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 | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3 | # From configure.in Revision: 1.249 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5 | # Guess values for system-dependent variables and create Makefiles. |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6 | # Generated automatically using autoconf version 2.13 |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7 | # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8 | # |
| 9 | # This configure script is free software; the Free Software Foundation |
| 10 | # gives unlimited permission to copy, distribute and modify it. |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 11 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 12 | # Defaults: |
| 13 | ac_help= |
| 14 | ac_default_prefix=/usr/local |
| 15 | # Any additions from configure.in: |
| 16 | ac_help="$ac_help |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 17 | --enable-framework[=INSTALLDIR] Build (MacOSX|Darwin) framework" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 18 | ac_help="$ac_help |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 19 | --without-gcc never use gcc" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 20 | ac_help="$ac_help |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 21 | --with-cxx=<compiler> enable C++ support" |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 22 | ac_help="$ac_help |
Neil Schemenauer | dfb38e4 | 2001-01-27 06:57:08 +0000 | [diff] [blame] | 23 | --with-suffix=.exe set executable suffix" |
| 24 | ac_help="$ac_help |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 25 | --with-pydebug build with Py_DEBUG defined" |
| 26 | ac_help="$ac_help |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 27 | --enable-toolbox-glue disable/enable MacOSX glue code for extensions" |
| 28 | ac_help="$ac_help |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 29 | --with-libs='lib1 ...' link against additional libs" |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 30 | ac_help="$ac_help |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 31 | --with-signal-module disable/enable signal module" |
| 32 | ac_help="$ac_help |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 33 | --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries" |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 34 | ac_help="$ac_help |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 35 | --with(out)-threads[=DIRECTORY] disable/enable thread support" |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 36 | ac_help="$ac_help |
Barry Warsaw | a0f3c5c | 2000-06-30 16:39:35 +0000 | [diff] [blame] | 37 | --with(out)-thread[=DIRECTORY] deprecated; use --with(out)-threads" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 38 | ac_help="$ac_help |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 39 | --with-pth use GNU pth threading libraries" |
| 40 | ac_help="$ac_help |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 41 | --enable-ipv6 Enable ipv6 (with ipv4) support |
| 42 | --disable-ipv6 Disable ipv6 support" |
| 43 | ac_help="$ac_help |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 44 | --with(out)-cycle-gc disable/enable garbage collection" |
| 45 | ac_help="$ac_help |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 46 | --with(out)-pymalloc disable/enable specialized mallocs" |
| 47 | ac_help="$ac_help |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 48 | --with-wctype-functions use wctype.h functions" |
| 49 | ac_help="$ac_help |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 50 | --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 51 | ac_help="$ac_help |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 52 | --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 53 | ac_help="$ac_help |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 54 | --with-fpectl enable SIGFPE catching" |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 55 | ac_help="$ac_help |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 56 | --with-libm=STRING math library" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 57 | ac_help="$ac_help |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 58 | --with-libc=STRING C library" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 59 | ac_help="$ac_help |
| 60 | --enable-unicode[=ucs2,ucs4] Enable Unicode strings (default is yes)" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 61 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 62 | # Initialize some variables set by options. |
| 63 | # The variables have the same names as the options, with |
| 64 | # dashes changed to underlines. |
| 65 | build=NONE |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 66 | cache_file=./config.cache |
| 67 | exec_prefix=NONE |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 68 | host=NONE |
| 69 | no_create= |
| 70 | nonopt=NONE |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 71 | no_recursion= |
| 72 | prefix=NONE |
| 73 | program_prefix=NONE |
| 74 | program_suffix=NONE |
| 75 | program_transform_name=s,x,x, |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 76 | silent= |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 77 | site= |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 78 | srcdir= |
| 79 | target=NONE |
| 80 | verbose= |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 81 | x_includes=NONE |
| 82 | x_libraries=NONE |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 83 | bindir='${exec_prefix}/bin' |
| 84 | sbindir='${exec_prefix}/sbin' |
| 85 | libexecdir='${exec_prefix}/libexec' |
| 86 | datadir='${prefix}/share' |
| 87 | sysconfdir='${prefix}/etc' |
| 88 | sharedstatedir='${prefix}/com' |
| 89 | localstatedir='${prefix}/var' |
| 90 | libdir='${exec_prefix}/lib' |
| 91 | includedir='${prefix}/include' |
| 92 | oldincludedir='/usr/include' |
| 93 | infodir='${prefix}/info' |
| 94 | mandir='${prefix}/man' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 95 | |
| 96 | # Initialize some other variables. |
| 97 | subdirs= |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 98 | MFLAGS= MAKEFLAGS= |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 99 | SHELL=${CONFIG_SHELL-/bin/sh} |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 100 | # Maximum number of lines to put in a shell here document. |
| 101 | ac_max_here_lines=12 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 102 | |
| 103 | ac_prev= |
| 104 | for ac_option |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 105 | do |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 106 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 107 | # If the previous option needs an argument, assign it. |
| 108 | if test -n "$ac_prev"; then |
| 109 | eval "$ac_prev=\$ac_option" |
| 110 | ac_prev= |
| 111 | continue |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 112 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 113 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 114 | case "$ac_option" in |
| 115 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; |
| 116 | *) ac_optarg= ;; |
| 117 | esac |
| 118 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 119 | # Accept the important Cygnus configure options, so we can diagnose typos. |
| 120 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 121 | case "$ac_option" in |
| 122 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 123 | -bindir | --bindir | --bindi | --bind | --bin | --bi) |
| 124 | ac_prev=bindir ;; |
| 125 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) |
| 126 | bindir="$ac_optarg" ;; |
| 127 | |
| 128 | -build | --build | --buil | --bui | --bu) |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 129 | ac_prev=build ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 130 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 131 | build="$ac_optarg" ;; |
| 132 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 133 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
| 134 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) |
| 135 | ac_prev=cache_file ;; |
| 136 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ |
| 137 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) |
| 138 | cache_file="$ac_optarg" ;; |
| 139 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 140 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) |
| 141 | ac_prev=datadir ;; |
| 142 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ |
| 143 | | --da=*) |
| 144 | datadir="$ac_optarg" ;; |
| 145 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 146 | -disable-* | --disable-*) |
| 147 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 148 | # Reject names that are not valid shell variable names. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 149 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 150 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 151 | fi |
| 152 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` |
| 153 | eval "enable_${ac_feature}=no" ;; |
| 154 | |
| 155 | -enable-* | --enable-*) |
| 156 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 157 | # Reject names that are not valid shell variable names. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 158 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 159 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 160 | fi |
| 161 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` |
| 162 | case "$ac_option" in |
| 163 | *=*) ;; |
| 164 | *) ac_optarg=yes ;; |
| 165 | esac |
| 166 | eval "enable_${ac_feature}='$ac_optarg'" ;; |
| 167 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 168 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ |
| 169 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ |
| 170 | | --exec | --exe | --ex) |
| 171 | ac_prev=exec_prefix ;; |
| 172 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ |
| 173 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ |
| 174 | | --exec=* | --exe=* | --ex=*) |
| 175 | exec_prefix="$ac_optarg" ;; |
| 176 | |
| 177 | -gas | --gas | --ga | --g) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 178 | # Obsolete; use --with-gas. |
| 179 | with_gas=yes ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 180 | |
| 181 | -help | --help | --hel | --he) |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 182 | # Omit some internal or obsolete options to make the list less imposing. |
| 183 | # This message is too long to be a string in the A/UX 3.1 sh. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 184 | cat << EOF |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 185 | Usage: configure [options] [host] |
| 186 | Options: [defaults in brackets after descriptions] |
| 187 | Configuration: |
| 188 | --cache-file=FILE cache test results in FILE |
| 189 | --help print this message |
| 190 | --no-create do not create output files |
| 191 | --quiet, --silent do not print \`checking...' messages |
| 192 | --version print the version of autoconf that created configure |
| 193 | Directory and file names: |
| 194 | --prefix=PREFIX install architecture-independent files in PREFIX |
| 195 | [$ac_default_prefix] |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 196 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 197 | [same as prefix] |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 198 | --bindir=DIR user executables in DIR [EPREFIX/bin] |
| 199 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] |
| 200 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] |
| 201 | --datadir=DIR read-only architecture-independent data in DIR |
| 202 | [PREFIX/share] |
| 203 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] |
| 204 | --sharedstatedir=DIR modifiable architecture-independent data in DIR |
| 205 | [PREFIX/com] |
| 206 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] |
| 207 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] |
| 208 | --includedir=DIR C header files in DIR [PREFIX/include] |
| 209 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] |
| 210 | --infodir=DIR info documentation in DIR [PREFIX/info] |
| 211 | --mandir=DIR man documentation in DIR [PREFIX/man] |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 212 | --srcdir=DIR find the sources in DIR [configure dir or ..] |
| 213 | --program-prefix=PREFIX prepend PREFIX to installed program names |
| 214 | --program-suffix=SUFFIX append SUFFIX to installed program names |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 215 | --program-transform-name=PROGRAM |
| 216 | run sed PROGRAM on installed program names |
| 217 | EOF |
| 218 | cat << EOF |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 219 | Host type: |
| 220 | --build=BUILD configure for building on BUILD [BUILD=HOST] |
| 221 | --host=HOST configure for HOST [guessed] |
| 222 | --target=TARGET configure for TARGET [TARGET=HOST] |
| 223 | Features and packages: |
| 224 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) |
| 225 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] |
| 226 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] |
| 227 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) |
| 228 | --x-includes=DIR X include files are in DIR |
| 229 | --x-libraries=DIR X library files are in DIR |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 230 | EOF |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 231 | if test -n "$ac_help"; then |
| 232 | echo "--enable and --with options recognized:$ac_help" |
| 233 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 234 | exit 0 ;; |
| 235 | |
| 236 | -host | --host | --hos | --ho) |
| 237 | ac_prev=host ;; |
| 238 | -host=* | --host=* | --hos=* | --ho=*) |
| 239 | host="$ac_optarg" ;; |
| 240 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 241 | -includedir | --includedir | --includedi | --included | --include \ |
| 242 | | --includ | --inclu | --incl | --inc) |
| 243 | ac_prev=includedir ;; |
| 244 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ |
| 245 | | --includ=* | --inclu=* | --incl=* | --inc=*) |
| 246 | includedir="$ac_optarg" ;; |
| 247 | |
| 248 | -infodir | --infodir | --infodi | --infod | --info | --inf) |
| 249 | ac_prev=infodir ;; |
| 250 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) |
| 251 | infodir="$ac_optarg" ;; |
| 252 | |
| 253 | -libdir | --libdir | --libdi | --libd) |
| 254 | ac_prev=libdir ;; |
| 255 | -libdir=* | --libdir=* | --libdi=* | --libd=*) |
| 256 | libdir="$ac_optarg" ;; |
| 257 | |
| 258 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ |
| 259 | | --libexe | --libex | --libe) |
| 260 | ac_prev=libexecdir ;; |
| 261 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ |
| 262 | | --libexe=* | --libex=* | --libe=*) |
| 263 | libexecdir="$ac_optarg" ;; |
| 264 | |
| 265 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
| 266 | | --localstate | --localstat | --localsta | --localst \ |
| 267 | | --locals | --local | --loca | --loc | --lo) |
| 268 | ac_prev=localstatedir ;; |
| 269 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ |
| 270 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ |
| 271 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) |
| 272 | localstatedir="$ac_optarg" ;; |
| 273 | |
| 274 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) |
| 275 | ac_prev=mandir ;; |
| 276 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) |
| 277 | mandir="$ac_optarg" ;; |
| 278 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 279 | -nfp | --nfp | --nf) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 280 | # Obsolete; use --without-fp. |
| 281 | with_fp=no ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 282 | |
| 283 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ |
| 284 | | --no-cr | --no-c) |
| 285 | no_create=yes ;; |
| 286 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 287 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ |
| 288 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) |
| 289 | no_recursion=yes ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 290 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 291 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ |
| 292 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ |
| 293 | | --oldin | --oldi | --old | --ol | --o) |
| 294 | ac_prev=oldincludedir ;; |
| 295 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ |
| 296 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ |
| 297 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) |
| 298 | oldincludedir="$ac_optarg" ;; |
| 299 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 300 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
| 301 | ac_prev=prefix ;; |
| 302 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) |
| 303 | prefix="$ac_optarg" ;; |
| 304 | |
| 305 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ |
| 306 | | --program-pre | --program-pr | --program-p) |
| 307 | ac_prev=program_prefix ;; |
| 308 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ |
| 309 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) |
| 310 | program_prefix="$ac_optarg" ;; |
| 311 | |
| 312 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ |
| 313 | | --program-suf | --program-su | --program-s) |
| 314 | ac_prev=program_suffix ;; |
| 315 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ |
| 316 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) |
| 317 | program_suffix="$ac_optarg" ;; |
| 318 | |
| 319 | -program-transform-name | --program-transform-name \ |
| 320 | | --program-transform-nam | --program-transform-na \ |
| 321 | | --program-transform-n | --program-transform- \ |
| 322 | | --program-transform | --program-transfor \ |
| 323 | | --program-transfo | --program-transf \ |
| 324 | | --program-trans | --program-tran \ |
| 325 | | --progr-tra | --program-tr | --program-t) |
| 326 | ac_prev=program_transform_name ;; |
| 327 | -program-transform-name=* | --program-transform-name=* \ |
| 328 | | --program-transform-nam=* | --program-transform-na=* \ |
| 329 | | --program-transform-n=* | --program-transform-=* \ |
| 330 | | --program-transform=* | --program-transfor=* \ |
| 331 | | --program-transfo=* | --program-transf=* \ |
| 332 | | --program-trans=* | --program-tran=* \ |
| 333 | | --progr-tra=* | --program-tr=* | --program-t=*) |
| 334 | program_transform_name="$ac_optarg" ;; |
| 335 | |
| 336 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
| 337 | | -silent | --silent | --silen | --sile | --sil) |
| 338 | silent=yes ;; |
| 339 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 340 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) |
| 341 | ac_prev=sbindir ;; |
| 342 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ |
| 343 | | --sbi=* | --sb=*) |
| 344 | sbindir="$ac_optarg" ;; |
| 345 | |
| 346 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ |
| 347 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ |
| 348 | | --sharedst | --shareds | --shared | --share | --shar \ |
| 349 | | --sha | --sh) |
| 350 | ac_prev=sharedstatedir ;; |
| 351 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ |
| 352 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ |
| 353 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ |
| 354 | | --sha=* | --sh=*) |
| 355 | sharedstatedir="$ac_optarg" ;; |
| 356 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 357 | -site | --site | --sit) |
| 358 | ac_prev=site ;; |
| 359 | -site=* | --site=* | --sit=*) |
| 360 | site="$ac_optarg" ;; |
| 361 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 362 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
| 363 | ac_prev=srcdir ;; |
| 364 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) |
| 365 | srcdir="$ac_optarg" ;; |
| 366 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 367 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ |
| 368 | | --syscon | --sysco | --sysc | --sys | --sy) |
| 369 | ac_prev=sysconfdir ;; |
| 370 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ |
| 371 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) |
| 372 | sysconfdir="$ac_optarg" ;; |
| 373 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 374 | -target | --target | --targe | --targ | --tar | --ta | --t) |
| 375 | ac_prev=target ;; |
| 376 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
| 377 | target="$ac_optarg" ;; |
| 378 | |
| 379 | -v | -verbose | --verbose | --verbos | --verbo | --verb) |
| 380 | verbose=yes ;; |
| 381 | |
| 382 | -version | --version | --versio | --versi | --vers) |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 383 | echo "configure generated by autoconf version 2.13" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 384 | exit 0 ;; |
| 385 | |
| 386 | -with-* | --with-*) |
| 387 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 388 | # Reject names that are not valid shell variable names. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 389 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 390 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 391 | fi |
| 392 | ac_package=`echo $ac_package| sed 's/-/_/g'` |
| 393 | case "$ac_option" in |
| 394 | *=*) ;; |
| 395 | *) ac_optarg=yes ;; |
| 396 | esac |
| 397 | eval "with_${ac_package}='$ac_optarg'" ;; |
| 398 | |
| 399 | -without-* | --without-*) |
| 400 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 401 | # Reject names that are not valid shell variable names. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 402 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 403 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 404 | fi |
| 405 | ac_package=`echo $ac_package| sed 's/-/_/g'` |
| 406 | eval "with_${ac_package}=no" ;; |
| 407 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 408 | --x) |
| 409 | # Obsolete; use --with-x. |
| 410 | with_x=yes ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 411 | |
| 412 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ |
| 413 | | --x-incl | --x-inc | --x-in | --x-i) |
| 414 | ac_prev=x_includes ;; |
| 415 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ |
| 416 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) |
| 417 | x_includes="$ac_optarg" ;; |
| 418 | |
| 419 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ |
| 420 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) |
| 421 | ac_prev=x_libraries ;; |
| 422 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ |
| 423 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) |
| 424 | x_libraries="$ac_optarg" ;; |
| 425 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 426 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 427 | ;; |
| 428 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 429 | *) |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 430 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 431 | echo "configure: warning: $ac_option: invalid host type" 1>&2 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 432 | fi |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 433 | if test "x$nonopt" != xNONE; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 434 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 435 | fi |
| 436 | nonopt="$ac_option" |
| 437 | ;; |
| 438 | |
| 439 | esac |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 440 | done |
| 441 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 442 | if test -n "$ac_prev"; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 443 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 444 | fi |
| 445 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 446 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 447 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 448 | # File descriptor usage: |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 449 | # 0 standard input |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 450 | # 1 file creation |
| 451 | # 2 errors and warnings |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 452 | # 3 some systems may open it to /dev/tty |
| 453 | # 4 used on the Kubota Titan |
| 454 | # 6 checking for... messages and results |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 455 | # 5 compiler messages saved in config.log |
| 456 | if test "$silent" = yes; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 457 | exec 6>/dev/null |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 458 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 459 | exec 6>&1 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 460 | fi |
| 461 | exec 5>./config.log |
| 462 | |
| 463 | echo "\ |
| 464 | This file contains any messages produced by compilers while |
| 465 | running configure, to aid debugging if configure makes a mistake. |
| 466 | " 1>&5 |
| 467 | |
| 468 | # Strip out --no-create and --no-recursion so they do not pile up. |
| 469 | # Also quote any args containing shell metacharacters. |
| 470 | ac_configure_args= |
| 471 | for ac_arg |
| 472 | do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 473 | case "$ac_arg" in |
| 474 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ |
| 475 | | --no-cr | --no-c) ;; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 476 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ |
| 477 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; |
| 478 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) |
| 479 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; |
| 480 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 481 | esac |
| 482 | done |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 483 | |
| 484 | # NLS nuisances. |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 485 | # Only set these to C if already set. These must not be set unconditionally |
| 486 | # because not all systems understand e.g. LANG=C (notably SCO). |
| 487 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! |
| 488 | # Non-C LC_CTYPE values break the ctype check. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 489 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 490 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi |
| 491 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi |
| 492 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 493 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 494 | # confdefs.h avoids OS command line length limits that DEFS can exceed. |
| 495 | rm -rf conftest* confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 496 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. |
| 497 | echo > confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 498 | |
| 499 | # A filename unique to this package, relative to the directory that |
| 500 | # configure is in, which we can look for to find out if srcdir is correct. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 501 | ac_unique_file=Include/object.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 502 | |
| 503 | # Find the source files, if location was not specified. |
| 504 | if test -z "$srcdir"; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 505 | ac_srcdir_defaulted=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 506 | # Try the directory containing this script, then its parent. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 507 | ac_prog=$0 |
| 508 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` |
| 509 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. |
| 510 | srcdir=$ac_confdir |
| 511 | if test ! -r $srcdir/$ac_unique_file; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 512 | srcdir=.. |
| 513 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 514 | else |
| 515 | ac_srcdir_defaulted=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 516 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 517 | if test ! -r $srcdir/$ac_unique_file; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 518 | if test "$ac_srcdir_defaulted" = yes; then |
| 519 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 520 | else |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 521 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 522 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 523 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 524 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` |
| 525 | |
| 526 | # Prefer explicitly selected file to automatically selected ones. |
| 527 | if test -z "$CONFIG_SITE"; then |
| 528 | if test "x$prefix" != xNONE; then |
| 529 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" |
| 530 | else |
| 531 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" |
| 532 | fi |
| 533 | fi |
| 534 | for ac_site_file in $CONFIG_SITE; do |
| 535 | if test -r "$ac_site_file"; then |
| 536 | echo "loading site script $ac_site_file" |
| 537 | . "$ac_site_file" |
| 538 | fi |
| 539 | done |
| 540 | |
| 541 | if test -r "$cache_file"; then |
| 542 | echo "loading cache $cache_file" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 543 | . $cache_file |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 544 | else |
| 545 | echo "creating cache $cache_file" |
| 546 | > $cache_file |
| 547 | fi |
| 548 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 549 | ac_ext=c |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 550 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 551 | ac_cpp='$CPP $CPPFLAGS' |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 552 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 553 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 554 | cross_compiling=$ac_cv_prog_cc_cross |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 555 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 556 | ac_exeext= |
| 557 | ac_objext=o |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 558 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then |
| 559 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. |
| 560 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then |
| 561 | ac_n= ac_c=' |
| 562 | ' ac_t=' ' |
| 563 | else |
| 564 | ac_n=-n ac_c= ac_t= |
| 565 | fi |
| 566 | else |
| 567 | ac_n= ac_c='\c' ac_t= |
| 568 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 569 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 570 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 571 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 572 | |
Guido van Rossum | 1fd74a7 | 1997-07-19 19:36:02 +0000 | [diff] [blame] | 573 | # Set VERSION so we only need to edit in one place (i.e., here) |
| 574 | |
Guido van Rossum | 6db412b | 2001-04-18 04:37:57 +0000 | [diff] [blame] | 575 | VERSION=2.2 |
Guido van Rossum | 1fd74a7 | 1997-07-19 19:36:02 +0000 | [diff] [blame] | 576 | |
Neil Schemenauer | 4edbc2a | 2001-03-22 00:34:03 +0000 | [diff] [blame] | 577 | # Arguments passed to configure. |
| 578 | |
| 579 | CONFIG_ARGS="$ac_configure_args" |
| 580 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 581 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 582 | # Check whether --enable-framework or --disable-framework was given. |
| 583 | if test "${enable_framework+set}" = set; then |
| 584 | enableval="$enable_framework" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 585 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 586 | PYTHONFRAMEWORK=Python |
| 587 | PYTHONFRAMEWORKDIR=Python.framework |
| 588 | case $enableval in |
| 589 | yes) |
| 590 | enableval=/Library/Frameworks |
| 591 | PYTHONFRAMEWORKPREFIX=$enableval |
| 592 | ;; |
| 593 | *) |
| 594 | PYTHONFRAMEWORKPREFIX=$enableval |
| 595 | esac |
| 596 | PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR |
| 597 | prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 598 | |
| 599 | else |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 600 | |
| 601 | PYTHONFRAMEWORK= |
| 602 | PYTHONFRAMEWORKDIR= |
| 603 | PYTHONFRAMEWORKPREFIX= |
| 604 | PYTHONFRAMEWORKINSTALLDIR= |
| 605 | enable_framework= |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 606 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 607 | fi |
| 608 | |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 609 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 610 | |
| 611 | |
| 612 | |
| 613 | |
| 614 | ##AC_ARG_WITH(dyld, |
| 615 | ##[ --with-dyld Use (OpenStep|Rhapsody) dynamic linker],,) |
| 616 | ## |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 617 | # Set name for machine-dependent library files |
| 618 | |
| 619 | echo $ac_n "checking MACHDEP""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 620 | echo "configure:621: checking MACHDEP" >&5 |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 621 | if test -z "$MACHDEP" |
| 622 | then |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 623 | ac_sys_system=`uname -s` |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 624 | if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 625 | ac_sys_release=`uname -v` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 626 | else |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 627 | ac_sys_release=`uname -r` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 628 | fi |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 629 | ac_md_system=`echo $ac_sys_system | |
| 630 | tr -d '/ ' | tr '[A-Z]' '[a-z]'` |
| 631 | ac_md_release=`echo $ac_sys_release | |
| 632 | tr -d '/ ' | sed 's/\..*//'` |
Guido van Rossum | b97ef17 | 1997-09-28 05:44:03 +0000 | [diff] [blame] | 633 | MACHDEP="$ac_md_system$ac_md_release" |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 634 | |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 635 | case $MACHDEP in |
Andrew M. Kuchling | 5a3e4cb | 2001-07-20 19:29:04 +0000 | [diff] [blame] | 636 | cygwin*) MACHDEP="cygwin";; |
Guido van Rossum | b97ef17 | 1997-09-28 05:44:03 +0000 | [diff] [blame] | 637 | '') MACHDEP="unknown";; |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 638 | esac |
| 639 | fi |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 640 | |
| 641 | # |
| 642 | # SGI compilers allow the specification of the both the ABI and the |
| 643 | # ISA on the command line. Depending on the values of these switches, |
| 644 | # different and often incompatable code will be generated. |
| 645 | # |
| 646 | # The SGI_ABI variable can be used to modify the CC and LDFLAGS and |
| 647 | # thus supply support for various ABI/ISA combinations. The MACHDEP |
| 648 | # variable is also adjusted. |
| 649 | # |
| 650 | |
| 651 | if test ! -z "$SGI_ABI" |
| 652 | then |
| 653 | CC="cc $SGI_ABI" |
| 654 | LDFLAGS="$SGI_ABI $LDFLAGS" |
| 655 | MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'` |
| 656 | fi |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 657 | echo "$ac_t""$MACHDEP" 1>&6 |
| 658 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 659 | # checks for alternative programs |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 660 | echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 661 | echo "configure:662: checking for --without-gcc" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 662 | # Check whether --with-gcc or --without-gcc was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 663 | if test "${with_gcc+set}" = set; then |
| 664 | withval="$with_gcc" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 665 | |
| 666 | case $withval in |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 667 | no) CC=cc |
| 668 | without_gcc=yes;; |
| 669 | yes) CC=gcc |
| 670 | without_gcc=no;; |
| 671 | *) CC=$withval |
| 672 | without_gcc=$withval;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 673 | esac |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 674 | else |
Guido van Rossum | e77438c | 1995-09-13 18:59:59 +0000 | [diff] [blame] | 675 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 676 | case $ac_sys_system in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 677 | AIX*) CC=cc_r |
| 678 | without_gcc=;; |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 679 | BeOS*) |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 680 | case $BE_HOST_CPU in |
| 681 | ppc) |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 682 | CC=mwcc |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 683 | without_gcc=yes |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 684 | OPT="-O -D'DL_EXPORT(RTYPE)=__declspec(dllexport) RTYPE' -D'DL_IMPORT(RTYPE)=__declspec(dllexport) RTYPE' -export pragma" |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 685 | CCSHARED="-UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'" |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 686 | LDFLAGS="$LDFLAGS -nodup" |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 687 | ;; |
| 688 | x86) |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 689 | CC=gcc |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 690 | without_gcc=no |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 691 | OPT=-O |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 692 | ;; |
| 693 | *) |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 694 | { echo "configure: error: Unknown BeOS platform \"$BE_HOST_CPU\"" 1>&2; exit 1; } |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 695 | ;; |
| 696 | esac |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 697 | AR="\$(srcdir)/Modules/ar_beos" |
| 698 | RANLIB=: |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 699 | ;; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 700 | Monterey*) |
| 701 | RANLIB=: |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 702 | without_gcc=;; |
| 703 | *) without_gcc=no;; |
Guido van Rossum | e77438c | 1995-09-13 18:59:59 +0000 | [diff] [blame] | 704 | esac |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 705 | fi |
| 706 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 707 | echo "$ac_t""$without_gcc" 1>&6 |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 708 | |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 709 | |
| 710 | |
Fred Drake | a1a84e7 | 2001-03-06 05:52:16 +0000 | [diff] [blame] | 711 | MAINOBJ=python.o |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 712 | echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 713 | echo "configure:714: checking for --with-cxx=<compiler>" >&5 |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 714 | # Check whether --with-cxx or --without-cxx was given. |
| 715 | if test "${with_cxx+set}" = set; then |
| 716 | withval="$with_cxx" |
| 717 | |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 718 | check_cxx=no |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 719 | case $withval in |
| 720 | no) CXX= |
| 721 | with_cxx=no;; |
| 722 | *) CXX=$withval |
Fred Drake | a1a84e7 | 2001-03-06 05:52:16 +0000 | [diff] [blame] | 723 | MAINOBJ=ccpython.o |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 724 | with_cxx=$withval;; |
| 725 | esac |
| 726 | else |
| 727 | |
| 728 | with_cxx=no |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 729 | check_cxx=yes |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 730 | |
| 731 | fi |
| 732 | |
| 733 | echo "$ac_t""$with_cxx" 1>&6 |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 734 | |
| 735 | |
| 736 | if test "$check_cxx" = "yes" |
| 737 | then |
| 738 | for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl |
| 739 | do |
| 740 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
| 741 | set dummy $ac_prog; ac_word=$2 |
| 742 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 743 | echo "configure:744: checking for $ac_word" >&5 |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 744 | if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then |
| 745 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 746 | else |
| 747 | if test -n "$CXX"; then |
| 748 | ac_cv_prog_CXX="$CXX" # Let the user override the test. |
| 749 | else |
| 750 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 751 | ac_dummy="$PATH" |
| 752 | for ac_dir in $ac_dummy; do |
| 753 | test -z "$ac_dir" && ac_dir=. |
| 754 | if test -f $ac_dir/$ac_word; then |
| 755 | ac_cv_prog_CXX="$ac_prog" |
| 756 | break |
| 757 | fi |
| 758 | done |
| 759 | IFS="$ac_save_ifs" |
| 760 | fi |
| 761 | fi |
| 762 | CXX="$ac_cv_prog_CXX" |
| 763 | if test -n "$CXX"; then |
| 764 | echo "$ac_t""$CXX" 1>&6 |
| 765 | else |
| 766 | echo "$ac_t""no" 1>&6 |
| 767 | fi |
| 768 | |
| 769 | test -n "$CXX" && break |
| 770 | done |
| 771 | test -n "$CXX" || CXX="notfound" |
| 772 | |
| 773 | if test "$CXX" = "notfound" |
| 774 | then |
| 775 | CXX= |
| 776 | else |
| 777 | echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 778 | echo "configure:779: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 779 | |
| 780 | ac_ext=C |
| 781 | # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 782 | ac_cpp='$CXXCPP $CPPFLAGS' |
| 783 | ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 784 | ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 785 | cross_compiling=$ac_cv_prog_cxx_cross |
| 786 | |
| 787 | cat > conftest.$ac_ext << EOF |
| 788 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 789 | #line 790 "configure" |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 790 | #include "confdefs.h" |
| 791 | |
| 792 | int main(){return(0);} |
| 793 | EOF |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 794 | if { (eval echo configure:795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 795 | ac_cv_prog_cxx_works=yes |
| 796 | # If we can't run a trivial program, we are probably using a cross compiler. |
| 797 | if (./conftest; exit) 2>/dev/null; then |
| 798 | ac_cv_prog_cxx_cross=no |
| 799 | else |
| 800 | ac_cv_prog_cxx_cross=yes |
| 801 | fi |
| 802 | else |
| 803 | echo "configure: failed program was:" >&5 |
| 804 | cat conftest.$ac_ext >&5 |
| 805 | ac_cv_prog_cxx_works=no |
| 806 | fi |
| 807 | rm -fr conftest* |
| 808 | ac_ext=c |
| 809 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 810 | ac_cpp='$CPP $CPPFLAGS' |
| 811 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 812 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 813 | cross_compiling=$ac_cv_prog_cc_cross |
| 814 | |
| 815 | echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6 |
| 816 | if test $ac_cv_prog_cxx_works = no; then |
| 817 | { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } |
| 818 | fi |
| 819 | echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 820 | echo "configure:821: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 821 | echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 |
| 822 | cross_compiling=$ac_cv_prog_cxx_cross |
| 823 | |
| 824 | fi |
| 825 | fi |
| 826 | |
Guido van Rossum | 8b131c5 | 1995-03-09 14:10:13 +0000 | [diff] [blame] | 827 | # If the user switches compilers, we can't believe the cache |
| 828 | if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC" |
| 829 | then |
| 830 | { echo "configure: error: cached CC is different -- throw away $cache_file |
| 831 | (it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; } |
| 832 | fi |
| 833 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 834 | # Extract the first word of "gcc", so it can be a program name with args. |
| 835 | set dummy gcc; ac_word=$2 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 836 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 837 | echo "configure:838: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 838 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 839 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 840 | else |
| 841 | if test -n "$CC"; then |
| 842 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 843 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 844 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 845 | ac_dummy="$PATH" |
| 846 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 847 | test -z "$ac_dir" && ac_dir=. |
| 848 | if test -f $ac_dir/$ac_word; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 849 | ac_cv_prog_CC="gcc" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 850 | break |
| 851 | fi |
| 852 | done |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 853 | IFS="$ac_save_ifs" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 854 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 855 | fi |
| 856 | CC="$ac_cv_prog_CC" |
| 857 | if test -n "$CC"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 858 | echo "$ac_t""$CC" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 859 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 860 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 861 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 862 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 863 | if test -z "$CC"; then |
| 864 | # Extract the first word of "cc", so it can be a program name with args. |
| 865 | set dummy cc; ac_word=$2 |
| 866 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 867 | echo "configure:868: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 868 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 869 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 870 | else |
| 871 | if test -n "$CC"; then |
| 872 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 873 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 874 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 875 | ac_prog_rejected=no |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 876 | ac_dummy="$PATH" |
| 877 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 878 | test -z "$ac_dir" && ac_dir=. |
| 879 | if test -f $ac_dir/$ac_word; then |
| 880 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then |
| 881 | ac_prog_rejected=yes |
| 882 | continue |
| 883 | fi |
| 884 | ac_cv_prog_CC="cc" |
| 885 | break |
| 886 | fi |
| 887 | done |
| 888 | IFS="$ac_save_ifs" |
| 889 | if test $ac_prog_rejected = yes; then |
| 890 | # We found a bogon in the path, so make sure we never use it. |
| 891 | set dummy $ac_cv_prog_CC |
| 892 | shift |
| 893 | if test $# -gt 0; then |
| 894 | # We chose a different compiler from the bogus one. |
| 895 | # However, it has the same basename, so the bogon will be chosen |
| 896 | # first if we set CC to just the basename; use the full file name. |
| 897 | shift |
| 898 | set dummy "$ac_dir/$ac_word" "$@" |
| 899 | shift |
| 900 | ac_cv_prog_CC="$@" |
| 901 | fi |
| 902 | fi |
| 903 | fi |
| 904 | fi |
| 905 | CC="$ac_cv_prog_CC" |
| 906 | if test -n "$CC"; then |
| 907 | echo "$ac_t""$CC" 1>&6 |
| 908 | else |
| 909 | echo "$ac_t""no" 1>&6 |
| 910 | fi |
| 911 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 912 | if test -z "$CC"; then |
| 913 | case "`uname -s`" in |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 914 | *win32* | *WIN32*) |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 915 | # Extract the first word of "cl", so it can be a program name with args. |
| 916 | set dummy cl; ac_word=$2 |
| 917 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 918 | echo "configure:919: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 919 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 920 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 921 | else |
| 922 | if test -n "$CC"; then |
| 923 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 924 | else |
| 925 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 926 | ac_dummy="$PATH" |
| 927 | for ac_dir in $ac_dummy; do |
| 928 | test -z "$ac_dir" && ac_dir=. |
| 929 | if test -f $ac_dir/$ac_word; then |
| 930 | ac_cv_prog_CC="cl" |
| 931 | break |
| 932 | fi |
| 933 | done |
| 934 | IFS="$ac_save_ifs" |
| 935 | fi |
| 936 | fi |
| 937 | CC="$ac_cv_prog_CC" |
| 938 | if test -n "$CC"; then |
| 939 | echo "$ac_t""$CC" 1>&6 |
| 940 | else |
| 941 | echo "$ac_t""no" 1>&6 |
| 942 | fi |
| 943 | ;; |
| 944 | esac |
| 945 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 946 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } |
| 947 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 948 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 949 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 950 | echo "configure:951: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 951 | |
| 952 | ac_ext=c |
| 953 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 954 | ac_cpp='$CPP $CPPFLAGS' |
| 955 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 956 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 957 | cross_compiling=$ac_cv_prog_cc_cross |
| 958 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 959 | cat > conftest.$ac_ext << EOF |
| 960 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 961 | #line 962 "configure" |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 962 | #include "confdefs.h" |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 963 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 964 | main(){return(0);} |
| 965 | EOF |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 966 | if { (eval echo configure:967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 967 | ac_cv_prog_cc_works=yes |
| 968 | # If we can't run a trivial program, we are probably using a cross compiler. |
| 969 | if (./conftest; exit) 2>/dev/null; then |
| 970 | ac_cv_prog_cc_cross=no |
| 971 | else |
| 972 | ac_cv_prog_cc_cross=yes |
| 973 | fi |
| 974 | else |
| 975 | echo "configure: failed program was:" >&5 |
| 976 | cat conftest.$ac_ext >&5 |
| 977 | ac_cv_prog_cc_works=no |
| 978 | fi |
| 979 | rm -fr conftest* |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 980 | ac_ext=c |
| 981 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 982 | ac_cpp='$CPP $CPPFLAGS' |
| 983 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 984 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 985 | cross_compiling=$ac_cv_prog_cc_cross |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 986 | |
| 987 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 |
| 988 | if test $ac_cv_prog_cc_works = no; then |
| 989 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } |
| 990 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 991 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 992 | echo "configure:993: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 993 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
| 994 | cross_compiling=$ac_cv_prog_cc_cross |
| 995 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 996 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 997 | echo "configure:998: checking whether we are using GNU C" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 998 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 999 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1000 | else |
| 1001 | cat > conftest.c <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1002 | #ifdef __GNUC__ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1003 | yes; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1004 | #endif |
| 1005 | EOF |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1006 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1007 | ac_cv_prog_gcc=yes |
| 1008 | else |
| 1009 | ac_cv_prog_gcc=no |
| 1010 | fi |
| 1011 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1012 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1013 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1014 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1015 | if test $ac_cv_prog_gcc = yes; then |
| 1016 | GCC=yes |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1017 | else |
| 1018 | GCC= |
| 1019 | fi |
| 1020 | |
| 1021 | ac_test_CFLAGS="${CFLAGS+set}" |
| 1022 | ac_save_CFLAGS="$CFLAGS" |
| 1023 | CFLAGS= |
| 1024 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1025 | echo "configure:1026: checking whether ${CC-cc} accepts -g" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1026 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1027 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1028 | else |
| 1029 | echo 'void f(){}' > conftest.c |
| 1030 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1031 | ac_cv_prog_cc_g=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1032 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1033 | ac_cv_prog_cc_g=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1034 | fi |
| 1035 | rm -f conftest* |
| 1036 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1037 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1038 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1039 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1040 | if test "$ac_test_CFLAGS" = set; then |
| 1041 | CFLAGS="$ac_save_CFLAGS" |
| 1042 | elif test $ac_cv_prog_cc_g = yes; then |
| 1043 | if test "$GCC" = yes; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1044 | CFLAGS="-g -O2" |
| 1045 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1046 | CFLAGS="-g" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1047 | fi |
| 1048 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1049 | if test "$GCC" = yes; then |
| 1050 | CFLAGS="-O2" |
| 1051 | else |
| 1052 | CFLAGS= |
| 1053 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1054 | fi |
| 1055 | |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1056 | |
| 1057 | # checks for UNIX variants that set C preprocessor variables |
| 1058 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1059 | echo "configure:1060: checking how to run the C preprocessor" >&5 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1060 | # On Suns, sometimes $CPP names a directory. |
| 1061 | if test -n "$CPP" && test -d "$CPP"; then |
| 1062 | CPP= |
| 1063 | fi |
| 1064 | if test -z "$CPP"; then |
| 1065 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then |
| 1066 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1067 | else |
| 1068 | # This must be in double quotes, not single quotes, because CPP may get |
| 1069 | # substituted into the Makefile and "${CC-cc}" will confuse make. |
| 1070 | CPP="${CC-cc} -E" |
| 1071 | # On the NeXT, cc -E runs the code through the compiler's parser, |
| 1072 | # not just through cpp. |
| 1073 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1074 | #line 1075 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1075 | #include "confdefs.h" |
| 1076 | #include <assert.h> |
| 1077 | Syntax Error |
| 1078 | EOF |
| 1079 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1080 | { (eval echo configure:1081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1081 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1082 | if test -z "$ac_err"; then |
| 1083 | : |
| 1084 | else |
| 1085 | echo "$ac_err" >&5 |
| 1086 | echo "configure: failed program was:" >&5 |
| 1087 | cat conftest.$ac_ext >&5 |
| 1088 | rm -rf conftest* |
| 1089 | CPP="${CC-cc} -E -traditional-cpp" |
| 1090 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1091 | #line 1092 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1092 | #include "confdefs.h" |
| 1093 | #include <assert.h> |
| 1094 | Syntax Error |
| 1095 | EOF |
| 1096 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1097 | { (eval echo configure:1098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1098 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1099 | if test -z "$ac_err"; then |
| 1100 | : |
| 1101 | else |
| 1102 | echo "$ac_err" >&5 |
| 1103 | echo "configure: failed program was:" >&5 |
| 1104 | cat conftest.$ac_ext >&5 |
| 1105 | rm -rf conftest* |
| 1106 | CPP="${CC-cc} -nologo -E" |
| 1107 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1108 | #line 1109 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1109 | #include "confdefs.h" |
| 1110 | #include <assert.h> |
| 1111 | Syntax Error |
| 1112 | EOF |
| 1113 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1114 | { (eval echo configure:1115: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1115 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1116 | if test -z "$ac_err"; then |
| 1117 | : |
| 1118 | else |
| 1119 | echo "$ac_err" >&5 |
| 1120 | echo "configure: failed program was:" >&5 |
| 1121 | cat conftest.$ac_ext >&5 |
| 1122 | rm -rf conftest* |
| 1123 | CPP=/lib/cpp |
| 1124 | fi |
| 1125 | rm -f conftest* |
| 1126 | fi |
| 1127 | rm -f conftest* |
| 1128 | fi |
| 1129 | rm -f conftest* |
| 1130 | ac_cv_prog_CPP="$CPP" |
| 1131 | fi |
| 1132 | CPP="$ac_cv_prog_CPP" |
| 1133 | else |
| 1134 | ac_cv_prog_CPP="$CPP" |
| 1135 | fi |
| 1136 | echo "$ac_t""$CPP" 1>&6 |
| 1137 | |
| 1138 | echo $ac_n "checking for AIX""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1139 | echo "configure:1140: checking for AIX" >&5 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1140 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1141 | #line 1142 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1142 | #include "confdefs.h" |
| 1143 | #ifdef _AIX |
| 1144 | yes |
| 1145 | #endif |
| 1146 | |
| 1147 | EOF |
| 1148 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1149 | egrep "yes" >/dev/null 2>&1; then |
| 1150 | rm -rf conftest* |
| 1151 | echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF |
| 1152 | #define _ALL_SOURCE 1 |
| 1153 | EOF |
| 1154 | |
| 1155 | else |
| 1156 | rm -rf conftest* |
| 1157 | echo "$ac_t""no" 1>&6 |
| 1158 | fi |
| 1159 | rm -f conftest* |
| 1160 | |
| 1161 | |
| 1162 | ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'` |
| 1163 | echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1164 | echo "configure:1165: checking for minix/config.h" >&5 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1165 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 1166 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1167 | else |
| 1168 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1169 | #line 1170 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1170 | #include "confdefs.h" |
| 1171 | #include <minix/config.h> |
| 1172 | EOF |
| 1173 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1174 | { (eval echo configure:1175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1175 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1176 | if test -z "$ac_err"; then |
| 1177 | rm -rf conftest* |
| 1178 | eval "ac_cv_header_$ac_safe=yes" |
| 1179 | else |
| 1180 | echo "$ac_err" >&5 |
| 1181 | echo "configure: failed program was:" >&5 |
| 1182 | cat conftest.$ac_ext >&5 |
| 1183 | rm -rf conftest* |
| 1184 | eval "ac_cv_header_$ac_safe=no" |
| 1185 | fi |
| 1186 | rm -f conftest* |
| 1187 | fi |
| 1188 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 1189 | echo "$ac_t""yes" 1>&6 |
| 1190 | MINIX=yes |
| 1191 | else |
| 1192 | echo "$ac_t""no" 1>&6 |
| 1193 | MINIX= |
| 1194 | fi |
| 1195 | |
| 1196 | if test "$MINIX" = yes; then |
| 1197 | cat >> confdefs.h <<\EOF |
| 1198 | #define _POSIX_SOURCE 1 |
| 1199 | EOF |
| 1200 | |
| 1201 | cat >> confdefs.h <<\EOF |
| 1202 | #define _POSIX_1_SOURCE 2 |
| 1203 | EOF |
| 1204 | |
| 1205 | cat >> confdefs.h <<\EOF |
| 1206 | #define _MINIX 1 |
| 1207 | EOF |
| 1208 | |
| 1209 | fi |
| 1210 | |
| 1211 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1212 | echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1213 | echo "configure:1214: checking for Cygwin environment" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1214 | if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then |
| 1215 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1216 | else |
| 1217 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1218 | #line 1219 "configure" |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1219 | #include "confdefs.h" |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1220 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1221 | int main() { |
| 1222 | |
| 1223 | #ifndef __CYGWIN__ |
| 1224 | #define __CYGWIN__ __CYGWIN32__ |
| 1225 | #endif |
| 1226 | return __CYGWIN__; |
| 1227 | ; return 0; } |
| 1228 | EOF |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1229 | if { (eval echo configure:1230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1230 | rm -rf conftest* |
| 1231 | ac_cv_cygwin=yes |
| 1232 | else |
| 1233 | echo "configure: failed program was:" >&5 |
| 1234 | cat conftest.$ac_ext >&5 |
| 1235 | rm -rf conftest* |
| 1236 | ac_cv_cygwin=no |
| 1237 | fi |
| 1238 | rm -f conftest* |
| 1239 | rm -f conftest* |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1240 | fi |
| 1241 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1242 | echo "$ac_t""$ac_cv_cygwin" 1>&6 |
| 1243 | CYGWIN= |
| 1244 | test "$ac_cv_cygwin" = yes && CYGWIN=yes |
| 1245 | echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1246 | echo "configure:1247: checking for mingw32 environment" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1247 | if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then |
| 1248 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1249 | else |
| 1250 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1251 | #line 1252 "configure" |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1252 | #include "confdefs.h" |
| 1253 | |
| 1254 | int main() { |
| 1255 | return __MINGW32__; |
| 1256 | ; return 0; } |
| 1257 | EOF |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1258 | if { (eval echo configure:1259: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1259 | rm -rf conftest* |
| 1260 | ac_cv_mingw32=yes |
| 1261 | else |
| 1262 | echo "configure: failed program was:" >&5 |
| 1263 | cat conftest.$ac_ext >&5 |
| 1264 | rm -rf conftest* |
| 1265 | ac_cv_mingw32=no |
| 1266 | fi |
| 1267 | rm -f conftest* |
| 1268 | rm -f conftest* |
| 1269 | fi |
| 1270 | |
| 1271 | echo "$ac_t""$ac_cv_mingw32" 1>&6 |
| 1272 | MINGW32= |
| 1273 | test "$ac_cv_mingw32" = yes && MINGW32=yes |
| 1274 | |
| 1275 | |
| 1276 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1277 | echo "configure:1278: checking for executable suffix" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1278 | if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then |
| 1279 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1280 | else |
| 1281 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then |
| 1282 | ac_cv_exeext=.exe |
| 1283 | else |
| 1284 | rm -f conftest* |
| 1285 | echo 'int main () { return 0; }' > conftest.$ac_ext |
| 1286 | ac_cv_exeext= |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1287 | if { (eval echo configure:1288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1288 | for file in conftest.*; do |
| 1289 | case $file in |
| 1290 | *.c | *.o | *.obj) ;; |
| 1291 | *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; |
| 1292 | esac |
| 1293 | done |
| 1294 | else |
| 1295 | { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } |
| 1296 | fi |
| 1297 | rm -f conftest* |
| 1298 | test x"${ac_cv_exeext}" = x && ac_cv_exeext=no |
| 1299 | fi |
| 1300 | fi |
| 1301 | |
| 1302 | EXEEXT="" |
| 1303 | test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} |
| 1304 | echo "$ac_t""${ac_cv_exeext}" 1>&6 |
| 1305 | ac_exeext=$EXEEXT |
| 1306 | |
Neil Schemenauer | dfb38e4 | 2001-01-27 06:57:08 +0000 | [diff] [blame] | 1307 | echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1308 | echo "configure:1309: checking for --with-suffix" >&5 |
Neil Schemenauer | dfb38e4 | 2001-01-27 06:57:08 +0000 | [diff] [blame] | 1309 | # Check whether --with-suffix or --without-suffix was given. |
| 1310 | if test "${with_suffix+set}" = set; then |
| 1311 | withval="$with_suffix" |
| 1312 | |
| 1313 | case $withval in |
| 1314 | no) EXEEXT=;; |
| 1315 | yes) EXEEXT=.exe;; |
| 1316 | *) EXEEXT=$withval;; |
| 1317 | esac |
| 1318 | fi |
| 1319 | |
| 1320 | echo "$ac_t""$EXEEXT" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1321 | # Test whether we're running on a non-case-sensitive system, in which |
| 1322 | # case we give a warning if no ext is given |
| 1323 | if test -d "python" -a -z "$EXEEXT" |
| 1324 | then |
| 1325 | echo "configure: warning: This filesystem is not case-sensitive so you should probably use --with-suffix" 1>&2 |
| 1326 | fi |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1327 | |
Guido van Rossum | dd997f7 | 1998-10-07 19:58:26 +0000 | [diff] [blame] | 1328 | case $MACHDEP in |
| 1329 | bsdos*) |
| 1330 | case $CC in |
| 1331 | gcc) CC="$CC -D_HAVE_BSDI";; |
| 1332 | esac;; |
| 1333 | esac |
| 1334 | |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1335 | case $ac_sys_system in |
| 1336 | hp*|HP*) |
| 1337 | case $CC in |
Guido van Rossum | cd5ff9f | 2000-09-22 16:15:54 +0000 | [diff] [blame] | 1338 | cc|*/cc) CC="$CC -Ae";; |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1339 | esac;; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1340 | Monterey*) |
| 1341 | case $CC in |
| 1342 | cc) CC="$CC -Wl,-Bexport";; |
| 1343 | esac;; |
Martin v. Löwis | a30c100 | 2001-03-06 12:10:20 +0000 | [diff] [blame] | 1344 | SunOS*) |
| 1345 | # Some functions have a prototype only with that define, e.g. confstr |
| 1346 | cat >> confdefs.h <<\EOF |
| 1347 | #define __EXTENSIONS__ 1 |
| 1348 | EOF |
| 1349 | |
| 1350 | ;; |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1351 | esac |
| 1352 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1353 | |
Martin v. Löwis | a30c100 | 2001-03-06 12:10:20 +0000 | [diff] [blame] | 1354 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1355 | echo $ac_n "checking LIBRARY""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1356 | echo "configure:1357: checking LIBRARY" >&5 |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1357 | if test -z "$LIBRARY" |
| 1358 | then |
| 1359 | LIBRARY='libpython$(VERSION).a' |
| 1360 | fi |
| 1361 | echo "$ac_t""$LIBRARY" 1>&6 |
| 1362 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1363 | # LDLIBRARY is the name of the library to link against (as opposed to the |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1364 | # name of the library into which to insert object files). BLDLIBRARY is also |
| 1365 | # the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY |
| 1366 | # is blank as the main program is not linked directly against LDLIBRARY. |
| 1367 | # LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On |
| 1368 | # systems without shared libraries, LDLIBRARY is the same as LIBRARY |
| 1369 | # (defined in the Makefiles). On Cygwin LDLIBRARY is the import library, |
| 1370 | # DLLLIBRARY is the shared (i.e., DLL) library. |
| 1371 | # |
| 1372 | |
| 1373 | |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1374 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1375 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1376 | LDLIBRARY="$LIBRARY" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1377 | BLDLIBRARY='$(LDLIBRARY)' |
Guido van Rossum | ca563f2 | 2001-01-23 01:52:44 +0000 | [diff] [blame] | 1378 | DLLLIBRARY='' |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1379 | LDLIBRARYDIR='' |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1380 | |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1381 | # LINKCC is the command that links the python executable -- default is $(CC). |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 1382 | # This is altered for AIX in order to build the export list before |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 1383 | # linking. |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1384 | |
| 1385 | echo $ac_n "checking LINKCC""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1386 | echo "configure:1387: checking LINKCC" >&5 |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1387 | if test -z "$LINKCC" |
| 1388 | then |
| 1389 | case $ac_sys_system in |
| 1390 | AIX*) |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 1391 | LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";; |
Guido van Rossum | 3c4bb80 | 1997-12-18 23:55:32 +0000 | [diff] [blame] | 1392 | dgux*) |
| 1393 | LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1394 | Monterey64*) |
| 1395 | LINKCC="\$(PURIFY) \$(CC) -L/usr/lib/ia64l64";; |
Guido van Rossum | 25f9303 | 1997-08-18 16:00:04 +0000 | [diff] [blame] | 1396 | *) LINKCC="\$(PURIFY) \$(CC)";; |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1397 | esac |
| 1398 | fi |
| 1399 | echo "$ac_t""$LINKCC" 1>&6 |
| 1400 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1401 | echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1402 | echo "configure:1403: checking LDLIBRARY" >&5 |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1403 | |
| 1404 | # DG/UX requires some fancy ld contortions to produce a .so from an .a |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 1405 | case $MACHDEP in |
| 1406 | dguxR4) |
| 1407 | LDLIBRARY='libpython$(VERSION).so' |
| 1408 | OPT="$OPT -pic" |
| 1409 | ;; |
| 1410 | beos*) |
| 1411 | LDLIBRARY='libpython$(VERSION).so' |
| 1412 | ;; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1413 | cygwin*) |
| 1414 | LDLIBRARY='libpython$(VERSION).dll.a' |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1415 | DLLLIBRARY='libpython$(VERSION).dll' |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1416 | ;; |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 1417 | esac |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1418 | |
| 1419 | # MacOSX framework builds need more magic. LDLIBRARY is the dynamic library that |
| 1420 | # we build, but we do not want to link against it (we will find it with a -framework |
| 1421 | # option). For this reason there is an extra variable BLDLIBRARY against which Python |
| 1422 | # and the extension modules are linked, BLDLIBRARY. This is normally the same |
| 1423 | # as LDLIBRARY, but empty for MacOSX framework builds. |
| 1424 | if test "$enable_framework" |
| 1425 | then |
| 1426 | LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' |
| 1427 | LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)' |
| 1428 | BLDLIBRARY='' |
| 1429 | else |
| 1430 | BLDLIBRARY='$(LDLIBRARY)' |
| 1431 | fi |
| 1432 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1433 | echo "$ac_t""$LDLIBRARY" 1>&6 |
| 1434 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1435 | # Extract the first word of "ranlib", so it can be a program name with args. |
| 1436 | set dummy ranlib; ac_word=$2 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1437 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1438 | echo "configure:1439: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1439 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1440 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1441 | else |
| 1442 | if test -n "$RANLIB"; then |
| 1443 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. |
| 1444 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1445 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 1446 | ac_dummy="$PATH" |
| 1447 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1448 | test -z "$ac_dir" && ac_dir=. |
| 1449 | if test -f $ac_dir/$ac_word; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1450 | ac_cv_prog_RANLIB="ranlib" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1451 | break |
| 1452 | fi |
| 1453 | done |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1454 | IFS="$ac_save_ifs" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1455 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1456 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1457 | fi |
| 1458 | RANLIB="$ac_cv_prog_RANLIB" |
| 1459 | if test -n "$RANLIB"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1460 | echo "$ac_t""$RANLIB" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1461 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1462 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1463 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1464 | |
| 1465 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1466 | for ac_prog in ar aal |
| 1467 | do |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1468 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
| 1469 | set dummy $ac_prog; ac_word=$2 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1470 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1471 | echo "configure:1472: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1472 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1473 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1474 | else |
| 1475 | if test -n "$AR"; then |
| 1476 | ac_cv_prog_AR="$AR" # Let the user override the test. |
| 1477 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1478 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 1479 | ac_dummy="$PATH" |
| 1480 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1481 | test -z "$ac_dir" && ac_dir=. |
| 1482 | if test -f $ac_dir/$ac_word; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1483 | ac_cv_prog_AR="$ac_prog" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1484 | break |
| 1485 | fi |
| 1486 | done |
| 1487 | IFS="$ac_save_ifs" |
| 1488 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1489 | fi |
| 1490 | AR="$ac_cv_prog_AR" |
| 1491 | if test -n "$AR"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1492 | echo "$ac_t""$AR" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1493 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1494 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1495 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1496 | |
| 1497 | test -n "$AR" && break |
| 1498 | done |
| 1499 | test -n "$AR" || AR="ar" |
| 1500 | |
Neil Schemenauer | a42c827 | 2001-03-31 00:01:55 +0000 | [diff] [blame] | 1501 | |
| 1502 | case $MACHDEP in |
| 1503 | bsdos*) |
| 1504 | # install -d does not work on BSDI |
| 1505 | if test -z "$INSTALL" |
| 1506 | then |
| 1507 | INSTALL="${srcdir}/install-sh -c" |
| 1508 | fi |
| 1509 | esac |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1510 | ac_aux_dir= |
| 1511 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do |
| 1512 | if test -f $ac_dir/install-sh; then |
| 1513 | ac_aux_dir=$ac_dir |
| 1514 | ac_install_sh="$ac_aux_dir/install-sh -c" |
| 1515 | break |
| 1516 | elif test -f $ac_dir/install.sh; then |
| 1517 | ac_aux_dir=$ac_dir |
| 1518 | ac_install_sh="$ac_aux_dir/install.sh -c" |
| 1519 | break |
| 1520 | fi |
| 1521 | done |
| 1522 | if test -z "$ac_aux_dir"; then |
| 1523 | { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1524 | fi |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1525 | ac_config_guess=$ac_aux_dir/config.guess |
| 1526 | ac_config_sub=$ac_aux_dir/config.sub |
| 1527 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. |
| 1528 | |
| 1529 | # Find a good install program. We prefer a C program (faster), |
| 1530 | # so one script is as good as another. But avoid the broken or |
| 1531 | # incompatible versions: |
| 1532 | # SysV /etc/install, /usr/sbin/install |
| 1533 | # SunOS /usr/etc/install |
| 1534 | # IRIX /sbin/install |
| 1535 | # AIX /bin/install |
| 1536 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag |
| 1537 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args |
| 1538 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" |
| 1539 | # ./install, which can be erroneously created by make from ./install.sh. |
| 1540 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1541 | echo "configure:1542: checking for a BSD compatible install" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1542 | if test -z "$INSTALL"; then |
| 1543 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then |
| 1544 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1545 | else |
| 1546 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" |
| 1547 | for ac_dir in $PATH; do |
| 1548 | # Account for people who put trailing slashes in PATH elements. |
| 1549 | case "$ac_dir/" in |
| 1550 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; |
| 1551 | *) |
| 1552 | # OSF1 and SCO ODT 3.0 have their own names for install. |
| 1553 | # Don't use installbsd from OSF since it installs stuff as root |
| 1554 | # by default. |
| 1555 | for ac_prog in ginstall scoinst install; do |
| 1556 | if test -f $ac_dir/$ac_prog; then |
| 1557 | if test $ac_prog = install && |
| 1558 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then |
| 1559 | # AIX install. It has an incompatible calling convention. |
| 1560 | : |
| 1561 | else |
| 1562 | ac_cv_path_install="$ac_dir/$ac_prog -c" |
| 1563 | break 2 |
| 1564 | fi |
| 1565 | fi |
| 1566 | done |
| 1567 | ;; |
| 1568 | esac |
| 1569 | done |
| 1570 | IFS="$ac_save_IFS" |
| 1571 | |
| 1572 | fi |
| 1573 | if test "${ac_cv_path_install+set}" = set; then |
| 1574 | INSTALL="$ac_cv_path_install" |
| 1575 | else |
| 1576 | # As a last resort, use the slow shell script. We don't cache a |
| 1577 | # path for INSTALL within a source directory, because that will |
| 1578 | # break other packages using the cache if that directory is |
| 1579 | # removed, or if the path is relative. |
| 1580 | INSTALL="$ac_install_sh" |
| 1581 | fi |
| 1582 | fi |
| 1583 | echo "$ac_t""$INSTALL" 1>&6 |
| 1584 | |
| 1585 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. |
| 1586 | # It thinks the first close brace ends the variable substitution. |
| 1587 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' |
| 1588 | |
| 1589 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' |
| 1590 | |
| 1591 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' |
| 1592 | |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1593 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 1594 | # Not every filesystem supports hard links |
| 1595 | |
| 1596 | if test -z "$LN" ; then |
| 1597 | case $ac_sys_system in |
| 1598 | BeOS*) LN="ln -s";; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1599 | CYGWIN*) LN="ln -s";; |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 1600 | *) LN=ln;; |
| 1601 | esac |
| 1602 | fi |
| 1603 | |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1604 | # Check for --with-pydebug |
| 1605 | echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1606 | echo "configure:1607: checking for --with-pydebug" >&5 |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1607 | # Check whether --with-pydebug or --without-pydebug was given. |
| 1608 | if test "${with_pydebug+set}" = set; then |
| 1609 | withval="$with_pydebug" |
| 1610 | |
| 1611 | if test "$withval" != no |
| 1612 | then cat >> confdefs.h <<\EOF |
| 1613 | #define Py_DEBUG 1 |
| 1614 | EOF |
| 1615 | echo "$ac_t""yes" 1>&6; Py_DEBUG='true' |
| 1616 | else echo "$ac_t""no" 1>&6; Py_DEBUG='false' |
| 1617 | fi |
| 1618 | else |
| 1619 | echo "$ac_t""no" 1>&6 |
| 1620 | fi |
| 1621 | |
| 1622 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1623 | # Optimizer/debugger flags |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1624 | |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1625 | if test -z "$OPT" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1626 | then |
Guido van Rossum | edca74a | 1997-07-18 23:29:40 +0000 | [diff] [blame] | 1627 | case $GCC in |
| 1628 | yes) |
| 1629 | case $ac_cv_prog_cc_g in |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1630 | yes) |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1631 | if test "$Py_DEBUG" = 'true' ; then |
| 1632 | # Optimization messes up debuggers, so turn it off for |
| 1633 | # debug builds. |
| 1634 | OPT="-g -Wall -Wstrict-prototypes" |
| 1635 | else |
| 1636 | OPT="-g -O3 -Wall -Wstrict-prototypes" |
| 1637 | fi;; |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1638 | *) |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1639 | OPT="-O3 -Wall -Wstrict-prototypes";; |
| 1640 | esac |
| 1641 | ;; |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1642 | *) |
| 1643 | case $ac_sys_system in |
| 1644 | UnixWare*) |
| 1645 | OPT="-O -K pentium,host,inline,loop_unroll,alloca ";; |
| 1646 | *) |
| 1647 | OPT="-O";; |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1648 | esac |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1649 | esac |
Jack Jansen | ca06bc6 | 2001-08-03 15:32:23 +0000 | [diff] [blame] | 1650 | case $ac_sys_system in |
| 1651 | Darwin*) |
| 1652 | OPT="$OPT -no-cpp-precomp";; |
| 1653 | esac |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1654 | fi |
| 1655 | |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1656 | # The current (beta) Monterey compiler dies with optimizations |
| 1657 | case $ac_sys_system in |
| 1658 | Monterey*) OPT="";; |
| 1659 | esac |
| 1660 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 1661 | if test "$ac_arch_flags" |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 1662 | then |
| 1663 | OPT="$OPT $ac_arch_flags" |
| 1664 | fi |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 1665 | |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1666 | echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1667 | echo "configure:1668: checking whether $CC accepts -OPT:Olimit=0" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1668 | if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1669 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1670 | else |
| 1671 | ac_save_cc="$CC" |
| 1672 | CC="$CC -OPT:Olimit=0" |
| 1673 | if test "$cross_compiling" = yes; then |
| 1674 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 1675 | else |
| 1676 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1677 | #line 1678 "configure" |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1678 | #include "confdefs.h" |
| 1679 | int main() { return 0; } |
| 1680 | EOF |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1681 | if { (eval echo configure:1682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1682 | then |
| 1683 | ac_cv_opt_olimit_ok=yes |
| 1684 | else |
| 1685 | echo "configure: failed program was:" >&5 |
| 1686 | cat conftest.$ac_ext >&5 |
| 1687 | rm -fr conftest* |
| 1688 | ac_cv_opt_olimit_ok=no |
| 1689 | fi |
| 1690 | rm -fr conftest* |
| 1691 | fi |
| 1692 | |
| 1693 | CC="$ac_save_cc" |
| 1694 | fi |
| 1695 | |
| 1696 | echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6 |
Guido van Rossum | 2efa34b | 1997-10-23 17:43:11 +0000 | [diff] [blame] | 1697 | if test $ac_cv_opt_olimit_ok = yes; then |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 1698 | case $ac_sys_system in |
| 1699 | Darwin*) OPT="$OPT" ;; |
| 1700 | *) OPT="$OPT -OPT:Olimit=0";; |
| 1701 | esac |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1702 | else |
| 1703 | echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1704 | echo "configure:1705: checking whether $CC accepts -Olimit 1500" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1705 | if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1706 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1707 | else |
| 1708 | ac_save_cc="$CC" |
| 1709 | CC="$CC -Olimit 1500" |
| 1710 | if test "$cross_compiling" = yes; then |
| 1711 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 1712 | else |
| 1713 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1714 | #line 1715 "configure" |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1715 | #include "confdefs.h" |
| 1716 | int main() { return 0; } |
| 1717 | EOF |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1718 | if { (eval echo configure:1719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1719 | then |
| 1720 | ac_cv_olimit_ok=yes |
| 1721 | else |
| 1722 | echo "configure: failed program was:" >&5 |
| 1723 | cat conftest.$ac_ext >&5 |
| 1724 | rm -fr conftest* |
| 1725 | ac_cv_olimit_ok=no |
Guido van Rossum | 201afe5 | 1997-05-14 21:14:44 +0000 | [diff] [blame] | 1726 | fi |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1727 | rm -fr conftest* |
| 1728 | fi |
| 1729 | |
| 1730 | CC="$ac_save_cc" |
| 1731 | fi |
| 1732 | |
| 1733 | echo "$ac_t""$ac_cv_olimit_ok" 1>&6 |
| 1734 | if test $ac_cv_olimit_ok = yes; then |
| 1735 | OPT="$OPT -Olimit 1500" |
| 1736 | fi |
| 1737 | fi |
| 1738 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1739 | # -Kpthread, if available, provides the right #defines |
| 1740 | # and linker options to make pthread_create available |
| 1741 | echo $ac_n "checking whether $CC accepts -Kpthread""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1742 | echo "configure:1743: checking whether $CC accepts -Kpthread" >&5 |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1743 | if eval "test \"`echo '$''{'ac_cv_kpthread'+set}'`\" = set"; then |
| 1744 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1745 | else |
| 1746 | ac_save_cc="$CC" |
| 1747 | CC="$CC -Kpthread" |
| 1748 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1749 | #line 1750 "configure" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1750 | #include "confdefs.h" |
| 1751 | #include <pthread.h> |
| 1752 | int main() { |
| 1753 | pthread_create(0,0,0,0) |
| 1754 | ; return 0; } |
| 1755 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1756 | if { (eval echo configure:1757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1757 | rm -rf conftest* |
| 1758 | ac_cv_kpthread=yes |
| 1759 | else |
| 1760 | echo "configure: failed program was:" >&5 |
| 1761 | cat conftest.$ac_ext >&5 |
| 1762 | rm -rf conftest* |
| 1763 | ac_cv_kpthread=no |
| 1764 | fi |
| 1765 | rm -f conftest* |
| 1766 | CC="$ac_save_cc" |
| 1767 | fi |
| 1768 | |
| 1769 | |
| 1770 | # GCC does not reject -Kpthread as an illegal option, it merely complains that |
| 1771 | # it is unrecognized |
| 1772 | if test "$GCC" = "yes" |
| 1773 | then ac_cv_kpthread="no, we have gcc" |
| 1774 | fi |
| 1775 | echo "$ac_t""$ac_cv_kpthread" 1>&6 |
| 1776 | |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 1777 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1778 | # checks for header files |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1779 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1780 | echo "configure:1781: checking for ANSI C header files" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1781 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1782 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1783 | else |
| 1784 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1785 | #line 1786 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1786 | #include "confdefs.h" |
| 1787 | #include <stdlib.h> |
| 1788 | #include <stdarg.h> |
| 1789 | #include <string.h> |
| 1790 | #include <float.h> |
| 1791 | EOF |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1792 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1793 | { (eval echo configure:1794: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1794 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1795 | if test -z "$ac_err"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1796 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1797 | ac_cv_header_stdc=yes |
| 1798 | else |
| 1799 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1800 | echo "configure: failed program was:" >&5 |
| 1801 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1802 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1803 | ac_cv_header_stdc=no |
| 1804 | fi |
| 1805 | rm -f conftest* |
| 1806 | |
| 1807 | if test $ac_cv_header_stdc = yes; then |
| 1808 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. |
| 1809 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1810 | #line 1811 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1811 | #include "confdefs.h" |
| 1812 | #include <string.h> |
| 1813 | EOF |
| 1814 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1815 | egrep "memchr" >/dev/null 2>&1; then |
| 1816 | : |
| 1817 | else |
| 1818 | rm -rf conftest* |
| 1819 | ac_cv_header_stdc=no |
| 1820 | fi |
| 1821 | rm -f conftest* |
| 1822 | |
| 1823 | fi |
| 1824 | |
| 1825 | if test $ac_cv_header_stdc = yes; then |
| 1826 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. |
| 1827 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1828 | #line 1829 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1829 | #include "confdefs.h" |
| 1830 | #include <stdlib.h> |
| 1831 | EOF |
| 1832 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1833 | egrep "free" >/dev/null 2>&1; then |
| 1834 | : |
| 1835 | else |
| 1836 | rm -rf conftest* |
| 1837 | ac_cv_header_stdc=no |
| 1838 | fi |
| 1839 | rm -f conftest* |
| 1840 | |
| 1841 | fi |
| 1842 | |
| 1843 | if test $ac_cv_header_stdc = yes; then |
| 1844 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. |
| 1845 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1846 | : |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1847 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1848 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1849 | #line 1850 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1850 | #include "confdefs.h" |
| 1851 | #include <ctype.h> |
| 1852 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') |
| 1853 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1854 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1855 | int main () { int i; for (i = 0; i < 256; i++) |
| 1856 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); |
| 1857 | exit (0); } |
| 1858 | |
| 1859 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1860 | if { (eval echo configure:1861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1861 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1862 | : |
| 1863 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1864 | echo "configure: failed program was:" >&5 |
| 1865 | cat conftest.$ac_ext >&5 |
| 1866 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1867 | ac_cv_header_stdc=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1868 | fi |
| 1869 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1870 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1871 | |
| 1872 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1873 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1874 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1875 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1876 | if test $ac_cv_header_stdc = yes; then |
| 1877 | cat >> confdefs.h <<\EOF |
| 1878 | #define STDC_HEADERS 1 |
| 1879 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1880 | |
| 1881 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1882 | |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 1883 | for ac_hdr in dlfcn.h fcntl.h limits.h langinfo.h locale.h \ |
| 1884 | ncurses.h poll.h pthread.h \ |
Eric S. Raymond | d2d75d3 | 2001-01-16 15:26:34 +0000 | [diff] [blame] | 1885 | signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \ |
Fred Drake | bbc3c5a | 2001-05-11 16:11:25 +0000 | [diff] [blame] | 1886 | sys/audioio.h sys/file.h sys/lock.h sys/modem.h db_185.h db.h \ |
Andrew M. Kuchling | 881fd90 | 2001-07-14 20:55:52 +0000 | [diff] [blame] | 1887 | sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \ |
Fred Drake | ae90f8d | 2000-09-15 03:38:12 +0000 | [diff] [blame] | 1888 | sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \ |
Martin v. Löwis | f24b2f3 | 2001-08-10 20:29:40 +0000 | [diff] [blame] | 1889 | ndbm.h db1/ndbm.h gdbm/ndbm.h sys/resource.h netpacket/packet.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1890 | do |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1891 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1892 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 1893 | echo "configure:1894: checking for $ac_hdr" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1894 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1895 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1896 | else |
| 1897 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 1898 | #line 1899 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1899 | #include "confdefs.h" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1900 | #include <$ac_hdr> |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1901 | EOF |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1902 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 1903 | { (eval echo configure:1904: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1904 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1905 | if test -z "$ac_err"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1906 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1907 | eval "ac_cv_header_$ac_safe=yes" |
| 1908 | else |
| 1909 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1910 | echo "configure: failed program was:" >&5 |
| 1911 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1912 | rm -rf conftest* |
| 1913 | eval "ac_cv_header_$ac_safe=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1914 | fi |
| 1915 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1916 | fi |
| 1917 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1918 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1919 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1920 | cat >> confdefs.h <<EOF |
| 1921 | #define $ac_tr_hdr 1 |
| 1922 | EOF |
| 1923 | |
| 1924 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1925 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1926 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1927 | done |
| 1928 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1929 | ac_header_dirent=no |
| 1930 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h |
| 1931 | do |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1932 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1933 | echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 1934 | echo "configure:1935: checking for $ac_hdr that defines DIR" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1935 | if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1936 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1937 | else |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1938 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 1939 | #line 1940 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1940 | #include "confdefs.h" |
| 1941 | #include <sys/types.h> |
| 1942 | #include <$ac_hdr> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1943 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1944 | DIR *dirp = 0; |
| 1945 | ; return 0; } |
| 1946 | EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 1947 | if { (eval echo configure:1948: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1948 | rm -rf conftest* |
| 1949 | eval "ac_cv_header_dirent_$ac_safe=yes" |
| 1950 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1951 | echo "configure: failed program was:" >&5 |
| 1952 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1953 | rm -rf conftest* |
| 1954 | eval "ac_cv_header_dirent_$ac_safe=no" |
| 1955 | fi |
| 1956 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1957 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1958 | if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1959 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1960 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1961 | cat >> confdefs.h <<EOF |
| 1962 | #define $ac_tr_hdr 1 |
| 1963 | EOF |
| 1964 | ac_header_dirent=$ac_hdr; break |
| 1965 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1966 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1967 | fi |
| 1968 | done |
| 1969 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. |
| 1970 | if test $ac_header_dirent = dirent.h; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1971 | echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 1972 | echo "configure:1973: checking for opendir in -ldir" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1973 | ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1974 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1975 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1976 | else |
| 1977 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1978 | LIBS="-ldir $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1979 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 1980 | #line 1981 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1981 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1982 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 1983 | /* We use char because int might match the return type of a gcc2 |
| 1984 | builtin and then its argument prototype would still apply. */ |
| 1985 | char opendir(); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1986 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1987 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1988 | opendir() |
| 1989 | ; return 0; } |
| 1990 | EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 1991 | if { (eval echo configure:1992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1992 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1993 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1994 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1995 | echo "configure: failed program was:" >&5 |
| 1996 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1997 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1998 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1999 | fi |
| 2000 | rm -f conftest* |
| 2001 | LIBS="$ac_save_LIBS" |
| 2002 | |
| 2003 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2004 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2005 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2006 | LIBS="$LIBS -ldir" |
| 2007 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2008 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2009 | fi |
| 2010 | |
| 2011 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2012 | echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2013 | echo "configure:2014: checking for opendir in -lx" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2014 | ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2015 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2016 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2017 | else |
| 2018 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2019 | LIBS="-lx $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2020 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2021 | #line 2022 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2022 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2023 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 2024 | /* We use char because int might match the return type of a gcc2 |
| 2025 | builtin and then its argument prototype would still apply. */ |
| 2026 | char opendir(); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2027 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2028 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2029 | opendir() |
| 2030 | ; return 0; } |
| 2031 | EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2032 | if { (eval echo configure:2033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2033 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2034 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2035 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2036 | echo "configure: failed program was:" >&5 |
| 2037 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2038 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2039 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2040 | fi |
| 2041 | rm -f conftest* |
| 2042 | LIBS="$ac_save_LIBS" |
| 2043 | |
| 2044 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2045 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2046 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2047 | LIBS="$LIBS -lx" |
| 2048 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2049 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2050 | fi |
| 2051 | |
| 2052 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2053 | |
| 2054 | |
| 2055 | # checks for typedefs |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2056 | was_it_defined=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2057 | echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2058 | echo "configure:2059: checking for clock_t in time.h" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2059 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2060 | #line 2061 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2061 | #include "confdefs.h" |
| 2062 | #include <time.h> |
| 2063 | EOF |
| 2064 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2065 | egrep "clock_t" >/dev/null 2>&1; then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2066 | rm -rf conftest* |
| 2067 | was_it_defined=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2068 | else |
| 2069 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2070 | cat >> confdefs.h <<\EOF |
| 2071 | #define clock_t long |
| 2072 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2073 | |
| 2074 | fi |
| 2075 | rm -f conftest* |
| 2076 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2077 | echo "$ac_t""$was_it_defined" 1>&6 |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2078 | |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 2079 | # Add some code to confdefs.h so that the test for off_t works on SCO |
| 2080 | cat >> confdefs.h <<\EOF |
| 2081 | #if defined(SCO_DS) |
| 2082 | #undef _OFF_T |
| 2083 | #endif |
| 2084 | EOF |
| 2085 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2086 | # Type availability checks |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2087 | echo $ac_n "checking for mode_t""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2088 | echo "configure:2089: checking for mode_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2089 | if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2090 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2091 | else |
| 2092 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2093 | #line 2094 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2094 | #include "confdefs.h" |
| 2095 | #include <sys/types.h> |
| 2096 | #if STDC_HEADERS |
| 2097 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2098 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2099 | #endif |
| 2100 | EOF |
| 2101 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 2102 | egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2103 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2104 | ac_cv_type_mode_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2105 | else |
| 2106 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2107 | ac_cv_type_mode_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2108 | fi |
| 2109 | rm -f conftest* |
| 2110 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2111 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2112 | echo "$ac_t""$ac_cv_type_mode_t" 1>&6 |
| 2113 | if test $ac_cv_type_mode_t = no; then |
| 2114 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2115 | #define mode_t int |
| 2116 | EOF |
| 2117 | |
| 2118 | fi |
| 2119 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2120 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2121 | echo "configure:2122: checking for off_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2122 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2123 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2124 | else |
| 2125 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2126 | #line 2127 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2127 | #include "confdefs.h" |
| 2128 | #include <sys/types.h> |
| 2129 | #if STDC_HEADERS |
| 2130 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2131 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2132 | #endif |
| 2133 | EOF |
| 2134 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 2135 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2136 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2137 | ac_cv_type_off_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2138 | else |
| 2139 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2140 | ac_cv_type_off_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2141 | fi |
| 2142 | rm -f conftest* |
| 2143 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2144 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2145 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 |
| 2146 | if test $ac_cv_type_off_t = no; then |
| 2147 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2148 | #define off_t long |
| 2149 | EOF |
| 2150 | |
| 2151 | fi |
| 2152 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2153 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2154 | echo "configure:2155: checking for pid_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2155 | if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2156 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2157 | else |
| 2158 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2159 | #line 2160 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2160 | #include "confdefs.h" |
| 2161 | #include <sys/types.h> |
| 2162 | #if STDC_HEADERS |
| 2163 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2164 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2165 | #endif |
| 2166 | EOF |
| 2167 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 2168 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2169 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2170 | ac_cv_type_pid_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2171 | else |
| 2172 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2173 | ac_cv_type_pid_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2174 | fi |
| 2175 | rm -f conftest* |
| 2176 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2177 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2178 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 |
| 2179 | if test $ac_cv_type_pid_t = no; then |
| 2180 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2181 | #define pid_t int |
| 2182 | EOF |
| 2183 | |
| 2184 | fi |
| 2185 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2186 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2187 | echo "configure:2188: checking return type of signal handlers" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2188 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2189 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2190 | else |
| 2191 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2192 | #line 2193 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2193 | #include "confdefs.h" |
| 2194 | #include <sys/types.h> |
| 2195 | #include <signal.h> |
| 2196 | #ifdef signal |
| 2197 | #undef signal |
| 2198 | #endif |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2199 | #ifdef __cplusplus |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2200 | extern "C" void (*signal (int, void (*)(int)))(int); |
| 2201 | #else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2202 | void (*signal ()) (); |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2203 | #endif |
| 2204 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2205 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2206 | int i; |
| 2207 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2208 | EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2209 | if { (eval echo configure:2210: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2210 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2211 | ac_cv_type_signal=void |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2212 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2213 | echo "configure: failed program was:" >&5 |
| 2214 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2215 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2216 | ac_cv_type_signal=int |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2217 | fi |
| 2218 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2219 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2220 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2221 | echo "$ac_t""$ac_cv_type_signal" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2222 | cat >> confdefs.h <<EOF |
| 2223 | #define RETSIGTYPE $ac_cv_type_signal |
| 2224 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2225 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2226 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2227 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2228 | echo "configure:2229: checking for size_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2229 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2230 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2231 | else |
| 2232 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2233 | #line 2234 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2234 | #include "confdefs.h" |
| 2235 | #include <sys/types.h> |
| 2236 | #if STDC_HEADERS |
| 2237 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2238 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2239 | #endif |
| 2240 | EOF |
| 2241 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 2242 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2243 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2244 | ac_cv_type_size_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2245 | else |
| 2246 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2247 | ac_cv_type_size_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2248 | fi |
| 2249 | rm -f conftest* |
| 2250 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2251 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2252 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 |
| 2253 | if test $ac_cv_type_size_t = no; then |
| 2254 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2255 | #define size_t unsigned |
| 2256 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2257 | |
| 2258 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2259 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2260 | echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2261 | echo "configure:2262: checking for uid_t in sys/types.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2262 | if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2263 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2264 | else |
| 2265 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2266 | #line 2267 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2267 | #include "confdefs.h" |
| 2268 | #include <sys/types.h> |
| 2269 | EOF |
| 2270 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2271 | egrep "uid_t" >/dev/null 2>&1; then |
| 2272 | rm -rf conftest* |
| 2273 | ac_cv_type_uid_t=yes |
| 2274 | else |
| 2275 | rm -rf conftest* |
| 2276 | ac_cv_type_uid_t=no |
| 2277 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2278 | rm -f conftest* |
| 2279 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2280 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2281 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2282 | echo "$ac_t""$ac_cv_type_uid_t" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2283 | if test $ac_cv_type_uid_t = no; then |
| 2284 | cat >> confdefs.h <<\EOF |
| 2285 | #define uid_t int |
| 2286 | EOF |
| 2287 | |
| 2288 | cat >> confdefs.h <<\EOF |
| 2289 | #define gid_t int |
| 2290 | EOF |
| 2291 | |
| 2292 | fi |
| 2293 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2294 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2295 | # Sizes of various common basic types |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2296 | echo $ac_n "checking size of int""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2297 | echo "configure:2298: checking size of int" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2298 | if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2299 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2300 | else |
| 2301 | if test "$cross_compiling" = yes; then |
| 2302 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2303 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2304 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2305 | #line 2306 "configure" |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2306 | #include "confdefs.h" |
| 2307 | #include <stdio.h> |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2308 | #include <sys/types.h> |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2309 | main() |
| 2310 | { |
| 2311 | FILE *f=fopen("conftestval", "w"); |
| 2312 | if (!f) exit(1); |
| 2313 | fprintf(f, "%d\n", sizeof(int)); |
| 2314 | exit(0); |
| 2315 | } |
| 2316 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2317 | if { (eval echo configure:2318: \"$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] | 2318 | then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2319 | ac_cv_sizeof_int=`cat conftestval` |
| 2320 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2321 | echo "configure: failed program was:" >&5 |
| 2322 | cat conftest.$ac_ext >&5 |
| 2323 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2324 | ac_cv_sizeof_int=0 |
| 2325 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2326 | rm -fr conftest* |
| 2327 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2328 | |
| 2329 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2330 | echo "$ac_t""$ac_cv_sizeof_int" 1>&6 |
| 2331 | cat >> confdefs.h <<EOF |
| 2332 | #define SIZEOF_INT $ac_cv_sizeof_int |
| 2333 | EOF |
| 2334 | |
| 2335 | |
| 2336 | echo $ac_n "checking size of long""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2337 | echo "configure:2338: checking size of long" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2338 | if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2339 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2340 | else |
| 2341 | if test "$cross_compiling" = yes; then |
| 2342 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2343 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2344 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2345 | #line 2346 "configure" |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2346 | #include "confdefs.h" |
| 2347 | #include <stdio.h> |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2348 | #include <sys/types.h> |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2349 | main() |
| 2350 | { |
| 2351 | FILE *f=fopen("conftestval", "w"); |
| 2352 | if (!f) exit(1); |
| 2353 | fprintf(f, "%d\n", sizeof(long)); |
| 2354 | exit(0); |
| 2355 | } |
| 2356 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2357 | if { (eval echo configure:2358: \"$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] | 2358 | then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2359 | ac_cv_sizeof_long=`cat conftestval` |
| 2360 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2361 | echo "configure: failed program was:" >&5 |
| 2362 | cat conftest.$ac_ext >&5 |
| 2363 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2364 | ac_cv_sizeof_long=0 |
| 2365 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2366 | rm -fr conftest* |
| 2367 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2368 | |
| 2369 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2370 | echo "$ac_t""$ac_cv_sizeof_long" 1>&6 |
| 2371 | cat >> confdefs.h <<EOF |
| 2372 | #define SIZEOF_LONG $ac_cv_sizeof_long |
| 2373 | EOF |
| 2374 | |
| 2375 | |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2376 | echo $ac_n "checking size of void *""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2377 | echo "configure:2378: checking size of void *" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2378 | 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] | 2379 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2380 | else |
| 2381 | if test "$cross_compiling" = yes; then |
| 2382 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2383 | else |
| 2384 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2385 | #line 2386 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2386 | #include "confdefs.h" |
| 2387 | #include <stdio.h> |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2388 | #include <sys/types.h> |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2389 | main() |
| 2390 | { |
| 2391 | FILE *f=fopen("conftestval", "w"); |
| 2392 | if (!f) exit(1); |
| 2393 | fprintf(f, "%d\n", sizeof(void *)); |
| 2394 | exit(0); |
| 2395 | } |
| 2396 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2397 | if { (eval echo configure:2398: \"$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] | 2398 | then |
| 2399 | ac_cv_sizeof_void_p=`cat conftestval` |
| 2400 | else |
| 2401 | echo "configure: failed program was:" >&5 |
| 2402 | cat conftest.$ac_ext >&5 |
| 2403 | rm -fr conftest* |
| 2404 | ac_cv_sizeof_void_p=0 |
| 2405 | fi |
| 2406 | rm -fr conftest* |
| 2407 | fi |
| 2408 | |
| 2409 | fi |
| 2410 | echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6 |
| 2411 | cat >> confdefs.h <<EOF |
| 2412 | #define SIZEOF_VOID_P $ac_cv_sizeof_void_p |
| 2413 | EOF |
| 2414 | |
| 2415 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2416 | echo $ac_n "checking size of char""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2417 | echo "configure:2418: checking size of char" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2418 | if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2419 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2420 | else |
| 2421 | if test "$cross_compiling" = yes; then |
| 2422 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2423 | else |
| 2424 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2425 | #line 2426 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2426 | #include "confdefs.h" |
| 2427 | #include <stdio.h> |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2428 | #include <sys/types.h> |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2429 | main() |
| 2430 | { |
| 2431 | FILE *f=fopen("conftestval", "w"); |
| 2432 | if (!f) exit(1); |
| 2433 | fprintf(f, "%d\n", sizeof(char)); |
| 2434 | exit(0); |
| 2435 | } |
| 2436 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2437 | if { (eval echo configure:2438: \"$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] | 2438 | then |
| 2439 | ac_cv_sizeof_char=`cat conftestval` |
| 2440 | else |
| 2441 | echo "configure: failed program was:" >&5 |
| 2442 | cat conftest.$ac_ext >&5 |
| 2443 | rm -fr conftest* |
| 2444 | ac_cv_sizeof_char=0 |
| 2445 | fi |
| 2446 | rm -fr conftest* |
| 2447 | fi |
| 2448 | |
| 2449 | fi |
| 2450 | echo "$ac_t""$ac_cv_sizeof_char" 1>&6 |
| 2451 | cat >> confdefs.h <<EOF |
| 2452 | #define SIZEOF_CHAR $ac_cv_sizeof_char |
| 2453 | EOF |
| 2454 | |
| 2455 | |
| 2456 | echo $ac_n "checking size of short""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2457 | echo "configure:2458: checking size of short" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2458 | if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2459 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2460 | else |
| 2461 | if test "$cross_compiling" = yes; then |
| 2462 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2463 | else |
| 2464 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2465 | #line 2466 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2466 | #include "confdefs.h" |
| 2467 | #include <stdio.h> |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2468 | #include <sys/types.h> |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2469 | main() |
| 2470 | { |
| 2471 | FILE *f=fopen("conftestval", "w"); |
| 2472 | if (!f) exit(1); |
| 2473 | fprintf(f, "%d\n", sizeof(short)); |
| 2474 | exit(0); |
| 2475 | } |
| 2476 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2477 | if { (eval echo configure:2478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2478 | then |
| 2479 | ac_cv_sizeof_short=`cat conftestval` |
| 2480 | else |
| 2481 | echo "configure: failed program was:" >&5 |
| 2482 | cat conftest.$ac_ext >&5 |
| 2483 | rm -fr conftest* |
| 2484 | ac_cv_sizeof_short=0 |
| 2485 | fi |
| 2486 | rm -fr conftest* |
| 2487 | fi |
| 2488 | |
| 2489 | fi |
| 2490 | echo "$ac_t""$ac_cv_sizeof_short" 1>&6 |
| 2491 | cat >> confdefs.h <<EOF |
| 2492 | #define SIZEOF_SHORT $ac_cv_sizeof_short |
| 2493 | EOF |
| 2494 | |
| 2495 | |
| 2496 | echo $ac_n "checking size of float""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2497 | echo "configure:2498: checking size of float" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2498 | if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2499 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2500 | else |
| 2501 | if test "$cross_compiling" = yes; then |
| 2502 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2503 | else |
| 2504 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2505 | #line 2506 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2506 | #include "confdefs.h" |
| 2507 | #include <stdio.h> |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2508 | #include <sys/types.h> |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2509 | main() |
| 2510 | { |
| 2511 | FILE *f=fopen("conftestval", "w"); |
| 2512 | if (!f) exit(1); |
| 2513 | fprintf(f, "%d\n", sizeof(float)); |
| 2514 | exit(0); |
| 2515 | } |
| 2516 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2517 | if { (eval echo configure:2518: \"$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] | 2518 | then |
| 2519 | ac_cv_sizeof_float=`cat conftestval` |
| 2520 | else |
| 2521 | echo "configure: failed program was:" >&5 |
| 2522 | cat conftest.$ac_ext >&5 |
| 2523 | rm -fr conftest* |
| 2524 | ac_cv_sizeof_float=0 |
| 2525 | fi |
| 2526 | rm -fr conftest* |
| 2527 | fi |
| 2528 | |
| 2529 | fi |
| 2530 | echo "$ac_t""$ac_cv_sizeof_float" 1>&6 |
| 2531 | cat >> confdefs.h <<EOF |
| 2532 | #define SIZEOF_FLOAT $ac_cv_sizeof_float |
| 2533 | EOF |
| 2534 | |
| 2535 | |
| 2536 | echo $ac_n "checking size of double""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2537 | echo "configure:2538: checking size of double" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2538 | if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2539 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2540 | else |
| 2541 | if test "$cross_compiling" = yes; then |
| 2542 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2543 | else |
| 2544 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2545 | #line 2546 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2546 | #include "confdefs.h" |
| 2547 | #include <stdio.h> |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2548 | #include <sys/types.h> |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2549 | main() |
| 2550 | { |
| 2551 | FILE *f=fopen("conftestval", "w"); |
| 2552 | if (!f) exit(1); |
| 2553 | fprintf(f, "%d\n", sizeof(double)); |
| 2554 | exit(0); |
| 2555 | } |
| 2556 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2557 | if { (eval echo configure:2558: \"$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] | 2558 | then |
| 2559 | ac_cv_sizeof_double=`cat conftestval` |
| 2560 | else |
| 2561 | echo "configure: failed program was:" >&5 |
| 2562 | cat conftest.$ac_ext >&5 |
| 2563 | rm -fr conftest* |
| 2564 | ac_cv_sizeof_double=0 |
| 2565 | fi |
| 2566 | rm -fr conftest* |
| 2567 | fi |
| 2568 | |
| 2569 | fi |
| 2570 | echo "$ac_t""$ac_cv_sizeof_double" 1>&6 |
| 2571 | cat >> confdefs.h <<EOF |
| 2572 | #define SIZEOF_DOUBLE $ac_cv_sizeof_double |
| 2573 | EOF |
| 2574 | |
| 2575 | |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2576 | echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2577 | echo "configure:2578: checking size of fpos_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2578 | 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] | 2579 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2580 | else |
| 2581 | if test "$cross_compiling" = yes; then |
| 2582 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2583 | else |
| 2584 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2585 | #line 2586 "configure" |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2586 | #include "confdefs.h" |
| 2587 | #include <stdio.h> |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2588 | #include <sys/types.h> |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2589 | main() |
| 2590 | { |
| 2591 | FILE *f=fopen("conftestval", "w"); |
| 2592 | if (!f) exit(1); |
| 2593 | fprintf(f, "%d\n", sizeof(fpos_t)); |
| 2594 | exit(0); |
| 2595 | } |
| 2596 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2597 | if { (eval echo configure:2598: \"$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] | 2598 | then |
| 2599 | ac_cv_sizeof_fpos_t=`cat conftestval` |
| 2600 | else |
| 2601 | echo "configure: failed program was:" >&5 |
| 2602 | cat conftest.$ac_ext >&5 |
| 2603 | rm -fr conftest* |
| 2604 | ac_cv_sizeof_fpos_t=0 |
| 2605 | fi |
| 2606 | rm -fr conftest* |
| 2607 | fi |
| 2608 | |
| 2609 | fi |
| 2610 | echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6 |
| 2611 | cat >> confdefs.h <<EOF |
| 2612 | #define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t |
| 2613 | EOF |
| 2614 | |
| 2615 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2616 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2617 | echo $ac_n "checking for long long support""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2618 | echo "configure:2619: checking for long long support" >&5 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2619 | have_long_long=no |
| 2620 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2621 | #line 2622 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2622 | #include "confdefs.h" |
| 2623 | |
| 2624 | int main() { |
| 2625 | long long x; x = (long long)0; |
| 2626 | ; return 0; } |
| 2627 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2628 | if { (eval echo configure:2629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2629 | rm -rf conftest* |
| 2630 | cat >> confdefs.h <<\EOF |
| 2631 | #define HAVE_LONG_LONG 1 |
| 2632 | EOF |
| 2633 | have_long_long=yes |
| 2634 | else |
| 2635 | echo "configure: failed program was:" >&5 |
| 2636 | cat conftest.$ac_ext >&5 |
| 2637 | fi |
| 2638 | rm -f conftest* |
| 2639 | echo "$ac_t""$have_long_long" 1>&6 |
Guido van Rossum | 96f2eb9 | 1999-04-10 16:02:18 +0000 | [diff] [blame] | 2640 | if test "$have_long_long" = yes ; then |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2641 | echo $ac_n "checking size of long long""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2642 | echo "configure:2643: checking size of long long" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2643 | 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] | 2644 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2645 | else |
| 2646 | if test "$cross_compiling" = yes; then |
| 2647 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2648 | else |
| 2649 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2650 | #line 2651 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2651 | #include "confdefs.h" |
| 2652 | #include <stdio.h> |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2653 | #include <sys/types.h> |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2654 | main() |
| 2655 | { |
| 2656 | FILE *f=fopen("conftestval", "w"); |
| 2657 | if (!f) exit(1); |
| 2658 | fprintf(f, "%d\n", sizeof(long long)); |
| 2659 | exit(0); |
| 2660 | } |
| 2661 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2662 | if { (eval echo configure:2663: \"$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] | 2663 | then |
| 2664 | ac_cv_sizeof_long_long=`cat conftestval` |
| 2665 | else |
| 2666 | echo "configure: failed program was:" >&5 |
| 2667 | cat conftest.$ac_ext >&5 |
| 2668 | rm -fr conftest* |
| 2669 | ac_cv_sizeof_long_long=0 |
| 2670 | fi |
| 2671 | rm -fr conftest* |
| 2672 | fi |
| 2673 | |
| 2674 | fi |
| 2675 | echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 |
| 2676 | cat >> confdefs.h <<EOF |
| 2677 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long |
| 2678 | EOF |
| 2679 | |
| 2680 | |
| 2681 | fi |
| 2682 | |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2683 | echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2684 | echo "configure:2685: checking for uintptr_t support" >&5 |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2685 | have_uintptr_t=no |
| 2686 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2687 | #line 2688 "configure" |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2688 | #include "confdefs.h" |
| 2689 | |
| 2690 | int main() { |
| 2691 | uintptr_t x; x = (uintptr_t)0; |
| 2692 | ; return 0; } |
| 2693 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2694 | if { (eval echo configure:2695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2695 | rm -rf conftest* |
| 2696 | cat >> confdefs.h <<\EOF |
| 2697 | #define HAVE_UINTPTR_T 1 |
| 2698 | EOF |
| 2699 | have_uintptr_t=yes |
| 2700 | else |
| 2701 | echo "configure: failed program was:" >&5 |
| 2702 | cat conftest.$ac_ext >&5 |
| 2703 | fi |
| 2704 | rm -f conftest* |
| 2705 | echo "$ac_t""$have_uintptr_t" 1>&6 |
| 2706 | if test "$have_uintptr_t" = yes ; then |
| 2707 | echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2708 | echo "configure:2709: checking size of uintptr_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2709 | if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2710 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2711 | else |
| 2712 | if test "$cross_compiling" = yes; then |
| 2713 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2714 | else |
| 2715 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2716 | #line 2717 "configure" |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2717 | #include "confdefs.h" |
| 2718 | #include <stdio.h> |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2719 | #include <sys/types.h> |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2720 | main() |
| 2721 | { |
| 2722 | FILE *f=fopen("conftestval", "w"); |
| 2723 | if (!f) exit(1); |
| 2724 | fprintf(f, "%d\n", sizeof(uintptr_t)); |
| 2725 | exit(0); |
| 2726 | } |
| 2727 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2728 | if { (eval echo configure:2729: \"$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] | 2729 | then |
| 2730 | ac_cv_sizeof_uintptr_t=`cat conftestval` |
| 2731 | else |
| 2732 | echo "configure: failed program was:" >&5 |
| 2733 | cat conftest.$ac_ext >&5 |
| 2734 | rm -fr conftest* |
| 2735 | ac_cv_sizeof_uintptr_t=0 |
| 2736 | fi |
| 2737 | rm -fr conftest* |
| 2738 | fi |
| 2739 | |
| 2740 | fi |
| 2741 | echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6 |
| 2742 | cat >> confdefs.h <<EOF |
| 2743 | #define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t |
| 2744 | EOF |
| 2745 | |
| 2746 | |
| 2747 | fi |
| 2748 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2749 | # Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>. |
| 2750 | echo $ac_n "checking size of off_t""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2751 | echo "configure:2752: checking size of off_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2752 | 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] | 2753 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2754 | else |
| 2755 | if test "$cross_compiling" = yes; then |
| 2756 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2757 | else |
| 2758 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2759 | #line 2760 "configure" |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2760 | #include "confdefs.h" |
| 2761 | #include <stdio.h> |
| 2762 | #include <sys/types.h> |
| 2763 | main() |
| 2764 | { |
| 2765 | FILE *f=fopen("conftestval", "w"); |
| 2766 | if (!f) exit(1); |
| 2767 | fprintf(f, "%d\n", sizeof(off_t)); |
| 2768 | exit(0); |
| 2769 | } |
| 2770 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2771 | if { (eval echo configure:2772: \"$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] | 2772 | then |
| 2773 | ac_cv_sizeof_off_t=`cat conftestval` |
| 2774 | else |
| 2775 | echo "configure: failed program was:" >&5 |
| 2776 | cat conftest.$ac_ext >&5 |
| 2777 | rm -fr conftest* |
| 2778 | ac_cv_sizeof_off_t=0 |
| 2779 | fi |
| 2780 | rm -fr conftest* |
| 2781 | fi |
| 2782 | |
| 2783 | |
| 2784 | fi |
| 2785 | |
| 2786 | echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6 |
| 2787 | cat >> confdefs.h <<EOF |
| 2788 | #define SIZEOF_OFF_T $ac_cv_sizeof_off_t |
| 2789 | EOF |
| 2790 | |
| 2791 | |
| 2792 | echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2793 | echo "configure:2794: checking whether to enable large file support" >&5 |
Guido van Rossum | 96f2eb9 | 1999-04-10 16:02:18 +0000 | [diff] [blame] | 2794 | if test "$have_long_long" = yes -a \ |
| 2795 | "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \ |
| 2796 | "$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] | 2797 | cat >> confdefs.h <<\EOF |
| 2798 | #define HAVE_LARGEFILE_SUPPORT 1 |
| 2799 | EOF |
| 2800 | |
| 2801 | echo "$ac_t""yes" 1>&6 |
| 2802 | else |
| 2803 | echo "$ac_t""no" 1>&6 |
| 2804 | fi |
| 2805 | |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2806 | # AC_CHECK_SIZEOF() doesn't include <time.h>. |
| 2807 | echo $ac_n "checking size of time_t""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2808 | echo "configure:2809: checking size of time_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2809 | 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] | 2810 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2811 | else |
| 2812 | if test "$cross_compiling" = yes; then |
| 2813 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2814 | else |
| 2815 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2816 | #line 2817 "configure" |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2817 | #include "confdefs.h" |
| 2818 | #include <stdio.h> |
| 2819 | #include <time.h> |
| 2820 | main() |
| 2821 | { |
| 2822 | FILE *f=fopen("conftestval", "w"); |
| 2823 | if (!f) exit(1); |
| 2824 | fprintf(f, "%d\n", sizeof(time_t)); |
| 2825 | exit(0); |
| 2826 | } |
| 2827 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2828 | if { (eval echo configure:2829: \"$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] | 2829 | then |
| 2830 | ac_cv_sizeof_time_t=`cat conftestval` |
| 2831 | else |
| 2832 | echo "configure: failed program was:" >&5 |
| 2833 | cat conftest.$ac_ext >&5 |
| 2834 | rm -fr conftest* |
| 2835 | ac_cv_sizeof_time_t=0 |
| 2836 | fi |
| 2837 | rm -fr conftest* |
| 2838 | fi |
| 2839 | |
| 2840 | |
| 2841 | fi |
| 2842 | |
| 2843 | echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6 |
| 2844 | cat >> confdefs.h <<EOF |
| 2845 | #define SIZEOF_TIME_T $ac_cv_sizeof_time_t |
| 2846 | EOF |
| 2847 | |
| 2848 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2849 | |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2850 | # if have pthread_t then define SIZEOF_PTHREAD_T |
Martin v. Löwis | 123cbd2 | 2001-07-19 14:21:10 +0000 | [diff] [blame] | 2851 | ac_save_cc="$CC" |
| 2852 | if test "$ac_cv_kpthread" = "yes" |
| 2853 | then CC="$CC -Kpthread" |
| 2854 | fi |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2855 | echo $ac_n "checking for pthread_t""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2856 | echo "configure:2857: checking for pthread_t" >&5 |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2857 | have_pthread_t=no |
| 2858 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2859 | #line 2860 "configure" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2860 | #include "confdefs.h" |
| 2861 | #include <pthread.h> |
| 2862 | int main() { |
Guido van Rossum | 1258049 | 2000-09-24 16:47:19 +0000 | [diff] [blame] | 2863 | pthread_t x; x = *(pthread_t*)0; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2864 | ; return 0; } |
| 2865 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2866 | if { (eval echo configure:2867: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2867 | rm -rf conftest* |
| 2868 | have_pthread_t=yes |
| 2869 | else |
| 2870 | echo "configure: failed program was:" >&5 |
| 2871 | cat conftest.$ac_ext >&5 |
| 2872 | fi |
| 2873 | rm -f conftest* |
| 2874 | echo "$ac_t""$have_pthread_t" 1>&6 |
| 2875 | if test "$have_pthread_t" = yes ; then |
| 2876 | # AC_CHECK_SIZEOF() doesn't include <pthread.h>. |
| 2877 | echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2878 | echo "configure:2879: checking size of pthread_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2879 | if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2880 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2881 | else |
| 2882 | if test "$cross_compiling" = yes; then |
| 2883 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2884 | else |
| 2885 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2886 | #line 2887 "configure" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2887 | #include "confdefs.h" |
| 2888 | #include <stdio.h> |
| 2889 | #include <pthread.h> |
| 2890 | main() |
| 2891 | { |
| 2892 | FILE *f=fopen("conftestval", "w"); |
| 2893 | if (!f) exit(1); |
| 2894 | fprintf(f, "%d\n", sizeof(pthread_t)); |
| 2895 | exit(0); |
| 2896 | } |
| 2897 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2898 | if { (eval echo configure:2899: \"$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] | 2899 | then |
| 2900 | ac_cv_sizeof_pthread_t=`cat conftestval` |
| 2901 | else |
| 2902 | echo "configure: failed program was:" >&5 |
| 2903 | cat conftest.$ac_ext >&5 |
| 2904 | rm -fr conftest* |
| 2905 | ac_cv_sizeof_pthread_t=0 |
| 2906 | fi |
| 2907 | rm -fr conftest* |
| 2908 | fi |
| 2909 | |
| 2910 | |
| 2911 | fi |
| 2912 | |
| 2913 | echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6 |
| 2914 | cat >> confdefs.h <<EOF |
| 2915 | #define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t |
| 2916 | EOF |
| 2917 | |
| 2918 | fi |
Martin v. Löwis | 123cbd2 | 2001-07-19 14:21:10 +0000 | [diff] [blame] | 2919 | CC="$ac_save_cc" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2920 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2921 | echo $ac_n "checking for --enable-toolbox-glue""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2922 | echo "configure:2923: checking for --enable-toolbox-glue" >&5 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2923 | # Check whether --enable-toolbox-glue or --disable-toolbox-glue was given. |
| 2924 | if test "${enable_toolbox_glue+set}" = set; then |
| 2925 | enableval="$enable_toolbox_glue" |
| 2926 | : |
| 2927 | fi |
| 2928 | |
| 2929 | |
| 2930 | if test -z "$enable_toolbox_glue" |
| 2931 | then |
| 2932 | case $ac_sys_system/$ac_sys_release in |
| 2933 | Darwin/*) |
| 2934 | enable_toolbox_glue="yes";; |
| 2935 | *) |
| 2936 | enable_toolbox_glue="no";; |
| 2937 | esac |
| 2938 | fi |
| 2939 | case "$enable_toolbox_glue" in |
| 2940 | yes) |
| 2941 | extra_frameworks="-framework Carbon -framework Foundation" |
| 2942 | extra_machdep_objs="Python/mactoolboxglue.o" |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 2943 | extra_undefs="-u __dummy -u _PyMac_Error" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2944 | cat >> confdefs.h <<\EOF |
| 2945 | #define USE_TOOLBOX_OBJECT_GLUE 1 |
| 2946 | EOF |
| 2947 | |
| 2948 | ;; |
| 2949 | *) |
| 2950 | extra_frameworks="" |
| 2951 | extra_machdep_objs="" |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 2952 | extra_undefs="" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2953 | ;; |
| 2954 | esac |
| 2955 | echo "$ac_t""$enable_toolbox_glue" 1>&6 |
| 2956 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2957 | |
| 2958 | case $ac_sys_system/$ac_sys_release in |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 2959 | Darwin/*) |
| 2960 | ns_undef_sym='_environ' |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2961 | LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym" |
| 2962 | LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks" |
| 2963 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python' |
| 2964 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2965 | esac |
| 2966 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2967 | echo $ac_n "checking for --enable-framework""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2968 | echo "configure:2969: checking for --enable-framework" >&5 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2969 | if test "$enable_framework" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2970 | then |
Jack Jansen | ca06bc6 | 2001-08-03 15:32:23 +0000 | [diff] [blame] | 2971 | OPT="$OPT -fno-common -dynamic" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2972 | # -U __environ is needed since bundles don't have access |
| 2973 | # to crt0 when built but will always be linked against it |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2974 | # -F. is needed to allow linking to the framework while |
| 2975 | # in the build location. |
| 2976 | |
| 2977 | LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2978 | cat >> confdefs.h <<\EOF |
| 2979 | #define WITH_NEXT_FRAMEWORK 1 |
| 2980 | EOF |
| 2981 | |
| 2982 | echo "$ac_t""yes" 1>&6 |
| 2983 | else |
| 2984 | echo "$ac_t""no" 1>&6 |
| 2985 | fi |
| 2986 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2987 | echo $ac_n "checking for dyld""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 2988 | echo "configure:2989: checking for dyld" >&5 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2989 | case $ac_sys_system/$ac_sys_release in |
| 2990 | Darwin/*) |
| 2991 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2992 | #define WITH_DYLD 1 |
| 2993 | EOF |
| 2994 | |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2995 | echo "$ac_t""always on for Darwin" 1>&6 |
| 2996 | ;; |
| 2997 | *) |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2998 | echo "$ac_t""no" 1>&6 |
| 2999 | ;; |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3000 | esac |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3001 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3002 | # Set info about shared libraries. |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3003 | |
| 3004 | |
| 3005 | |
| 3006 | |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3007 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3008 | # SO is the extension of shared libraries `(including the dot!) |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3009 | # -- usually .so, .sl on HP-UX, .dll on Cygwin |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3010 | echo $ac_n "checking SO""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3011 | echo "configure:3012: checking SO" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3012 | if test -z "$SO" |
| 3013 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3014 | case $ac_sys_system in |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 3015 | hp*|HP*) SO=.sl;; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3016 | CYGWIN*) SO=.dll;; |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 3017 | *) SO=.so;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3018 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3019 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3020 | echo "$ac_t""$SO" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3021 | # LDSHARED is the ld *command* used to create shared library |
| 3022 | # -- "ld" on SunOS 4.x.x, "ld -G" on SunOS 5.x, "ld -shared" on IRIX 5 |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3023 | # (Shared libraries in this instance are shared modules to be loaded into |
| 3024 | # Python, as opposed to building Python itself as a shared library.) |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3025 | echo $ac_n "checking LDSHARED""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3026 | echo "configure:3027: checking LDSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3027 | if test -z "$LDSHARED" |
| 3028 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3029 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3030 | AIX*) |
| 3031 | BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp" |
| 3032 | LDSHARED="\$(BINLIBDEST)/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/python.exp" |
| 3033 | ;; |
| 3034 | BeOS*) |
| 3035 | BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY" |
| 3036 | LDSHARED="\$(BINLIBDEST)/ld_so_beos \$(LIBDIR)/$LDLIBRARY" |
| 3037 | ;; |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3038 | IRIX/5*) LDSHARED="ld -shared";; |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 3039 | IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3040 | SunOS/4*) LDSHARED="ld";; |
Greg Ward | 57c9a663 | 2000-05-26 12:22:54 +0000 | [diff] [blame] | 3041 | SunOS/5*) |
| 3042 | if test "$GCC" = "yes" |
Neil Schemenauer | 8ba9445 | 2001-02-19 18:18:48 +0000 | [diff] [blame] | 3043 | then LDSHARED='$(CC) -shared' |
Greg Ward | 57c9a663 | 2000-05-26 12:22:54 +0000 | [diff] [blame] | 3044 | else LDSHARED="ld -G"; |
| 3045 | fi ;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3046 | hp*|HP*) LDSHARED="ld -b";; |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 3047 | OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";; |
| 3048 | DYNIX/ptx*) LDSHARED="ld -G";; |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3049 | Darwin/*) |
| 3050 | LDSHARED='$(CC) $(LDFLAGS) -bundle' |
| 3051 | if test "$enable_framework" ; then |
| 3052 | # Link against the framework. All externals should be defined. |
| 3053 | LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)' |
| 3054 | else |
| 3055 | # No framework. Ignore undefined symbols, assuming they come from Python |
| 3056 | LDSHARED="$LDSHARED -undefined suppress" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3057 | fi ;; |
Guido van Rossum | 81652ab | 1996-07-21 02:53:27 +0000 | [diff] [blame] | 3058 | Linux*) LDSHARED="gcc -shared";; |
Guido van Rossum | 3c4bb80 | 1997-12-18 23:55:32 +0000 | [diff] [blame] | 3059 | dgux*) LDSHARED="ld -G";; |
Guido van Rossum | 458e7fa | 1999-09-17 15:40:40 +0000 | [diff] [blame] | 3060 | BSD/OS*/4*) LDSHARED="gcc -shared";; |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 3061 | OpenBSD*) LDSHARED="ld -Bshareable";; |
Guido van Rossum | df69365 | 1999-01-07 21:50:41 +0000 | [diff] [blame] | 3062 | NetBSD*) |
| 3063 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
| 3064 | then |
| 3065 | LDSHARED="cc -shared" |
| 3066 | else |
| 3067 | LDSHARED="ld -Bshareable" |
| 3068 | fi;; |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 3069 | FreeBSD*) |
Jeremy Hylton | 4bcc7c5 | 2000-08-31 17:45:35 +0000 | [diff] [blame] | 3070 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 3071 | then |
| 3072 | LDSHARED="cc -shared ${LDFLAGS}" |
| 3073 | else |
| 3074 | LDSHARED="ld -Bshareable ${LDFLAGS}" |
| 3075 | fi;; |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3076 | UnixWare*) |
| 3077 | if test "$GCC" = "yes" |
| 3078 | then LDSHARED="$(CC) -shared" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3079 | else LDSHARED="$(CC) -G" |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3080 | fi;; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3081 | SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3082 | Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3083 | CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3084 | *) LDSHARED="ld";; |
| 3085 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3086 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3087 | echo "$ac_t""$LDSHARED" 1>&6 |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3088 | BLDSHARED=${BLDSHARED-$LDSHARED} |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3089 | # 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] | 3090 | # library (module) -- this is only needed for a few systems |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3091 | echo $ac_n "checking CCSHARED""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3092 | echo "configure:3093: checking CCSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3093 | if test -z "$CCSHARED" |
| 3094 | then |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3095 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | c761fc8 | 2001-02-19 04:50:49 +0000 | [diff] [blame] | 3096 | SunOS*) if test "$GCC" = yes; |
| 3097 | then CCSHARED="-fPIC"; |
| 3098 | fi;; |
Guido van Rossum | af07a44 | 1995-02-13 19:45:27 +0000 | [diff] [blame] | 3099 | hp*|HP*) if test "$GCC" = yes; |
| 3100 | then CCSHARED="-fpic"; |
| 3101 | else CCSHARED="+z"; |
| 3102 | fi;; |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3103 | Linux*) CCSHARED="-fPIC";; |
Guido van Rossum | f5957ea | 1999-10-05 21:59:33 +0000 | [diff] [blame] | 3104 | BSD/OS*/4*) CCSHARED="-fpic";; |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 3105 | OpenBSD*) CCSHARED="-fpic";; |
| 3106 | FreeBSD*|NetBSD*) CCSHARED="-fPIC";; |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3107 | UnixWare*) |
| 3108 | if test "$GCC" = "yes" |
| 3109 | then CCSHARED="-fPIC" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3110 | else CCSHARED="-KPIC" |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3111 | fi;; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3112 | SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3113 | Monterey*) CCSHARED="-G";; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3114 | IRIX*/6*) case $CC in |
| 3115 | *gcc*) CCSHARED="-shared";; |
Guido van Rossum | ee21f41 | 1998-04-20 18:51:54 +0000 | [diff] [blame] | 3116 | *) CCSHARED="";; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3117 | esac;; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3118 | CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3119 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3120 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3121 | echo "$ac_t""$CCSHARED" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3122 | # LINKFORSHARED are the flags passed to the $(CC) command that links |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3123 | # the python executable -- this is only needed for a few systems |
| 3124 | echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3125 | echo "configure:3126: checking LINKFORSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3126 | if test -z "$LINKFORSHARED" |
| 3127 | then |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3128 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3129 | AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';; |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 3130 | hp*|HP*) |
Guido van Rossum | 304dd2d | 1997-10-20 23:10:56 +0000 | [diff] [blame] | 3131 | LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";; |
Guido van Rossum | f5957ea | 1999-10-05 21:59:33 +0000 | [diff] [blame] | 3132 | BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";; |
Guido van Rossum | 2d9feed | 1997-11-24 17:36:21 +0000 | [diff] [blame] | 3133 | Linux*) LINKFORSHARED="-Xlinker -export-dynamic";; |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3134 | # -u libsys_s pulls in all symbols in libsys |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3135 | Darwin/*) |
| 3136 | # -u __dummy makes the linker aware of the objc runtime |
| 3137 | # in System.framework; otherwise, __objcInit (referenced in |
| 3138 | # crt1.o) gets erroneously defined as common, which breaks dynamic |
| 3139 | # loading of any modules which reference it in System.framework. |
| 3140 | # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is |
| 3141 | # not used by the core itself but which needs to be in the core so |
| 3142 | # that dynamically loaded extension modules have access to it. |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3143 | LINKFORSHARED="$extra_undefs -framework System" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3144 | if test "$enable_framework" |
| 3145 | then |
| 3146 | LINKFORSHARED="$LINKFORSHARED -framework Python" |
| 3147 | fi |
| 3148 | LINKFORSHARED="$LINKFORSHARED $extra_frameworks";; |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3149 | UnixWare*) LINKFORSHARED="-Wl,-Bexport";; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3150 | SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";; |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3151 | ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";; |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 3152 | FreeBSD*|NetBSD*) |
Guido van Rossum | df69365 | 1999-01-07 21:50:41 +0000 | [diff] [blame] | 3153 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
| 3154 | then |
| 3155 | LINKFORSHARED="-Wl,--export-dynamic" |
| 3156 | fi;; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3157 | SunOS/5*) case $CC in |
| 3158 | *gcc*) |
Guido van Rossum | ff48418 | 2000-02-03 13:50:24 +0000 | [diff] [blame] | 3159 | if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null |
Guido van Rossum | 8f4ceb1 | 1997-12-18 23:42:19 +0000 | [diff] [blame] | 3160 | then |
| 3161 | LINKFORSHARED="-Xlinker --export-dynamic" |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3162 | fi;; |
| 3163 | esac;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3164 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3165 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3166 | echo "$ac_t""$LINKFORSHARED" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3167 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3168 | |
| 3169 | echo $ac_n "checking CFLAGSFORSHARED""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3170 | echo "configure:3171: checking CFLAGSFORSHARED" >&5 |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3171 | if test ! "$LIBRARY" = "$LDLIBRARY" |
| 3172 | then |
Neil Schemenauer | 0c6141f | 2001-01-27 21:40:54 +0000 | [diff] [blame] | 3173 | case $ac_sys_system in |
| 3174 | CYGWIN*) |
| 3175 | # Cygwin needs CCSHARED when building extension DLLs |
| 3176 | # but not when building the interpreter DLL. |
| 3177 | CFLAGSFORSHARED='';; |
| 3178 | *) |
| 3179 | CFLAGSFORSHARED='$(CCSHARED)' |
| 3180 | esac |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3181 | fi |
| 3182 | echo "$ac_t""$CFLAGSFORSHARED" 1>&6 |
| 3183 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3184 | # checks for libraries |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3185 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3186 | echo "configure:3187: checking for dlopen in -ldl" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3187 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3188 | 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] | 3189 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3190 | else |
| 3191 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3192 | LIBS="-ldl $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3193 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3194 | #line 3195 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3195 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3196 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3197 | /* We use char because int might match the return type of a gcc2 |
| 3198 | builtin and then its argument prototype would still apply. */ |
| 3199 | char dlopen(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3200 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3201 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3202 | dlopen() |
| 3203 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3204 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3205 | if { (eval echo configure:3206: \"$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] | 3206 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3207 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3208 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3209 | echo "configure: failed program was:" >&5 |
| 3210 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3211 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3212 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3213 | fi |
| 3214 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3215 | LIBS="$ac_save_LIBS" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3216 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3217 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3218 | 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] | 3219 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3220 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 3221 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3222 | cat >> confdefs.h <<EOF |
| 3223 | #define $ac_tr_lib 1 |
| 3224 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3225 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3226 | LIBS="-ldl $LIBS" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3227 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3228 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3229 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3230 | fi |
| 3231 | # Dynamic linking for SunOS/Solaris and SYSV |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3232 | echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3233 | echo "configure:3234: checking for shl_load in -ldld" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3234 | ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3235 | 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] | 3236 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3237 | else |
| 3238 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3239 | LIBS="-ldld $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3240 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3241 | #line 3242 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3242 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3243 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3244 | /* We use char because int might match the return type of a gcc2 |
| 3245 | builtin and then its argument prototype would still apply. */ |
| 3246 | char shl_load(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3247 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3248 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3249 | shl_load() |
| 3250 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3251 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3252 | if { (eval echo configure:3253: \"$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] | 3253 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3254 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3255 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3256 | echo "configure: failed program was:" >&5 |
| 3257 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3258 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3259 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3260 | fi |
| 3261 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3262 | LIBS="$ac_save_LIBS" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3263 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3264 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3265 | 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] | 3266 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3267 | ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 3268 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3269 | cat >> confdefs.h <<EOF |
| 3270 | #define $ac_tr_lib 1 |
| 3271 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3272 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3273 | LIBS="-ldld $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3274 | |
| 3275 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3276 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3277 | fi |
| 3278 | # Dynamic linking for HP-UX |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3279 | |
| 3280 | # checks for system dependent C++ extensions support |
| 3281 | case "$ac_sys_system" in |
| 3282 | AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3283 | echo "configure:3284: checking for genuine AIX C++ extensions support" >&5 |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3284 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3285 | #line 3286 "configure" |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3286 | #include "confdefs.h" |
| 3287 | #include "/usr/lpp/xlC/include/load.h" |
| 3288 | int main() { |
| 3289 | loadAndInit("", 0, "") |
| 3290 | ; return 0; } |
| 3291 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3292 | if { (eval echo configure:3293: \"$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] | 3293 | rm -rf conftest* |
| 3294 | cat >> confdefs.h <<\EOF |
| 3295 | #define AIX_GENUINE_CPLUSPLUS 1 |
| 3296 | EOF |
| 3297 | |
| 3298 | echo "$ac_t""yes" 1>&6 |
| 3299 | else |
| 3300 | echo "configure: failed program was:" >&5 |
| 3301 | cat conftest.$ac_ext >&5 |
| 3302 | rm -rf conftest* |
| 3303 | echo "$ac_t""no" 1>&6 |
| 3304 | fi |
| 3305 | rm -f conftest*;; |
| 3306 | *) ;; |
| 3307 | esac |
| 3308 | |
Guido van Rossum | 70c7f48 | 1998-03-26 18:44:10 +0000 | [diff] [blame] | 3309 | # Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl. |
| 3310 | # However on SGI IRIX, these exist but are broken. |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3311 | # BeOS' sockets are stashed in libnet. |
| 3312 | case "$ac_sys_system" in |
| 3313 | IRIX*) ;; |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3314 | *) |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3315 | echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3316 | echo "configure:3317: checking for t_open in -lnsl" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3317 | ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3318 | 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] | 3319 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3320 | else |
| 3321 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3322 | LIBS="-lnsl $LIBS" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3323 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3324 | #line 3325 "configure" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3325 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3326 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3327 | /* We use char because int might match the return type of a gcc2 |
| 3328 | builtin and then its argument prototype would still apply. */ |
| 3329 | char t_open(); |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3330 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3331 | int main() { |
Guido van Rossum | 0ddb028 | 1995-01-17 16:46:14 +0000 | [diff] [blame] | 3332 | t_open() |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3333 | ; return 0; } |
| 3334 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3335 | if { (eval echo configure:3336: \"$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] | 3336 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3337 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3338 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3339 | echo "configure: failed program was:" >&5 |
| 3340 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3341 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3342 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3343 | fi |
| 3344 | rm -f conftest* |
| 3345 | LIBS="$ac_save_LIBS" |
| 3346 | |
| 3347 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3348 | 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] | 3349 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3350 | LIBS="-lnsl $LIBS" |
| 3351 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3352 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3353 | fi |
Guido van Rossum | 0ddb028 | 1995-01-17 16:46:14 +0000 | [diff] [blame] | 3354 | # SVR4 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3355 | echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3356 | echo "configure:3357: checking for socket in -lsocket" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3357 | ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3358 | 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] | 3359 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3360 | else |
| 3361 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3362 | LIBS="-lsocket $LIBS $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3363 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3364 | #line 3365 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3365 | #include "confdefs.h" |
| 3366 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3367 | /* We use char because int might match the return type of a gcc2 |
| 3368 | builtin and then its argument prototype would still apply. */ |
| 3369 | char socket(); |
| 3370 | |
| 3371 | int main() { |
| 3372 | socket() |
| 3373 | ; return 0; } |
| 3374 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3375 | if { (eval echo configure:3376: \"$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] | 3376 | rm -rf conftest* |
| 3377 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3378 | else |
| 3379 | echo "configure: failed program was:" >&5 |
| 3380 | cat conftest.$ac_ext >&5 |
| 3381 | rm -rf conftest* |
| 3382 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3383 | fi |
| 3384 | rm -f conftest* |
| 3385 | LIBS="$ac_save_LIBS" |
| 3386 | |
| 3387 | fi |
| 3388 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3389 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3390 | LIBS="-lsocket $LIBS" |
| 3391 | else |
| 3392 | echo "$ac_t""no" 1>&6 |
| 3393 | fi |
| 3394 | # SVR4 sockets |
Jeremy Hylton | cb25d5e | 2000-07-27 21:23:28 +0000 | [diff] [blame] | 3395 | ;; |
| 3396 | esac |
| 3397 | case "$ac_sys_system" in |
| 3398 | BeOS*) |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3399 | echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3400 | echo "configure:3401: checking for socket in -lnet" >&5 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3401 | ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3402 | 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] | 3403 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3404 | else |
| 3405 | ac_save_LIBS="$LIBS" |
| 3406 | LIBS="-lnet $LIBS $LIBS" |
| 3407 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3408 | #line 3409 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3409 | #include "confdefs.h" |
| 3410 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3411 | /* We use char because int might match the return type of a gcc2 |
| 3412 | builtin and then its argument prototype would still apply. */ |
| 3413 | char socket(); |
| 3414 | |
| 3415 | int main() { |
| 3416 | socket() |
| 3417 | ; return 0; } |
| 3418 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3419 | if { (eval echo configure:3420: \"$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] | 3420 | rm -rf conftest* |
| 3421 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3422 | else |
| 3423 | echo "configure: failed program was:" >&5 |
| 3424 | cat conftest.$ac_ext >&5 |
| 3425 | rm -rf conftest* |
| 3426 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3427 | fi |
| 3428 | rm -f conftest* |
| 3429 | LIBS="$ac_save_LIBS" |
| 3430 | |
| 3431 | fi |
| 3432 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3433 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3434 | LIBS="-lnet $LIBS" |
| 3435 | else |
| 3436 | echo "$ac_t""no" 1>&6 |
| 3437 | fi |
| 3438 | # BeOS |
| 3439 | ;; |
| 3440 | esac |
Guido van Rossum | 70c7f48 | 1998-03-26 18:44:10 +0000 | [diff] [blame] | 3441 | |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 3442 | echo $ac_n "checking for --with-libs""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3443 | echo "configure:3444: checking for --with-libs" >&5 |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 3444 | # Check whether --with-libs or --without-libs was given. |
| 3445 | if test "${with_libs+set}" = set; then |
| 3446 | withval="$with_libs" |
| 3447 | |
| 3448 | echo "$ac_t""$withval" 1>&6 |
| 3449 | LIBS="$withval $LIBS" |
| 3450 | |
| 3451 | else |
| 3452 | echo "$ac_t""no" 1>&6 |
| 3453 | fi |
| 3454 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3455 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 3456 | # Determine if signalmodule should be used. |
| 3457 | |
| 3458 | |
| 3459 | echo $ac_n "checking for --with-signal-module""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3460 | echo "configure:3461: checking for --with-signal-module" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 3461 | # Check whether --with-signal-module or --without-signal-module was given. |
| 3462 | if test "${with_signal_module+set}" = set; then |
| 3463 | withval="$with_signal_module" |
| 3464 | : |
| 3465 | fi |
| 3466 | |
| 3467 | |
| 3468 | if test -z "$with_signal_module" |
| 3469 | then with_signal_module="yes" |
| 3470 | fi |
| 3471 | echo "$ac_t""$with_signal_module" 1>&6 |
| 3472 | |
| 3473 | if test "${with_signal_module}" = "yes"; then |
| 3474 | USE_SIGNAL_MODULE="" |
| 3475 | SIGNAL_OBJS="" |
| 3476 | else |
| 3477 | USE_SIGNAL_MODULE="#" |
| 3478 | SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o" |
| 3479 | fi |
| 3480 | |
Guido van Rossum | 3d15bd8 | 2001-01-10 18:53:48 +0000 | [diff] [blame] | 3481 | # This is used to generate Setup.config |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 3482 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3483 | USE_THREAD_MODULE="" |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 3484 | |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3485 | echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3486 | echo "configure:3487: checking for --with-dec-threads" >&5 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3487 | |
| 3488 | # Check whether --with-dec-threads or --without-dec-threads was given. |
| 3489 | if test "${with_dec_threads+set}" = set; then |
| 3490 | withval="$with_dec_threads" |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3491 | |
| 3492 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3493 | LDLAST=-threads |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3494 | if test "${with_thread+set}" != set; then |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3495 | with_thread="$withval"; |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3496 | fi |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3497 | else |
| 3498 | echo "$ac_t""no" 1>&6 |
| 3499 | fi |
| 3500 | |
| 3501 | |
| 3502 | echo $ac_n "checking for --with-threads""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3503 | echo "configure:3504: checking for --with-threads" >&5 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3504 | # Check whether --with-threads or --without-threads was given. |
| 3505 | if test "${with_threads+set}" = set; then |
| 3506 | withval="$with_threads" |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3507 | : |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3508 | fi |
| 3509 | |
| 3510 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3511 | # --with-thread is deprecated, but check for it anyway |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3512 | # Check whether --with-thread or --without-thread was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3513 | if test "${with_thread+set}" = set; then |
| 3514 | withval="$with_thread" |
Barry Warsaw | a0f3c5c | 2000-06-30 16:39:35 +0000 | [diff] [blame] | 3515 | |
| 3516 | with_threads=$with_thread |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3517 | fi |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3518 | |
| 3519 | |
| 3520 | if test -z "$with_threads" |
| 3521 | then with_threads="yes" |
| 3522 | fi |
| 3523 | echo "$ac_t""$with_threads" 1>&6 |
| 3524 | |
| 3525 | if test "$with_threads" = "no" |
| 3526 | then |
| 3527 | USE_THREAD_MODULE="#" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3528 | elif test "$ac_cv_kpthread" = "yes" |
| 3529 | then |
| 3530 | CC="$CC -Kpthread" |
| 3531 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 3532 | #define WITH_THREAD 1 |
| 3533 | EOF |
| 3534 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3535 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 3536 | #define _POSIX_THREADS 1 |
| 3537 | EOF |
| 3538 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3539 | LIBOBJS="$LIBOBJS thread.o" |
| 3540 | else |
| 3541 | if test ! -z "$with_threads" -a -d "$with_threads" |
| 3542 | then LDFLAGS="$LDFLAGS -L$with_threads" |
| 3543 | fi |
| 3544 | if test ! -z "$withval" -a -d "$withval" |
| 3545 | then LDFLAGS="$LDFLAGS -L$withval" |
| 3546 | fi |
| 3547 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9caf77a | 1996-08-01 00:52:26 +0000 | [diff] [blame] | 3548 | #define _REENTRANT 1 |
| 3549 | EOF |
| 3550 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3551 | ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3552 | echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3553 | echo "configure:3554: checking for mach/cthreads.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3554 | 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] | 3555 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3556 | else |
| 3557 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3558 | #line 3559 "configure" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3559 | #include "confdefs.h" |
| 3560 | #include <mach/cthreads.h> |
| 3561 | EOF |
| 3562 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3563 | { (eval echo configure:3564: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 3564 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3565 | if test -z "$ac_err"; then |
| 3566 | rm -rf conftest* |
| 3567 | eval "ac_cv_header_$ac_safe=yes" |
| 3568 | else |
| 3569 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3570 | echo "configure: failed program was:" >&5 |
| 3571 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3572 | rm -rf conftest* |
| 3573 | eval "ac_cv_header_$ac_safe=no" |
| 3574 | fi |
| 3575 | rm -f conftest* |
| 3576 | fi |
| 3577 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 3578 | echo "$ac_t""yes" 1>&6 |
| 3579 | cat >> confdefs.h <<\EOF |
| 3580 | #define WITH_THREAD 1 |
| 3581 | EOF |
| 3582 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3583 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3584 | #define C_THREADS 1 |
| 3585 | EOF |
| 3586 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3587 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3588 | else |
| 3589 | echo "$ac_t""no" 1>&6 |
| 3590 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3591 | echo $ac_n "checking for --with-pth""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3592 | echo "configure:3593: checking for --with-pth" >&5 |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3593 | # Check whether --with-pth or --without-pth was given. |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3594 | if test "${with_pth+set}" = set; then |
| 3595 | withval="$with_pth" |
| 3596 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3597 | echo "$ac_t""$withval" 1>&6 |
| 3598 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3599 | #define WITH_THREAD 1 |
| 3600 | EOF |
| 3601 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3602 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3603 | #define HAVE_PTH 1 |
| 3604 | EOF |
| 3605 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3606 | LIBS="-lpth $LIBS" |
| 3607 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3608 | else |
| 3609 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3610 | echo "$ac_t""no" 1>&6 |
| 3611 | echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3612 | echo "configure:3613: checking for pthread_create in -lpthread" >&5 |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3613 | ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3614 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3615 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3616 | else |
| 3617 | ac_save_LIBS="$LIBS" |
| 3618 | LIBS="-lpthread $LIBS" |
| 3619 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3620 | #line 3621 "configure" |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3621 | #include "confdefs.h" |
| 3622 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3623 | /* We use char because int might match the return type of a gcc2 |
| 3624 | builtin and then its argument prototype would still apply. */ |
| 3625 | char pthread_create(); |
| 3626 | |
| 3627 | int main() { |
| 3628 | pthread_create() |
| 3629 | ; return 0; } |
| 3630 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3631 | if { (eval echo configure:3632: \"$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] | 3632 | rm -rf conftest* |
| 3633 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3634 | else |
| 3635 | echo "configure: failed program was:" >&5 |
| 3636 | cat conftest.$ac_ext >&5 |
| 3637 | rm -rf conftest* |
| 3638 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3639 | fi |
| 3640 | rm -f conftest* |
| 3641 | LIBS="$ac_save_LIBS" |
| 3642 | |
| 3643 | fi |
| 3644 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3645 | echo "$ac_t""yes" 1>&6 |
| 3646 | cat >> confdefs.h <<\EOF |
| 3647 | #define WITH_THREAD 1 |
| 3648 | EOF |
| 3649 | |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3650 | case $ac_sys_system in |
| 3651 | Darwin*) ;; |
| 3652 | *) cat >> confdefs.h <<\EOF |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3653 | #define _POSIX_THREADS 1 |
| 3654 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3655 | ;; |
| 3656 | esac |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3657 | LIBS="-lpthread $LIBS" |
| 3658 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3659 | else |
| 3660 | echo "$ac_t""no" 1>&6 |
| 3661 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3662 | echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3663 | echo "configure:3664: checking for pthread_detach" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3664 | 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] | 3665 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3666 | else |
| 3667 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3668 | #line 3669 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3669 | #include "confdefs.h" |
| 3670 | /* System header to define __stub macros and hopefully few prototypes, |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3671 | which can conflict with char pthread_detach(); below. */ |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3672 | #include <assert.h> |
| 3673 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3674 | /* We use char because int might match the return type of a gcc2 |
| 3675 | builtin and then its argument prototype would still apply. */ |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3676 | char pthread_detach(); |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3677 | |
| 3678 | int main() { |
| 3679 | |
| 3680 | /* The GNU C library defines this for functions which it implements |
| 3681 | to always fail with ENOSYS. Some functions are actually named |
| 3682 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3683 | #if defined (__stub_pthread_detach) || defined (__stub___pthread_detach) |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3684 | choke me |
| 3685 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3686 | pthread_detach(); |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3687 | #endif |
| 3688 | |
| 3689 | ; return 0; } |
| 3690 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3691 | if { (eval echo configure:3692: \"$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] | 3692 | rm -rf conftest* |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3693 | eval "ac_cv_func_pthread_detach=yes" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3694 | else |
| 3695 | echo "configure: failed program was:" >&5 |
| 3696 | cat conftest.$ac_ext >&5 |
| 3697 | rm -rf conftest* |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3698 | eval "ac_cv_func_pthread_detach=no" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3699 | fi |
| 3700 | rm -f conftest* |
| 3701 | fi |
| 3702 | |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3703 | if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3704 | echo "$ac_t""yes" 1>&6 |
| 3705 | cat >> confdefs.h <<\EOF |
| 3706 | #define WITH_THREAD 1 |
| 3707 | EOF |
| 3708 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3709 | case $ac_sys_system in |
| 3710 | Darwin*) ;; |
| 3711 | *) cat >> confdefs.h <<\EOF |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3712 | #define _POSIX_THREADS 1 |
| 3713 | EOF |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 3714 | ;; |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3715 | esac |
| 3716 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3717 | else |
| 3718 | echo "$ac_t""no" 1>&6 |
| 3719 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3720 | ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'` |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3721 | echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3722 | echo "configure:3723: checking for kernel/OS.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3723 | 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] | 3724 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3725 | else |
| 3726 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3727 | #line 3728 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3728 | #include "confdefs.h" |
| 3729 | #include <kernel/OS.h> |
| 3730 | EOF |
| 3731 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3732 | { (eval echo configure:3733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 3733 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3734 | if test -z "$ac_err"; then |
| 3735 | rm -rf conftest* |
| 3736 | eval "ac_cv_header_$ac_safe=yes" |
| 3737 | else |
| 3738 | echo "$ac_err" >&5 |
| 3739 | echo "configure: failed program was:" >&5 |
| 3740 | cat conftest.$ac_ext >&5 |
| 3741 | rm -rf conftest* |
| 3742 | eval "ac_cv_header_$ac_safe=no" |
| 3743 | fi |
| 3744 | rm -f conftest* |
| 3745 | fi |
| 3746 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 3747 | echo "$ac_t""yes" 1>&6 |
| 3748 | cat >> confdefs.h <<\EOF |
| 3749 | #define WITH_THREAD 1 |
| 3750 | EOF |
| 3751 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3752 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3753 | #define BEOS_THREADS 1 |
| 3754 | EOF |
| 3755 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3756 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3757 | else |
| 3758 | echo "$ac_t""no" 1>&6 |
| 3759 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3760 | echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3761 | echo "configure:3762: checking for pthread_create in -lpthreads" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3762 | ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3763 | 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] | 3764 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3765 | else |
| 3766 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3767 | LIBS="-lpthreads $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3768 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3769 | #line 3770 "configure" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3770 | #include "confdefs.h" |
| 3771 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3772 | /* We use char because int might match the return type of a gcc2 |
| 3773 | builtin and then its argument prototype would still apply. */ |
| 3774 | char pthread_create(); |
| 3775 | |
| 3776 | int main() { |
| 3777 | pthread_create() |
| 3778 | ; return 0; } |
| 3779 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3780 | if { (eval echo configure:3781: \"$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] | 3781 | rm -rf conftest* |
| 3782 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3783 | else |
| 3784 | echo "configure: failed program was:" >&5 |
| 3785 | cat conftest.$ac_ext >&5 |
| 3786 | rm -rf conftest* |
| 3787 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3788 | fi |
| 3789 | rm -f conftest* |
| 3790 | LIBS="$ac_save_LIBS" |
| 3791 | |
| 3792 | fi |
| 3793 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3794 | echo "$ac_t""yes" 1>&6 |
| 3795 | cat >> confdefs.h <<\EOF |
| 3796 | #define WITH_THREAD 1 |
| 3797 | EOF |
| 3798 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3799 | cat >> confdefs.h <<\EOF |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3800 | #define _POSIX_THREADS 1 |
| 3801 | EOF |
| 3802 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3803 | LIBS="$LIBS -lpthreads" |
| 3804 | LIBOBJS="$LIBOBJS thread.o" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3805 | else |
| 3806 | echo "$ac_t""no" 1>&6 |
| 3807 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3808 | echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3809 | echo "configure:3810: checking for pthread_create in -lc_r" >&5 |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3810 | ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3811 | 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] | 3812 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3813 | else |
| 3814 | ac_save_LIBS="$LIBS" |
| 3815 | LIBS="-lc_r $LIBS" |
| 3816 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3817 | #line 3818 "configure" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 3818 | #include "confdefs.h" |
| 3819 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3820 | /* We use char because int might match the return type of a gcc2 |
| 3821 | builtin and then its argument prototype would still apply. */ |
| 3822 | char pthread_create(); |
| 3823 | |
| 3824 | int main() { |
| 3825 | pthread_create() |
| 3826 | ; return 0; } |
| 3827 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3828 | if { (eval echo configure:3829: \"$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] | 3829 | rm -rf conftest* |
| 3830 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3831 | else |
| 3832 | echo "configure: failed program was:" >&5 |
| 3833 | cat conftest.$ac_ext >&5 |
| 3834 | rm -rf conftest* |
| 3835 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3836 | fi |
| 3837 | rm -f conftest* |
| 3838 | LIBS="$ac_save_LIBS" |
| 3839 | |
| 3840 | fi |
| 3841 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3842 | echo "$ac_t""yes" 1>&6 |
| 3843 | cat >> confdefs.h <<\EOF |
| 3844 | #define WITH_THREAD 1 |
| 3845 | EOF |
| 3846 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3847 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 3848 | #define _POSIX_THREADS 1 |
| 3849 | EOF |
| 3850 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3851 | LIBS="$LIBS -lc_r" |
| 3852 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3853 | else |
| 3854 | echo "$ac_t""no" 1>&6 |
| 3855 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3856 | echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3857 | echo "configure:3858: checking for __d6_pthread_create in -lthread" >&5 |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3858 | ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3859 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3860 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3861 | else |
| 3862 | ac_save_LIBS="$LIBS" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3863 | LIBS="-lthread $LIBS" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3864 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3865 | #line 3866 "configure" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3866 | #include "confdefs.h" |
| 3867 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3868 | /* We use char because int might match the return type of a gcc2 |
| 3869 | builtin and then its argument prototype would still apply. */ |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3870 | char __d6_pthread_create(); |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3871 | |
| 3872 | int main() { |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3873 | __d6_pthread_create() |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3874 | ; return 0; } |
| 3875 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3876 | if { (eval echo configure:3877: \"$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] | 3877 | rm -rf conftest* |
| 3878 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3879 | else |
| 3880 | echo "configure: failed program was:" >&5 |
| 3881 | cat conftest.$ac_ext >&5 |
| 3882 | rm -rf conftest* |
| 3883 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3884 | fi |
| 3885 | rm -f conftest* |
| 3886 | LIBS="$ac_save_LIBS" |
| 3887 | |
| 3888 | fi |
| 3889 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3890 | echo "$ac_t""yes" 1>&6 |
| 3891 | cat >> confdefs.h <<\EOF |
| 3892 | #define WITH_THREAD 1 |
| 3893 | EOF |
| 3894 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3895 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3896 | #define _POSIX_THREADS 1 |
| 3897 | EOF |
| 3898 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3899 | LIBS="$LIBS -lthread" |
| 3900 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 3901 | else |
| 3902 | echo "$ac_t""no" 1>&6 |
| 3903 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3904 | echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3905 | echo "configure:3906: checking for __pthread_create_system in -lpthread" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3906 | ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'` |
| 3907 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 3908 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3909 | else |
| 3910 | ac_save_LIBS="$LIBS" |
| 3911 | LIBS="-lpthread $LIBS" |
| 3912 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3913 | #line 3914 "configure" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3914 | #include "confdefs.h" |
| 3915 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3916 | /* We use char because int might match the return type of a gcc2 |
| 3917 | builtin and then its argument prototype would still apply. */ |
| 3918 | char __pthread_create_system(); |
| 3919 | |
| 3920 | int main() { |
| 3921 | __pthread_create_system() |
| 3922 | ; return 0; } |
| 3923 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3924 | if { (eval echo configure:3925: \"$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] | 3925 | rm -rf conftest* |
| 3926 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3927 | else |
| 3928 | echo "configure: failed program was:" >&5 |
| 3929 | cat conftest.$ac_ext >&5 |
| 3930 | rm -rf conftest* |
| 3931 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3932 | fi |
| 3933 | rm -f conftest* |
| 3934 | LIBS="$ac_save_LIBS" |
| 3935 | |
| 3936 | fi |
| 3937 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3938 | echo "$ac_t""yes" 1>&6 |
| 3939 | cat >> confdefs.h <<\EOF |
| 3940 | #define WITH_THREAD 1 |
| 3941 | EOF |
| 3942 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3943 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3944 | #define _POSIX_THREADS 1 |
| 3945 | EOF |
| 3946 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3947 | LIBS="$LIBS -lpthread" |
| 3948 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3949 | else |
| 3950 | echo "$ac_t""no" 1>&6 |
| 3951 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3952 | echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3953 | echo "configure:3954: checking for pthread_create in -lcma" >&5 |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3954 | ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3955 | 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] | 3956 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3957 | else |
| 3958 | ac_save_LIBS="$LIBS" |
| 3959 | LIBS="-lcma $LIBS" |
| 3960 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3961 | #line 3962 "configure" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3962 | #include "confdefs.h" |
| 3963 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3964 | /* We use char because int might match the return type of a gcc2 |
| 3965 | builtin and then its argument prototype would still apply. */ |
| 3966 | char pthread_create(); |
| 3967 | |
| 3968 | int main() { |
| 3969 | pthread_create() |
| 3970 | ; return 0; } |
| 3971 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 3972 | if { (eval echo configure:3973: \"$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] | 3973 | rm -rf conftest* |
| 3974 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3975 | else |
| 3976 | echo "configure: failed program was:" >&5 |
| 3977 | cat conftest.$ac_ext >&5 |
| 3978 | rm -rf conftest* |
| 3979 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3980 | fi |
| 3981 | rm -f conftest* |
| 3982 | LIBS="$ac_save_LIBS" |
| 3983 | |
| 3984 | fi |
| 3985 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3986 | echo "$ac_t""yes" 1>&6 |
| 3987 | cat >> confdefs.h <<\EOF |
| 3988 | #define WITH_THREAD 1 |
| 3989 | EOF |
| 3990 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3991 | cat >> confdefs.h <<\EOF |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3992 | #define _POSIX_THREADS 1 |
| 3993 | EOF |
| 3994 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3995 | LIBS="$LIBS -lcma" |
| 3996 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3997 | else |
| 3998 | echo "$ac_t""no" 1>&6 |
Thomas Wouters | 0db2b2b | 2000-08-26 11:33:43 +0000 | [diff] [blame] | 3999 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4000 | USE_THREAD_MODULE="#" |
Guido van Rossum | 2d38f91 | 1996-06-26 19:47:01 +0000 | [diff] [blame] | 4001 | fi |
| 4002 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4003 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4004 | fi |
| 4005 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 4006 | fi |
| 4007 | |
Guido van Rossum | 0be3e49 | 1997-05-22 20:33:33 +0000 | [diff] [blame] | 4008 | fi |
| 4009 | |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4010 | fi |
| 4011 | |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4012 | fi |
| 4013 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 4014 | fi |
| 4015 | |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 4016 | fi |
| 4017 | |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4018 | fi |
| 4019 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4020 | fi |
| 4021 | |
Guido van Rossum | 0be3e49 | 1997-05-22 20:33:33 +0000 | [diff] [blame] | 4022 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4023 | echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4024 | echo "configure:4025: checking for usconfig in -lmpc" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4025 | ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4026 | 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] | 4027 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4028 | else |
| 4029 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4030 | LIBS="-lmpc $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4031 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4032 | #line 4033 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4033 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4034 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4035 | /* We use char because int might match the return type of a gcc2 |
| 4036 | builtin and then its argument prototype would still apply. */ |
| 4037 | char usconfig(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4038 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4039 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4040 | usconfig() |
| 4041 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4042 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4043 | if { (eval echo configure:4044: \"$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] | 4044 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4045 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4046 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4047 | echo "configure: failed program was:" >&5 |
| 4048 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4049 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4050 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4051 | fi |
| 4052 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4053 | LIBS="$ac_save_LIBS" |
| 4054 | |
| 4055 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4056 | 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] | 4057 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4058 | cat >> confdefs.h <<\EOF |
| 4059 | #define WITH_THREAD 1 |
| 4060 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4061 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4062 | LIBS="$LIBS -lmpc" |
| 4063 | LIBOBJS="$LIBOBJS thread.o" |
| 4064 | USE_THREAD_MODULE="" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4065 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4066 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4067 | fi |
| 4068 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4069 | echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4070 | echo "configure:4071: checking for thr_create in -lthread" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4071 | ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4072 | 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] | 4073 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4074 | else |
| 4075 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4076 | LIBS="-lthread $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4077 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4078 | #line 4079 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4079 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4080 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4081 | /* We use char because int might match the return type of a gcc2 |
| 4082 | builtin and then its argument prototype would still apply. */ |
| 4083 | char thr_create(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4084 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4085 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4086 | thr_create() |
| 4087 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4088 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4089 | if { (eval echo configure:4090: \"$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] | 4090 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4091 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4092 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4093 | echo "configure: failed program was:" >&5 |
| 4094 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4095 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4096 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4097 | fi |
| 4098 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4099 | LIBS="$ac_save_LIBS" |
| 4100 | |
| 4101 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4102 | 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] | 4103 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4104 | cat >> confdefs.h <<\EOF |
| 4105 | #define WITH_THREAD 1 |
| 4106 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4107 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4108 | LIBS="$LIBS -lthread" |
| 4109 | LIBOBJS="$LIBOBJS thread.o" |
| 4110 | USE_THREAD_MODULE="" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4111 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4112 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4113 | fi |
| 4114 | |
Jeremy Hylton | 1a2ca86 | 2000-10-16 16:59:12 +0000 | [diff] [blame] | 4115 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4116 | if test "$USE_THREAD_MODULE" != "#" |
| 4117 | then |
| 4118 | # If the above checks didn't disable threads, (at least) OSF1 |
| 4119 | # needs this '-threads' argument during linking. |
| 4120 | case $ac_sys_system in |
| 4121 | OSF1) LDLAST=-threads;; |
| 4122 | esac |
Jeremy Hylton | 1a2ca86 | 2000-10-16 16:59:12 +0000 | [diff] [blame] | 4123 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4124 | fi |
| 4125 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4126 | # Check for enable-ipv6 |
| 4127 | echo $ac_n "checking whether to enable ipv6""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4128 | echo "configure:4129: checking whether to enable ipv6" >&5 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4129 | # Check whether --enable-ipv6 or --disable-ipv6 was given. |
| 4130 | if test "${enable_ipv6+set}" = set; then |
| 4131 | enableval="$enable_ipv6" |
| 4132 | case "$enableval" in |
| 4133 | no) |
| 4134 | echo "$ac_t""no" 1>&6 |
| 4135 | ipv6=no |
| 4136 | ;; |
| 4137 | *) echo "$ac_t""yes" 1>&6 |
| 4138 | cat >> confdefs.h <<\EOF |
| 4139 | #define ENABLE_IPV6 1 |
| 4140 | EOF |
| 4141 | |
| 4142 | ipv6=yes |
| 4143 | ;; |
| 4144 | esac |
| 4145 | else |
| 4146 | if test "$cross_compiling" = yes; then |
| 4147 | echo "$ac_t""no" 1>&6 |
| 4148 | ipv6=no |
| 4149 | |
| 4150 | else |
| 4151 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4152 | #line 4153 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4153 | #include "confdefs.h" |
| 4154 | /* AF_INET6 available check */ |
| 4155 | #include <sys/types.h> |
| 4156 | #include <sys/socket.h> |
| 4157 | main() |
| 4158 | { |
| 4159 | if (socket(AF_INET6, SOCK_STREAM, 0) < 0) |
| 4160 | exit(1); |
| 4161 | else |
| 4162 | exit(0); |
| 4163 | } |
| 4164 | |
| 4165 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4166 | if { (eval echo configure:4167: \"$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] | 4167 | then |
| 4168 | echo "$ac_t""yes" 1>&6 |
| 4169 | cat >> confdefs.h <<\EOF |
| 4170 | #define ENABLE_IPV6 1 |
| 4171 | EOF |
| 4172 | |
| 4173 | ipv6=yes |
| 4174 | else |
| 4175 | echo "configure: failed program was:" >&5 |
| 4176 | cat conftest.$ac_ext >&5 |
| 4177 | rm -fr conftest* |
| 4178 | echo "$ac_t""no" 1>&6 |
| 4179 | ipv6=no |
| 4180 | fi |
| 4181 | rm -fr conftest* |
| 4182 | fi |
| 4183 | |
| 4184 | fi |
| 4185 | |
| 4186 | |
| 4187 | ipv6type=unknown |
| 4188 | ipv6lib=none |
| 4189 | ipv6trylibc=no |
| 4190 | |
| 4191 | if test "$ipv6" = "yes"; then |
| 4192 | echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4193 | echo "configure:4194: checking ipv6 stack type" >&5 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4194 | for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta; do |
| 4195 | case $i in |
| 4196 | inria) |
| 4197 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4198 | #line 4199 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4199 | #include "confdefs.h" |
| 4200 | dnl |
| 4201 | #include <netinet/in.h> |
| 4202 | #ifdef IPV6_INRIA_VERSION |
| 4203 | yes |
| 4204 | #endif |
| 4205 | EOF |
| 4206 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4207 | egrep "yes" >/dev/null 2>&1; then |
| 4208 | rm -rf conftest* |
| 4209 | ipv6type=$i; |
| 4210 | OPT="-DINET6 $OPT" |
| 4211 | fi |
| 4212 | rm -f conftest* |
| 4213 | |
| 4214 | ;; |
| 4215 | kame) |
| 4216 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4217 | #line 4218 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4218 | #include "confdefs.h" |
| 4219 | dnl |
| 4220 | #include <netinet/in.h> |
| 4221 | #ifdef __KAME__ |
| 4222 | yes |
| 4223 | #endif |
| 4224 | EOF |
| 4225 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4226 | egrep "yes" >/dev/null 2>&1; then |
| 4227 | rm -rf conftest* |
| 4228 | ipv6type=$i; |
| 4229 | ipv6lib=inet6 |
| 4230 | ipv6libdir=/usr/local/v6/lib |
| 4231 | ipv6trylibc=yes |
| 4232 | OPT="-DINET6 $OPT" |
| 4233 | fi |
| 4234 | rm -f conftest* |
| 4235 | |
| 4236 | ;; |
| 4237 | linux-glibc) |
| 4238 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4239 | #line 4240 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4240 | #include "confdefs.h" |
| 4241 | dnl |
| 4242 | #include <features.h> |
| 4243 | #if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)) |
| 4244 | yes |
| 4245 | #endif |
| 4246 | EOF |
| 4247 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4248 | egrep "yes" >/dev/null 2>&1; then |
| 4249 | rm -rf conftest* |
| 4250 | ipv6type=$i; |
| 4251 | ipv6trylibc=yes |
| 4252 | OPT="-DINET6 $OPT" |
| 4253 | fi |
| 4254 | rm -f conftest* |
| 4255 | |
| 4256 | ;; |
| 4257 | linux-inet6) |
| 4258 | if test -d /usr/inet6; then |
| 4259 | ipv6type=$i |
| 4260 | ipv6lib=inet6 |
| 4261 | ipv6libdir=/usr/inet6/lib |
| 4262 | OPT="-DINET6 -I/usr/inet6/include $OPT" |
| 4263 | fi |
| 4264 | ;; |
| 4265 | solaris) |
| 4266 | if test -f /etc/netconfig; then |
| 4267 | if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then |
| 4268 | ipv6type=$i |
| 4269 | ipv6trylibc=yes |
| 4270 | OPT="-DINET6 $OPT" |
| 4271 | fi |
| 4272 | fi |
| 4273 | ;; |
| 4274 | toshiba) |
| 4275 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4276 | #line 4277 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4277 | #include "confdefs.h" |
| 4278 | dnl |
| 4279 | #include <sys/param.h> |
| 4280 | #ifdef _TOSHIBA_INET6 |
| 4281 | yes |
| 4282 | #endif |
| 4283 | EOF |
| 4284 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4285 | egrep "yes" >/dev/null 2>&1; then |
| 4286 | rm -rf conftest* |
| 4287 | ipv6type=$i; |
| 4288 | ipv6lib=inet6; |
| 4289 | ipv6libdir=/usr/local/v6/lib; |
| 4290 | OPT="-DINET6 $OPT" |
| 4291 | fi |
| 4292 | rm -f conftest* |
| 4293 | |
| 4294 | ;; |
| 4295 | v6d) |
| 4296 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4297 | #line 4298 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4298 | #include "confdefs.h" |
| 4299 | dnl |
| 4300 | #include </usr/local/v6/include/sys/v6config.h> |
| 4301 | #ifdef __V6D__ |
| 4302 | yes |
| 4303 | #endif |
| 4304 | EOF |
| 4305 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4306 | egrep "yes" >/dev/null 2>&1; then |
| 4307 | rm -rf conftest* |
| 4308 | ipv6type=$i; |
| 4309 | ipv6lib=v6; |
| 4310 | ipv6libdir=/usr/local/v6/lib; |
| 4311 | OPT="-I/usr/local/v6/include $OPT" |
| 4312 | fi |
| 4313 | rm -f conftest* |
| 4314 | |
| 4315 | ;; |
| 4316 | zeta) |
| 4317 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4318 | #line 4319 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4319 | #include "confdefs.h" |
| 4320 | dnl |
| 4321 | #include <sys/param.h> |
| 4322 | #ifdef _ZETA_MINAMI_INET6 |
| 4323 | yes |
| 4324 | #endif |
| 4325 | EOF |
| 4326 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4327 | egrep "yes" >/dev/null 2>&1; then |
| 4328 | rm -rf conftest* |
| 4329 | ipv6type=$i; |
| 4330 | ipv6lib=inet6; |
| 4331 | ipv6libdir=/usr/local/v6/lib; |
| 4332 | OPT="-DINET6 $OPT" |
| 4333 | fi |
| 4334 | rm -f conftest* |
| 4335 | |
| 4336 | ;; |
| 4337 | esac |
| 4338 | if test "$ipv6type" != "unknown"; then |
| 4339 | break |
| 4340 | fi |
| 4341 | done |
| 4342 | echo "$ac_t""$ipv6type" 1>&6 |
| 4343 | fi |
| 4344 | |
| 4345 | if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then |
| 4346 | if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then |
| 4347 | LIBS="-L$ipv6libdir -l$ipv6lib $LIBS" |
| 4348 | echo "using lib$ipv6lib" |
| 4349 | else |
| 4350 | if test $ipv6trylibc = "yes"; then |
| 4351 | echo "using libc" |
| 4352 | else |
| 4353 | echo 'Fatal: no $ipv6lib library found. cannot continue.' |
| 4354 | echo "You need to fetch lib$ipv6lib.a from appropriate" |
| 4355 | echo 'ipv6 kit and compile beforehand.' |
| 4356 | exit 1 |
| 4357 | fi |
| 4358 | fi |
| 4359 | fi |
| 4360 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4361 | # Check for GC support |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4362 | echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4363 | echo "configure:4364: checking for --with-cycle-gc" >&5 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4364 | # Check whether --with-cycle-gc or --without-cycle-gc was given. |
| 4365 | if test "${with_cycle_gc+set}" = set; then |
| 4366 | withval="$with_cycle_gc" |
| 4367 | : |
| 4368 | fi |
| 4369 | |
| 4370 | |
| 4371 | if test -z "$with_cycle_gc" |
| 4372 | then with_cycle_gc="yes" |
| 4373 | fi |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4374 | if test "$with_cycle_gc" != "no" |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4375 | then |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4376 | cat >> confdefs.h <<\EOF |
| 4377 | #define WITH_CYCLE_GC 1 |
| 4378 | EOF |
| 4379 | |
| 4380 | fi |
| 4381 | echo "$ac_t""$with_cycle_gc" 1>&6 |
| 4382 | |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 4383 | # Check for Python-specific malloc support |
| 4384 | echo $ac_n "checking for --with-pymalloc""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4385 | echo "configure:4386: checking for --with-pymalloc" >&5 |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 4386 | # Check whether --with-pymalloc or --without-pymalloc was given. |
| 4387 | if test "${with_pymalloc+set}" = set; then |
| 4388 | withval="$with_pymalloc" |
| 4389 | |
| 4390 | if test "$withval" != no |
| 4391 | then cat >> confdefs.h <<\EOF |
| 4392 | #define WITH_PYMALLOC 1 |
| 4393 | EOF |
| 4394 | echo "$ac_t""yes" 1>&6 |
| 4395 | else echo "$ac_t""no" 1>&6 |
| 4396 | fi |
| 4397 | else |
| 4398 | echo "$ac_t""no" 1>&6 |
| 4399 | fi |
| 4400 | |
| 4401 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4402 | # Check for --with-wctype-functions |
| 4403 | echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4404 | echo "configure:4405: checking for --with-wctype-functions" >&5 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4405 | # Check whether --with-wctype-functions or --without-wctype-functions was given. |
| 4406 | if test "${with_wctype_functions+set}" = set; then |
| 4407 | withval="$with_wctype_functions" |
| 4408 | |
| 4409 | if test "$withval" != no |
| 4410 | then cat >> confdefs.h <<\EOF |
| 4411 | #define WANT_WCTYPE_FUNCTIONS 1 |
| 4412 | EOF |
| 4413 | echo "$ac_t""yes" 1>&6 |
| 4414 | else echo "$ac_t""no" 1>&6 |
| 4415 | fi |
| 4416 | else |
| 4417 | echo "$ac_t""no" 1>&6 |
| 4418 | fi |
| 4419 | |
| 4420 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4421 | # -I${DLINCLDIR} is added to the compile rule for importdl.o |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4422 | |
| 4423 | DLINCLDIR=/ |
| 4424 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4425 | echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4426 | echo "configure:4427: checking for --with-sgi-dl" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4427 | # Check whether --with-sgi-dl or --without-sgi-dl was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4428 | if test "${with_sgi_dl+set}" = set; then |
| 4429 | withval="$with_sgi_dl" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4430 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4431 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4432 | cat >> confdefs.h <<\EOF |
| 4433 | #define WITH_SGI_DL 1 |
| 4434 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4435 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4436 | DYNLOADFILE="dynload_dl.o" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4437 | dldir=$withval |
Guido van Rossum | 4095101 | 2000-10-07 16:21:27 +0000 | [diff] [blame] | 4438 | if test ! -z "$dldir" -a -d "$dldir" |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 4439 | then LDFLAGS="$LDFLAGS -L$dldir" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4440 | 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] | 4441 | fi |
| 4442 | DLINCLDIR=${dldir} |
| 4443 | LIBS="$LIBS -ldl -lmld" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4444 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4445 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4446 | fi |
| 4447 | |
| 4448 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4449 | echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4450 | echo "configure:4451: checking for --with-dl-dld" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4451 | # Check whether --with-dl-dld or --without-dl-dld was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4452 | if test "${with_dl_dld+set}" = set; then |
| 4453 | withval="$with_dl_dld" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4454 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4455 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4456 | cat >> confdefs.h <<\EOF |
| 4457 | #define WITH_DL_DLD 1 |
| 4458 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4459 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4460 | DYNLOADFILE="dynload_dl.o" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4461 | dldir=`echo "$withval" | sed 's/,.*//'` |
| 4462 | dlddir=`echo "$withval" | sed 's/.*,//'` |
Barry Warsaw | 7d1219d | 2000-10-05 18:45:53 +0000 | [diff] [blame] | 4463 | 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] | 4464 | then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4465 | 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] | 4466 | fi |
| 4467 | DLINCLDIR=${dldir} |
| 4468 | LIBS="$LIBS -ldl -ldld" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4469 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4470 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4471 | fi |
| 4472 | |
| 4473 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4474 | # the dlopen() function means we might want to use dynload_shlib.o. some |
| 4475 | # 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] | 4476 | for ac_func in dlopen |
| 4477 | do |
| 4478 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4479 | echo "configure:4480: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4480 | 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] | 4481 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4482 | else |
| 4483 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4484 | #line 4485 "configure" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4485 | #include "confdefs.h" |
| 4486 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4487 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4488 | #include <assert.h> |
| 4489 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4490 | /* We use char because int might match the return type of a gcc2 |
| 4491 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4492 | char $ac_func(); |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4493 | |
| 4494 | int main() { |
| 4495 | |
| 4496 | /* The GNU C library defines this for functions which it implements |
| 4497 | to always fail with ENOSYS. Some functions are actually named |
| 4498 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4499 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4500 | choke me |
| 4501 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4502 | $ac_func(); |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4503 | #endif |
| 4504 | |
| 4505 | ; return 0; } |
| 4506 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4507 | if { (eval echo configure:4508: \"$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] | 4508 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4509 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4510 | else |
| 4511 | echo "configure: failed program was:" >&5 |
| 4512 | cat conftest.$ac_ext >&5 |
| 4513 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4514 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4515 | fi |
| 4516 | rm -f conftest* |
| 4517 | fi |
| 4518 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4519 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4520 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4521 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4522 | cat >> confdefs.h <<EOF |
| 4523 | #define $ac_tr_func 1 |
| 4524 | EOF |
| 4525 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4526 | else |
| 4527 | echo "$ac_t""no" 1>&6 |
| 4528 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4529 | done |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4530 | |
| 4531 | |
| 4532 | # DYNLOADFILE specifies which dynload_*.o file we will use for dynamic |
| 4533 | # loading of modules. |
| 4534 | |
| 4535 | echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4536 | echo "configure:4537: checking DYNLOADFILE" >&5 |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4537 | if test -z "$DYNLOADFILE" |
| 4538 | then |
| 4539 | case $ac_sys_system/$ac_sys_release in |
| 4540 | AIX*) DYNLOADFILE="dynload_aix.o";; |
| 4541 | BeOS*) DYNLOADFILE="dynload_beos.o";; |
| 4542 | hp*|HP*) DYNLOADFILE="dynload_hpux.o";; |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 4543 | Darwin/*) DYNLOADFILE="dynload_next.o";; |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4544 | *) |
| 4545 | # use dynload_shlib.c and dlopen() if we have it; otherwise stub |
| 4546 | # out any dynamic loading |
| 4547 | if test "$ac_cv_func_dlopen" = yes |
| 4548 | then DYNLOADFILE="dynload_shlib.o" |
| 4549 | else DYNLOADFILE="dynload_stub.o" |
| 4550 | fi |
| 4551 | ;; |
| 4552 | esac |
| 4553 | fi |
| 4554 | echo "$ac_t""$DYNLOADFILE" 1>&6 |
| 4555 | if test "$DYNLOADFILE" != "dynload_stub.o" |
| 4556 | then |
| 4557 | cat >> confdefs.h <<\EOF |
| 4558 | #define HAVE_DYNAMIC_LOADING 1 |
| 4559 | EOF |
| 4560 | |
| 4561 | fi |
| 4562 | |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4563 | # MACHDEP_OBJS can be set to platform-specific object files needed by Python |
| 4564 | |
| 4565 | |
| 4566 | echo $ac_n "checking MACHDEP_OBJS""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4567 | echo "configure:4568: checking MACHDEP_OBJS" >&5 |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4568 | if test -z "$MACHDEP_OBJS" |
| 4569 | then |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 4570 | MACHDEP_OBJS=$extra_machdep_objs |
| 4571 | else |
| 4572 | MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs" |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4573 | fi |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 4574 | echo "$ac_t""MACHDEP_OBJS" 1>&6 |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4575 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4576 | # checks for library functions |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4577 | for ac_func in alarm chown clock confstr ctermid ctermid_r execv \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 4578 | flock fork fsync fdatasync fpathconf ftime ftruncate \ |
Martin v. Löwis | f95dd0a | 2001-08-15 17:14:33 +0000 | [diff] [blame] | 4579 | gai_strerror getgroups getlogin getpeername getpid getpwent getwd \ |
Martin v. Löwis | 864e9ff | 2001-08-04 22:32:03 +0000 | [diff] [blame] | 4580 | hstrerror inet_pton kill link lstat mkfifo mktime mremap \ |
Andrew M. Kuchling | 5821b77 | 2000-08-25 01:14:08 +0000 | [diff] [blame] | 4581 | nice pathconf pause plock poll pthread_init \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 4582 | putenv readlink \ |
Andrew M. Kuchling | 8d2f2b2 | 2000-07-13 01:26:58 +0000 | [diff] [blame] | 4583 | select setegid seteuid setgid \ |
Martin v. Löwis | 791bfda | 2001-07-24 06:33:08 +0000 | [diff] [blame] | 4584 | setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 4585 | sigaction siginterrupt sigrelse strftime strptime symlink sysconf \ |
Fred Drake | 89143df | 1999-12-09 22:03:25 +0000 | [diff] [blame] | 4586 | tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ |
Thomas Wouters | c2c12dc | 2001-07-11 14:45:34 +0000 | [diff] [blame] | 4587 | truncate uname waitpid _getpty getpriority |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4588 | do |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4589 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4590 | echo "configure:4591: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4591 | 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] | 4592 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4593 | else |
| 4594 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4595 | #line 4596 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4596 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4597 | /* System header to define __stub macros and hopefully few prototypes, |
| 4598 | which can conflict with char $ac_func(); below. */ |
| 4599 | #include <assert.h> |
| 4600 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4601 | /* We use char because int might match the return type of a gcc2 |
| 4602 | builtin and then its argument prototype would still apply. */ |
| 4603 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4604 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4605 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4606 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4607 | /* The GNU C library defines this for functions which it implements |
| 4608 | to always fail with ENOSYS. Some functions are actually named |
| 4609 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4610 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4611 | choke me |
| 4612 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4613 | $ac_func(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4614 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4615 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4616 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4617 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4618 | if { (eval echo configure:4619: \"$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] | 4619 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4620 | eval "ac_cv_func_$ac_func=yes" |
| 4621 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4622 | echo "configure: failed program was:" >&5 |
| 4623 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4624 | rm -rf conftest* |
| 4625 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4626 | fi |
| 4627 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4628 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4629 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4630 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4631 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4632 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4633 | cat >> confdefs.h <<EOF |
| 4634 | #define $ac_tr_func 1 |
| 4635 | EOF |
| 4636 | |
| 4637 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4638 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4639 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4640 | done |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 4641 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 4642 | |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4643 | # check for openpty and forkpty |
| 4644 | |
| 4645 | for ac_func in openpty |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4646 | do |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4647 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4648 | echo "configure:4649: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4649 | 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] | 4650 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4651 | else |
| 4652 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4653 | #line 4654 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4654 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4655 | /* System header to define __stub macros and hopefully few prototypes, |
| 4656 | which can conflict with char $ac_func(); below. */ |
| 4657 | #include <assert.h> |
| 4658 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4659 | /* We use char because int might match the return type of a gcc2 |
| 4660 | builtin and then its argument prototype would still apply. */ |
| 4661 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4662 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4663 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4664 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4665 | /* The GNU C library defines this for functions which it implements |
| 4666 | to always fail with ENOSYS. Some functions are actually named |
| 4667 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4668 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4669 | choke me |
| 4670 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4671 | $ac_func(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4672 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4673 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4674 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4675 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4676 | if { (eval echo configure:4677: \"$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] | 4677 | rm -rf conftest* |
| 4678 | eval "ac_cv_func_$ac_func=yes" |
| 4679 | else |
| 4680 | echo "configure: failed program was:" >&5 |
| 4681 | cat conftest.$ac_ext >&5 |
| 4682 | rm -rf conftest* |
| 4683 | eval "ac_cv_func_$ac_func=no" |
| 4684 | fi |
| 4685 | rm -f conftest* |
| 4686 | fi |
| 4687 | |
| 4688 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4689 | echo "$ac_t""yes" 1>&6 |
| 4690 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4691 | cat >> confdefs.h <<EOF |
| 4692 | #define $ac_tr_func 1 |
| 4693 | EOF |
| 4694 | |
| 4695 | else |
| 4696 | echo "$ac_t""no" 1>&6 |
| 4697 | echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4698 | echo "configure:4699: checking for openpty in -lutil" >&5 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4699 | ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4700 | 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] | 4701 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4702 | else |
| 4703 | ac_save_LIBS="$LIBS" |
| 4704 | LIBS="-lutil $LIBS" |
| 4705 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4706 | #line 4707 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4707 | #include "confdefs.h" |
| 4708 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4709 | /* We use char because int might match the return type of a gcc2 |
| 4710 | builtin and then its argument prototype would still apply. */ |
| 4711 | char openpty(); |
| 4712 | |
| 4713 | int main() { |
| 4714 | openpty() |
| 4715 | ; return 0; } |
| 4716 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4717 | if { (eval echo configure:4718: \"$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] | 4718 | rm -rf conftest* |
| 4719 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 4720 | else |
| 4721 | echo "configure: failed program was:" >&5 |
| 4722 | cat conftest.$ac_ext >&5 |
| 4723 | rm -rf conftest* |
| 4724 | eval "ac_cv_lib_$ac_lib_var=no" |
| 4725 | fi |
| 4726 | rm -f conftest* |
| 4727 | LIBS="$ac_save_LIBS" |
| 4728 | |
| 4729 | fi |
| 4730 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4731 | echo "$ac_t""yes" 1>&6 |
| 4732 | cat >> confdefs.h <<\EOF |
| 4733 | #define HAVE_OPENPTY 1 |
| 4734 | EOF |
| 4735 | LIBS="$LIBS -lutil" |
| 4736 | else |
| 4737 | echo "$ac_t""no" 1>&6 |
| 4738 | fi |
| 4739 | |
| 4740 | fi |
| 4741 | done |
| 4742 | |
| 4743 | for ac_func in forkpty |
| 4744 | do |
| 4745 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4746 | echo "configure:4747: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4747 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4748 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4749 | else |
| 4750 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4751 | #line 4752 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4752 | #include "confdefs.h" |
| 4753 | /* System header to define __stub macros and hopefully few prototypes, |
| 4754 | which can conflict with char $ac_func(); below. */ |
| 4755 | #include <assert.h> |
| 4756 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4757 | /* We use char because int might match the return type of a gcc2 |
| 4758 | builtin and then its argument prototype would still apply. */ |
| 4759 | char $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4760 | |
| 4761 | int main() { |
| 4762 | |
| 4763 | /* The GNU C library defines this for functions which it implements |
| 4764 | to always fail with ENOSYS. Some functions are actually named |
| 4765 | something starting with __ and the normal name is an alias. */ |
| 4766 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 4767 | choke me |
| 4768 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4769 | $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4770 | #endif |
| 4771 | |
| 4772 | ; return 0; } |
| 4773 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4774 | if { (eval echo configure:4775: \"$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] | 4775 | rm -rf conftest* |
| 4776 | eval "ac_cv_func_$ac_func=yes" |
| 4777 | else |
| 4778 | echo "configure: failed program was:" >&5 |
| 4779 | cat conftest.$ac_ext >&5 |
| 4780 | rm -rf conftest* |
| 4781 | eval "ac_cv_func_$ac_func=no" |
| 4782 | fi |
| 4783 | rm -f conftest* |
| 4784 | fi |
| 4785 | |
| 4786 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4787 | echo "$ac_t""yes" 1>&6 |
| 4788 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4789 | cat >> confdefs.h <<EOF |
| 4790 | #define $ac_tr_func 1 |
| 4791 | EOF |
| 4792 | |
| 4793 | else |
| 4794 | echo "$ac_t""no" 1>&6 |
| 4795 | echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4796 | echo "configure:4797: checking for forkpty in -lutil" >&5 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4797 | ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4798 | 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] | 4799 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4800 | else |
| 4801 | ac_save_LIBS="$LIBS" |
| 4802 | LIBS="-lutil $LIBS" |
| 4803 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4804 | #line 4805 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4805 | #include "confdefs.h" |
| 4806 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4807 | /* We use char because int might match the return type of a gcc2 |
| 4808 | builtin and then its argument prototype would still apply. */ |
| 4809 | char forkpty(); |
| 4810 | |
| 4811 | int main() { |
| 4812 | forkpty() |
| 4813 | ; return 0; } |
| 4814 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4815 | if { (eval echo configure:4816: \"$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] | 4816 | rm -rf conftest* |
| 4817 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 4818 | else |
| 4819 | echo "configure: failed program was:" >&5 |
| 4820 | cat conftest.$ac_ext >&5 |
| 4821 | rm -rf conftest* |
| 4822 | eval "ac_cv_lib_$ac_lib_var=no" |
| 4823 | fi |
| 4824 | rm -f conftest* |
| 4825 | LIBS="$ac_save_LIBS" |
| 4826 | |
| 4827 | fi |
| 4828 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4829 | echo "$ac_t""yes" 1>&6 |
| 4830 | cat >> confdefs.h <<\EOF |
| 4831 | #define HAVE_FORKPTY 1 |
| 4832 | EOF |
| 4833 | LIBS="$LIBS -lutil" |
| 4834 | else |
| 4835 | echo "$ac_t""no" 1>&6 |
| 4836 | fi |
| 4837 | |
| 4838 | fi |
| 4839 | done |
| 4840 | |
| 4841 | |
| 4842 | # check for long file support functions |
| 4843 | for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs |
| 4844 | do |
| 4845 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4846 | echo "configure:4847: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4847 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4848 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4849 | else |
| 4850 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4851 | #line 4852 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4852 | #include "confdefs.h" |
| 4853 | /* System header to define __stub macros and hopefully few prototypes, |
| 4854 | which can conflict with char $ac_func(); below. */ |
| 4855 | #include <assert.h> |
| 4856 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4857 | /* We use char because int might match the return type of a gcc2 |
| 4858 | builtin and then its argument prototype would still apply. */ |
| 4859 | char $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4860 | |
| 4861 | int main() { |
| 4862 | |
| 4863 | /* The GNU C library defines this for functions which it implements |
| 4864 | to always fail with ENOSYS. Some functions are actually named |
| 4865 | something starting with __ and the normal name is an alias. */ |
| 4866 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 4867 | choke me |
| 4868 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4869 | $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4870 | #endif |
| 4871 | |
| 4872 | ; return 0; } |
| 4873 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4874 | if { (eval echo configure:4875: \"$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] | 4875 | rm -rf conftest* |
| 4876 | eval "ac_cv_func_$ac_func=yes" |
| 4877 | else |
| 4878 | echo "configure: failed program was:" >&5 |
| 4879 | cat conftest.$ac_ext >&5 |
| 4880 | rm -rf conftest* |
| 4881 | eval "ac_cv_func_$ac_func=no" |
| 4882 | fi |
| 4883 | rm -f conftest* |
| 4884 | fi |
| 4885 | |
| 4886 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4887 | echo "$ac_t""yes" 1>&6 |
| 4888 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4889 | cat >> confdefs.h <<EOF |
| 4890 | #define $ac_tr_func 1 |
| 4891 | EOF |
| 4892 | |
| 4893 | else |
| 4894 | echo "$ac_t""no" 1>&6 |
| 4895 | fi |
| 4896 | done |
| 4897 | |
| 4898 | |
| 4899 | for ac_func in dup2 getcwd strdup strerror memmove |
| 4900 | do |
| 4901 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4902 | echo "configure:4903: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4903 | 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] | 4904 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4905 | else |
| 4906 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4907 | #line 4908 "configure" |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 4908 | #include "confdefs.h" |
| 4909 | /* System header to define __stub macros and hopefully few prototypes, |
| 4910 | which can conflict with char $ac_func(); below. */ |
| 4911 | #include <assert.h> |
| 4912 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4913 | /* We use char because int might match the return type of a gcc2 |
| 4914 | builtin and then its argument prototype would still apply. */ |
| 4915 | char $ac_func(); |
| 4916 | |
| 4917 | int main() { |
| 4918 | |
| 4919 | /* The GNU C library defines this for functions which it implements |
| 4920 | to always fail with ENOSYS. Some functions are actually named |
| 4921 | something starting with __ and the normal name is an alias. */ |
| 4922 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 4923 | choke me |
| 4924 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4925 | $ac_func(); |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 4926 | #endif |
| 4927 | |
| 4928 | ; return 0; } |
| 4929 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4930 | if { (eval echo configure:4931: \"$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] | 4931 | rm -rf conftest* |
| 4932 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4933 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4934 | echo "configure: failed program was:" >&5 |
| 4935 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4936 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4937 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4938 | fi |
| 4939 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4940 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4941 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4942 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4943 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4944 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4945 | cat >> confdefs.h <<EOF |
| 4946 | #define $ac_tr_func 1 |
| 4947 | EOF |
| 4948 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4949 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4950 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 4951 | LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4952 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4953 | done |
| 4954 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4955 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4956 | for ac_func in getpgrp |
| 4957 | do |
| 4958 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4959 | echo "configure:4960: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4960 | 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] | 4961 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4962 | else |
| 4963 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4964 | #line 4965 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4965 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4966 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4967 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4968 | #include <assert.h> |
| 4969 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4970 | /* We use char because int might match the return type of a gcc2 |
| 4971 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4972 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4973 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4974 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4975 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4976 | /* The GNU C library defines this for functions which it implements |
| 4977 | to always fail with ENOSYS. Some functions are actually named |
| 4978 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4979 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4980 | choke me |
| 4981 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4982 | $ac_func(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4983 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4984 | |
| 4985 | ; return 0; } |
| 4986 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 4987 | if { (eval echo configure:4988: \"$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] | 4988 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4989 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4990 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4991 | echo "configure: failed program was:" >&5 |
| 4992 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4993 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4994 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4995 | fi |
| 4996 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4997 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4998 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4999 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5000 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5001 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5002 | cat >> confdefs.h <<EOF |
| 5003 | #define $ac_tr_func 1 |
| 5004 | EOF |
| 5005 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5006 | #line 5007 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5007 | #include "confdefs.h" |
| 5008 | #include <unistd.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5009 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5010 | getpgrp(0); |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5011 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5012 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5013 | if { (eval echo configure:5014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5014 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5015 | cat >> confdefs.h <<\EOF |
| 5016 | #define GETPGRP_HAVE_ARG 1 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5017 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5018 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5019 | else |
| 5020 | echo "configure: failed program was:" >&5 |
| 5021 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5022 | fi |
| 5023 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5024 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5025 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5026 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5027 | done |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5028 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5029 | for ac_func in setpgrp |
| 5030 | do |
| 5031 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5032 | echo "configure:5033: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5033 | 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] | 5034 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5035 | else |
| 5036 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5037 | #line 5038 "configure" |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5038 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5039 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5040 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5041 | #include <assert.h> |
| 5042 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5043 | /* We use char because int might match the return type of a gcc2 |
| 5044 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5045 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5046 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5047 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5048 | |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5049 | /* The GNU C library defines this for functions which it implements |
| 5050 | to always fail with ENOSYS. Some functions are actually named |
| 5051 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5052 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5053 | choke me |
| 5054 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5055 | $ac_func(); |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5056 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5057 | |
| 5058 | ; return 0; } |
| 5059 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5060 | if { (eval echo configure:5061: \"$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] | 5061 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5062 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5063 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5064 | echo "configure: failed program was:" >&5 |
| 5065 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5066 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5067 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5068 | fi |
| 5069 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5070 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5071 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5072 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5073 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5074 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5075 | cat >> confdefs.h <<EOF |
| 5076 | #define $ac_tr_func 1 |
| 5077 | EOF |
| 5078 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5079 | #line 5080 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5080 | #include "confdefs.h" |
| 5081 | #include <unistd.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5082 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5083 | setpgrp(0,0); |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5084 | ; return 0; } |
| 5085 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5086 | if { (eval echo configure:5087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5087 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5088 | cat >> confdefs.h <<\EOF |
| 5089 | #define SETPGRP_HAVE_ARG 1 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5090 | EOF |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5091 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5092 | else |
| 5093 | echo "configure: failed program was:" >&5 |
| 5094 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5095 | fi |
| 5096 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5097 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5098 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5099 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5100 | done |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5101 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5102 | for ac_func in gettimeofday |
| 5103 | do |
| 5104 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5105 | echo "configure:5106: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5106 | 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] | 5107 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5108 | else |
| 5109 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5110 | #line 5111 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5111 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5112 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5113 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5114 | #include <assert.h> |
| 5115 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5116 | /* We use char because int might match the return type of a gcc2 |
| 5117 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5118 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5119 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5120 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5121 | |
| 5122 | /* The GNU C library defines this for functions which it implements |
| 5123 | to always fail with ENOSYS. Some functions are actually named |
| 5124 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5125 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5126 | choke me |
| 5127 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5128 | $ac_func(); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5129 | #endif |
| 5130 | |
| 5131 | ; return 0; } |
| 5132 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5133 | if { (eval echo configure:5134: \"$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] | 5134 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5135 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5136 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5137 | echo "configure: failed program was:" >&5 |
| 5138 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5139 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5140 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5141 | fi |
| 5142 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5143 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5144 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5145 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5146 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5147 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5148 | cat >> confdefs.h <<EOF |
| 5149 | #define $ac_tr_func 1 |
| 5150 | EOF |
| 5151 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5152 | #line 5153 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5153 | #include "confdefs.h" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5154 | #include <sys/time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5155 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5156 | gettimeofday((struct timeval*)0,(struct timezone*)0); |
| 5157 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5158 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5159 | if { (eval echo configure:5160: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5160 | : |
| 5161 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5162 | echo "configure: failed program was:" >&5 |
| 5163 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5164 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5165 | cat >> confdefs.h <<\EOF |
| 5166 | #define GETTIMEOFDAY_NO_TZ 1 |
| 5167 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5168 | |
| 5169 | fi |
| 5170 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5171 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5172 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5173 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5174 | done |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5175 | |
| 5176 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5177 | for ac_func in getaddrinfo |
| 5178 | do |
| 5179 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5180 | echo "configure:5181: checking for $ac_func" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5181 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5182 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5183 | else |
| 5184 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5185 | #line 5186 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5186 | #include "confdefs.h" |
| 5187 | /* System header to define __stub macros and hopefully few prototypes, |
| 5188 | which can conflict with char $ac_func(); below. */ |
| 5189 | #include <assert.h> |
| 5190 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5191 | /* We use char because int might match the return type of a gcc2 |
| 5192 | builtin and then its argument prototype would still apply. */ |
| 5193 | char $ac_func(); |
| 5194 | |
| 5195 | int main() { |
| 5196 | |
| 5197 | /* The GNU C library defines this for functions which it implements |
| 5198 | to always fail with ENOSYS. Some functions are actually named |
| 5199 | something starting with __ and the normal name is an alias. */ |
| 5200 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5201 | choke me |
| 5202 | #else |
| 5203 | $ac_func(); |
| 5204 | #endif |
| 5205 | |
| 5206 | ; return 0; } |
| 5207 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5208 | if { (eval echo configure:5209: \"$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] | 5209 | rm -rf conftest* |
| 5210 | eval "ac_cv_func_$ac_func=yes" |
| 5211 | else |
| 5212 | echo "configure: failed program was:" >&5 |
| 5213 | cat conftest.$ac_ext >&5 |
| 5214 | rm -rf conftest* |
| 5215 | eval "ac_cv_func_$ac_func=no" |
| 5216 | fi |
| 5217 | rm -f conftest* |
| 5218 | fi |
| 5219 | |
| 5220 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5221 | echo "$ac_t""yes" 1>&6 |
| 5222 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5223 | cat >> confdefs.h <<EOF |
| 5224 | #define $ac_tr_func 1 |
| 5225 | EOF |
| 5226 | echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5227 | echo "configure:5228: checking getaddrinfo bug" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5228 | if test "$cross_compiling" = yes; then |
| 5229 | echo "$ac_t""buggy" 1>&6 |
| 5230 | buggygetaddrinfo=yes |
| 5231 | else |
| 5232 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5233 | #line 5234 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5234 | #include "confdefs.h" |
| 5235 | |
| 5236 | #include <sys/types.h> |
| 5237 | #include <netdb.h> |
| 5238 | #include <string.h> |
| 5239 | #include <sys/socket.h> |
| 5240 | #include <netinet/in.h> |
| 5241 | |
| 5242 | main() |
| 5243 | { |
| 5244 | int passive, gaierr, inet4 = 0, inet6 = 0; |
| 5245 | struct addrinfo hints, *ai, *aitop; |
| 5246 | char straddr[INET6_ADDRSTRLEN], strport[16]; |
| 5247 | |
| 5248 | for (passive = 0; passive <= 1; passive++) { |
| 5249 | memset(&hints, 0, sizeof(hints)); |
| 5250 | hints.ai_family = AF_UNSPEC; |
| 5251 | hints.ai_flags = passive ? AI_PASSIVE : 0; |
| 5252 | hints.ai_socktype = SOCK_STREAM; |
| 5253 | if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) { |
| 5254 | (void)gai_strerror(gaierr); |
| 5255 | goto bad; |
| 5256 | } |
| 5257 | for (ai = aitop; ai; ai = ai->ai_next) { |
| 5258 | if (ai->ai_addr == NULL || |
| 5259 | ai->ai_addrlen == 0 || |
| 5260 | getnameinfo(ai->ai_addr, ai->ai_addrlen, |
| 5261 | straddr, sizeof(straddr), strport, sizeof(strport), |
| 5262 | NI_NUMERICHOST|NI_NUMERICSERV) != 0) { |
| 5263 | goto bad; |
| 5264 | } |
| 5265 | switch (ai->ai_family) { |
| 5266 | case AF_INET: |
| 5267 | if (strcmp(strport, "54321") != 0) { |
| 5268 | goto bad; |
| 5269 | } |
| 5270 | if (passive) { |
| 5271 | if (strcmp(straddr, "0.0.0.0") != 0) { |
| 5272 | goto bad; |
| 5273 | } |
| 5274 | } else { |
| 5275 | if (strcmp(straddr, "127.0.0.1") != 0) { |
| 5276 | goto bad; |
| 5277 | } |
| 5278 | } |
| 5279 | inet4++; |
| 5280 | break; |
| 5281 | case AF_INET6: |
| 5282 | if (strcmp(strport, "54321") != 0) { |
| 5283 | goto bad; |
| 5284 | } |
| 5285 | if (passive) { |
| 5286 | if (strcmp(straddr, "::") != 0) { |
| 5287 | goto bad; |
| 5288 | } |
| 5289 | } else { |
| 5290 | if (strcmp(straddr, "::1") != 0) { |
| 5291 | goto bad; |
| 5292 | } |
| 5293 | } |
| 5294 | inet6++; |
| 5295 | break; |
| 5296 | case AF_UNSPEC: |
| 5297 | goto bad; |
| 5298 | break; |
| 5299 | default: |
| 5300 | /* another family support? */ |
| 5301 | break; |
| 5302 | } |
| 5303 | } |
| 5304 | } |
| 5305 | |
| 5306 | if (!(inet4 == 0 || inet4 == 2)) |
| 5307 | goto bad; |
| 5308 | if (!(inet6 == 0 || inet6 == 2)) |
| 5309 | goto bad; |
| 5310 | |
| 5311 | if (aitop) |
| 5312 | freeaddrinfo(aitop); |
| 5313 | exit(0); |
| 5314 | |
| 5315 | bad: |
| 5316 | if (aitop) |
| 5317 | freeaddrinfo(aitop); |
| 5318 | exit(1); |
| 5319 | } |
| 5320 | |
| 5321 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5322 | if { (eval echo configure:5323: \"$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] | 5323 | then |
| 5324 | echo "$ac_t""good" 1>&6 |
| 5325 | buggygetaddrinfo=no |
| 5326 | else |
| 5327 | echo "configure: failed program was:" >&5 |
| 5328 | cat conftest.$ac_ext >&5 |
| 5329 | rm -fr conftest* |
| 5330 | echo "$ac_t""buggy" 1>&6 |
| 5331 | buggygetaddrinfo=yes |
| 5332 | fi |
| 5333 | rm -fr conftest* |
| 5334 | fi |
| 5335 | |
| 5336 | else |
| 5337 | echo "$ac_t""no" 1>&6 |
| 5338 | buggygetaddrinfo=yes |
| 5339 | fi |
| 5340 | done |
| 5341 | |
| 5342 | |
| 5343 | if test "$buggygetaddrinfo" = "yes"; then |
| 5344 | if test "$ipv6" = "yes"; then |
| 5345 | echo 'Fatal: You must get working getaddrinfo() function.' |
| 5346 | echo ' or you can specify "--disable-ipv6"'. |
| 5347 | exit 1 |
| 5348 | fi |
| 5349 | fi |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5350 | for ac_func in getnameinfo |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5351 | do |
| 5352 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5353 | echo "configure:5354: checking for $ac_func" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5354 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5355 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5356 | else |
| 5357 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5358 | #line 5359 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5359 | #include "confdefs.h" |
| 5360 | /* System header to define __stub macros and hopefully few prototypes, |
| 5361 | which can conflict with char $ac_func(); below. */ |
| 5362 | #include <assert.h> |
| 5363 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5364 | /* We use char because int might match the return type of a gcc2 |
| 5365 | builtin and then its argument prototype would still apply. */ |
| 5366 | char $ac_func(); |
| 5367 | |
| 5368 | int main() { |
| 5369 | |
| 5370 | /* The GNU C library defines this for functions which it implements |
| 5371 | to always fail with ENOSYS. Some functions are actually named |
| 5372 | something starting with __ and the normal name is an alias. */ |
| 5373 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5374 | choke me |
| 5375 | #else |
| 5376 | $ac_func(); |
| 5377 | #endif |
| 5378 | |
| 5379 | ; return 0; } |
| 5380 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5381 | if { (eval echo configure:5382: \"$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] | 5382 | rm -rf conftest* |
| 5383 | eval "ac_cv_func_$ac_func=yes" |
| 5384 | else |
| 5385 | echo "configure: failed program was:" >&5 |
| 5386 | cat conftest.$ac_ext >&5 |
| 5387 | rm -rf conftest* |
| 5388 | eval "ac_cv_func_$ac_func=no" |
| 5389 | fi |
| 5390 | rm -f conftest* |
| 5391 | fi |
| 5392 | |
| 5393 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5394 | echo "$ac_t""yes" 1>&6 |
| 5395 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5396 | cat >> confdefs.h <<EOF |
| 5397 | #define $ac_tr_func 1 |
| 5398 | EOF |
| 5399 | |
| 5400 | else |
| 5401 | echo "$ac_t""no" 1>&6 |
| 5402 | fi |
| 5403 | done |
| 5404 | |
| 5405 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5406 | # checks for structures |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5407 | echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5408 | echo "configure:5409: 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] | 5409 | if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5410 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5411 | else |
| 5412 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5413 | #line 5414 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5414 | #include "confdefs.h" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5415 | #include <sys/types.h> |
| 5416 | #include <sys/time.h> |
| 5417 | #include <time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5418 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5419 | struct tm *tp; |
| 5420 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5421 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5422 | if { (eval echo configure:5423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5423 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5424 | ac_cv_header_time=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5425 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5426 | echo "configure: failed program was:" >&5 |
| 5427 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5428 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5429 | ac_cv_header_time=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5430 | fi |
| 5431 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5432 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5433 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5434 | echo "$ac_t""$ac_cv_header_time" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5435 | if test $ac_cv_header_time = yes; then |
| 5436 | cat >> confdefs.h <<\EOF |
| 5437 | #define TIME_WITH_SYS_TIME 1 |
| 5438 | EOF |
| 5439 | |
| 5440 | fi |
| 5441 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5442 | echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5443 | echo "configure:5444: 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] | 5444 | if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5445 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5446 | else |
| 5447 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5448 | #line 5449 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5449 | #include "confdefs.h" |
| 5450 | #include <sys/types.h> |
| 5451 | #include <time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5452 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5453 | struct tm *tp; tp->tm_sec; |
| 5454 | ; return 0; } |
| 5455 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5456 | if { (eval echo configure:5457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5457 | rm -rf conftest* |
| 5458 | ac_cv_struct_tm=time.h |
| 5459 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5460 | echo "configure: failed program was:" >&5 |
| 5461 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5462 | rm -rf conftest* |
| 5463 | ac_cv_struct_tm=sys/time.h |
| 5464 | fi |
| 5465 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5466 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5467 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5468 | echo "$ac_t""$ac_cv_struct_tm" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5469 | if test $ac_cv_struct_tm = sys/time.h; then |
| 5470 | cat >> confdefs.h <<\EOF |
| 5471 | #define TM_IN_SYS_TIME 1 |
| 5472 | EOF |
| 5473 | |
| 5474 | fi |
| 5475 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5476 | echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5477 | echo "configure:5478: checking for tm_zone in struct tm" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5478 | 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] | 5479 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5480 | else |
| 5481 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5482 | #line 5483 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5483 | #include "confdefs.h" |
| 5484 | #include <sys/types.h> |
| 5485 | #include <$ac_cv_struct_tm> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5486 | int main() { |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5487 | struct tm tm; tm.tm_zone; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5488 | ; return 0; } |
| 5489 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5490 | if { (eval echo configure:5491: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5491 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5492 | ac_cv_struct_tm_zone=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5493 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5494 | echo "configure: failed program was:" >&5 |
| 5495 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5496 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5497 | ac_cv_struct_tm_zone=no |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5498 | fi |
| 5499 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5500 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5501 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5502 | echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6 |
| 5503 | if test "$ac_cv_struct_tm_zone" = yes; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5504 | cat >> confdefs.h <<\EOF |
| 5505 | #define HAVE_TM_ZONE 1 |
| 5506 | EOF |
| 5507 | |
| 5508 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5509 | echo $ac_n "checking for tzname""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5510 | echo "configure:5511: checking for tzname" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5511 | if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5512 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5513 | else |
| 5514 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5515 | #line 5516 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5516 | #include "confdefs.h" |
| 5517 | #include <time.h> |
| 5518 | #ifndef tzname /* For SGI. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5519 | extern char *tzname[]; /* RS6000 and others reject char **tzname. */ |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5520 | #endif |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5521 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5522 | atoi(*tzname); |
| 5523 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5524 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5525 | if { (eval echo configure:5526: \"$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] | 5526 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5527 | ac_cv_var_tzname=yes |
| 5528 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5529 | echo "configure: failed program was:" >&5 |
| 5530 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5531 | rm -rf conftest* |
| 5532 | ac_cv_var_tzname=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5533 | fi |
| 5534 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5535 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5536 | |
| 5537 | echo "$ac_t""$ac_cv_var_tzname" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5538 | if test $ac_cv_var_tzname = yes; then |
| 5539 | cat >> confdefs.h <<\EOF |
| 5540 | #define HAVE_TZNAME 1 |
| 5541 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5542 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5543 | fi |
| 5544 | fi |
| 5545 | |
| 5546 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5547 | echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5548 | echo "configure:5549: checking for time.h that defines altzone" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5549 | 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] | 5550 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5551 | else |
| 5552 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5553 | #line 5554 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5554 | #include "confdefs.h" |
| 5555 | #include <time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5556 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5557 | return altzone; |
| 5558 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5559 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5560 | if { (eval echo configure:5561: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5561 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5562 | ac_cv_header_time_altzone=yes |
| 5563 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5564 | echo "configure: failed program was:" >&5 |
| 5565 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5566 | rm -rf conftest* |
| 5567 | ac_cv_header_time_altzone=no |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5568 | fi |
| 5569 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5570 | fi |
| 5571 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5572 | echo "$ac_t""$ac_cv_header_time_altzone" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5573 | if test $ac_cv_header_time_altzone = yes; then |
| 5574 | cat >> confdefs.h <<\EOF |
| 5575 | #define HAVE_ALTZONE 1 |
| 5576 | EOF |
| 5577 | |
| 5578 | fi |
| 5579 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5580 | was_it_defined=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5581 | echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5582 | echo "configure:5583: 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] | 5583 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5584 | #line 5585 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5585 | #include "confdefs.h" |
| 5586 | |
| 5587 | #include <sys/types.h> |
| 5588 | #include <sys/select.h> |
| 5589 | #include <sys/time.h> |
| 5590 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5591 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5592 | ; |
| 5593 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5594 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5595 | if { (eval echo configure:5596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5596 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5597 | cat >> confdefs.h <<\EOF |
| 5598 | #define SYS_SELECT_WITH_SYS_TIME 1 |
| 5599 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5600 | was_it_defined=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5601 | else |
| 5602 | echo "configure: failed program was:" >&5 |
| 5603 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5604 | fi |
| 5605 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5606 | echo "$ac_t""$was_it_defined" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5607 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5608 | echo $ac_n "checking for addrinfo""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5609 | echo "configure:5610: checking for addrinfo" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5610 | if eval "test \"`echo '$''{'ac_cv_struct_addrinfo'+set}'`\" = set"; then |
| 5611 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5612 | else |
| 5613 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5614 | #line 5615 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5615 | #include "confdefs.h" |
| 5616 | |
| 5617 | # include <netdb.h> |
| 5618 | int main() { |
| 5619 | struct addrinfo a |
| 5620 | ; return 0; } |
| 5621 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5622 | if { (eval echo configure:5623: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5623 | rm -rf conftest* |
| 5624 | ac_cv_struct_addrinfo=yes |
| 5625 | else |
| 5626 | echo "configure: failed program was:" >&5 |
| 5627 | cat conftest.$ac_ext >&5 |
| 5628 | rm -rf conftest* |
| 5629 | ac_cv_struct_addrinfo=no |
| 5630 | fi |
| 5631 | rm -f conftest* |
| 5632 | fi |
| 5633 | |
| 5634 | echo "$ac_t""$ac_cv_struct_addrinfo" 1>&6 |
| 5635 | if test $ac_cv_struct_addrinfo = yes; then |
| 5636 | cat >> confdefs.h <<\EOF |
| 5637 | #define HAVE_ADDRINFO 1 |
| 5638 | EOF |
| 5639 | |
| 5640 | fi |
| 5641 | |
| 5642 | echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5643 | echo "configure:5644: checking for sockaddr_storage" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5644 | if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then |
| 5645 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5646 | else |
| 5647 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5648 | #line 5649 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5649 | #include "confdefs.h" |
| 5650 | |
| 5651 | # include <sys/types.h> |
| 5652 | # include <sys/socket.h> |
| 5653 | int main() { |
| 5654 | struct sockaddr_storage s |
| 5655 | ; return 0; } |
| 5656 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5657 | if { (eval echo configure:5658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5658 | rm -rf conftest* |
| 5659 | ac_cv_struct_sockaddr_storage=yes |
| 5660 | else |
| 5661 | echo "configure: failed program was:" >&5 |
| 5662 | cat conftest.$ac_ext >&5 |
| 5663 | rm -rf conftest* |
| 5664 | ac_cv_struct_sockaddr_storage=no |
| 5665 | fi |
| 5666 | rm -f conftest* |
| 5667 | fi |
| 5668 | |
| 5669 | echo "$ac_t""$ac_cv_struct_sockaddr_storage" 1>&6 |
| 5670 | if test $ac_cv_struct_sockaddr_storage = yes; then |
| 5671 | cat >> confdefs.h <<\EOF |
| 5672 | #define HAVE_SOCKADDR_STORAGE 1 |
| 5673 | EOF |
| 5674 | |
| 5675 | fi |
| 5676 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5677 | # checks for compiler characteristics |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5678 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5679 | echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5680 | echo "configure:5681: checking whether char is unsigned" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5681 | 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] | 5682 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5683 | else |
| 5684 | if test "$GCC" = yes; then |
| 5685 | # GCC predefines this symbol on systems where it applies. |
| 5686 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5687 | #line 5688 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5688 | #include "confdefs.h" |
| 5689 | #ifdef __CHAR_UNSIGNED__ |
| 5690 | yes |
| 5691 | #endif |
| 5692 | |
| 5693 | EOF |
| 5694 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 5695 | egrep "yes" >/dev/null 2>&1; then |
| 5696 | rm -rf conftest* |
| 5697 | ac_cv_c_char_unsigned=yes |
| 5698 | else |
| 5699 | rm -rf conftest* |
| 5700 | ac_cv_c_char_unsigned=no |
| 5701 | fi |
| 5702 | rm -f conftest* |
| 5703 | |
| 5704 | else |
| 5705 | if test "$cross_compiling" = yes; then |
| 5706 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 5707 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5708 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5709 | #line 5710 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5710 | #include "confdefs.h" |
| 5711 | /* volatile prevents gcc2 from optimizing the test away on sparcs. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5712 | #if !defined(__STDC__) || __STDC__ != 1 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5713 | #define volatile |
| 5714 | #endif |
| 5715 | main() { |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5716 | volatile char c = 255; exit(c < 0); |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5717 | } |
| 5718 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5719 | if { (eval echo configure:5720: \"$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] | 5720 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5721 | ac_cv_c_char_unsigned=yes |
| 5722 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5723 | echo "configure: failed program was:" >&5 |
| 5724 | cat conftest.$ac_ext >&5 |
| 5725 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5726 | ac_cv_c_char_unsigned=no |
| 5727 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5728 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5729 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5730 | |
| 5731 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5732 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5733 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5734 | echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5735 | if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then |
| 5736 | cat >> confdefs.h <<\EOF |
| 5737 | #define __CHAR_UNSIGNED__ 1 |
| 5738 | EOF |
| 5739 | |
| 5740 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5741 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5742 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5743 | echo "configure:5744: checking for working const" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5744 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5745 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5746 | else |
| 5747 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5748 | #line 5749 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5749 | #include "confdefs.h" |
| 5750 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5751 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5752 | |
| 5753 | /* Ultrix mips cc rejects this. */ |
Martin v. Löwis | 9db2f57 | 2001-07-23 01:30:10 +0000 | [diff] [blame] | 5754 | typedef int charset[2]; const charset x; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5755 | /* SunOS 4.1.1 cc rejects this. */ |
| 5756 | char const *const *ccp; |
| 5757 | char **p; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5758 | /* NEC SVR4.0.2 mips cc rejects this. */ |
| 5759 | struct point {int x, y;}; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5760 | static struct point const zero = {0,0}; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5761 | /* AIX XL C 1.02.0.0 rejects this. |
| 5762 | It does not let you subtract one const X* pointer from another in an arm |
| 5763 | of an if-expression whose if-part is not a constant expression */ |
| 5764 | const char *g = "string"; |
| 5765 | ccp = &g + (g ? g-g : 0); |
| 5766 | /* HPUX 7.0 cc rejects these. */ |
| 5767 | ++ccp; |
| 5768 | p = (char**) ccp; |
| 5769 | ccp = (char const *const *) p; |
| 5770 | { /* SCO 3.2v4 cc rejects this. */ |
| 5771 | char *t; |
| 5772 | char const *s = 0 ? (char *) 0 : (char const *) 0; |
| 5773 | |
| 5774 | *t++ = 0; |
| 5775 | } |
| 5776 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5777 | int x[] = {25, 17}; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5778 | const int *foo = &x[0]; |
| 5779 | ++foo; |
| 5780 | } |
| 5781 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ |
| 5782 | typedef const int *iptr; |
| 5783 | iptr p = 0; |
| 5784 | ++p; |
| 5785 | } |
| 5786 | { /* AIX XL C 1.02.0.0 rejects this saying |
| 5787 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ |
| 5788 | struct s { int j; const int *ap[3]; }; |
| 5789 | struct s *b; b->j = 5; |
| 5790 | } |
| 5791 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ |
| 5792 | const int foo = 10; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5793 | } |
| 5794 | |
| 5795 | ; return 0; } |
| 5796 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5797 | if { (eval echo configure:5798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5798 | rm -rf conftest* |
| 5799 | ac_cv_c_const=yes |
| 5800 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5801 | echo "configure: failed program was:" >&5 |
| 5802 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5803 | rm -rf conftest* |
| 5804 | ac_cv_c_const=no |
| 5805 | fi |
| 5806 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5807 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5808 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5809 | echo "$ac_t""$ac_cv_c_const" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5810 | if test $ac_cv_c_const = no; then |
| 5811 | cat >> confdefs.h <<\EOF |
| 5812 | #define const |
| 5813 | EOF |
| 5814 | |
| 5815 | fi |
| 5816 | |
| 5817 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5818 | works=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5819 | echo $ac_n "checking for working volatile""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5820 | echo "configure:5821: checking for working volatile" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5821 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5822 | #line 5823 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5823 | #include "confdefs.h" |
| 5824 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5825 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5826 | volatile int x; x = 0; |
| 5827 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5828 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5829 | if { (eval echo configure:5830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5830 | rm -rf conftest* |
| 5831 | works=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5832 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5833 | echo "configure: failed program was:" >&5 |
| 5834 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5835 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5836 | cat >> confdefs.h <<\EOF |
| 5837 | #define volatile |
| 5838 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5839 | |
| 5840 | fi |
| 5841 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5842 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5843 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5844 | works=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5845 | echo $ac_n "checking for working signed char""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5846 | echo "configure:5847: checking for working signed char" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5847 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5848 | #line 5849 "configure" |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 5849 | #include "confdefs.h" |
| 5850 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5851 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5852 | signed char c; |
| 5853 | ; return 0; } |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 5854 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5855 | if { (eval echo configure:5856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5856 | rm -rf conftest* |
| 5857 | works=yes |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 5858 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5859 | echo "configure: failed program was:" >&5 |
| 5860 | cat conftest.$ac_ext >&5 |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 5861 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5862 | cat >> confdefs.h <<\EOF |
| 5863 | #define signed |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5864 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5865 | |
| 5866 | fi |
| 5867 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5868 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5869 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5870 | have_prototypes=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5871 | echo $ac_n "checking for prototypes""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5872 | echo "configure:5873: checking for prototypes" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5873 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5874 | #line 5875 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5875 | #include "confdefs.h" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5876 | int foo(int x) { return 0; } |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5877 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5878 | return foo(10); |
| 5879 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5880 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5881 | if { (eval echo configure:5882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5882 | rm -rf conftest* |
| 5883 | cat >> confdefs.h <<\EOF |
| 5884 | #define HAVE_PROTOTYPES 1 |
| 5885 | EOF |
| 5886 | have_prototypes=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5887 | else |
| 5888 | echo "configure: failed program was:" >&5 |
| 5889 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5890 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5891 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5892 | echo "$ac_t""$have_prototypes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5893 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5894 | works=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5895 | echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5896 | echo "configure:5897: checking for variable length prototypes and stdarg.h" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5897 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5898 | #line 5899 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5899 | #include "confdefs.h" |
| 5900 | |
| 5901 | #include <stdarg.h> |
Guido van Rossum | 90eea07 | 1996-08-30 20:58:57 +0000 | [diff] [blame] | 5902 | int foo(int x, ...) { |
| 5903 | va_list va; |
| 5904 | va_start(va, x); |
| 5905 | va_arg(va, int); |
| 5906 | va_arg(va, char *); |
| 5907 | va_arg(va, double); |
| 5908 | return 0; |
| 5909 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5910 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5911 | int main() { |
Guido van Rossum | 90eea07 | 1996-08-30 20:58:57 +0000 | [diff] [blame] | 5912 | return foo(10, "", 3.14); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5913 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5914 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5915 | if { (eval echo configure:5916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5916 | rm -rf conftest* |
| 5917 | cat >> confdefs.h <<\EOF |
| 5918 | #define HAVE_STDARG_PROTOTYPES 1 |
| 5919 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5920 | works=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5921 | else |
| 5922 | echo "configure: failed program was:" >&5 |
| 5923 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5924 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5925 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5926 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5927 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5928 | if test "$have_prototypes" = yes; then |
| 5929 | bad_prototypes=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5930 | echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5931 | echo "configure:5932: checking for bad exec* prototypes" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5932 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5933 | #line 5934 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5934 | #include "confdefs.h" |
| 5935 | #include <unistd.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5936 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5937 | char **t;execve("@",t,t); |
| 5938 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5939 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5940 | if { (eval echo configure:5941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5941 | : |
| 5942 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5943 | echo "configure: failed program was:" >&5 |
| 5944 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5945 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5946 | cat >> confdefs.h <<\EOF |
| 5947 | #define BAD_EXEC_PROTOTYPES 1 |
| 5948 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5949 | bad_prototypes=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5950 | fi |
| 5951 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5952 | echo "$ac_t""$bad_prototypes" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5953 | fi |
| 5954 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5955 | # check if sockaddr has sa_len member |
| 5956 | echo $ac_n "checking if sockaddr has sa_len member""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5957 | echo "configure:5958: checking if sockaddr has sa_len member" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5958 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5959 | #line 5960 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5960 | #include "confdefs.h" |
| 5961 | #include <sys/types.h> |
| 5962 | #include <sys/socket.h> |
| 5963 | int main() { |
| 5964 | struct sockaddr x; |
| 5965 | x.sa_len = 0; |
| 5966 | ; return 0; } |
| 5967 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5968 | if { (eval echo configure:5969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5969 | rm -rf conftest* |
| 5970 | echo "$ac_t""yes" 1>&6 |
| 5971 | cat >> confdefs.h <<\EOF |
| 5972 | #define HAVE_SOCKADDR_SA_LEN 1 |
| 5973 | EOF |
| 5974 | |
| 5975 | else |
| 5976 | echo "configure: failed program was:" >&5 |
| 5977 | cat conftest.$ac_ext >&5 |
| 5978 | rm -rf conftest* |
| 5979 | echo "$ac_t""no" 1>&6 |
| 5980 | fi |
| 5981 | rm -f conftest* |
| 5982 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5983 | echo $ac_n "checking for bad static forward""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5984 | echo "configure:5985: checking for bad static forward" >&5 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 5985 | if eval "test \"`echo '$''{'ac_cv_bad_static_forward'+set}'`\" = set"; then |
| 5986 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5987 | else |
| 5988 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5989 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 5990 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5991 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 5992 | #line 5993 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5993 | #include "confdefs.h" |
| 5994 | |
| 5995 | struct s { int a; int b; }; |
| 5996 | static struct s foo; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5997 | int foobar() { |
| 5998 | static int random; |
| 5999 | random = (int) &foo; |
| 6000 | return random; |
| 6001 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6002 | static struct s foo = { 1, 2 }; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6003 | main() { |
| 6004 | exit(!((int)&foo == foobar())); |
| 6005 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6006 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6007 | if { (eval echo configure:6008: \"$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] | 6008 | then |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6009 | ac_cv_bad_static_forward=no |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6010 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6011 | echo "configure: failed program was:" >&5 |
| 6012 | cat conftest.$ac_ext >&5 |
| 6013 | rm -fr conftest* |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6014 | ac_cv_bad_static_forward=yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6015 | fi |
| 6016 | rm -fr conftest* |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6017 | fi |
| 6018 | |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6019 | fi |
| 6020 | |
| 6021 | echo "$ac_t""$ac_cv_bad_static_forward" 1>&6 |
| 6022 | if test "$ac_cv_bad_static_forward" = yes |
| 6023 | then |
| 6024 | cat >> confdefs.h <<\EOF |
| 6025 | #define BAD_STATIC_FORWARD 1 |
| 6026 | EOF |
| 6027 | |
| 6028 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6029 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6030 | va_list_is_array=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6031 | echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6032 | echo "configure:6033: checking whether va_list is an array" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6033 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6034 | #line 6035 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6035 | #include "confdefs.h" |
| 6036 | |
| 6037 | #ifdef HAVE_STDARG_PROTOTYPES |
| 6038 | #include <stdarg.h> |
| 6039 | #else |
| 6040 | #include <varargs.h> |
| 6041 | #endif |
| 6042 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6043 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6044 | va_list list1, list2; list1 = list2; |
| 6045 | ; return 0; } |
| 6046 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6047 | if { (eval echo configure:6048: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6048 | : |
| 6049 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6050 | echo "configure: failed program was:" >&5 |
| 6051 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6052 | rm -rf conftest* |
| 6053 | cat >> confdefs.h <<\EOF |
| 6054 | #define VA_LIST_IS_ARRAY 1 |
| 6055 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6056 | va_list_is_array=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6057 | fi |
| 6058 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6059 | echo "$ac_t""$va_list_is_array" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6060 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6061 | # sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-( |
| 6062 | echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6063 | echo "configure:6064: checking for gethostbyname_r" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6064 | 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] | 6065 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6066 | else |
| 6067 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6068 | #line 6069 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6069 | #include "confdefs.h" |
| 6070 | /* System header to define __stub macros and hopefully few prototypes, |
| 6071 | which can conflict with char gethostbyname_r(); below. */ |
| 6072 | #include <assert.h> |
| 6073 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6074 | /* We use char because int might match the return type of a gcc2 |
| 6075 | builtin and then its argument prototype would still apply. */ |
| 6076 | char gethostbyname_r(); |
| 6077 | |
| 6078 | int main() { |
| 6079 | |
| 6080 | /* The GNU C library defines this for functions which it implements |
| 6081 | to always fail with ENOSYS. Some functions are actually named |
| 6082 | something starting with __ and the normal name is an alias. */ |
| 6083 | #if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r) |
| 6084 | choke me |
| 6085 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6086 | gethostbyname_r(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6087 | #endif |
| 6088 | |
| 6089 | ; return 0; } |
| 6090 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6091 | if { (eval echo configure:6092: \"$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] | 6092 | rm -rf conftest* |
| 6093 | eval "ac_cv_func_gethostbyname_r=yes" |
| 6094 | else |
| 6095 | echo "configure: failed program was:" >&5 |
| 6096 | cat conftest.$ac_ext >&5 |
| 6097 | rm -rf conftest* |
| 6098 | eval "ac_cv_func_gethostbyname_r=no" |
| 6099 | fi |
| 6100 | rm -f conftest* |
| 6101 | fi |
| 6102 | |
| 6103 | if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then |
| 6104 | echo "$ac_t""yes" 1>&6 |
| 6105 | |
| 6106 | cat >> confdefs.h <<\EOF |
| 6107 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6108 | EOF |
| 6109 | |
| 6110 | echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6111 | echo "configure:6112: checking gethostbyname_r with 6 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6112 | OLD_CFLAGS=$CFLAGS |
| 6113 | CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS" |
| 6114 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6115 | #line 6116 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6116 | #include "confdefs.h" |
| 6117 | |
| 6118 | # include <netdb.h> |
| 6119 | |
| 6120 | int main() { |
| 6121 | |
| 6122 | char *name; |
| 6123 | struct hostent *he, *res; |
| 6124 | char buffer[2048]; |
| 6125 | int buflen = 2048; |
| 6126 | int h_errnop; |
| 6127 | |
| 6128 | (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop) |
| 6129 | |
| 6130 | ; return 0; } |
| 6131 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6132 | if { (eval echo configure:6133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6133 | rm -rf conftest* |
| 6134 | |
| 6135 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6136 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6137 | EOF |
| 6138 | |
| 6139 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6140 | #define HAVE_GETHOSTBYNAME_R_6_ARG 1 |
| 6141 | EOF |
| 6142 | |
| 6143 | echo "$ac_t""yes" 1>&6 |
| 6144 | |
| 6145 | else |
| 6146 | echo "configure: failed program was:" >&5 |
| 6147 | cat conftest.$ac_ext >&5 |
| 6148 | rm -rf conftest* |
| 6149 | |
| 6150 | echo "$ac_t""no" 1>&6 |
| 6151 | echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6152 | echo "configure:6153: checking gethostbyname_r with 5 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6153 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6154 | #line 6155 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6155 | #include "confdefs.h" |
| 6156 | |
| 6157 | # include <netdb.h> |
| 6158 | |
| 6159 | int main() { |
| 6160 | |
| 6161 | char *name; |
| 6162 | struct hostent *he; |
| 6163 | char buffer[2048]; |
| 6164 | int buflen = 2048; |
| 6165 | int h_errnop; |
| 6166 | |
| 6167 | (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop) |
| 6168 | |
| 6169 | ; return 0; } |
| 6170 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6171 | if { (eval echo configure:6172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6172 | rm -rf conftest* |
| 6173 | |
| 6174 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6175 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6176 | EOF |
| 6177 | |
| 6178 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6179 | #define HAVE_GETHOSTBYNAME_R_5_ARG 1 |
| 6180 | EOF |
| 6181 | |
| 6182 | echo "$ac_t""yes" 1>&6 |
| 6183 | |
| 6184 | else |
| 6185 | echo "configure: failed program was:" >&5 |
| 6186 | cat conftest.$ac_ext >&5 |
| 6187 | rm -rf conftest* |
| 6188 | |
| 6189 | echo "$ac_t""no" 1>&6 |
| 6190 | echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6191 | echo "configure:6192: checking gethostbyname_r with 3 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6192 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6193 | #line 6194 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6194 | #include "confdefs.h" |
| 6195 | |
| 6196 | # include <netdb.h> |
| 6197 | |
| 6198 | int main() { |
| 6199 | |
| 6200 | char *name; |
| 6201 | struct hostent *he; |
| 6202 | struct hostent_data data; |
| 6203 | |
| 6204 | (void) gethostbyname_r(name, he, &data); |
| 6205 | |
| 6206 | ; return 0; } |
| 6207 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6208 | if { (eval echo configure:6209: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6209 | rm -rf conftest* |
| 6210 | |
| 6211 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6212 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6213 | EOF |
| 6214 | |
| 6215 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6216 | #define HAVE_GETHOSTBYNAME_R_3_ARG 1 |
| 6217 | EOF |
| 6218 | |
| 6219 | echo "$ac_t""yes" 1>&6 |
| 6220 | |
| 6221 | else |
| 6222 | echo "configure: failed program was:" >&5 |
| 6223 | cat conftest.$ac_ext >&5 |
| 6224 | rm -rf conftest* |
| 6225 | |
| 6226 | echo "$ac_t""no" 1>&6 |
| 6227 | |
| 6228 | fi |
| 6229 | rm -f conftest* |
| 6230 | |
| 6231 | fi |
| 6232 | rm -f conftest* |
| 6233 | |
| 6234 | fi |
| 6235 | rm -f conftest* |
| 6236 | CFLAGS=$OLD_CFLAGS |
| 6237 | |
| 6238 | else |
| 6239 | echo "$ac_t""no" 1>&6 |
| 6240 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6241 | for ac_func in gethostbyname |
| 6242 | do |
| 6243 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6244 | echo "configure:6245: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6245 | 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] | 6246 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6247 | else |
| 6248 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6249 | #line 6250 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6250 | #include "confdefs.h" |
| 6251 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6252 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6253 | #include <assert.h> |
| 6254 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6255 | /* We use char because int might match the return type of a gcc2 |
| 6256 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6257 | char $ac_func(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6258 | |
| 6259 | int main() { |
| 6260 | |
| 6261 | /* The GNU C library defines this for functions which it implements |
| 6262 | to always fail with ENOSYS. Some functions are actually named |
| 6263 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6264 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6265 | choke me |
| 6266 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6267 | $ac_func(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6268 | #endif |
| 6269 | |
| 6270 | ; return 0; } |
| 6271 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6272 | if { (eval echo configure:6273: \"$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] | 6273 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6274 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6275 | else |
| 6276 | echo "configure: failed program was:" >&5 |
| 6277 | cat conftest.$ac_ext >&5 |
| 6278 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6279 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6280 | fi |
| 6281 | rm -f conftest* |
| 6282 | fi |
| 6283 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6284 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6285 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6286 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 6287 | cat >> confdefs.h <<EOF |
| 6288 | #define $ac_tr_func 1 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6289 | EOF |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6290 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6291 | else |
| 6292 | echo "$ac_t""no" 1>&6 |
| 6293 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6294 | done |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6295 | |
| 6296 | |
| 6297 | fi |
| 6298 | |
| 6299 | |
| 6300 | |
| 6301 | |
| 6302 | |
| 6303 | |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6304 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6305 | # checks for system services |
| 6306 | # (none yet) |
| 6307 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6308 | # Linux requires this for correct f.p. operations |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6309 | echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6310 | echo "configure:6311: checking for __fpu_control" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6311 | if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6312 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6313 | else |
| 6314 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6315 | #line 6316 "configure" |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6316 | #include "confdefs.h" |
| 6317 | /* System header to define __stub macros and hopefully few prototypes, |
| 6318 | which can conflict with char __fpu_control(); below. */ |
| 6319 | #include <assert.h> |
| 6320 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6321 | /* We use char because int might match the return type of a gcc2 |
| 6322 | builtin and then its argument prototype would still apply. */ |
| 6323 | char __fpu_control(); |
| 6324 | |
| 6325 | int main() { |
| 6326 | |
| 6327 | /* The GNU C library defines this for functions which it implements |
| 6328 | to always fail with ENOSYS. Some functions are actually named |
| 6329 | something starting with __ and the normal name is an alias. */ |
| 6330 | #if defined (__stub___fpu_control) || defined (__stub_____fpu_control) |
| 6331 | choke me |
| 6332 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6333 | __fpu_control(); |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6334 | #endif |
| 6335 | |
| 6336 | ; return 0; } |
| 6337 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6338 | if { (eval echo configure:6339: \"$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] | 6339 | rm -rf conftest* |
| 6340 | eval "ac_cv_func___fpu_control=yes" |
| 6341 | else |
| 6342 | echo "configure: failed program was:" >&5 |
| 6343 | cat conftest.$ac_ext >&5 |
| 6344 | rm -rf conftest* |
| 6345 | eval "ac_cv_func___fpu_control=no" |
| 6346 | fi |
| 6347 | rm -f conftest* |
| 6348 | fi |
| 6349 | |
| 6350 | if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then |
| 6351 | echo "$ac_t""yes" 1>&6 |
| 6352 | : |
| 6353 | else |
| 6354 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6355 | echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6356 | echo "configure:6357: checking for __fpu_control in -lieee" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6357 | ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6358 | 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] | 6359 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6360 | else |
| 6361 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6362 | LIBS="-lieee $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6363 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6364 | #line 6365 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6365 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6366 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6367 | /* We use char because int might match the return type of a gcc2 |
| 6368 | builtin and then its argument prototype would still apply. */ |
| 6369 | char __fpu_control(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6370 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6371 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6372 | __fpu_control() |
| 6373 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6374 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6375 | if { (eval echo configure:6376: \"$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] | 6376 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6377 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6378 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6379 | echo "configure: failed program was:" >&5 |
| 6380 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6381 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6382 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6383 | fi |
| 6384 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6385 | LIBS="$ac_save_LIBS" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6386 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6387 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6388 | 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] | 6389 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6390 | ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 6391 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6392 | cat >> confdefs.h <<EOF |
| 6393 | #define $ac_tr_lib 1 |
| 6394 | EOF |
| 6395 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6396 | LIBS="-lieee $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6397 | |
| 6398 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6399 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6400 | fi |
| 6401 | |
| 6402 | |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6403 | fi |
| 6404 | |
| 6405 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6406 | # Check for --with-fpectl |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6407 | echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6408 | echo "configure:6409: checking for --with-fpectl" >&5 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6409 | # Check whether --with-fpectl or --without-fpectl was given. |
| 6410 | if test "${with_fpectl+set}" = set; then |
| 6411 | withval="$with_fpectl" |
| 6412 | |
| 6413 | if test "$withval" != no |
| 6414 | then cat >> confdefs.h <<\EOF |
| 6415 | #define WANT_SIGFPE_HANDLER 1 |
| 6416 | EOF |
| 6417 | echo "$ac_t""yes" 1>&6 |
| 6418 | else echo "$ac_t""no" 1>&6 |
| 6419 | fi |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6420 | else |
| 6421 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6422 | fi |
| 6423 | |
| 6424 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6425 | # check for --with-libm=... |
| 6426 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 6427 | case $ac_sys_system in |
Guido van Rossum | 3dc0a51 | 2000-10-05 18:00:06 +0000 | [diff] [blame] | 6428 | Darwin) ;; |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 6429 | BeOS) ;; |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 6430 | *) LIBM=-lm |
| 6431 | esac |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6432 | echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6433 | echo "configure:6434: checking for --with-libm=STRING" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6434 | # Check whether --with-libm or --without-libm was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6435 | if test "${with_libm+set}" = set; then |
| 6436 | withval="$with_libm" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6437 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6438 | if test "$withval" = no |
| 6439 | then LIBM= |
| 6440 | echo "$ac_t""force LIBM empty" 1>&6 |
| 6441 | elif test "$withval" != yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6442 | then LIBM=$withval |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6443 | echo "$ac_t""set LIBM=\"$withval\"" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6444 | 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] | 6445 | fi |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6446 | else |
| 6447 | echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6448 | fi |
| 6449 | |
| 6450 | |
| 6451 | # check for --with-libc=... |
| 6452 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6453 | echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6454 | echo "configure:6455: checking for --with-libc=STRING" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6455 | # Check whether --with-libc or --without-libc was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6456 | if test "${with_libc+set}" = set; then |
| 6457 | withval="$with_libc" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6458 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6459 | if test "$withval" = no |
| 6460 | then LIBC= |
| 6461 | echo "$ac_t""force LIBC empty" 1>&6 |
| 6462 | elif test "$withval" != yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6463 | then LIBC=$withval |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6464 | echo "$ac_t""set LIBC=\"$withval\"" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6465 | 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] | 6466 | fi |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6467 | else |
| 6468 | echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6469 | fi |
| 6470 | |
| 6471 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6472 | # check for hypot() in math library |
| 6473 | LIBS_SAVE=$LIBS |
| 6474 | LIBS="$LIBS $LIBM" |
| 6475 | for ac_func in hypot |
| 6476 | do |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6477 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6478 | echo "configure:6479: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6479 | 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] | 6480 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6481 | else |
| 6482 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6483 | #line 6484 "configure" |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6484 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6485 | /* System header to define __stub macros and hopefully few prototypes, |
| 6486 | which can conflict with char $ac_func(); below. */ |
| 6487 | #include <assert.h> |
| 6488 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6489 | /* We use char because int might match the return type of a gcc2 |
| 6490 | builtin and then its argument prototype would still apply. */ |
| 6491 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6492 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6493 | int main() { |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6494 | |
| 6495 | /* The GNU C library defines this for functions which it implements |
| 6496 | to always fail with ENOSYS. Some functions are actually named |
| 6497 | something starting with __ and the normal name is an alias. */ |
| 6498 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 6499 | choke me |
| 6500 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6501 | $ac_func(); |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6502 | #endif |
| 6503 | |
| 6504 | ; return 0; } |
| 6505 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6506 | if { (eval echo configure:6507: \"$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] | 6507 | rm -rf conftest* |
| 6508 | eval "ac_cv_func_$ac_func=yes" |
| 6509 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6510 | echo "configure: failed program was:" >&5 |
| 6511 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6512 | rm -rf conftest* |
| 6513 | eval "ac_cv_func_$ac_func=no" |
| 6514 | fi |
| 6515 | rm -f conftest* |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6516 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6517 | |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6518 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 6519 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6520 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 6521 | cat >> confdefs.h <<EOF |
| 6522 | #define $ac_tr_func 1 |
| 6523 | EOF |
| 6524 | |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6525 | else |
| 6526 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 6527 | LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6528 | fi |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6529 | done |
| 6530 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6531 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6532 | LIBS=$LIBS_SAVE |
| 6533 | |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6534 | # check whether malloc(0) returns NULL or not |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6535 | echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6536 | echo "configure:6537: checking what malloc(0) returns" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6537 | if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6538 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6539 | else |
| 6540 | if test "$cross_compiling" = yes; then |
| 6541 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 6542 | else |
| 6543 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6544 | #line 6545 "configure" |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6545 | #include "confdefs.h" |
| 6546 | #include <stdio.h> |
| 6547 | #ifdef HAVE_STDLIB |
| 6548 | #include <stdlib.h> |
| 6549 | #else |
| 6550 | char *malloc(), *realloc(); |
| 6551 | int *free(); |
| 6552 | #endif |
| 6553 | main() { |
| 6554 | char *p; |
| 6555 | p = malloc(0); |
| 6556 | if (p == NULL) exit(1); |
| 6557 | p = realloc(p, 0); |
| 6558 | if (p == NULL) exit(1); |
| 6559 | free(p); |
| 6560 | exit(0); |
| 6561 | } |
| 6562 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6563 | if { (eval echo configure:6564: \"$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] | 6564 | then |
| 6565 | ac_cv_malloc_zero=nonnull |
| 6566 | else |
| 6567 | echo "configure: failed program was:" >&5 |
| 6568 | cat conftest.$ac_ext >&5 |
| 6569 | rm -fr conftest* |
| 6570 | ac_cv_malloc_zero=null |
| 6571 | fi |
| 6572 | rm -fr conftest* |
| 6573 | fi |
| 6574 | |
| 6575 | fi |
| 6576 | |
| 6577 | echo "$ac_t""$ac_cv_malloc_zero" 1>&6 |
| 6578 | if test "$ac_cv_malloc_zero" = null |
| 6579 | then |
| 6580 | cat >> confdefs.h <<\EOF |
| 6581 | #define MALLOC_ZERO_RETURNS_NULL 1 |
| 6582 | EOF |
| 6583 | |
| 6584 | fi |
| 6585 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6586 | # check for wchar.h |
| 6587 | ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'` |
| 6588 | echo $ac_n "checking for wchar.h""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6589 | echo "configure:6590: checking for wchar.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6590 | 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] | 6591 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6592 | else |
| 6593 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6594 | #line 6595 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6595 | #include "confdefs.h" |
| 6596 | #include <wchar.h> |
| 6597 | EOF |
| 6598 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6599 | { (eval echo configure:6600: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6600 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 6601 | if test -z "$ac_err"; then |
| 6602 | rm -rf conftest* |
| 6603 | eval "ac_cv_header_$ac_safe=yes" |
| 6604 | else |
| 6605 | echo "$ac_err" >&5 |
| 6606 | echo "configure: failed program was:" >&5 |
| 6607 | cat conftest.$ac_ext >&5 |
| 6608 | rm -rf conftest* |
| 6609 | eval "ac_cv_header_$ac_safe=no" |
| 6610 | fi |
| 6611 | rm -f conftest* |
| 6612 | fi |
| 6613 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 6614 | echo "$ac_t""yes" 1>&6 |
| 6615 | cat >> confdefs.h <<\EOF |
| 6616 | #define HAVE_WCHAR_H 1 |
| 6617 | EOF |
| 6618 | wchar_h="yes" |
| 6619 | else |
| 6620 | echo "$ac_t""no" 1>&6 |
| 6621 | wchar_h="no" |
| 6622 | |
| 6623 | fi |
| 6624 | |
| 6625 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6626 | # determine wchar_t size |
| 6627 | if test "$wchar_h" = yes |
| 6628 | then |
| 6629 | echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6630 | echo "configure:6631: checking size of wchar_t" >&5 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6631 | if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then |
| 6632 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6633 | else |
| 6634 | if test "$cross_compiling" = yes; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6635 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 6636 | else |
| 6637 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6638 | #line 6639 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6639 | #include "confdefs.h" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6640 | #include <stdio.h> |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6641 | #include <sys/types.h> |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6642 | main() |
| 6643 | { |
| 6644 | FILE *f=fopen("conftestval", "w"); |
| 6645 | if (!f) exit(1); |
| 6646 | fprintf(f, "%d\n", sizeof(wchar_t)); |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6647 | exit(0); |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6648 | } |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6649 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6650 | if { (eval echo configure:6651: \"$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] | 6651 | then |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6652 | ac_cv_sizeof_wchar_t=`cat conftestval` |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6653 | else |
| 6654 | echo "configure: failed program was:" >&5 |
| 6655 | cat conftest.$ac_ext >&5 |
| 6656 | rm -fr conftest* |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6657 | ac_cv_sizeof_wchar_t=0 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6658 | fi |
| 6659 | rm -fr conftest* |
| 6660 | fi |
| 6661 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6662 | fi |
| 6663 | echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 |
| 6664 | cat >> confdefs.h <<EOF |
| 6665 | #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t |
| 6666 | EOF |
| 6667 | |
| 6668 | |
| 6669 | fi |
| 6670 | |
| 6671 | echo $ac_n "checking what type to use for unicode""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6672 | echo "configure:6673: checking what type to use for unicode" >&5 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6673 | # Check whether --enable-unicode or --disable-unicode was given. |
| 6674 | if test "${enable_unicode+set}" = set; then |
| 6675 | enableval="$enable_unicode" |
| 6676 | : |
| 6677 | else |
| 6678 | enable_unicode=yes |
| 6679 | fi |
| 6680 | |
| 6681 | |
| 6682 | if test $enable_unicode = yes |
| 6683 | then |
Martin v. Löwis | fd91779 | 2001-06-27 20:22:04 +0000 | [diff] [blame] | 6684 | # Without any arguments, Py_UNICODE defaults to two-byte mode |
| 6685 | enable_unicode="ucs2" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6686 | fi |
| 6687 | |
| 6688 | case "$enable_unicode" in |
| 6689 | ucs2) unicode_size="2" |
| 6690 | cat >> confdefs.h <<\EOF |
| 6691 | #define Py_UNICODE_SIZE 2 |
| 6692 | EOF |
| 6693 | |
| 6694 | ;; |
| 6695 | ucs4) unicode_size="4" |
| 6696 | cat >> confdefs.h <<\EOF |
| 6697 | #define Py_UNICODE_SIZE 4 |
| 6698 | EOF |
| 6699 | |
| 6700 | ;; |
| 6701 | esac |
| 6702 | |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 6703 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6704 | if test "$enable_unicode" = "no" |
| 6705 | then |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 6706 | UNICODE_OBJS="" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6707 | echo "$ac_t""not used" 1>&6 |
| 6708 | else |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 6709 | UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6710 | cat >> confdefs.h <<\EOF |
| 6711 | #define Py_USING_UNICODE 1 |
| 6712 | EOF |
| 6713 | |
| 6714 | if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" |
| 6715 | then |
| 6716 | PY_UNICODE_TYPE="wchar_t" |
| 6717 | cat >> confdefs.h <<\EOF |
| 6718 | #define HAVE_USABLE_WCHAR_T 1 |
| 6719 | EOF |
| 6720 | |
| 6721 | cat >> confdefs.h <<\EOF |
| 6722 | #define PY_UNICODE_TYPE wchar_t |
| 6723 | EOF |
| 6724 | |
| 6725 | elif test "$ac_cv_sizeof_short" = "$unicode_size" |
| 6726 | then |
| 6727 | PY_UNICODE_TYPE="unsigned short" |
| 6728 | cat >> confdefs.h <<\EOF |
| 6729 | #define PY_UNICODE_TYPE unsigned short |
| 6730 | EOF |
| 6731 | |
| 6732 | elif test "$ac_cv_sizeof_long" = "$unicode_size" |
| 6733 | then |
| 6734 | PY_UNICODE_TYPE="unsigned long" |
| 6735 | cat >> confdefs.h <<\EOF |
| 6736 | #define PY_UNICODE_TYPE unsigned long |
| 6737 | EOF |
| 6738 | |
| 6739 | else |
| 6740 | PY_UNICODE_TYPE="no type found" |
| 6741 | fi |
| 6742 | echo "$ac_t""$PY_UNICODE_TYPE" 1>&6 |
| 6743 | fi |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6744 | |
| 6745 | # check for endianness |
| 6746 | echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6747 | echo "configure:6748: checking whether byte ordering is bigendian" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6748 | if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6749 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6750 | else |
| 6751 | ac_cv_c_bigendian=unknown |
| 6752 | # See if sys/param.h defines the BYTE_ORDER macro. |
| 6753 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6754 | #line 6755 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6755 | #include "confdefs.h" |
| 6756 | #include <sys/types.h> |
| 6757 | #include <sys/param.h> |
| 6758 | int main() { |
| 6759 | |
| 6760 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN |
| 6761 | bogus endian macros |
| 6762 | #endif |
| 6763 | ; return 0; } |
| 6764 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6765 | if { (eval echo configure:6766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6766 | rm -rf conftest* |
| 6767 | # It does; now see whether it defined to BIG_ENDIAN or not. |
| 6768 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6769 | #line 6770 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6770 | #include "confdefs.h" |
| 6771 | #include <sys/types.h> |
| 6772 | #include <sys/param.h> |
| 6773 | int main() { |
| 6774 | |
| 6775 | #if BYTE_ORDER != BIG_ENDIAN |
| 6776 | not big endian |
| 6777 | #endif |
| 6778 | ; return 0; } |
| 6779 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6780 | if { (eval echo configure:6781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6781 | rm -rf conftest* |
| 6782 | ac_cv_c_bigendian=yes |
| 6783 | else |
| 6784 | echo "configure: failed program was:" >&5 |
| 6785 | cat conftest.$ac_ext >&5 |
| 6786 | rm -rf conftest* |
| 6787 | ac_cv_c_bigendian=no |
| 6788 | fi |
| 6789 | rm -f conftest* |
| 6790 | else |
| 6791 | echo "configure: failed program was:" >&5 |
| 6792 | cat conftest.$ac_ext >&5 |
| 6793 | fi |
| 6794 | rm -f conftest* |
| 6795 | if test $ac_cv_c_bigendian = unknown; then |
| 6796 | if test "$cross_compiling" = yes; then |
| 6797 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 6798 | else |
| 6799 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6800 | #line 6801 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6801 | #include "confdefs.h" |
| 6802 | main () { |
| 6803 | /* Are we little or big endian? From Harbison&Steele. */ |
| 6804 | union |
| 6805 | { |
| 6806 | long l; |
| 6807 | char c[sizeof (long)]; |
| 6808 | } u; |
| 6809 | u.l = 1; |
| 6810 | exit (u.c[sizeof (long) - 1] == 1); |
| 6811 | } |
| 6812 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6813 | if { (eval echo configure:6814: \"$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] | 6814 | then |
| 6815 | ac_cv_c_bigendian=no |
| 6816 | else |
| 6817 | echo "configure: failed program was:" >&5 |
| 6818 | cat conftest.$ac_ext >&5 |
| 6819 | rm -fr conftest* |
| 6820 | ac_cv_c_bigendian=yes |
| 6821 | fi |
| 6822 | rm -fr conftest* |
| 6823 | fi |
| 6824 | |
| 6825 | fi |
| 6826 | fi |
| 6827 | |
| 6828 | echo "$ac_t""$ac_cv_c_bigendian" 1>&6 |
| 6829 | if test $ac_cv_c_bigendian = yes; then |
| 6830 | cat >> confdefs.h <<\EOF |
| 6831 | #define WORDS_BIGENDIAN 1 |
| 6832 | EOF |
| 6833 | |
| 6834 | fi |
| 6835 | |
| 6836 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6837 | # Check whether right shifting a negative integer extends the sign bit |
| 6838 | # or fills with zeros (like the Cray J90, according to Tim Peters). |
| 6839 | echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6840 | echo "configure:6841: checking whether right shift extends the sign bit" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6841 | if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 6842 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6843 | else |
| 6844 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6845 | if test "$cross_compiling" = yes; then |
| 6846 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 6847 | else |
| 6848 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6849 | #line 6850 "configure" |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6850 | #include "confdefs.h" |
| 6851 | |
| 6852 | int main() |
| 6853 | { |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 6854 | exit(((-1)>>3 == -1) ? 0 : 1); |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6855 | } |
| 6856 | |
| 6857 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6858 | if { (eval echo configure:6859: \"$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] | 6859 | then |
| 6860 | ac_cv_rshift_extends_sign=yes |
| 6861 | else |
| 6862 | echo "configure: failed program was:" >&5 |
| 6863 | cat conftest.$ac_ext >&5 |
| 6864 | rm -fr conftest* |
| 6865 | ac_cv_rshift_extends_sign=no |
| 6866 | fi |
| 6867 | rm -fr conftest* |
| 6868 | fi |
| 6869 | |
| 6870 | fi |
| 6871 | |
| 6872 | echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6 |
| 6873 | if test "$ac_cv_rshift_extends_sign" = no |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6874 | then |
| 6875 | cat >> confdefs.h <<\EOF |
| 6876 | #define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1 |
| 6877 | EOF |
| 6878 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6879 | fi |
| 6880 | |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 6881 | # check for getc_unlocked and related locking functions |
| 6882 | echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6883 | echo "configure:6884: checking for getc_unlocked() and friends" >&5 |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 6884 | if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then |
| 6885 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6886 | else |
| 6887 | |
| 6888 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6889 | #line 6890 "configure" |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 6890 | #include "confdefs.h" |
| 6891 | #include <stdio.h> |
| 6892 | int main() { |
| 6893 | |
| 6894 | FILE *f = fopen("/dev/null", "r"); |
| 6895 | flockfile(f); |
| 6896 | getc_unlocked(f); |
| 6897 | funlockfile(f); |
| 6898 | |
| 6899 | ; return 0; } |
| 6900 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6901 | if { (eval echo configure:6902: \"$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] | 6902 | rm -rf conftest* |
| 6903 | ac_cv_have_getc_unlocked=yes |
| 6904 | else |
| 6905 | echo "configure: failed program was:" >&5 |
| 6906 | cat conftest.$ac_ext >&5 |
| 6907 | rm -rf conftest* |
| 6908 | ac_cv_have_getc_unlocked=no |
| 6909 | fi |
| 6910 | rm -f conftest* |
| 6911 | fi |
| 6912 | |
| 6913 | echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6 |
| 6914 | if test "$ac_cv_have_getc_unlocked" = yes |
| 6915 | then |
| 6916 | cat >> confdefs.h <<\EOF |
| 6917 | #define HAVE_GETC_UNLOCKED 1 |
| 6918 | EOF |
| 6919 | |
| 6920 | fi |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6921 | |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 6922 | # check for readline 4.2 |
| 6923 | echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6924 | echo "configure:6925: checking for rl_completion_matches in -lreadline" >&5 |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 6925 | ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'` |
| 6926 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 6927 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6928 | else |
| 6929 | ac_save_LIBS="$LIBS" |
| 6930 | LIBS="-lreadline -ltermcap $LIBS" |
| 6931 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6932 | #line 6933 "configure" |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 6933 | #include "confdefs.h" |
| 6934 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6935 | /* We use char because int might match the return type of a gcc2 |
| 6936 | builtin and then its argument prototype would still apply. */ |
| 6937 | char rl_completion_matches(); |
| 6938 | |
| 6939 | int main() { |
| 6940 | rl_completion_matches() |
| 6941 | ; return 0; } |
| 6942 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6943 | if { (eval echo configure:6944: \"$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] | 6944 | rm -rf conftest* |
| 6945 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 6946 | else |
| 6947 | echo "configure: failed program was:" >&5 |
| 6948 | cat conftest.$ac_ext >&5 |
| 6949 | rm -rf conftest* |
| 6950 | eval "ac_cv_lib_$ac_lib_var=no" |
| 6951 | fi |
| 6952 | rm -f conftest* |
| 6953 | LIBS="$ac_save_LIBS" |
| 6954 | |
| 6955 | fi |
| 6956 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 6957 | echo "$ac_t""yes" 1>&6 |
| 6958 | cat >> confdefs.h <<\EOF |
| 6959 | #define HAVE_RL_COMPLETION_MATCHES 1 |
| 6960 | EOF |
| 6961 | |
| 6962 | else |
| 6963 | echo "$ac_t""no" 1>&6 |
| 6964 | fi |
| 6965 | |
| 6966 | |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 6967 | echo $ac_n "checking for broken nice()""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6968 | echo "configure:6969: checking for broken nice()" >&5 |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 6969 | if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then |
| 6970 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6971 | else |
| 6972 | |
| 6973 | if test "$cross_compiling" = yes; then |
| 6974 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 6975 | else |
| 6976 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6977 | #line 6978 "configure" |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 6978 | #include "confdefs.h" |
| 6979 | |
| 6980 | int main() |
| 6981 | { |
| 6982 | int val1 = nice(1); |
| 6983 | if (val1 != -1 && val1 == nice(2)) |
| 6984 | exit(0); |
| 6985 | exit(1); |
| 6986 | } |
| 6987 | |
| 6988 | EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 6989 | if { (eval echo configure:6990: \"$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] | 6990 | then |
| 6991 | ac_cv_broken_nice=yes |
| 6992 | else |
| 6993 | echo "configure: failed program was:" >&5 |
| 6994 | cat conftest.$ac_ext >&5 |
| 6995 | rm -fr conftest* |
| 6996 | ac_cv_broken_nice=no |
| 6997 | fi |
| 6998 | rm -fr conftest* |
| 6999 | fi |
| 7000 | |
| 7001 | fi |
| 7002 | |
| 7003 | echo "$ac_t""$ac_cv_broken_nice" 1>&6 |
| 7004 | if test "$ac_cv_broken_nice" = yes |
| 7005 | then |
| 7006 | cat >> confdefs.h <<\EOF |
| 7007 | #define HAVE_BROKEN_NICE 1 |
| 7008 | EOF |
| 7009 | |
| 7010 | fi |
| 7011 | |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7012 | # THIS MUST BE LAST, IT CAN BREAK OTHER TESTS! |
| 7013 | # Add sys/socket.h to confdefs.h |
| 7014 | cat >> confdefs.h <<\EOF |
| 7015 | #ifdef HAVE_SYS_SOCKET_H |
| 7016 | #include <sys/socket.h> |
| 7017 | #endif |
| 7018 | EOF |
| 7019 | echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 7020 | echo "configure:7021: checking for socklen_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7021 | 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] | 7022 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 7023 | else |
| 7024 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 7025 | #line 7026 "configure" |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7026 | #include "confdefs.h" |
| 7027 | #include <sys/types.h> |
| 7028 | #if STDC_HEADERS |
| 7029 | #include <stdlib.h> |
| 7030 | #include <stddef.h> |
| 7031 | #endif |
| 7032 | EOF |
| 7033 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 7034 | egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
| 7035 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7036 | ac_cv_type_socklen_t=yes |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7037 | else |
| 7038 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7039 | ac_cv_type_socklen_t=no |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7040 | fi |
| 7041 | rm -f conftest* |
| 7042 | |
| 7043 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7044 | echo "$ac_t""$ac_cv_type_socklen_t" 1>&6 |
| 7045 | if test $ac_cv_type_socklen_t = no; then |
| 7046 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7047 | #define socklen_t int |
| 7048 | EOF |
| 7049 | |
| 7050 | fi |
| 7051 | |
| 7052 | |
Neil Schemenauer | f25cf6c | 2001-03-04 06:39:33 +0000 | [diff] [blame] | 7053 | # Add Python/ prefix to LIBOBJS |
| 7054 | libobjs=$LIBOBJS |
| 7055 | LIBOBJS= |
| 7056 | for obj in $libobjs; do |
| 7057 | LIBOBJS="$LIBOBJS Python/$obj" |
| 7058 | done |
| 7059 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7060 | #AC_MSG_CHECKING(for Modules/Setup) |
| 7061 | #if test ! -f Modules/Setup ; then |
| 7062 | # if test ! -d Modules ; then |
| 7063 | # mkdir Modules |
| 7064 | # fi |
| 7065 | # cp "$srcdir/Modules/Setup.dist" Modules/Setup |
| 7066 | # AC_MSG_RESULT(creating) |
| 7067 | #else |
| 7068 | # AC_MSG_RESULT(already exists) |
| 7069 | #fi |
| 7070 | |
| 7071 | |
Neil Schemenauer | acbf9ef | 2001-02-27 02:15:14 +0000 | [diff] [blame] | 7072 | SRCDIRS="Parser Grammar Objects Python Modules" |
Andrew M. Kuchling | 8abedde | 2001-01-26 22:55:24 +0000 | [diff] [blame] | 7073 | echo $ac_n "checking for build directories""... $ac_c" 1>&6 |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame^] | 7074 | echo "configure:7075: checking for build directories" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7075 | for dir in $SRCDIRS; do |
| 7076 | if test ! -d $dir; then |
| 7077 | mkdir $dir |
Guido van Rossum | 262cf20 | 2000-11-02 19:33:53 +0000 | [diff] [blame] | 7078 | fi |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7079 | done |
| 7080 | echo "$ac_t""done" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 7081 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7082 | # generate output files |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7083 | trap '' 1 2 15 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7084 | cat > confcache <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7085 | # This file is a shell script that caches the results of configure |
| 7086 | # tests run on this system so they can be shared between configure |
| 7087 | # scripts and configure runs. It is not useful on other systems. |
| 7088 | # If it contains results you don't want to keep, you may remove or edit it. |
| 7089 | # |
| 7090 | # By default, configure uses ./config.cache as the cache file, |
| 7091 | # creating it if it does not exist already. You can give configure |
| 7092 | # the --cache-file=FILE option to use a different cache file; that is |
| 7093 | # what configure does when it calls configure scripts in |
| 7094 | # subdirectories, so they share the cache. |
| 7095 | # Giving --cache-file=/dev/null disables caching, for debugging configure. |
| 7096 | # config.status only pays attention to the cache file if you give it the |
| 7097 | # --recheck option to rerun configure. |
| 7098 | # |
| 7099 | EOF |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7100 | # The following way of writing the cache mishandles newlines in values, |
| 7101 | # but we know of no workaround that is simple, portable, and efficient. |
| 7102 | # So, don't put newlines in cache variables' values. |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7103 | # Ultrix sh set writes to stderr and can't be redirected directly, |
| 7104 | # 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] | 7105 | (set) 2>&1 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 7106 | case `(ac_space=' '; set | grep ac_space) 2>&1` in |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7107 | *ac_space=\ *) |
| 7108 | # `set' does not quote correctly, so add quotes (double-quote substitution |
| 7109 | # turns \\\\ into \\, and sed turns \\ into \). |
| 7110 | sed -n \ |
| 7111 | -e "s/'/'\\\\''/g" \ |
| 7112 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" |
| 7113 | ;; |
| 7114 | *) |
| 7115 | # `set' quotes correctly as required by POSIX, so do not add quotes. |
| 7116 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' |
| 7117 | ;; |
| 7118 | esac >> confcache |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7119 | if cmp -s $cache_file confcache; then |
| 7120 | : |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7121 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7122 | if test -w $cache_file; then |
| 7123 | echo "updating cache $cache_file" |
| 7124 | cat confcache > $cache_file |
| 7125 | else |
| 7126 | echo "not updating unwritable cache $cache_file" |
| 7127 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7128 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7129 | rm -f confcache |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7130 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7131 | 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] | 7132 | |
| 7133 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
| 7134 | # Let make expand exec_prefix. |
| 7135 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7136 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7137 | # Any assignment to VPATH causes Sun make to only execute |
| 7138 | # the first set of double-colon rules, so remove it if not needed. |
| 7139 | # If there is a colon in the path, we need to keep it. |
| 7140 | if test "x$srcdir" = x.; then |
| 7141 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' |
| 7142 | fi |
| 7143 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7144 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7145 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7146 | DEFS=-DHAVE_CONFIG_H |
| 7147 | |
| 7148 | # Without the "./", some shells look in PATH for config.status. |
| 7149 | : ${CONFIG_STATUS=./config.status} |
| 7150 | |
| 7151 | echo creating $CONFIG_STATUS |
| 7152 | rm -f $CONFIG_STATUS |
| 7153 | cat > $CONFIG_STATUS <<EOF |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7154 | #! /bin/sh |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7155 | # Generated automatically by configure. |
| 7156 | # Run this file to recreate the current configuration. |
| 7157 | # This directory was configured as follows, |
| 7158 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: |
| 7159 | # |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7160 | # $0 $ac_configure_args |
| 7161 | # |
| 7162 | # Compiler output produced by configure, useful for debugging |
| 7163 | # configure, is in ./config.log if it exists. |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7164 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7165 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7166 | for ac_option |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7167 | do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7168 | case "\$ac_option" in |
| 7169 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7170 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" |
| 7171 | 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] | 7172 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7173 | echo "$CONFIG_STATUS generated by autoconf version 2.13" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7174 | exit 0 ;; |
| 7175 | -help | --help | --hel | --he | --h) |
| 7176 | echo "\$ac_cs_usage"; exit 0 ;; |
| 7177 | *) echo "\$ac_cs_usage"; exit 1 ;; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7178 | esac |
| 7179 | done |
| 7180 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7181 | ac_given_srcdir=$srcdir |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7182 | ac_given_INSTALL="$INSTALL" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7183 | |
Martin v. Löwis | 4f1cd8b | 2001-07-26 13:41:06 +0000 | [diff] [blame] | 7184 | 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] | 7185 | EOF |
| 7186 | cat >> $CONFIG_STATUS <<EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7187 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7188 | # Protect against being on the right side of a sed subst in config.status. |
| 7189 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; |
| 7190 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7191 | $ac_vpsub |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7192 | $extrasub |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 7193 | s%@SHELL@%$SHELL%g |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7194 | s%@CFLAGS@%$CFLAGS%g |
| 7195 | s%@CPPFLAGS@%$CPPFLAGS%g |
| 7196 | s%@CXXFLAGS@%$CXXFLAGS%g |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 7197 | s%@FFLAGS@%$FFLAGS%g |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7198 | s%@DEFS@%$DEFS%g |
| 7199 | s%@LDFLAGS@%$LDFLAGS%g |
| 7200 | s%@LIBS@%$LIBS%g |
| 7201 | s%@exec_prefix@%$exec_prefix%g |
| 7202 | s%@prefix@%$prefix%g |
| 7203 | s%@program_transform_name@%$program_transform_name%g |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7204 | s%@bindir@%$bindir%g |
| 7205 | s%@sbindir@%$sbindir%g |
| 7206 | s%@libexecdir@%$libexecdir%g |
| 7207 | s%@datadir@%$datadir%g |
| 7208 | s%@sysconfdir@%$sysconfdir%g |
| 7209 | s%@sharedstatedir@%$sharedstatedir%g |
| 7210 | s%@localstatedir@%$localstatedir%g |
| 7211 | s%@libdir@%$libdir%g |
| 7212 | s%@includedir@%$includedir%g |
| 7213 | s%@oldincludedir@%$oldincludedir%g |
| 7214 | s%@infodir@%$infodir%g |
| 7215 | s%@mandir@%$mandir%g |
Guido van Rossum | 1fd74a7 | 1997-07-19 19:36:02 +0000 | [diff] [blame] | 7216 | s%@VERSION@%$VERSION%g |
Neil Schemenauer | 4edbc2a | 2001-03-22 00:34:03 +0000 | [diff] [blame] | 7217 | s%@CONFIG_ARGS@%$CONFIG_ARGS%g |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 7218 | s%@PYTHONFRAMEWORK@%$PYTHONFRAMEWORK%g |
| 7219 | s%@PYTHONFRAMEWORKDIR@%$PYTHONFRAMEWORKDIR%g |
| 7220 | s%@PYTHONFRAMEWORKPREFIX@%$PYTHONFRAMEWORKPREFIX%g |
| 7221 | s%@PYTHONFRAMEWORKINSTALLDIR@%$PYTHONFRAMEWORKINSTALLDIR%g |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 7222 | s%@MACHDEP@%$MACHDEP%g |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 7223 | s%@SGI_ABI@%$SGI_ABI%g |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 7224 | s%@CXX@%$CXX%g |
Guido van Rossum | ca563f2 | 2001-01-23 01:52:44 +0000 | [diff] [blame] | 7225 | s%@MAINOBJ@%$MAINOBJ%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7226 | s%@CC@%$CC%g |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 7227 | s%@CPP@%$CPP%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7228 | s%@EXEEXT@%$EXEEXT%g |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 7229 | s%@LIBRARY@%$LIBRARY%g |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 7230 | s%@LDLIBRARY@%$LDLIBRARY%g |
Guido van Rossum | ca563f2 | 2001-01-23 01:52:44 +0000 | [diff] [blame] | 7231 | s%@DLLLIBRARY@%$DLLLIBRARY%g |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 7232 | s%@BLDLIBRARY@%$BLDLIBRARY%g |
| 7233 | s%@LDLIBRARYDIR@%$LDLIBRARYDIR%g |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 7234 | s%@LINKCC@%$LINKCC%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7235 | s%@RANLIB@%$RANLIB%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7236 | s%@AR@%$AR%g |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 7237 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7238 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 7239 | s%@INSTALL_DATA@%$INSTALL_DATA%g |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 7240 | s%@LN@%$LN%g |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 7241 | s%@OPT@%$OPT%g |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 7242 | s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7243 | s%@SO@%$SO%g |
| 7244 | s%@LDSHARED@%$LDSHARED%g |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 7245 | s%@BLDSHARED@%$BLDSHARED%g |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7246 | s%@CCSHARED@%$CCSHARED%g |
| 7247 | s%@LINKFORSHARED@%$LINKFORSHARED%g |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 7248 | s%@CFLAGSFORSHARED@%$CFLAGSFORSHARED%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7249 | s%@USE_SIGNAL_MODULE@%$USE_SIGNAL_MODULE%g |
| 7250 | s%@SIGNAL_OBJS@%$SIGNAL_OBJS%g |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 7251 | s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 7252 | s%@LDLAST@%$LDLAST%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7253 | s%@DLINCLDIR@%$DLINCLDIR%g |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 7254 | s%@DYNLOADFILE@%$DYNLOADFILE%g |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 7255 | s%@MACHDEP_OBJS@%$MACHDEP_OBJS%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7256 | s%@LIBOBJS@%$LIBOBJS%g |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 7257 | s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g |
| 7258 | s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g |
| 7259 | 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] | 7260 | s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 7261 | s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7262 | s%@LIBM@%$LIBM%g |
| 7263 | s%@LIBC@%$LIBC%g |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 7264 | s%@UNICODE_OBJS@%$UNICODE_OBJS%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7265 | s%@SRCDIRS@%$SRCDIRS%g |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7266 | |
| 7267 | CEOF |
| 7268 | EOF |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7269 | |
| 7270 | cat >> $CONFIG_STATUS <<\EOF |
| 7271 | |
| 7272 | # Split the substitutions into bite-sized pieces for seds with |
| 7273 | # small command number limits, like on Digital OSF/1 and HP-UX. |
| 7274 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. |
| 7275 | ac_file=1 # Number of current file. |
| 7276 | ac_beg=1 # First line for current file. |
| 7277 | ac_end=$ac_max_sed_cmds # Line after last line for current file. |
| 7278 | ac_more_lines=: |
| 7279 | ac_sed_cmds="" |
| 7280 | while $ac_more_lines; do |
| 7281 | if test $ac_beg -gt 1; then |
| 7282 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file |
| 7283 | else |
| 7284 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file |
| 7285 | fi |
| 7286 | if test ! -s conftest.s$ac_file; then |
| 7287 | ac_more_lines=false |
| 7288 | rm -f conftest.s$ac_file |
| 7289 | else |
| 7290 | if test -z "$ac_sed_cmds"; then |
| 7291 | ac_sed_cmds="sed -f conftest.s$ac_file" |
| 7292 | else |
| 7293 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" |
| 7294 | fi |
| 7295 | ac_file=`expr $ac_file + 1` |
| 7296 | ac_beg=$ac_end |
| 7297 | ac_end=`expr $ac_end + $ac_max_sed_cmds` |
| 7298 | fi |
| 7299 | done |
| 7300 | if test -z "$ac_sed_cmds"; then |
| 7301 | ac_sed_cmds=cat |
| 7302 | fi |
| 7303 | EOF |
| 7304 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7305 | cat >> $CONFIG_STATUS <<EOF |
| 7306 | |
Andrew M. Kuchling | 8abedde | 2001-01-26 22:55:24 +0000 | [diff] [blame] | 7307 | CONFIG_FILES=\${CONFIG_FILES-"Makefile.pre Modules/Setup.config"} |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7308 | EOF |
| 7309 | cat >> $CONFIG_STATUS <<\EOF |
| 7310 | 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] | 7311 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7312 | case "$ac_file" in |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7313 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7314 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
| 7315 | *) ac_file_in="${ac_file}.in" ;; |
| 7316 | esac |
| 7317 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7318 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7319 | |
| 7320 | # Remove last slash and all that follows it. Not all systems have dirname. |
| 7321 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` |
| 7322 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then |
| 7323 | # The file is in a subdirectory. |
| 7324 | test ! -d "$ac_dir" && mkdir "$ac_dir" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7325 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7326 | # A "../" for each directory in $ac_dir_suffix. |
| 7327 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` |
| 7328 | else |
| 7329 | ac_dir_suffix= ac_dots= |
| 7330 | fi |
| 7331 | |
| 7332 | case "$ac_given_srcdir" in |
| 7333 | .) srcdir=. |
| 7334 | if test -z "$ac_dots"; then top_srcdir=. |
| 7335 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; |
| 7336 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; |
| 7337 | *) # Relative path. |
| 7338 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" |
| 7339 | top_srcdir="$ac_dots$ac_given_srcdir" ;; |
| 7340 | esac |
| 7341 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7342 | case "$ac_given_INSTALL" in |
| 7343 | [/$]*) INSTALL="$ac_given_INSTALL" ;; |
| 7344 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; |
| 7345 | esac |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7346 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7347 | echo creating "$ac_file" |
| 7348 | rm -f "$ac_file" |
| 7349 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." |
| 7350 | case "$ac_file" in |
| 7351 | *Makefile*) ac_comsub="1i\\ |
| 7352 | # $configure_input" ;; |
| 7353 | *) ac_comsub= ;; |
| 7354 | esac |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7355 | |
| 7356 | 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] | 7357 | sed -e "$ac_comsub |
| 7358 | s%@configure_input@%$configure_input%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7359 | s%@srcdir@%$srcdir%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7360 | s%@top_srcdir@%$top_srcdir%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7361 | s%@INSTALL@%$INSTALL%g |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7362 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7363 | fi; done |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7364 | rm -f conftest.s* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7365 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7366 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where |
| 7367 | # 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] | 7368 | # |
| 7369 | # ac_d sets the value in "#define NAME VALUE" lines. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7370 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' |
| 7371 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7372 | ac_dC='\3' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7373 | ac_dD='%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7374 | # 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] | 7375 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
| 7376 | ac_uB='\([ ]\)%\1#\2define\3' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7377 | ac_uC=' ' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7378 | ac_uD='\4%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7379 | # 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] | 7380 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
| 7381 | ac_eB='$%\1#\2define\3' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7382 | ac_eC=' ' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7383 | ac_eD='%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7384 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7385 | if test "${CONFIG_HEADERS+set}" != set; then |
| 7386 | EOF |
| 7387 | cat >> $CONFIG_STATUS <<EOF |
Martin v. Löwis | 4f1cd8b | 2001-07-26 13:41:06 +0000 | [diff] [blame] | 7388 | CONFIG_HEADERS="pyconfig.h" |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7389 | EOF |
| 7390 | cat >> $CONFIG_STATUS <<\EOF |
| 7391 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7392 | 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] | 7393 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7394 | case "$ac_file" in |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7395 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7396 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
| 7397 | *) ac_file_in="${ac_file}.in" ;; |
| 7398 | esac |
| 7399 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7400 | echo creating $ac_file |
| 7401 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7402 | rm -f conftest.frag conftest.in conftest.out |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7403 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
| 7404 | cat $ac_file_inputs > conftest.in |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7405 | |
| 7406 | EOF |
| 7407 | |
| 7408 | # Transform confdefs.h into a sed script conftest.vals that substitutes |
| 7409 | # 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] | 7410 | # 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] | 7411 | # Protect against being in an unquoted here document in config.status. |
| 7412 | rm -f conftest.vals |
| 7413 | cat > conftest.hdr <<\EOF |
| 7414 | s/[\\&%]/\\&/g |
| 7415 | s%[\\$`]%\\&%g |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7416 | 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] | 7417 | s%ac_d%ac_u%gp |
| 7418 | s%ac_u%ac_e%gp |
| 7419 | EOF |
| 7420 | sed -n -f conftest.hdr confdefs.h > conftest.vals |
| 7421 | rm -f conftest.hdr |
| 7422 | |
| 7423 | # This sed command replaces #undef with comments. This is necessary, for |
| 7424 | # example, in the case of _POSIX_SOURCE, which is predefined and required |
| 7425 | # on some systems where configure will not decide to define it. |
| 7426 | cat >> conftest.vals <<\EOF |
| 7427 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% |
| 7428 | EOF |
| 7429 | |
| 7430 | # Break up conftest.vals because some shells have a limit on |
| 7431 | # 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] | 7432 | |
| 7433 | rm -f conftest.tail |
| 7434 | while : |
| 7435 | do |
| 7436 | ac_lines=`grep -c . conftest.vals` |
| 7437 | # grep -c gives empty output for an empty file on some AIX systems. |
| 7438 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi |
| 7439 | # Write a limited-size here document to conftest.frag. |
| 7440 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS |
| 7441 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS |
| 7442 | echo 'CEOF |
| 7443 | sed -f conftest.frag conftest.in > conftest.out |
| 7444 | rm -f conftest.in |
| 7445 | mv conftest.out conftest.in |
| 7446 | ' >> $CONFIG_STATUS |
| 7447 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail |
| 7448 | rm -f conftest.vals |
| 7449 | mv conftest.tail conftest.vals |
| 7450 | done |
| 7451 | rm -f conftest.vals |
| 7452 | |
| 7453 | cat >> $CONFIG_STATUS <<\EOF |
| 7454 | rm -f conftest.frag conftest.h |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7455 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7456 | cat conftest.in >> conftest.h |
| 7457 | rm -f conftest.in |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7458 | if cmp -s $ac_file conftest.h 2>/dev/null; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7459 | echo "$ac_file is unchanged" |
| 7460 | rm -f conftest.h |
| 7461 | else |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7462 | # Remove last slash and all that follows it. Not all systems have dirname. |
| 7463 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` |
| 7464 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then |
| 7465 | # The file is in a subdirectory. |
| 7466 | test ! -d "$ac_dir" && mkdir "$ac_dir" |
| 7467 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7468 | rm -f $ac_file |
| 7469 | mv conftest.h $ac_file |
| 7470 | fi |
| 7471 | fi; done |
| 7472 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7473 | EOF |
| 7474 | cat >> $CONFIG_STATUS <<EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7475 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7476 | EOF |
| 7477 | cat >> $CONFIG_STATUS <<\EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7478 | |
| 7479 | exit 0 |
| 7480 | EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7481 | chmod +x $CONFIG_STATUS |
| 7482 | rm -fr confdefs* $ac_clean_files |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7483 | 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] | 7484 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 7485 | |
| 7486 | echo "creating Setup" |
| 7487 | if test ! -f Modules/Setup |
| 7488 | then |
| 7489 | cp $srcdir/Modules/Setup.dist Modules/Setup |
| 7490 | fi |
| 7491 | |
| 7492 | echo "creating Setup.local" |
| 7493 | if test ! -f Modules/Setup.local |
| 7494 | then |
| 7495 | echo "# Edit this file for local setup changes" >Modules/Setup.local |
| 7496 | fi |
| 7497 | |
| 7498 | echo "creating Makefile" |
| 7499 | $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \ |
| 7500 | -s Modules Modules/Setup.config \ |
Neil Schemenauer | f8b71c5 | 2001-04-21 17:41:16 +0000 | [diff] [blame] | 7501 | Modules/Setup.local Modules/Setup |
Neil Schemenauer | c761fc8 | 2001-02-19 04:50:49 +0000 | [diff] [blame] | 7502 | mv config.c Modules |