Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1 | #! /bin/sh |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2 | |
Martin v. Löwis | e3eb1f2 | 2001-08-16 13:15:00 +0000 | [diff] [blame] | 3 | # From configure.in Revision: 1.247 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5 | # Guess values for system-dependent variables and create Makefiles. |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6 | # Generated automatically using autoconf version 2.13 |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7 | # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8 | # |
| 9 | # This configure script is free software; the Free Software Foundation |
| 10 | # gives unlimited permission to copy, distribute and modify it. |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 11 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 12 | # Defaults: |
| 13 | ac_help= |
| 14 | ac_default_prefix=/usr/local |
| 15 | # Any additions from configure.in: |
| 16 | ac_help="$ac_help |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 17 | --enable-framework[=INSTALLDIR] Build (MacOSX|Darwin) framework" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 18 | ac_help="$ac_help |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 19 | --without-gcc never use gcc" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 20 | ac_help="$ac_help |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 21 | --with-cxx=<compiler> enable C++ support" |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 22 | ac_help="$ac_help |
Neil Schemenauer | dfb38e4 | 2001-01-27 06:57:08 +0000 | [diff] [blame] | 23 | --with-suffix=.exe set executable suffix" |
| 24 | ac_help="$ac_help |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 25 | --with-pydebug build with Py_DEBUG defined" |
| 26 | ac_help="$ac_help |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 27 | --enable-toolbox-glue disable/enable MacOSX glue code for extensions" |
| 28 | ac_help="$ac_help |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 29 | --with-libs='lib1 ...' link against additional libs" |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 30 | ac_help="$ac_help |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 31 | --with-signal-module disable/enable signal module" |
| 32 | ac_help="$ac_help |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 33 | --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries" |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 34 | ac_help="$ac_help |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 35 | --with(out)-threads[=DIRECTORY] disable/enable thread support" |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 36 | ac_help="$ac_help |
Barry Warsaw | a0f3c5c | 2000-06-30 16:39:35 +0000 | [diff] [blame] | 37 | --with(out)-thread[=DIRECTORY] deprecated; use --with(out)-threads" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 38 | ac_help="$ac_help |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 39 | --with-pth use GNU pth threading libraries" |
| 40 | ac_help="$ac_help |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 41 | --enable-ipv6 Enable ipv6 (with ipv4) support |
| 42 | --disable-ipv6 Disable ipv6 support" |
| 43 | ac_help="$ac_help |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 44 | --with(out)-cycle-gc disable/enable garbage collection" |
| 45 | ac_help="$ac_help |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 46 | --with(out)-pymalloc disable/enable specialized mallocs" |
| 47 | ac_help="$ac_help |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 48 | --with-wctype-functions use wctype.h functions" |
| 49 | ac_help="$ac_help |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 50 | --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 51 | ac_help="$ac_help |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 52 | --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 53 | ac_help="$ac_help |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 54 | --with-fpectl enable SIGFPE catching" |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 55 | ac_help="$ac_help |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 56 | --with-libm=STRING math library" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 57 | ac_help="$ac_help |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 58 | --with-libc=STRING C library" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 59 | ac_help="$ac_help |
| 60 | --enable-unicode[=ucs2,ucs4] Enable Unicode strings (default is yes)" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 61 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 62 | # Initialize some variables set by options. |
| 63 | # The variables have the same names as the options, with |
| 64 | # dashes changed to underlines. |
| 65 | build=NONE |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 66 | cache_file=./config.cache |
| 67 | exec_prefix=NONE |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 68 | host=NONE |
| 69 | no_create= |
| 70 | nonopt=NONE |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 71 | no_recursion= |
| 72 | prefix=NONE |
| 73 | program_prefix=NONE |
| 74 | program_suffix=NONE |
| 75 | program_transform_name=s,x,x, |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 76 | silent= |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 77 | site= |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 78 | srcdir= |
| 79 | target=NONE |
| 80 | verbose= |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 81 | x_includes=NONE |
| 82 | x_libraries=NONE |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 83 | bindir='${exec_prefix}/bin' |
| 84 | sbindir='${exec_prefix}/sbin' |
| 85 | libexecdir='${exec_prefix}/libexec' |
| 86 | datadir='${prefix}/share' |
| 87 | sysconfdir='${prefix}/etc' |
| 88 | sharedstatedir='${prefix}/com' |
| 89 | localstatedir='${prefix}/var' |
| 90 | libdir='${exec_prefix}/lib' |
| 91 | includedir='${prefix}/include' |
| 92 | oldincludedir='/usr/include' |
| 93 | infodir='${prefix}/info' |
| 94 | mandir='${prefix}/man' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 95 | |
| 96 | # Initialize some other variables. |
| 97 | subdirs= |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 98 | MFLAGS= MAKEFLAGS= |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 99 | SHELL=${CONFIG_SHELL-/bin/sh} |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 100 | # Maximum number of lines to put in a shell here document. |
| 101 | ac_max_here_lines=12 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 102 | |
| 103 | ac_prev= |
| 104 | for ac_option |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 105 | do |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 106 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 107 | # If the previous option needs an argument, assign it. |
| 108 | if test -n "$ac_prev"; then |
| 109 | eval "$ac_prev=\$ac_option" |
| 110 | ac_prev= |
| 111 | continue |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 112 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 113 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 114 | case "$ac_option" in |
| 115 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; |
| 116 | *) ac_optarg= ;; |
| 117 | esac |
| 118 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 119 | # Accept the important Cygnus configure options, so we can diagnose typos. |
| 120 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 121 | case "$ac_option" in |
| 122 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 123 | -bindir | --bindir | --bindi | --bind | --bin | --bi) |
| 124 | ac_prev=bindir ;; |
| 125 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) |
| 126 | bindir="$ac_optarg" ;; |
| 127 | |
| 128 | -build | --build | --buil | --bui | --bu) |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 129 | ac_prev=build ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 130 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 131 | build="$ac_optarg" ;; |
| 132 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 133 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
| 134 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) |
| 135 | ac_prev=cache_file ;; |
| 136 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ |
| 137 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) |
| 138 | cache_file="$ac_optarg" ;; |
| 139 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 140 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) |
| 141 | ac_prev=datadir ;; |
| 142 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ |
| 143 | | --da=*) |
| 144 | datadir="$ac_optarg" ;; |
| 145 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 146 | -disable-* | --disable-*) |
| 147 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 148 | # Reject names that are not valid shell variable names. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 149 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 150 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 151 | fi |
| 152 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` |
| 153 | eval "enable_${ac_feature}=no" ;; |
| 154 | |
| 155 | -enable-* | --enable-*) |
| 156 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 157 | # Reject names that are not valid shell variable names. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 158 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 159 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 160 | fi |
| 161 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` |
| 162 | case "$ac_option" in |
| 163 | *=*) ;; |
| 164 | *) ac_optarg=yes ;; |
| 165 | esac |
| 166 | eval "enable_${ac_feature}='$ac_optarg'" ;; |
| 167 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 168 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ |
| 169 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ |
| 170 | | --exec | --exe | --ex) |
| 171 | ac_prev=exec_prefix ;; |
| 172 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ |
| 173 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ |
| 174 | | --exec=* | --exe=* | --ex=*) |
| 175 | exec_prefix="$ac_optarg" ;; |
| 176 | |
| 177 | -gas | --gas | --ga | --g) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 178 | # Obsolete; use --with-gas. |
| 179 | with_gas=yes ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 180 | |
| 181 | -help | --help | --hel | --he) |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 182 | # Omit some internal or obsolete options to make the list less imposing. |
| 183 | # This message is too long to be a string in the A/UX 3.1 sh. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 184 | cat << EOF |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 185 | Usage: configure [options] [host] |
| 186 | Options: [defaults in brackets after descriptions] |
| 187 | Configuration: |
| 188 | --cache-file=FILE cache test results in FILE |
| 189 | --help print this message |
| 190 | --no-create do not create output files |
| 191 | --quiet, --silent do not print \`checking...' messages |
| 192 | --version print the version of autoconf that created configure |
| 193 | Directory and file names: |
| 194 | --prefix=PREFIX install architecture-independent files in PREFIX |
| 195 | [$ac_default_prefix] |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 196 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 197 | [same as prefix] |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 198 | --bindir=DIR user executables in DIR [EPREFIX/bin] |
| 199 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] |
| 200 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] |
| 201 | --datadir=DIR read-only architecture-independent data in DIR |
| 202 | [PREFIX/share] |
| 203 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] |
| 204 | --sharedstatedir=DIR modifiable architecture-independent data in DIR |
| 205 | [PREFIX/com] |
| 206 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] |
| 207 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] |
| 208 | --includedir=DIR C header files in DIR [PREFIX/include] |
| 209 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] |
| 210 | --infodir=DIR info documentation in DIR [PREFIX/info] |
| 211 | --mandir=DIR man documentation in DIR [PREFIX/man] |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 212 | --srcdir=DIR find the sources in DIR [configure dir or ..] |
| 213 | --program-prefix=PREFIX prepend PREFIX to installed program names |
| 214 | --program-suffix=SUFFIX append SUFFIX to installed program names |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 215 | --program-transform-name=PROGRAM |
| 216 | run sed PROGRAM on installed program names |
| 217 | EOF |
| 218 | cat << EOF |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 219 | Host type: |
| 220 | --build=BUILD configure for building on BUILD [BUILD=HOST] |
| 221 | --host=HOST configure for HOST [guessed] |
| 222 | --target=TARGET configure for TARGET [TARGET=HOST] |
| 223 | Features and packages: |
| 224 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) |
| 225 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] |
| 226 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] |
| 227 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) |
| 228 | --x-includes=DIR X include files are in DIR |
| 229 | --x-libraries=DIR X library files are in DIR |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 230 | EOF |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 231 | if test -n "$ac_help"; then |
| 232 | echo "--enable and --with options recognized:$ac_help" |
| 233 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 234 | exit 0 ;; |
| 235 | |
| 236 | -host | --host | --hos | --ho) |
| 237 | ac_prev=host ;; |
| 238 | -host=* | --host=* | --hos=* | --ho=*) |
| 239 | host="$ac_optarg" ;; |
| 240 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 241 | -includedir | --includedir | --includedi | --included | --include \ |
| 242 | | --includ | --inclu | --incl | --inc) |
| 243 | ac_prev=includedir ;; |
| 244 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ |
| 245 | | --includ=* | --inclu=* | --incl=* | --inc=*) |
| 246 | includedir="$ac_optarg" ;; |
| 247 | |
| 248 | -infodir | --infodir | --infodi | --infod | --info | --inf) |
| 249 | ac_prev=infodir ;; |
| 250 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) |
| 251 | infodir="$ac_optarg" ;; |
| 252 | |
| 253 | -libdir | --libdir | --libdi | --libd) |
| 254 | ac_prev=libdir ;; |
| 255 | -libdir=* | --libdir=* | --libdi=* | --libd=*) |
| 256 | libdir="$ac_optarg" ;; |
| 257 | |
| 258 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ |
| 259 | | --libexe | --libex | --libe) |
| 260 | ac_prev=libexecdir ;; |
| 261 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ |
| 262 | | --libexe=* | --libex=* | --libe=*) |
| 263 | libexecdir="$ac_optarg" ;; |
| 264 | |
| 265 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
| 266 | | --localstate | --localstat | --localsta | --localst \ |
| 267 | | --locals | --local | --loca | --loc | --lo) |
| 268 | ac_prev=localstatedir ;; |
| 269 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ |
| 270 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ |
| 271 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) |
| 272 | localstatedir="$ac_optarg" ;; |
| 273 | |
| 274 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) |
| 275 | ac_prev=mandir ;; |
| 276 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) |
| 277 | mandir="$ac_optarg" ;; |
| 278 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 279 | -nfp | --nfp | --nf) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 280 | # Obsolete; use --without-fp. |
| 281 | with_fp=no ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 282 | |
| 283 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ |
| 284 | | --no-cr | --no-c) |
| 285 | no_create=yes ;; |
| 286 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 287 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ |
| 288 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) |
| 289 | no_recursion=yes ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 290 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 291 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ |
| 292 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ |
| 293 | | --oldin | --oldi | --old | --ol | --o) |
| 294 | ac_prev=oldincludedir ;; |
| 295 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ |
| 296 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ |
| 297 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) |
| 298 | oldincludedir="$ac_optarg" ;; |
| 299 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 300 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
| 301 | ac_prev=prefix ;; |
| 302 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) |
| 303 | prefix="$ac_optarg" ;; |
| 304 | |
| 305 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ |
| 306 | | --program-pre | --program-pr | --program-p) |
| 307 | ac_prev=program_prefix ;; |
| 308 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ |
| 309 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) |
| 310 | program_prefix="$ac_optarg" ;; |
| 311 | |
| 312 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ |
| 313 | | --program-suf | --program-su | --program-s) |
| 314 | ac_prev=program_suffix ;; |
| 315 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ |
| 316 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) |
| 317 | program_suffix="$ac_optarg" ;; |
| 318 | |
| 319 | -program-transform-name | --program-transform-name \ |
| 320 | | --program-transform-nam | --program-transform-na \ |
| 321 | | --program-transform-n | --program-transform- \ |
| 322 | | --program-transform | --program-transfor \ |
| 323 | | --program-transfo | --program-transf \ |
| 324 | | --program-trans | --program-tran \ |
| 325 | | --progr-tra | --program-tr | --program-t) |
| 326 | ac_prev=program_transform_name ;; |
| 327 | -program-transform-name=* | --program-transform-name=* \ |
| 328 | | --program-transform-nam=* | --program-transform-na=* \ |
| 329 | | --program-transform-n=* | --program-transform-=* \ |
| 330 | | --program-transform=* | --program-transfor=* \ |
| 331 | | --program-transfo=* | --program-transf=* \ |
| 332 | | --program-trans=* | --program-tran=* \ |
| 333 | | --progr-tra=* | --program-tr=* | --program-t=*) |
| 334 | program_transform_name="$ac_optarg" ;; |
| 335 | |
| 336 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
| 337 | | -silent | --silent | --silen | --sile | --sil) |
| 338 | silent=yes ;; |
| 339 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 340 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) |
| 341 | ac_prev=sbindir ;; |
| 342 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ |
| 343 | | --sbi=* | --sb=*) |
| 344 | sbindir="$ac_optarg" ;; |
| 345 | |
| 346 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ |
| 347 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ |
| 348 | | --sharedst | --shareds | --shared | --share | --shar \ |
| 349 | | --sha | --sh) |
| 350 | ac_prev=sharedstatedir ;; |
| 351 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ |
| 352 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ |
| 353 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ |
| 354 | | --sha=* | --sh=*) |
| 355 | sharedstatedir="$ac_optarg" ;; |
| 356 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 357 | -site | --site | --sit) |
| 358 | ac_prev=site ;; |
| 359 | -site=* | --site=* | --sit=*) |
| 360 | site="$ac_optarg" ;; |
| 361 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 362 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
| 363 | ac_prev=srcdir ;; |
| 364 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) |
| 365 | srcdir="$ac_optarg" ;; |
| 366 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 367 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ |
| 368 | | --syscon | --sysco | --sysc | --sys | --sy) |
| 369 | ac_prev=sysconfdir ;; |
| 370 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ |
| 371 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) |
| 372 | sysconfdir="$ac_optarg" ;; |
| 373 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 374 | -target | --target | --targe | --targ | --tar | --ta | --t) |
| 375 | ac_prev=target ;; |
| 376 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
| 377 | target="$ac_optarg" ;; |
| 378 | |
| 379 | -v | -verbose | --verbose | --verbos | --verbo | --verb) |
| 380 | verbose=yes ;; |
| 381 | |
| 382 | -version | --version | --versio | --versi | --vers) |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 383 | echo "configure generated by autoconf version 2.13" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 384 | exit 0 ;; |
| 385 | |
| 386 | -with-* | --with-*) |
| 387 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 388 | # Reject names that are not valid shell variable names. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 389 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 390 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 391 | fi |
| 392 | ac_package=`echo $ac_package| sed 's/-/_/g'` |
| 393 | case "$ac_option" in |
| 394 | *=*) ;; |
| 395 | *) ac_optarg=yes ;; |
| 396 | esac |
| 397 | eval "with_${ac_package}='$ac_optarg'" ;; |
| 398 | |
| 399 | -without-* | --without-*) |
| 400 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 401 | # Reject names that are not valid shell variable names. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 402 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 403 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 404 | fi |
| 405 | ac_package=`echo $ac_package| sed 's/-/_/g'` |
| 406 | eval "with_${ac_package}=no" ;; |
| 407 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 408 | --x) |
| 409 | # Obsolete; use --with-x. |
| 410 | with_x=yes ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 411 | |
| 412 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ |
| 413 | | --x-incl | --x-inc | --x-in | --x-i) |
| 414 | ac_prev=x_includes ;; |
| 415 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ |
| 416 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) |
| 417 | x_includes="$ac_optarg" ;; |
| 418 | |
| 419 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ |
| 420 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) |
| 421 | ac_prev=x_libraries ;; |
| 422 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ |
| 423 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) |
| 424 | x_libraries="$ac_optarg" ;; |
| 425 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 426 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 427 | ;; |
| 428 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 429 | *) |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 430 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 431 | echo "configure: warning: $ac_option: invalid host type" 1>&2 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 432 | fi |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 433 | if test "x$nonopt" != xNONE; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 434 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 435 | fi |
| 436 | nonopt="$ac_option" |
| 437 | ;; |
| 438 | |
| 439 | esac |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 440 | done |
| 441 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 442 | if test -n "$ac_prev"; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 443 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 444 | fi |
| 445 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 446 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 447 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 448 | # File descriptor usage: |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 449 | # 0 standard input |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 450 | # 1 file creation |
| 451 | # 2 errors and warnings |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 452 | # 3 some systems may open it to /dev/tty |
| 453 | # 4 used on the Kubota Titan |
| 454 | # 6 checking for... messages and results |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 455 | # 5 compiler messages saved in config.log |
| 456 | if test "$silent" = yes; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 457 | exec 6>/dev/null |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 458 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 459 | exec 6>&1 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 460 | fi |
| 461 | exec 5>./config.log |
| 462 | |
| 463 | echo "\ |
| 464 | This file contains any messages produced by compilers while |
| 465 | running configure, to aid debugging if configure makes a mistake. |
| 466 | " 1>&5 |
| 467 | |
| 468 | # Strip out --no-create and --no-recursion so they do not pile up. |
| 469 | # Also quote any args containing shell metacharacters. |
| 470 | ac_configure_args= |
| 471 | for ac_arg |
| 472 | do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 473 | case "$ac_arg" in |
| 474 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ |
| 475 | | --no-cr | --no-c) ;; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 476 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ |
| 477 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; |
| 478 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) |
| 479 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; |
| 480 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 481 | esac |
| 482 | done |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 483 | |
| 484 | # NLS nuisances. |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 485 | # Only set these to C if already set. These must not be set unconditionally |
| 486 | # because not all systems understand e.g. LANG=C (notably SCO). |
| 487 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! |
| 488 | # Non-C LC_CTYPE values break the ctype check. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 489 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 490 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi |
| 491 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi |
| 492 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 493 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 494 | # confdefs.h avoids OS command line length limits that DEFS can exceed. |
| 495 | rm -rf conftest* confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 496 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. |
| 497 | echo > confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 498 | |
| 499 | # A filename unique to this package, relative to the directory that |
| 500 | # configure is in, which we can look for to find out if srcdir is correct. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 501 | ac_unique_file=Include/object.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 502 | |
| 503 | # Find the source files, if location was not specified. |
| 504 | if test -z "$srcdir"; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 505 | ac_srcdir_defaulted=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 506 | # Try the directory containing this script, then its parent. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 507 | ac_prog=$0 |
| 508 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` |
| 509 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. |
| 510 | srcdir=$ac_confdir |
| 511 | if test ! -r $srcdir/$ac_unique_file; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 512 | srcdir=.. |
| 513 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 514 | else |
| 515 | ac_srcdir_defaulted=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 516 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 517 | if test ! -r $srcdir/$ac_unique_file; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 518 | if test "$ac_srcdir_defaulted" = yes; then |
| 519 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 520 | else |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 521 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 522 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 523 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 524 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` |
| 525 | |
| 526 | # Prefer explicitly selected file to automatically selected ones. |
| 527 | if test -z "$CONFIG_SITE"; then |
| 528 | if test "x$prefix" != xNONE; then |
| 529 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" |
| 530 | else |
| 531 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" |
| 532 | fi |
| 533 | fi |
| 534 | for ac_site_file in $CONFIG_SITE; do |
| 535 | if test -r "$ac_site_file"; then |
| 536 | echo "loading site script $ac_site_file" |
| 537 | . "$ac_site_file" |
| 538 | fi |
| 539 | done |
| 540 | |
| 541 | if test -r "$cache_file"; then |
| 542 | echo "loading cache $cache_file" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 543 | . $cache_file |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 544 | else |
| 545 | echo "creating cache $cache_file" |
| 546 | > $cache_file |
| 547 | fi |
| 548 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 549 | ac_ext=c |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 550 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 551 | ac_cpp='$CPP $CPPFLAGS' |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 552 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 553 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 554 | cross_compiling=$ac_cv_prog_cc_cross |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 555 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 556 | ac_exeext= |
| 557 | ac_objext=o |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 558 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then |
| 559 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. |
| 560 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then |
| 561 | ac_n= ac_c=' |
| 562 | ' ac_t=' ' |
| 563 | else |
| 564 | ac_n=-n ac_c= ac_t= |
| 565 | fi |
| 566 | else |
| 567 | ac_n= ac_c='\c' ac_t= |
| 568 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 569 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 570 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 571 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 572 | |
Guido van Rossum | 1fd74a7 | 1997-07-19 19:36:02 +0000 | [diff] [blame] | 573 | # Set VERSION so we only need to edit in one place (i.e., here) |
| 574 | |
Guido van Rossum | 6db412b | 2001-04-18 04:37:57 +0000 | [diff] [blame] | 575 | VERSION=2.2 |
Guido van Rossum | 1fd74a7 | 1997-07-19 19:36:02 +0000 | [diff] [blame] | 576 | |
Neil Schemenauer | 4edbc2a | 2001-03-22 00:34:03 +0000 | [diff] [blame] | 577 | # Arguments passed to configure. |
| 578 | |
| 579 | CONFIG_ARGS="$ac_configure_args" |
| 580 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 581 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 582 | # Check whether --enable-framework or --disable-framework was given. |
| 583 | if test "${enable_framework+set}" = set; then |
| 584 | enableval="$enable_framework" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 585 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 586 | PYTHONFRAMEWORK=Python |
| 587 | PYTHONFRAMEWORKDIR=Python.framework |
| 588 | case $enableval in |
| 589 | yes) |
| 590 | enableval=/Library/Frameworks |
| 591 | PYTHONFRAMEWORKPREFIX=$enableval |
| 592 | ;; |
| 593 | *) |
| 594 | PYTHONFRAMEWORKPREFIX=$enableval |
| 595 | esac |
| 596 | PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR |
| 597 | prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 598 | |
| 599 | else |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 600 | |
| 601 | PYTHONFRAMEWORK= |
| 602 | PYTHONFRAMEWORKDIR= |
| 603 | PYTHONFRAMEWORKPREFIX= |
| 604 | PYTHONFRAMEWORKINSTALLDIR= |
| 605 | enable_framework= |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 606 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 607 | fi |
| 608 | |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 609 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 610 | |
| 611 | |
| 612 | |
| 613 | |
| 614 | ##AC_ARG_WITH(dyld, |
| 615 | ##[ --with-dyld Use (OpenStep|Rhapsody) dynamic linker],,) |
| 616 | ## |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 617 | # Set name for machine-dependent library files |
| 618 | |
| 619 | echo $ac_n "checking MACHDEP""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 620 | echo "configure:621: checking MACHDEP" >&5 |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 621 | if test -z "$MACHDEP" |
| 622 | then |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 623 | ac_sys_system=`uname -s` |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 624 | if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 625 | ac_sys_release=`uname -v` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 626 | else |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 627 | ac_sys_release=`uname -r` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 628 | fi |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 629 | ac_md_system=`echo $ac_sys_system | |
| 630 | tr -d '/ ' | tr '[A-Z]' '[a-z]'` |
| 631 | ac_md_release=`echo $ac_sys_release | |
| 632 | tr -d '/ ' | sed 's/\..*//'` |
Guido van Rossum | b97ef17 | 1997-09-28 05:44:03 +0000 | [diff] [blame] | 633 | MACHDEP="$ac_md_system$ac_md_release" |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 634 | |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 635 | case $MACHDEP in |
Andrew M. Kuchling | 5a3e4cb | 2001-07-20 19:29:04 +0000 | [diff] [blame] | 636 | cygwin*) MACHDEP="cygwin";; |
Guido van Rossum | b97ef17 | 1997-09-28 05:44:03 +0000 | [diff] [blame] | 637 | '') MACHDEP="unknown";; |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 638 | esac |
| 639 | fi |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 640 | |
| 641 | # |
| 642 | # SGI compilers allow the specification of the both the ABI and the |
| 643 | # ISA on the command line. Depending on the values of these switches, |
| 644 | # different and often incompatable code will be generated. |
| 645 | # |
| 646 | # The SGI_ABI variable can be used to modify the CC and LDFLAGS and |
| 647 | # thus supply support for various ABI/ISA combinations. The MACHDEP |
| 648 | # variable is also adjusted. |
| 649 | # |
| 650 | |
| 651 | if test ! -z "$SGI_ABI" |
| 652 | then |
| 653 | CC="cc $SGI_ABI" |
| 654 | LDFLAGS="$SGI_ABI $LDFLAGS" |
| 655 | MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'` |
| 656 | fi |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 657 | echo "$ac_t""$MACHDEP" 1>&6 |
| 658 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 659 | # checks for alternative programs |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 660 | echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 661 | echo "configure:662: checking for --without-gcc" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 662 | # Check whether --with-gcc or --without-gcc was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 663 | if test "${with_gcc+set}" = set; then |
| 664 | withval="$with_gcc" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 665 | |
| 666 | case $withval in |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 667 | no) CC=cc |
| 668 | without_gcc=yes;; |
| 669 | yes) CC=gcc |
| 670 | without_gcc=no;; |
| 671 | *) CC=$withval |
| 672 | without_gcc=$withval;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 673 | esac |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 674 | else |
Guido van Rossum | e77438c | 1995-09-13 18:59:59 +0000 | [diff] [blame] | 675 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 676 | case $ac_sys_system in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 677 | AIX*) CC=cc_r |
| 678 | without_gcc=;; |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 679 | BeOS*) |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 680 | case $BE_HOST_CPU in |
| 681 | ppc) |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 682 | CC=mwcc |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 683 | without_gcc=yes |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 684 | OPT="-O -D'DL_EXPORT(RTYPE)=__declspec(dllexport) RTYPE' -D'DL_IMPORT(RTYPE)=__declspec(dllexport) RTYPE' -export pragma" |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 685 | CCSHARED="-UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'" |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 686 | LDFLAGS="$LDFLAGS -nodup" |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 687 | ;; |
| 688 | x86) |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 689 | CC=gcc |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 690 | without_gcc=no |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 691 | OPT=-O |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 692 | ;; |
| 693 | *) |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 694 | { echo "configure: error: Unknown BeOS platform \"$BE_HOST_CPU\"" 1>&2; exit 1; } |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 695 | ;; |
| 696 | esac |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 697 | AR="\$(srcdir)/Modules/ar_beos" |
| 698 | RANLIB=: |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 699 | ;; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 700 | Monterey*) |
| 701 | RANLIB=: |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 702 | without_gcc=;; |
| 703 | *) without_gcc=no;; |
Guido van Rossum | e77438c | 1995-09-13 18:59:59 +0000 | [diff] [blame] | 704 | esac |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 705 | fi |
| 706 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 707 | echo "$ac_t""$without_gcc" 1>&6 |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 708 | |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 709 | |
| 710 | |
Fred Drake | a1a84e7 | 2001-03-06 05:52:16 +0000 | [diff] [blame] | 711 | MAINOBJ=python.o |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 712 | echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 713 | echo "configure:714: checking for --with-cxx=<compiler>" >&5 |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 714 | # Check whether --with-cxx or --without-cxx was given. |
| 715 | if test "${with_cxx+set}" = set; then |
| 716 | withval="$with_cxx" |
| 717 | |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 718 | check_cxx=no |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 719 | case $withval in |
| 720 | no) CXX= |
| 721 | with_cxx=no;; |
| 722 | *) CXX=$withval |
Fred Drake | a1a84e7 | 2001-03-06 05:52:16 +0000 | [diff] [blame] | 723 | MAINOBJ=ccpython.o |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 724 | with_cxx=$withval;; |
| 725 | esac |
| 726 | else |
| 727 | |
| 728 | with_cxx=no |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 729 | check_cxx=yes |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 730 | |
| 731 | fi |
| 732 | |
| 733 | echo "$ac_t""$with_cxx" 1>&6 |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 734 | |
| 735 | |
| 736 | if test "$check_cxx" = "yes" |
| 737 | then |
| 738 | for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl |
| 739 | do |
| 740 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
| 741 | set dummy $ac_prog; ac_word=$2 |
| 742 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 743 | echo "configure:744: checking for $ac_word" >&5 |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 744 | if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then |
| 745 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 746 | else |
| 747 | if test -n "$CXX"; then |
| 748 | ac_cv_prog_CXX="$CXX" # Let the user override the test. |
| 749 | else |
| 750 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 751 | ac_dummy="$PATH" |
| 752 | for ac_dir in $ac_dummy; do |
| 753 | test -z "$ac_dir" && ac_dir=. |
| 754 | if test -f $ac_dir/$ac_word; then |
| 755 | ac_cv_prog_CXX="$ac_prog" |
| 756 | break |
| 757 | fi |
| 758 | done |
| 759 | IFS="$ac_save_ifs" |
| 760 | fi |
| 761 | fi |
| 762 | CXX="$ac_cv_prog_CXX" |
| 763 | if test -n "$CXX"; then |
| 764 | echo "$ac_t""$CXX" 1>&6 |
| 765 | else |
| 766 | echo "$ac_t""no" 1>&6 |
| 767 | fi |
| 768 | |
| 769 | test -n "$CXX" && break |
| 770 | done |
| 771 | test -n "$CXX" || CXX="notfound" |
| 772 | |
| 773 | if test "$CXX" = "notfound" |
| 774 | then |
| 775 | CXX= |
| 776 | else |
| 777 | echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 778 | echo "configure:779: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 779 | |
| 780 | ac_ext=C |
| 781 | # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 782 | ac_cpp='$CXXCPP $CPPFLAGS' |
| 783 | ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 784 | ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 785 | cross_compiling=$ac_cv_prog_cxx_cross |
| 786 | |
| 787 | cat > conftest.$ac_ext << EOF |
| 788 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 789 | #line 790 "configure" |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 790 | #include "confdefs.h" |
| 791 | |
| 792 | int main(){return(0);} |
| 793 | EOF |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 794 | if { (eval echo configure:795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 795 | ac_cv_prog_cxx_works=yes |
| 796 | # If we can't run a trivial program, we are probably using a cross compiler. |
| 797 | if (./conftest; exit) 2>/dev/null; then |
| 798 | ac_cv_prog_cxx_cross=no |
| 799 | else |
| 800 | ac_cv_prog_cxx_cross=yes |
| 801 | fi |
| 802 | else |
| 803 | echo "configure: failed program was:" >&5 |
| 804 | cat conftest.$ac_ext >&5 |
| 805 | ac_cv_prog_cxx_works=no |
| 806 | fi |
| 807 | rm -fr conftest* |
| 808 | ac_ext=c |
| 809 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 810 | ac_cpp='$CPP $CPPFLAGS' |
| 811 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 812 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 813 | cross_compiling=$ac_cv_prog_cc_cross |
| 814 | |
| 815 | echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6 |
| 816 | if test $ac_cv_prog_cxx_works = no; then |
| 817 | { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } |
| 818 | fi |
| 819 | echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 820 | echo "configure:821: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 821 | echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 |
| 822 | cross_compiling=$ac_cv_prog_cxx_cross |
| 823 | |
| 824 | fi |
| 825 | fi |
| 826 | |
Guido van Rossum | 8b131c5 | 1995-03-09 14:10:13 +0000 | [diff] [blame] | 827 | # If the user switches compilers, we can't believe the cache |
| 828 | if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC" |
| 829 | then |
| 830 | { echo "configure: error: cached CC is different -- throw away $cache_file |
| 831 | (it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; } |
| 832 | fi |
| 833 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 834 | # Extract the first word of "gcc", so it can be a program name with args. |
| 835 | set dummy gcc; ac_word=$2 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 836 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 837 | echo "configure:838: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 838 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 839 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 840 | else |
| 841 | if test -n "$CC"; then |
| 842 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 843 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 844 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 845 | ac_dummy="$PATH" |
| 846 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 847 | test -z "$ac_dir" && ac_dir=. |
| 848 | if test -f $ac_dir/$ac_word; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 849 | ac_cv_prog_CC="gcc" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 850 | break |
| 851 | fi |
| 852 | done |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 853 | IFS="$ac_save_ifs" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 854 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 855 | fi |
| 856 | CC="$ac_cv_prog_CC" |
| 857 | if test -n "$CC"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 858 | echo "$ac_t""$CC" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 859 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 860 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 861 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 862 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 863 | if test -z "$CC"; then |
| 864 | # Extract the first word of "cc", so it can be a program name with args. |
| 865 | set dummy cc; ac_word=$2 |
| 866 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 867 | echo "configure:868: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 868 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 869 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 870 | else |
| 871 | if test -n "$CC"; then |
| 872 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 873 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 874 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 875 | ac_prog_rejected=no |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 876 | ac_dummy="$PATH" |
| 877 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 878 | test -z "$ac_dir" && ac_dir=. |
| 879 | if test -f $ac_dir/$ac_word; then |
| 880 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then |
| 881 | ac_prog_rejected=yes |
| 882 | continue |
| 883 | fi |
| 884 | ac_cv_prog_CC="cc" |
| 885 | break |
| 886 | fi |
| 887 | done |
| 888 | IFS="$ac_save_ifs" |
| 889 | if test $ac_prog_rejected = yes; then |
| 890 | # We found a bogon in the path, so make sure we never use it. |
| 891 | set dummy $ac_cv_prog_CC |
| 892 | shift |
| 893 | if test $# -gt 0; then |
| 894 | # We chose a different compiler from the bogus one. |
| 895 | # However, it has the same basename, so the bogon will be chosen |
| 896 | # first if we set CC to just the basename; use the full file name. |
| 897 | shift |
| 898 | set dummy "$ac_dir/$ac_word" "$@" |
| 899 | shift |
| 900 | ac_cv_prog_CC="$@" |
| 901 | fi |
| 902 | fi |
| 903 | fi |
| 904 | fi |
| 905 | CC="$ac_cv_prog_CC" |
| 906 | if test -n "$CC"; then |
| 907 | echo "$ac_t""$CC" 1>&6 |
| 908 | else |
| 909 | echo "$ac_t""no" 1>&6 |
| 910 | fi |
| 911 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 912 | if test -z "$CC"; then |
| 913 | case "`uname -s`" in |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 914 | *win32* | *WIN32*) |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 915 | # Extract the first word of "cl", so it can be a program name with args. |
| 916 | set dummy cl; ac_word=$2 |
| 917 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 918 | echo "configure:919: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 919 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 920 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 921 | else |
| 922 | if test -n "$CC"; then |
| 923 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 924 | else |
| 925 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 926 | ac_dummy="$PATH" |
| 927 | for ac_dir in $ac_dummy; do |
| 928 | test -z "$ac_dir" && ac_dir=. |
| 929 | if test -f $ac_dir/$ac_word; then |
| 930 | ac_cv_prog_CC="cl" |
| 931 | break |
| 932 | fi |
| 933 | done |
| 934 | IFS="$ac_save_ifs" |
| 935 | fi |
| 936 | fi |
| 937 | CC="$ac_cv_prog_CC" |
| 938 | if test -n "$CC"; then |
| 939 | echo "$ac_t""$CC" 1>&6 |
| 940 | else |
| 941 | echo "$ac_t""no" 1>&6 |
| 942 | fi |
| 943 | ;; |
| 944 | esac |
| 945 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 946 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } |
| 947 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 948 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 949 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 950 | echo "configure:951: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 951 | |
| 952 | ac_ext=c |
| 953 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 954 | ac_cpp='$CPP $CPPFLAGS' |
| 955 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 956 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 957 | cross_compiling=$ac_cv_prog_cc_cross |
| 958 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 959 | cat > conftest.$ac_ext << EOF |
| 960 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 961 | #line 962 "configure" |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 962 | #include "confdefs.h" |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 963 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 964 | main(){return(0);} |
| 965 | EOF |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 966 | if { (eval echo configure:967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 967 | ac_cv_prog_cc_works=yes |
| 968 | # If we can't run a trivial program, we are probably using a cross compiler. |
| 969 | if (./conftest; exit) 2>/dev/null; then |
| 970 | ac_cv_prog_cc_cross=no |
| 971 | else |
| 972 | ac_cv_prog_cc_cross=yes |
| 973 | fi |
| 974 | else |
| 975 | echo "configure: failed program was:" >&5 |
| 976 | cat conftest.$ac_ext >&5 |
| 977 | ac_cv_prog_cc_works=no |
| 978 | fi |
| 979 | rm -fr conftest* |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 980 | ac_ext=c |
| 981 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 982 | ac_cpp='$CPP $CPPFLAGS' |
| 983 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 984 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 985 | cross_compiling=$ac_cv_prog_cc_cross |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 986 | |
| 987 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 |
| 988 | if test $ac_cv_prog_cc_works = no; then |
| 989 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } |
| 990 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 991 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 992 | echo "configure:993: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 993 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
| 994 | cross_compiling=$ac_cv_prog_cc_cross |
| 995 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 996 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 997 | echo "configure:998: checking whether we are using GNU C" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 998 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 999 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1000 | else |
| 1001 | cat > conftest.c <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1002 | #ifdef __GNUC__ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1003 | yes; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1004 | #endif |
| 1005 | EOF |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1006 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1007 | ac_cv_prog_gcc=yes |
| 1008 | else |
| 1009 | ac_cv_prog_gcc=no |
| 1010 | fi |
| 1011 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1012 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1013 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1014 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1015 | if test $ac_cv_prog_gcc = yes; then |
| 1016 | GCC=yes |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1017 | else |
| 1018 | GCC= |
| 1019 | fi |
| 1020 | |
| 1021 | ac_test_CFLAGS="${CFLAGS+set}" |
| 1022 | ac_save_CFLAGS="$CFLAGS" |
| 1023 | CFLAGS= |
| 1024 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1025 | echo "configure:1026: checking whether ${CC-cc} accepts -g" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1026 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1027 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1028 | else |
| 1029 | echo 'void f(){}' > conftest.c |
| 1030 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1031 | ac_cv_prog_cc_g=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1032 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1033 | ac_cv_prog_cc_g=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1034 | fi |
| 1035 | rm -f conftest* |
| 1036 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1037 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1038 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1039 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1040 | if test "$ac_test_CFLAGS" = set; then |
| 1041 | CFLAGS="$ac_save_CFLAGS" |
| 1042 | elif test $ac_cv_prog_cc_g = yes; then |
| 1043 | if test "$GCC" = yes; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1044 | CFLAGS="-g -O2" |
| 1045 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1046 | CFLAGS="-g" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1047 | fi |
| 1048 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1049 | if test "$GCC" = yes; then |
| 1050 | CFLAGS="-O2" |
| 1051 | else |
| 1052 | CFLAGS= |
| 1053 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1054 | fi |
| 1055 | |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1056 | |
| 1057 | # checks for UNIX variants that set C preprocessor variables |
| 1058 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1059 | echo "configure:1060: checking how to run the C preprocessor" >&5 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1060 | # On Suns, sometimes $CPP names a directory. |
| 1061 | if test -n "$CPP" && test -d "$CPP"; then |
| 1062 | CPP= |
| 1063 | fi |
| 1064 | if test -z "$CPP"; then |
| 1065 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then |
| 1066 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1067 | else |
| 1068 | # This must be in double quotes, not single quotes, because CPP may get |
| 1069 | # substituted into the Makefile and "${CC-cc}" will confuse make. |
| 1070 | CPP="${CC-cc} -E" |
| 1071 | # On the NeXT, cc -E runs the code through the compiler's parser, |
| 1072 | # not just through cpp. |
| 1073 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1074 | #line 1075 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1075 | #include "confdefs.h" |
| 1076 | #include <assert.h> |
| 1077 | Syntax Error |
| 1078 | EOF |
| 1079 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1080 | { (eval echo configure:1081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1081 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1082 | if test -z "$ac_err"; then |
| 1083 | : |
| 1084 | else |
| 1085 | echo "$ac_err" >&5 |
| 1086 | echo "configure: failed program was:" >&5 |
| 1087 | cat conftest.$ac_ext >&5 |
| 1088 | rm -rf conftest* |
| 1089 | CPP="${CC-cc} -E -traditional-cpp" |
| 1090 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1091 | #line 1092 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1092 | #include "confdefs.h" |
| 1093 | #include <assert.h> |
| 1094 | Syntax Error |
| 1095 | EOF |
| 1096 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1097 | { (eval echo configure:1098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1098 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1099 | if test -z "$ac_err"; then |
| 1100 | : |
| 1101 | else |
| 1102 | echo "$ac_err" >&5 |
| 1103 | echo "configure: failed program was:" >&5 |
| 1104 | cat conftest.$ac_ext >&5 |
| 1105 | rm -rf conftest* |
| 1106 | CPP="${CC-cc} -nologo -E" |
| 1107 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1108 | #line 1109 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1109 | #include "confdefs.h" |
| 1110 | #include <assert.h> |
| 1111 | Syntax Error |
| 1112 | EOF |
| 1113 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1114 | { (eval echo configure:1115: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1115 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1116 | if test -z "$ac_err"; then |
| 1117 | : |
| 1118 | else |
| 1119 | echo "$ac_err" >&5 |
| 1120 | echo "configure: failed program was:" >&5 |
| 1121 | cat conftest.$ac_ext >&5 |
| 1122 | rm -rf conftest* |
| 1123 | CPP=/lib/cpp |
| 1124 | fi |
| 1125 | rm -f conftest* |
| 1126 | fi |
| 1127 | rm -f conftest* |
| 1128 | fi |
| 1129 | rm -f conftest* |
| 1130 | ac_cv_prog_CPP="$CPP" |
| 1131 | fi |
| 1132 | CPP="$ac_cv_prog_CPP" |
| 1133 | else |
| 1134 | ac_cv_prog_CPP="$CPP" |
| 1135 | fi |
| 1136 | echo "$ac_t""$CPP" 1>&6 |
| 1137 | |
| 1138 | echo $ac_n "checking for AIX""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1139 | echo "configure:1140: checking for AIX" >&5 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1140 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1141 | #line 1142 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1142 | #include "confdefs.h" |
| 1143 | #ifdef _AIX |
| 1144 | yes |
| 1145 | #endif |
| 1146 | |
| 1147 | EOF |
| 1148 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1149 | egrep "yes" >/dev/null 2>&1; then |
| 1150 | rm -rf conftest* |
| 1151 | echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF |
| 1152 | #define _ALL_SOURCE 1 |
| 1153 | EOF |
| 1154 | |
| 1155 | else |
| 1156 | rm -rf conftest* |
| 1157 | echo "$ac_t""no" 1>&6 |
| 1158 | fi |
| 1159 | rm -f conftest* |
| 1160 | |
| 1161 | |
| 1162 | ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'` |
| 1163 | echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1164 | echo "configure:1165: checking for minix/config.h" >&5 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1165 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 1166 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1167 | else |
| 1168 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1169 | #line 1170 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1170 | #include "confdefs.h" |
| 1171 | #include <minix/config.h> |
| 1172 | EOF |
| 1173 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1174 | { (eval echo configure:1175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1175 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1176 | if test -z "$ac_err"; then |
| 1177 | rm -rf conftest* |
| 1178 | eval "ac_cv_header_$ac_safe=yes" |
| 1179 | else |
| 1180 | echo "$ac_err" >&5 |
| 1181 | echo "configure: failed program was:" >&5 |
| 1182 | cat conftest.$ac_ext >&5 |
| 1183 | rm -rf conftest* |
| 1184 | eval "ac_cv_header_$ac_safe=no" |
| 1185 | fi |
| 1186 | rm -f conftest* |
| 1187 | fi |
| 1188 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 1189 | echo "$ac_t""yes" 1>&6 |
| 1190 | MINIX=yes |
| 1191 | else |
| 1192 | echo "$ac_t""no" 1>&6 |
| 1193 | MINIX= |
| 1194 | fi |
| 1195 | |
| 1196 | if test "$MINIX" = yes; then |
| 1197 | cat >> confdefs.h <<\EOF |
| 1198 | #define _POSIX_SOURCE 1 |
| 1199 | EOF |
| 1200 | |
| 1201 | cat >> confdefs.h <<\EOF |
| 1202 | #define _POSIX_1_SOURCE 2 |
| 1203 | EOF |
| 1204 | |
| 1205 | cat >> confdefs.h <<\EOF |
| 1206 | #define _MINIX 1 |
| 1207 | EOF |
| 1208 | |
| 1209 | fi |
| 1210 | |
| 1211 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1212 | echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1213 | echo "configure:1214: checking for Cygwin environment" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1214 | if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then |
| 1215 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1216 | else |
| 1217 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1218 | #line 1219 "configure" |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1219 | #include "confdefs.h" |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1220 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1221 | int main() { |
| 1222 | |
| 1223 | #ifndef __CYGWIN__ |
| 1224 | #define __CYGWIN__ __CYGWIN32__ |
| 1225 | #endif |
| 1226 | return __CYGWIN__; |
| 1227 | ; return 0; } |
| 1228 | EOF |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1229 | if { (eval echo configure:1230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1230 | rm -rf conftest* |
| 1231 | ac_cv_cygwin=yes |
| 1232 | else |
| 1233 | echo "configure: failed program was:" >&5 |
| 1234 | cat conftest.$ac_ext >&5 |
| 1235 | rm -rf conftest* |
| 1236 | ac_cv_cygwin=no |
| 1237 | fi |
| 1238 | rm -f conftest* |
| 1239 | rm -f conftest* |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1240 | fi |
| 1241 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1242 | echo "$ac_t""$ac_cv_cygwin" 1>&6 |
| 1243 | CYGWIN= |
| 1244 | test "$ac_cv_cygwin" = yes && CYGWIN=yes |
| 1245 | echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1246 | echo "configure:1247: checking for mingw32 environment" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1247 | if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then |
| 1248 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1249 | else |
| 1250 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1251 | #line 1252 "configure" |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1252 | #include "confdefs.h" |
| 1253 | |
| 1254 | int main() { |
| 1255 | return __MINGW32__; |
| 1256 | ; return 0; } |
| 1257 | EOF |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1258 | if { (eval echo configure:1259: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1259 | rm -rf conftest* |
| 1260 | ac_cv_mingw32=yes |
| 1261 | else |
| 1262 | echo "configure: failed program was:" >&5 |
| 1263 | cat conftest.$ac_ext >&5 |
| 1264 | rm -rf conftest* |
| 1265 | ac_cv_mingw32=no |
| 1266 | fi |
| 1267 | rm -f conftest* |
| 1268 | rm -f conftest* |
| 1269 | fi |
| 1270 | |
| 1271 | echo "$ac_t""$ac_cv_mingw32" 1>&6 |
| 1272 | MINGW32= |
| 1273 | test "$ac_cv_mingw32" = yes && MINGW32=yes |
| 1274 | |
| 1275 | |
| 1276 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1277 | echo "configure:1278: checking for executable suffix" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1278 | if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then |
| 1279 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1280 | else |
| 1281 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then |
| 1282 | ac_cv_exeext=.exe |
| 1283 | else |
| 1284 | rm -f conftest* |
| 1285 | echo 'int main () { return 0; }' > conftest.$ac_ext |
| 1286 | ac_cv_exeext= |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1287 | if { (eval echo configure:1288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1288 | for file in conftest.*; do |
| 1289 | case $file in |
| 1290 | *.c | *.o | *.obj) ;; |
| 1291 | *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; |
| 1292 | esac |
| 1293 | done |
| 1294 | else |
| 1295 | { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } |
| 1296 | fi |
| 1297 | rm -f conftest* |
| 1298 | test x"${ac_cv_exeext}" = x && ac_cv_exeext=no |
| 1299 | fi |
| 1300 | fi |
| 1301 | |
| 1302 | EXEEXT="" |
| 1303 | test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} |
| 1304 | echo "$ac_t""${ac_cv_exeext}" 1>&6 |
| 1305 | ac_exeext=$EXEEXT |
| 1306 | |
Neil Schemenauer | dfb38e4 | 2001-01-27 06:57:08 +0000 | [diff] [blame] | 1307 | echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1308 | echo "configure:1309: checking for --with-suffix" >&5 |
Neil Schemenauer | dfb38e4 | 2001-01-27 06:57:08 +0000 | [diff] [blame] | 1309 | # Check whether --with-suffix or --without-suffix was given. |
| 1310 | if test "${with_suffix+set}" = set; then |
| 1311 | withval="$with_suffix" |
| 1312 | |
| 1313 | case $withval in |
| 1314 | no) EXEEXT=;; |
| 1315 | yes) EXEEXT=.exe;; |
| 1316 | *) EXEEXT=$withval;; |
| 1317 | esac |
| 1318 | fi |
| 1319 | |
| 1320 | echo "$ac_t""$EXEEXT" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1321 | # Test whether we're running on a non-case-sensitive system, in which |
| 1322 | # case we give a warning if no ext is given |
| 1323 | if test -d "python" -a -z "$EXEEXT" |
| 1324 | then |
| 1325 | echo "configure: warning: This filesystem is not case-sensitive so you should probably use --with-suffix" 1>&2 |
| 1326 | fi |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1327 | |
Guido van Rossum | dd997f7 | 1998-10-07 19:58:26 +0000 | [diff] [blame] | 1328 | case $MACHDEP in |
| 1329 | bsdos*) |
| 1330 | case $CC in |
| 1331 | gcc) CC="$CC -D_HAVE_BSDI";; |
| 1332 | esac;; |
| 1333 | esac |
| 1334 | |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1335 | case $ac_sys_system in |
| 1336 | hp*|HP*) |
| 1337 | case $CC in |
Guido van Rossum | cd5ff9f | 2000-09-22 16:15:54 +0000 | [diff] [blame] | 1338 | cc|*/cc) CC="$CC -Ae";; |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1339 | esac;; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1340 | Monterey*) |
| 1341 | case $CC in |
| 1342 | cc) CC="$CC -Wl,-Bexport";; |
| 1343 | esac;; |
Martin v. Löwis | a30c100 | 2001-03-06 12:10:20 +0000 | [diff] [blame] | 1344 | SunOS*) |
| 1345 | # Some functions have a prototype only with that define, e.g. confstr |
| 1346 | cat >> confdefs.h <<\EOF |
| 1347 | #define __EXTENSIONS__ 1 |
| 1348 | EOF |
| 1349 | |
| 1350 | ;; |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1351 | esac |
| 1352 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1353 | |
Martin v. Löwis | a30c100 | 2001-03-06 12:10:20 +0000 | [diff] [blame] | 1354 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1355 | echo $ac_n "checking LIBRARY""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1356 | echo "configure:1357: checking LIBRARY" >&5 |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1357 | if test -z "$LIBRARY" |
| 1358 | then |
| 1359 | LIBRARY='libpython$(VERSION).a' |
| 1360 | fi |
| 1361 | echo "$ac_t""$LIBRARY" 1>&6 |
| 1362 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1363 | # LDLIBRARY is the name of the library to link against (as opposed to the |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1364 | # name of the library into which to insert object files). BLDLIBRARY is also |
| 1365 | # the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY |
| 1366 | # is blank as the main program is not linked directly against LDLIBRARY. |
| 1367 | # LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On |
| 1368 | # systems without shared libraries, LDLIBRARY is the same as LIBRARY |
| 1369 | # (defined in the Makefiles). On Cygwin LDLIBRARY is the import library, |
| 1370 | # DLLLIBRARY is the shared (i.e., DLL) library. |
| 1371 | # |
| 1372 | |
| 1373 | |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1374 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1375 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1376 | LDLIBRARY="$LIBRARY" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1377 | BLDLIBRARY='$(LDLIBRARY)' |
Guido van Rossum | ca563f2 | 2001-01-23 01:52:44 +0000 | [diff] [blame] | 1378 | DLLLIBRARY='' |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1379 | LDLIBRARYDIR='' |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1380 | |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1381 | # LINKCC is the command that links the python executable -- default is $(CC). |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 1382 | # This is altered for AIX in order to build the export list before |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 1383 | # linking. |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1384 | |
| 1385 | echo $ac_n "checking LINKCC""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1386 | echo "configure:1387: checking LINKCC" >&5 |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1387 | if test -z "$LINKCC" |
| 1388 | then |
| 1389 | case $ac_sys_system in |
| 1390 | AIX*) |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 1391 | LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";; |
Guido van Rossum | 3c4bb80 | 1997-12-18 23:55:32 +0000 | [diff] [blame] | 1392 | dgux*) |
| 1393 | LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1394 | Monterey64*) |
| 1395 | LINKCC="\$(PURIFY) \$(CC) -L/usr/lib/ia64l64";; |
Guido van Rossum | 25f9303 | 1997-08-18 16:00:04 +0000 | [diff] [blame] | 1396 | *) LINKCC="\$(PURIFY) \$(CC)";; |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1397 | esac |
| 1398 | fi |
| 1399 | echo "$ac_t""$LINKCC" 1>&6 |
| 1400 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1401 | echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1402 | echo "configure:1403: checking LDLIBRARY" >&5 |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1403 | |
| 1404 | # DG/UX requires some fancy ld contortions to produce a .so from an .a |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 1405 | case $MACHDEP in |
| 1406 | dguxR4) |
| 1407 | LDLIBRARY='libpython$(VERSION).so' |
| 1408 | OPT="$OPT -pic" |
| 1409 | ;; |
| 1410 | beos*) |
| 1411 | LDLIBRARY='libpython$(VERSION).so' |
| 1412 | ;; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1413 | cygwin*) |
| 1414 | LDLIBRARY='libpython$(VERSION).dll.a' |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1415 | DLLLIBRARY='libpython$(VERSION).dll' |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1416 | ;; |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 1417 | esac |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1418 | |
| 1419 | # MacOSX framework builds need more magic. LDLIBRARY is the dynamic library that |
| 1420 | # we build, but we do not want to link against it (we will find it with a -framework |
| 1421 | # option). For this reason there is an extra variable BLDLIBRARY against which Python |
| 1422 | # and the extension modules are linked, BLDLIBRARY. This is normally the same |
| 1423 | # as LDLIBRARY, but empty for MacOSX framework builds. |
| 1424 | if test "$enable_framework" |
| 1425 | then |
| 1426 | LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' |
| 1427 | LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)' |
| 1428 | BLDLIBRARY='' |
| 1429 | else |
| 1430 | BLDLIBRARY='$(LDLIBRARY)' |
| 1431 | fi |
| 1432 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1433 | echo "$ac_t""$LDLIBRARY" 1>&6 |
| 1434 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1435 | # Extract the first word of "ranlib", so it can be a program name with args. |
| 1436 | set dummy ranlib; ac_word=$2 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1437 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1438 | echo "configure:1439: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1439 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1440 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1441 | else |
| 1442 | if test -n "$RANLIB"; then |
| 1443 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. |
| 1444 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1445 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 1446 | ac_dummy="$PATH" |
| 1447 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1448 | test -z "$ac_dir" && ac_dir=. |
| 1449 | if test -f $ac_dir/$ac_word; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1450 | ac_cv_prog_RANLIB="ranlib" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1451 | break |
| 1452 | fi |
| 1453 | done |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1454 | IFS="$ac_save_ifs" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1455 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1456 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1457 | fi |
| 1458 | RANLIB="$ac_cv_prog_RANLIB" |
| 1459 | if test -n "$RANLIB"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1460 | echo "$ac_t""$RANLIB" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1461 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1462 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1463 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1464 | |
| 1465 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1466 | for ac_prog in ar aal |
| 1467 | do |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1468 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
| 1469 | set dummy $ac_prog; ac_word=$2 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1470 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1471 | echo "configure:1472: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1472 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1473 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1474 | else |
| 1475 | if test -n "$AR"; then |
| 1476 | ac_cv_prog_AR="$AR" # Let the user override the test. |
| 1477 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1478 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 1479 | ac_dummy="$PATH" |
| 1480 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1481 | test -z "$ac_dir" && ac_dir=. |
| 1482 | if test -f $ac_dir/$ac_word; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1483 | ac_cv_prog_AR="$ac_prog" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1484 | break |
| 1485 | fi |
| 1486 | done |
| 1487 | IFS="$ac_save_ifs" |
| 1488 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1489 | fi |
| 1490 | AR="$ac_cv_prog_AR" |
| 1491 | if test -n "$AR"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1492 | echo "$ac_t""$AR" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1493 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1494 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1495 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1496 | |
| 1497 | test -n "$AR" && break |
| 1498 | done |
| 1499 | test -n "$AR" || AR="ar" |
| 1500 | |
Neil Schemenauer | a42c827 | 2001-03-31 00:01:55 +0000 | [diff] [blame] | 1501 | |
| 1502 | case $MACHDEP in |
| 1503 | bsdos*) |
| 1504 | # install -d does not work on BSDI |
| 1505 | if test -z "$INSTALL" |
| 1506 | then |
| 1507 | INSTALL="${srcdir}/install-sh -c" |
| 1508 | fi |
| 1509 | esac |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1510 | ac_aux_dir= |
| 1511 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do |
| 1512 | if test -f $ac_dir/install-sh; then |
| 1513 | ac_aux_dir=$ac_dir |
| 1514 | ac_install_sh="$ac_aux_dir/install-sh -c" |
| 1515 | break |
| 1516 | elif test -f $ac_dir/install.sh; then |
| 1517 | ac_aux_dir=$ac_dir |
| 1518 | ac_install_sh="$ac_aux_dir/install.sh -c" |
| 1519 | break |
| 1520 | fi |
| 1521 | done |
| 1522 | if test -z "$ac_aux_dir"; then |
| 1523 | { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1524 | fi |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1525 | ac_config_guess=$ac_aux_dir/config.guess |
| 1526 | ac_config_sub=$ac_aux_dir/config.sub |
| 1527 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. |
| 1528 | |
| 1529 | # Find a good install program. We prefer a C program (faster), |
| 1530 | # so one script is as good as another. But avoid the broken or |
| 1531 | # incompatible versions: |
| 1532 | # SysV /etc/install, /usr/sbin/install |
| 1533 | # SunOS /usr/etc/install |
| 1534 | # IRIX /sbin/install |
| 1535 | # AIX /bin/install |
| 1536 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag |
| 1537 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args |
| 1538 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" |
| 1539 | # ./install, which can be erroneously created by make from ./install.sh. |
| 1540 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1541 | echo "configure:1542: checking for a BSD compatible install" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1542 | if test -z "$INSTALL"; then |
| 1543 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then |
| 1544 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1545 | else |
| 1546 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" |
| 1547 | for ac_dir in $PATH; do |
| 1548 | # Account for people who put trailing slashes in PATH elements. |
| 1549 | case "$ac_dir/" in |
| 1550 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; |
| 1551 | *) |
| 1552 | # OSF1 and SCO ODT 3.0 have their own names for install. |
| 1553 | # Don't use installbsd from OSF since it installs stuff as root |
| 1554 | # by default. |
| 1555 | for ac_prog in ginstall scoinst install; do |
| 1556 | if test -f $ac_dir/$ac_prog; then |
| 1557 | if test $ac_prog = install && |
| 1558 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then |
| 1559 | # AIX install. It has an incompatible calling convention. |
| 1560 | : |
| 1561 | else |
| 1562 | ac_cv_path_install="$ac_dir/$ac_prog -c" |
| 1563 | break 2 |
| 1564 | fi |
| 1565 | fi |
| 1566 | done |
| 1567 | ;; |
| 1568 | esac |
| 1569 | done |
| 1570 | IFS="$ac_save_IFS" |
| 1571 | |
| 1572 | fi |
| 1573 | if test "${ac_cv_path_install+set}" = set; then |
| 1574 | INSTALL="$ac_cv_path_install" |
| 1575 | else |
| 1576 | # As a last resort, use the slow shell script. We don't cache a |
| 1577 | # path for INSTALL within a source directory, because that will |
| 1578 | # break other packages using the cache if that directory is |
| 1579 | # removed, or if the path is relative. |
| 1580 | INSTALL="$ac_install_sh" |
| 1581 | fi |
| 1582 | fi |
| 1583 | echo "$ac_t""$INSTALL" 1>&6 |
| 1584 | |
| 1585 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. |
| 1586 | # It thinks the first close brace ends the variable substitution. |
| 1587 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' |
| 1588 | |
| 1589 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' |
| 1590 | |
| 1591 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' |
| 1592 | |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1593 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 1594 | # Not every filesystem supports hard links |
| 1595 | |
| 1596 | if test -z "$LN" ; then |
| 1597 | case $ac_sys_system in |
| 1598 | BeOS*) LN="ln -s";; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1599 | CYGWIN*) LN="ln -s";; |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 1600 | *) LN=ln;; |
| 1601 | esac |
| 1602 | fi |
| 1603 | |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1604 | # Check for --with-pydebug |
| 1605 | echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1606 | echo "configure:1607: checking for --with-pydebug" >&5 |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1607 | # Check whether --with-pydebug or --without-pydebug was given. |
| 1608 | if test "${with_pydebug+set}" = set; then |
| 1609 | withval="$with_pydebug" |
| 1610 | |
| 1611 | if test "$withval" != no |
| 1612 | then cat >> confdefs.h <<\EOF |
| 1613 | #define Py_DEBUG 1 |
| 1614 | EOF |
| 1615 | echo "$ac_t""yes" 1>&6; Py_DEBUG='true' |
| 1616 | else echo "$ac_t""no" 1>&6; Py_DEBUG='false' |
| 1617 | fi |
| 1618 | else |
| 1619 | echo "$ac_t""no" 1>&6 |
| 1620 | fi |
| 1621 | |
| 1622 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1623 | # Optimizer/debugger flags |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1624 | |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1625 | if test -z "$OPT" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1626 | then |
Guido van Rossum | edca74a | 1997-07-18 23:29:40 +0000 | [diff] [blame] | 1627 | case $GCC in |
| 1628 | yes) |
| 1629 | case $ac_cv_prog_cc_g in |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1630 | yes) |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1631 | if test "$Py_DEBUG" = 'true' ; then |
| 1632 | # Optimization messes up debuggers, so turn it off for |
| 1633 | # debug builds. |
| 1634 | OPT="-g -Wall -Wstrict-prototypes" |
| 1635 | else |
| 1636 | OPT="-g -O3 -Wall -Wstrict-prototypes" |
| 1637 | fi;; |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1638 | *) |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1639 | OPT="-O3 -Wall -Wstrict-prototypes";; |
| 1640 | esac |
| 1641 | ;; |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1642 | *) |
| 1643 | case $ac_sys_system in |
| 1644 | UnixWare*) |
| 1645 | OPT="-O -K pentium,host,inline,loop_unroll,alloca ";; |
| 1646 | *) |
| 1647 | OPT="-O";; |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1648 | esac |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1649 | esac |
Jack Jansen | ca06bc6 | 2001-08-03 15:32:23 +0000 | [diff] [blame] | 1650 | case $ac_sys_system in |
| 1651 | Darwin*) |
| 1652 | OPT="$OPT -no-cpp-precomp";; |
| 1653 | esac |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1654 | fi |
| 1655 | |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1656 | # The current (beta) Monterey compiler dies with optimizations |
| 1657 | case $ac_sys_system in |
| 1658 | Monterey*) OPT="";; |
| 1659 | esac |
| 1660 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 1661 | if test "$ac_arch_flags" |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 1662 | then |
| 1663 | OPT="$OPT $ac_arch_flags" |
| 1664 | fi |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 1665 | |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1666 | echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1667 | echo "configure:1668: checking whether $CC accepts -OPT:Olimit=0" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1668 | if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1669 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1670 | else |
| 1671 | ac_save_cc="$CC" |
| 1672 | CC="$CC -OPT:Olimit=0" |
| 1673 | if test "$cross_compiling" = yes; then |
| 1674 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 1675 | else |
| 1676 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1677 | #line 1678 "configure" |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1678 | #include "confdefs.h" |
| 1679 | int main() { return 0; } |
| 1680 | EOF |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1681 | if { (eval echo configure:1682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1682 | then |
| 1683 | ac_cv_opt_olimit_ok=yes |
| 1684 | else |
| 1685 | echo "configure: failed program was:" >&5 |
| 1686 | cat conftest.$ac_ext >&5 |
| 1687 | rm -fr conftest* |
| 1688 | ac_cv_opt_olimit_ok=no |
| 1689 | fi |
| 1690 | rm -fr conftest* |
| 1691 | fi |
| 1692 | |
| 1693 | CC="$ac_save_cc" |
| 1694 | fi |
| 1695 | |
| 1696 | echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6 |
Guido van Rossum | 2efa34b | 1997-10-23 17:43:11 +0000 | [diff] [blame] | 1697 | if test $ac_cv_opt_olimit_ok = yes; then |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 1698 | case $ac_sys_system in |
| 1699 | Darwin*) OPT="$OPT" ;; |
| 1700 | *) OPT="$OPT -OPT:Olimit=0";; |
| 1701 | esac |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1702 | else |
| 1703 | echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1704 | echo "configure:1705: checking whether $CC accepts -Olimit 1500" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1705 | if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1706 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1707 | else |
| 1708 | ac_save_cc="$CC" |
| 1709 | CC="$CC -Olimit 1500" |
| 1710 | if test "$cross_compiling" = yes; then |
| 1711 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 1712 | else |
| 1713 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1714 | #line 1715 "configure" |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1715 | #include "confdefs.h" |
| 1716 | int main() { return 0; } |
| 1717 | EOF |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1718 | if { (eval echo configure:1719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1719 | then |
| 1720 | ac_cv_olimit_ok=yes |
| 1721 | else |
| 1722 | echo "configure: failed program was:" >&5 |
| 1723 | cat conftest.$ac_ext >&5 |
| 1724 | rm -fr conftest* |
| 1725 | ac_cv_olimit_ok=no |
Guido van Rossum | 201afe5 | 1997-05-14 21:14:44 +0000 | [diff] [blame] | 1726 | fi |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1727 | rm -fr conftest* |
| 1728 | fi |
| 1729 | |
| 1730 | CC="$ac_save_cc" |
| 1731 | fi |
| 1732 | |
| 1733 | echo "$ac_t""$ac_cv_olimit_ok" 1>&6 |
| 1734 | if test $ac_cv_olimit_ok = yes; then |
| 1735 | OPT="$OPT -Olimit 1500" |
| 1736 | fi |
| 1737 | fi |
| 1738 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1739 | # -Kpthread, if available, provides the right #defines |
| 1740 | # and linker options to make pthread_create available |
| 1741 | echo $ac_n "checking whether $CC accepts -Kpthread""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1742 | echo "configure:1743: checking whether $CC accepts -Kpthread" >&5 |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1743 | if eval "test \"`echo '$''{'ac_cv_kpthread'+set}'`\" = set"; then |
| 1744 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1745 | else |
| 1746 | ac_save_cc="$CC" |
| 1747 | CC="$CC -Kpthread" |
| 1748 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1749 | #line 1750 "configure" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1750 | #include "confdefs.h" |
| 1751 | #include <pthread.h> |
| 1752 | int main() { |
| 1753 | pthread_create(0,0,0,0) |
| 1754 | ; return 0; } |
| 1755 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1756 | if { (eval echo configure:1757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1757 | rm -rf conftest* |
| 1758 | ac_cv_kpthread=yes |
| 1759 | else |
| 1760 | echo "configure: failed program was:" >&5 |
| 1761 | cat conftest.$ac_ext >&5 |
| 1762 | rm -rf conftest* |
| 1763 | ac_cv_kpthread=no |
| 1764 | fi |
| 1765 | rm -f conftest* |
| 1766 | CC="$ac_save_cc" |
| 1767 | fi |
| 1768 | |
| 1769 | |
| 1770 | # GCC does not reject -Kpthread as an illegal option, it merely complains that |
| 1771 | # it is unrecognized |
| 1772 | if test "$GCC" = "yes" |
| 1773 | then ac_cv_kpthread="no, we have gcc" |
| 1774 | fi |
| 1775 | echo "$ac_t""$ac_cv_kpthread" 1>&6 |
| 1776 | |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 1777 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1778 | # checks for header files |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1779 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1780 | echo "configure:1781: checking for ANSI C header files" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1781 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1782 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1783 | else |
| 1784 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1785 | #line 1786 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1786 | #include "confdefs.h" |
| 1787 | #include <stdlib.h> |
| 1788 | #include <stdarg.h> |
| 1789 | #include <string.h> |
| 1790 | #include <float.h> |
| 1791 | EOF |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1792 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1793 | { (eval echo configure:1794: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1794 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1795 | if test -z "$ac_err"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1796 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1797 | ac_cv_header_stdc=yes |
| 1798 | else |
| 1799 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1800 | echo "configure: failed program was:" >&5 |
| 1801 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1802 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1803 | ac_cv_header_stdc=no |
| 1804 | fi |
| 1805 | rm -f conftest* |
| 1806 | |
| 1807 | if test $ac_cv_header_stdc = yes; then |
| 1808 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. |
| 1809 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1810 | #line 1811 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1811 | #include "confdefs.h" |
| 1812 | #include <string.h> |
| 1813 | EOF |
| 1814 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1815 | egrep "memchr" >/dev/null 2>&1; then |
| 1816 | : |
| 1817 | else |
| 1818 | rm -rf conftest* |
| 1819 | ac_cv_header_stdc=no |
| 1820 | fi |
| 1821 | rm -f conftest* |
| 1822 | |
| 1823 | fi |
| 1824 | |
| 1825 | if test $ac_cv_header_stdc = yes; then |
| 1826 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. |
| 1827 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1828 | #line 1829 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1829 | #include "confdefs.h" |
| 1830 | #include <stdlib.h> |
| 1831 | EOF |
| 1832 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1833 | egrep "free" >/dev/null 2>&1; then |
| 1834 | : |
| 1835 | else |
| 1836 | rm -rf conftest* |
| 1837 | ac_cv_header_stdc=no |
| 1838 | fi |
| 1839 | rm -f conftest* |
| 1840 | |
| 1841 | fi |
| 1842 | |
| 1843 | if test $ac_cv_header_stdc = yes; then |
| 1844 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. |
| 1845 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1846 | : |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1847 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1848 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1849 | #line 1850 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1850 | #include "confdefs.h" |
| 1851 | #include <ctype.h> |
| 1852 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') |
| 1853 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1854 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1855 | int main () { int i; for (i = 0; i < 256; i++) |
| 1856 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); |
| 1857 | exit (0); } |
| 1858 | |
| 1859 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1860 | if { (eval echo configure:1861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1861 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1862 | : |
| 1863 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1864 | echo "configure: failed program was:" >&5 |
| 1865 | cat conftest.$ac_ext >&5 |
| 1866 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1867 | ac_cv_header_stdc=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1868 | fi |
| 1869 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1870 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1871 | |
| 1872 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1873 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1874 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1875 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1876 | if test $ac_cv_header_stdc = yes; then |
| 1877 | cat >> confdefs.h <<\EOF |
| 1878 | #define STDC_HEADERS 1 |
| 1879 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1880 | |
| 1881 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1882 | |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 1883 | for ac_hdr in dlfcn.h fcntl.h limits.h langinfo.h locale.h \ |
| 1884 | ncurses.h poll.h pthread.h \ |
Eric S. Raymond | d2d75d3 | 2001-01-16 15:26:34 +0000 | [diff] [blame] | 1885 | signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \ |
Fred Drake | bbc3c5a | 2001-05-11 16:11:25 +0000 | [diff] [blame] | 1886 | sys/audioio.h sys/file.h sys/lock.h sys/modem.h db_185.h db.h \ |
Andrew M. Kuchling | 881fd90 | 2001-07-14 20:55:52 +0000 | [diff] [blame] | 1887 | sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \ |
Fred Drake | ae90f8d | 2000-09-15 03:38:12 +0000 | [diff] [blame] | 1888 | sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \ |
Martin v. Löwis | f24b2f3 | 2001-08-10 20:29:40 +0000 | [diff] [blame] | 1889 | ndbm.h db1/ndbm.h gdbm/ndbm.h sys/resource.h netpacket/packet.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1890 | do |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1891 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1892 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 1893 | echo "configure:1894: checking for $ac_hdr" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1894 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1895 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1896 | else |
| 1897 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 1898 | #line 1899 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1899 | #include "confdefs.h" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1900 | #include <$ac_hdr> |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1901 | EOF |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1902 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 1903 | { (eval echo configure:1904: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1904 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1905 | if test -z "$ac_err"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1906 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1907 | eval "ac_cv_header_$ac_safe=yes" |
| 1908 | else |
| 1909 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1910 | echo "configure: failed program was:" >&5 |
| 1911 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1912 | rm -rf conftest* |
| 1913 | eval "ac_cv_header_$ac_safe=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1914 | fi |
| 1915 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1916 | fi |
| 1917 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1918 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1919 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1920 | cat >> confdefs.h <<EOF |
| 1921 | #define $ac_tr_hdr 1 |
| 1922 | EOF |
| 1923 | |
| 1924 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1925 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1926 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1927 | done |
| 1928 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1929 | ac_header_dirent=no |
| 1930 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h |
| 1931 | do |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1932 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1933 | echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 1934 | echo "configure:1935: checking for $ac_hdr that defines DIR" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1935 | if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1936 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1937 | else |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1938 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 1939 | #line 1940 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1940 | #include "confdefs.h" |
| 1941 | #include <sys/types.h> |
| 1942 | #include <$ac_hdr> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1943 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1944 | DIR *dirp = 0; |
| 1945 | ; return 0; } |
| 1946 | EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 1947 | if { (eval echo configure:1948: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1948 | rm -rf conftest* |
| 1949 | eval "ac_cv_header_dirent_$ac_safe=yes" |
| 1950 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1951 | echo "configure: failed program was:" >&5 |
| 1952 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1953 | rm -rf conftest* |
| 1954 | eval "ac_cv_header_dirent_$ac_safe=no" |
| 1955 | fi |
| 1956 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1957 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1958 | if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1959 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1960 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1961 | cat >> confdefs.h <<EOF |
| 1962 | #define $ac_tr_hdr 1 |
| 1963 | EOF |
| 1964 | ac_header_dirent=$ac_hdr; break |
| 1965 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1966 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1967 | fi |
| 1968 | done |
| 1969 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. |
| 1970 | if test $ac_header_dirent = dirent.h; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1971 | echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 1972 | echo "configure:1973: checking for opendir in -ldir" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1973 | ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1974 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1975 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1976 | else |
| 1977 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1978 | LIBS="-ldir $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1979 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 1980 | #line 1981 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1981 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1982 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 1983 | /* We use char because int might match the return type of a gcc2 |
| 1984 | builtin and then its argument prototype would still apply. */ |
| 1985 | char opendir(); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1986 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1987 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1988 | opendir() |
| 1989 | ; return 0; } |
| 1990 | EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 1991 | if { (eval echo configure:1992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1992 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1993 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1994 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1995 | echo "configure: failed program was:" >&5 |
| 1996 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1997 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1998 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1999 | fi |
| 2000 | rm -f conftest* |
| 2001 | LIBS="$ac_save_LIBS" |
| 2002 | |
| 2003 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2004 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2005 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2006 | LIBS="$LIBS -ldir" |
| 2007 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2008 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2009 | fi |
| 2010 | |
| 2011 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2012 | echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2013 | echo "configure:2014: checking for opendir in -lx" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2014 | ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2015 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2016 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2017 | else |
| 2018 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2019 | LIBS="-lx $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2020 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2021 | #line 2022 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2022 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2023 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 2024 | /* We use char because int might match the return type of a gcc2 |
| 2025 | builtin and then its argument prototype would still apply. */ |
| 2026 | char opendir(); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2027 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2028 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2029 | opendir() |
| 2030 | ; return 0; } |
| 2031 | EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2032 | if { (eval echo configure:2033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2033 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2034 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2035 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2036 | echo "configure: failed program was:" >&5 |
| 2037 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2038 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2039 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2040 | fi |
| 2041 | rm -f conftest* |
| 2042 | LIBS="$ac_save_LIBS" |
| 2043 | |
| 2044 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2045 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2046 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2047 | LIBS="$LIBS -lx" |
| 2048 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2049 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2050 | fi |
| 2051 | |
| 2052 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2053 | |
| 2054 | |
| 2055 | # checks for typedefs |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2056 | was_it_defined=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2057 | echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2058 | echo "configure:2059: checking for clock_t in time.h" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2059 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2060 | #line 2061 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2061 | #include "confdefs.h" |
| 2062 | #include <time.h> |
| 2063 | EOF |
| 2064 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2065 | egrep "clock_t" >/dev/null 2>&1; then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2066 | rm -rf conftest* |
| 2067 | was_it_defined=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2068 | else |
| 2069 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2070 | cat >> confdefs.h <<\EOF |
| 2071 | #define clock_t long |
| 2072 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2073 | |
| 2074 | fi |
| 2075 | rm -f conftest* |
| 2076 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2077 | echo "$ac_t""$was_it_defined" 1>&6 |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2078 | |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 2079 | # Add some code to confdefs.h so that the test for off_t works on SCO |
| 2080 | cat >> confdefs.h <<\EOF |
| 2081 | #if defined(SCO_DS) |
| 2082 | #undef _OFF_T |
| 2083 | #endif |
| 2084 | EOF |
| 2085 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2086 | # Type availability checks |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2087 | echo $ac_n "checking for mode_t""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2088 | echo "configure:2089: checking for mode_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2089 | if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2090 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2091 | else |
| 2092 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2093 | #line 2094 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2094 | #include "confdefs.h" |
| 2095 | #include <sys/types.h> |
| 2096 | #if STDC_HEADERS |
| 2097 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2098 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2099 | #endif |
| 2100 | EOF |
| 2101 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 2102 | egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2103 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2104 | ac_cv_type_mode_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2105 | else |
| 2106 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2107 | ac_cv_type_mode_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2108 | fi |
| 2109 | rm -f conftest* |
| 2110 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2111 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2112 | echo "$ac_t""$ac_cv_type_mode_t" 1>&6 |
| 2113 | if test $ac_cv_type_mode_t = no; then |
| 2114 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2115 | #define mode_t int |
| 2116 | EOF |
| 2117 | |
| 2118 | fi |
| 2119 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2120 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2121 | echo "configure:2122: checking for off_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2122 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2123 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2124 | else |
| 2125 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2126 | #line 2127 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2127 | #include "confdefs.h" |
| 2128 | #include <sys/types.h> |
| 2129 | #if STDC_HEADERS |
| 2130 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2131 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2132 | #endif |
| 2133 | EOF |
| 2134 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 2135 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2136 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2137 | ac_cv_type_off_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2138 | else |
| 2139 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2140 | ac_cv_type_off_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2141 | fi |
| 2142 | rm -f conftest* |
| 2143 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2144 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2145 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 |
| 2146 | if test $ac_cv_type_off_t = no; then |
| 2147 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2148 | #define off_t long |
| 2149 | EOF |
| 2150 | |
| 2151 | fi |
| 2152 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2153 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2154 | echo "configure:2155: checking for pid_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2155 | if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2156 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2157 | else |
| 2158 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2159 | #line 2160 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2160 | #include "confdefs.h" |
| 2161 | #include <sys/types.h> |
| 2162 | #if STDC_HEADERS |
| 2163 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2164 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2165 | #endif |
| 2166 | EOF |
| 2167 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 2168 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2169 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2170 | ac_cv_type_pid_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2171 | else |
| 2172 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2173 | ac_cv_type_pid_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2174 | fi |
| 2175 | rm -f conftest* |
| 2176 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2177 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2178 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 |
| 2179 | if test $ac_cv_type_pid_t = no; then |
| 2180 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2181 | #define pid_t int |
| 2182 | EOF |
| 2183 | |
| 2184 | fi |
| 2185 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2186 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2187 | echo "configure:2188: checking return type of signal handlers" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2188 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2189 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2190 | else |
| 2191 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2192 | #line 2193 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2193 | #include "confdefs.h" |
| 2194 | #include <sys/types.h> |
| 2195 | #include <signal.h> |
| 2196 | #ifdef signal |
| 2197 | #undef signal |
| 2198 | #endif |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2199 | #ifdef __cplusplus |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2200 | extern "C" void (*signal (int, void (*)(int)))(int); |
| 2201 | #else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2202 | void (*signal ()) (); |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2203 | #endif |
| 2204 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2205 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2206 | int i; |
| 2207 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2208 | EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2209 | if { (eval echo configure:2210: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2210 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2211 | ac_cv_type_signal=void |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2212 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2213 | echo "configure: failed program was:" >&5 |
| 2214 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2215 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2216 | ac_cv_type_signal=int |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2217 | fi |
| 2218 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2219 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2220 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2221 | echo "$ac_t""$ac_cv_type_signal" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2222 | cat >> confdefs.h <<EOF |
| 2223 | #define RETSIGTYPE $ac_cv_type_signal |
| 2224 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2225 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2226 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2227 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2228 | echo "configure:2229: checking for size_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2229 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2230 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2231 | else |
| 2232 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2233 | #line 2234 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2234 | #include "confdefs.h" |
| 2235 | #include <sys/types.h> |
| 2236 | #if STDC_HEADERS |
| 2237 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2238 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2239 | #endif |
| 2240 | EOF |
| 2241 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 2242 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2243 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2244 | ac_cv_type_size_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2245 | else |
| 2246 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2247 | ac_cv_type_size_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2248 | fi |
| 2249 | rm -f conftest* |
| 2250 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2251 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2252 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 |
| 2253 | if test $ac_cv_type_size_t = no; then |
| 2254 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2255 | #define size_t unsigned |
| 2256 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2257 | |
| 2258 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2259 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2260 | echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2261 | echo "configure:2262: checking for uid_t in sys/types.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2262 | if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2263 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2264 | else |
| 2265 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2266 | #line 2267 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2267 | #include "confdefs.h" |
| 2268 | #include <sys/types.h> |
| 2269 | EOF |
| 2270 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2271 | egrep "uid_t" >/dev/null 2>&1; then |
| 2272 | rm -rf conftest* |
| 2273 | ac_cv_type_uid_t=yes |
| 2274 | else |
| 2275 | rm -rf conftest* |
| 2276 | ac_cv_type_uid_t=no |
| 2277 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2278 | rm -f conftest* |
| 2279 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2280 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2281 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2282 | echo "$ac_t""$ac_cv_type_uid_t" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2283 | if test $ac_cv_type_uid_t = no; then |
| 2284 | cat >> confdefs.h <<\EOF |
| 2285 | #define uid_t int |
| 2286 | EOF |
| 2287 | |
| 2288 | cat >> confdefs.h <<\EOF |
| 2289 | #define gid_t int |
| 2290 | EOF |
| 2291 | |
| 2292 | fi |
| 2293 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2294 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2295 | # Sizes of various common basic types |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2296 | echo $ac_n "checking size of int""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2297 | echo "configure:2298: checking size of int" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2298 | if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2299 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2300 | else |
| 2301 | if test "$cross_compiling" = yes; then |
| 2302 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2303 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2304 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2305 | #line 2306 "configure" |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2306 | #include "confdefs.h" |
| 2307 | #include <stdio.h> |
| 2308 | main() |
| 2309 | { |
| 2310 | FILE *f=fopen("conftestval", "w"); |
| 2311 | if (!f) exit(1); |
| 2312 | fprintf(f, "%d\n", sizeof(int)); |
| 2313 | exit(0); |
| 2314 | } |
| 2315 | EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2316 | if { (eval echo configure:2317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2317 | then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2318 | ac_cv_sizeof_int=`cat conftestval` |
| 2319 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2320 | echo "configure: failed program was:" >&5 |
| 2321 | cat conftest.$ac_ext >&5 |
| 2322 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2323 | ac_cv_sizeof_int=0 |
| 2324 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2325 | rm -fr conftest* |
| 2326 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2327 | |
| 2328 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2329 | echo "$ac_t""$ac_cv_sizeof_int" 1>&6 |
| 2330 | cat >> confdefs.h <<EOF |
| 2331 | #define SIZEOF_INT $ac_cv_sizeof_int |
| 2332 | EOF |
| 2333 | |
| 2334 | |
| 2335 | echo $ac_n "checking size of long""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2336 | echo "configure:2337: checking size of long" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2337 | if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2338 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2339 | else |
| 2340 | if test "$cross_compiling" = yes; then |
| 2341 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2342 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2343 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2344 | #line 2345 "configure" |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2345 | #include "confdefs.h" |
| 2346 | #include <stdio.h> |
| 2347 | main() |
| 2348 | { |
| 2349 | FILE *f=fopen("conftestval", "w"); |
| 2350 | if (!f) exit(1); |
| 2351 | fprintf(f, "%d\n", sizeof(long)); |
| 2352 | exit(0); |
| 2353 | } |
| 2354 | EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2355 | if { (eval echo configure:2356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2356 | then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2357 | ac_cv_sizeof_long=`cat conftestval` |
| 2358 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2359 | echo "configure: failed program was:" >&5 |
| 2360 | cat conftest.$ac_ext >&5 |
| 2361 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2362 | ac_cv_sizeof_long=0 |
| 2363 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2364 | rm -fr conftest* |
| 2365 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2366 | |
| 2367 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2368 | echo "$ac_t""$ac_cv_sizeof_long" 1>&6 |
| 2369 | cat >> confdefs.h <<EOF |
| 2370 | #define SIZEOF_LONG $ac_cv_sizeof_long |
| 2371 | EOF |
| 2372 | |
| 2373 | |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2374 | echo $ac_n "checking size of void *""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2375 | echo "configure:2376: checking size of void *" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2376 | if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2377 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2378 | else |
| 2379 | if test "$cross_compiling" = yes; then |
| 2380 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2381 | else |
| 2382 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2383 | #line 2384 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2384 | #include "confdefs.h" |
| 2385 | #include <stdio.h> |
| 2386 | main() |
| 2387 | { |
| 2388 | FILE *f=fopen("conftestval", "w"); |
| 2389 | if (!f) exit(1); |
| 2390 | fprintf(f, "%d\n", sizeof(void *)); |
| 2391 | exit(0); |
| 2392 | } |
| 2393 | EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2394 | if { (eval echo configure:2395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2395 | then |
| 2396 | ac_cv_sizeof_void_p=`cat conftestval` |
| 2397 | else |
| 2398 | echo "configure: failed program was:" >&5 |
| 2399 | cat conftest.$ac_ext >&5 |
| 2400 | rm -fr conftest* |
| 2401 | ac_cv_sizeof_void_p=0 |
| 2402 | fi |
| 2403 | rm -fr conftest* |
| 2404 | fi |
| 2405 | |
| 2406 | fi |
| 2407 | echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6 |
| 2408 | cat >> confdefs.h <<EOF |
| 2409 | #define SIZEOF_VOID_P $ac_cv_sizeof_void_p |
| 2410 | EOF |
| 2411 | |
| 2412 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2413 | echo $ac_n "checking size of char""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2414 | echo "configure:2415: checking size of char" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2415 | if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2416 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2417 | else |
| 2418 | if test "$cross_compiling" = yes; then |
| 2419 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2420 | else |
| 2421 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2422 | #line 2423 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2423 | #include "confdefs.h" |
| 2424 | #include <stdio.h> |
| 2425 | main() |
| 2426 | { |
| 2427 | FILE *f=fopen("conftestval", "w"); |
| 2428 | if (!f) exit(1); |
| 2429 | fprintf(f, "%d\n", sizeof(char)); |
| 2430 | exit(0); |
| 2431 | } |
| 2432 | EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2433 | if { (eval echo configure:2434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2434 | then |
| 2435 | ac_cv_sizeof_char=`cat conftestval` |
| 2436 | else |
| 2437 | echo "configure: failed program was:" >&5 |
| 2438 | cat conftest.$ac_ext >&5 |
| 2439 | rm -fr conftest* |
| 2440 | ac_cv_sizeof_char=0 |
| 2441 | fi |
| 2442 | rm -fr conftest* |
| 2443 | fi |
| 2444 | |
| 2445 | fi |
| 2446 | echo "$ac_t""$ac_cv_sizeof_char" 1>&6 |
| 2447 | cat >> confdefs.h <<EOF |
| 2448 | #define SIZEOF_CHAR $ac_cv_sizeof_char |
| 2449 | EOF |
| 2450 | |
| 2451 | |
| 2452 | echo $ac_n "checking size of short""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2453 | echo "configure:2454: checking size of short" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2454 | if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2455 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2456 | else |
| 2457 | if test "$cross_compiling" = yes; then |
| 2458 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2459 | else |
| 2460 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2461 | #line 2462 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2462 | #include "confdefs.h" |
| 2463 | #include <stdio.h> |
| 2464 | main() |
| 2465 | { |
| 2466 | FILE *f=fopen("conftestval", "w"); |
| 2467 | if (!f) exit(1); |
| 2468 | fprintf(f, "%d\n", sizeof(short)); |
| 2469 | exit(0); |
| 2470 | } |
| 2471 | EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2472 | if { (eval echo configure:2473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2473 | then |
| 2474 | ac_cv_sizeof_short=`cat conftestval` |
| 2475 | else |
| 2476 | echo "configure: failed program was:" >&5 |
| 2477 | cat conftest.$ac_ext >&5 |
| 2478 | rm -fr conftest* |
| 2479 | ac_cv_sizeof_short=0 |
| 2480 | fi |
| 2481 | rm -fr conftest* |
| 2482 | fi |
| 2483 | |
| 2484 | fi |
| 2485 | echo "$ac_t""$ac_cv_sizeof_short" 1>&6 |
| 2486 | cat >> confdefs.h <<EOF |
| 2487 | #define SIZEOF_SHORT $ac_cv_sizeof_short |
| 2488 | EOF |
| 2489 | |
| 2490 | |
| 2491 | echo $ac_n "checking size of float""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2492 | echo "configure:2493: checking size of float" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2493 | if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2494 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2495 | else |
| 2496 | if test "$cross_compiling" = yes; then |
| 2497 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2498 | else |
| 2499 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2500 | #line 2501 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2501 | #include "confdefs.h" |
| 2502 | #include <stdio.h> |
| 2503 | main() |
| 2504 | { |
| 2505 | FILE *f=fopen("conftestval", "w"); |
| 2506 | if (!f) exit(1); |
| 2507 | fprintf(f, "%d\n", sizeof(float)); |
| 2508 | exit(0); |
| 2509 | } |
| 2510 | EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2511 | if { (eval echo configure:2512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2512 | then |
| 2513 | ac_cv_sizeof_float=`cat conftestval` |
| 2514 | else |
| 2515 | echo "configure: failed program was:" >&5 |
| 2516 | cat conftest.$ac_ext >&5 |
| 2517 | rm -fr conftest* |
| 2518 | ac_cv_sizeof_float=0 |
| 2519 | fi |
| 2520 | rm -fr conftest* |
| 2521 | fi |
| 2522 | |
| 2523 | fi |
| 2524 | echo "$ac_t""$ac_cv_sizeof_float" 1>&6 |
| 2525 | cat >> confdefs.h <<EOF |
| 2526 | #define SIZEOF_FLOAT $ac_cv_sizeof_float |
| 2527 | EOF |
| 2528 | |
| 2529 | |
| 2530 | echo $ac_n "checking size of double""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2531 | echo "configure:2532: checking size of double" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2532 | if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2533 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2534 | else |
| 2535 | if test "$cross_compiling" = yes; then |
| 2536 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2537 | else |
| 2538 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2539 | #line 2540 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2540 | #include "confdefs.h" |
| 2541 | #include <stdio.h> |
| 2542 | main() |
| 2543 | { |
| 2544 | FILE *f=fopen("conftestval", "w"); |
| 2545 | if (!f) exit(1); |
| 2546 | fprintf(f, "%d\n", sizeof(double)); |
| 2547 | exit(0); |
| 2548 | } |
| 2549 | EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2550 | if { (eval echo configure:2551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2551 | then |
| 2552 | ac_cv_sizeof_double=`cat conftestval` |
| 2553 | else |
| 2554 | echo "configure: failed program was:" >&5 |
| 2555 | cat conftest.$ac_ext >&5 |
| 2556 | rm -fr conftest* |
| 2557 | ac_cv_sizeof_double=0 |
| 2558 | fi |
| 2559 | rm -fr conftest* |
| 2560 | fi |
| 2561 | |
| 2562 | fi |
| 2563 | echo "$ac_t""$ac_cv_sizeof_double" 1>&6 |
| 2564 | cat >> confdefs.h <<EOF |
| 2565 | #define SIZEOF_DOUBLE $ac_cv_sizeof_double |
| 2566 | EOF |
| 2567 | |
| 2568 | |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2569 | echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2570 | echo "configure:2571: checking size of fpos_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2571 | if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2572 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2573 | else |
| 2574 | if test "$cross_compiling" = yes; then |
| 2575 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2576 | else |
| 2577 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2578 | #line 2579 "configure" |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2579 | #include "confdefs.h" |
| 2580 | #include <stdio.h> |
| 2581 | main() |
| 2582 | { |
| 2583 | FILE *f=fopen("conftestval", "w"); |
| 2584 | if (!f) exit(1); |
| 2585 | fprintf(f, "%d\n", sizeof(fpos_t)); |
| 2586 | exit(0); |
| 2587 | } |
| 2588 | EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2589 | if { (eval echo configure:2590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2590 | then |
| 2591 | ac_cv_sizeof_fpos_t=`cat conftestval` |
| 2592 | else |
| 2593 | echo "configure: failed program was:" >&5 |
| 2594 | cat conftest.$ac_ext >&5 |
| 2595 | rm -fr conftest* |
| 2596 | ac_cv_sizeof_fpos_t=0 |
| 2597 | fi |
| 2598 | rm -fr conftest* |
| 2599 | fi |
| 2600 | |
| 2601 | fi |
| 2602 | echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6 |
| 2603 | cat >> confdefs.h <<EOF |
| 2604 | #define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t |
| 2605 | EOF |
| 2606 | |
| 2607 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2608 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2609 | echo $ac_n "checking for long long support""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2610 | echo "configure:2611: checking for long long support" >&5 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2611 | have_long_long=no |
| 2612 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2613 | #line 2614 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2614 | #include "confdefs.h" |
| 2615 | |
| 2616 | int main() { |
| 2617 | long long x; x = (long long)0; |
| 2618 | ; return 0; } |
| 2619 | EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2620 | if { (eval echo configure:2621: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2621 | rm -rf conftest* |
| 2622 | cat >> confdefs.h <<\EOF |
| 2623 | #define HAVE_LONG_LONG 1 |
| 2624 | EOF |
| 2625 | have_long_long=yes |
| 2626 | else |
| 2627 | echo "configure: failed program was:" >&5 |
| 2628 | cat conftest.$ac_ext >&5 |
| 2629 | fi |
| 2630 | rm -f conftest* |
| 2631 | echo "$ac_t""$have_long_long" 1>&6 |
Guido van Rossum | 96f2eb9 | 1999-04-10 16:02:18 +0000 | [diff] [blame] | 2632 | if test "$have_long_long" = yes ; then |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2633 | echo $ac_n "checking size of long long""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2634 | echo "configure:2635: checking size of long long" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2635 | if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2636 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2637 | else |
| 2638 | if test "$cross_compiling" = yes; then |
| 2639 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2640 | else |
| 2641 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2642 | #line 2643 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2643 | #include "confdefs.h" |
| 2644 | #include <stdio.h> |
| 2645 | main() |
| 2646 | { |
| 2647 | FILE *f=fopen("conftestval", "w"); |
| 2648 | if (!f) exit(1); |
| 2649 | fprintf(f, "%d\n", sizeof(long long)); |
| 2650 | exit(0); |
| 2651 | } |
| 2652 | EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2653 | if { (eval echo configure:2654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2654 | then |
| 2655 | ac_cv_sizeof_long_long=`cat conftestval` |
| 2656 | else |
| 2657 | echo "configure: failed program was:" >&5 |
| 2658 | cat conftest.$ac_ext >&5 |
| 2659 | rm -fr conftest* |
| 2660 | ac_cv_sizeof_long_long=0 |
| 2661 | fi |
| 2662 | rm -fr conftest* |
| 2663 | fi |
| 2664 | |
| 2665 | fi |
| 2666 | echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 |
| 2667 | cat >> confdefs.h <<EOF |
| 2668 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long |
| 2669 | EOF |
| 2670 | |
| 2671 | |
| 2672 | fi |
| 2673 | |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2674 | echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2675 | echo "configure:2676: checking for uintptr_t support" >&5 |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2676 | have_uintptr_t=no |
| 2677 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2678 | #line 2679 "configure" |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2679 | #include "confdefs.h" |
| 2680 | |
| 2681 | int main() { |
| 2682 | uintptr_t x; x = (uintptr_t)0; |
| 2683 | ; return 0; } |
| 2684 | EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2685 | if { (eval echo configure:2686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2686 | rm -rf conftest* |
| 2687 | cat >> confdefs.h <<\EOF |
| 2688 | #define HAVE_UINTPTR_T 1 |
| 2689 | EOF |
| 2690 | have_uintptr_t=yes |
| 2691 | else |
| 2692 | echo "configure: failed program was:" >&5 |
| 2693 | cat conftest.$ac_ext >&5 |
| 2694 | fi |
| 2695 | rm -f conftest* |
| 2696 | echo "$ac_t""$have_uintptr_t" 1>&6 |
| 2697 | if test "$have_uintptr_t" = yes ; then |
| 2698 | echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2699 | echo "configure:2700: checking size of uintptr_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2700 | if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2701 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2702 | else |
| 2703 | if test "$cross_compiling" = yes; then |
| 2704 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2705 | else |
| 2706 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2707 | #line 2708 "configure" |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2708 | #include "confdefs.h" |
| 2709 | #include <stdio.h> |
| 2710 | main() |
| 2711 | { |
| 2712 | FILE *f=fopen("conftestval", "w"); |
| 2713 | if (!f) exit(1); |
| 2714 | fprintf(f, "%d\n", sizeof(uintptr_t)); |
| 2715 | exit(0); |
| 2716 | } |
| 2717 | EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2718 | if { (eval echo configure:2719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2719 | then |
| 2720 | ac_cv_sizeof_uintptr_t=`cat conftestval` |
| 2721 | else |
| 2722 | echo "configure: failed program was:" >&5 |
| 2723 | cat conftest.$ac_ext >&5 |
| 2724 | rm -fr conftest* |
| 2725 | ac_cv_sizeof_uintptr_t=0 |
| 2726 | fi |
| 2727 | rm -fr conftest* |
| 2728 | fi |
| 2729 | |
| 2730 | fi |
| 2731 | echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6 |
| 2732 | cat >> confdefs.h <<EOF |
| 2733 | #define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t |
| 2734 | EOF |
| 2735 | |
| 2736 | |
| 2737 | fi |
| 2738 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2739 | # Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>. |
| 2740 | echo $ac_n "checking size of off_t""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2741 | echo "configure:2742: checking size of off_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2742 | if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2743 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2744 | else |
| 2745 | if test "$cross_compiling" = yes; then |
| 2746 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2747 | else |
| 2748 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2749 | #line 2750 "configure" |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2750 | #include "confdefs.h" |
| 2751 | #include <stdio.h> |
| 2752 | #include <sys/types.h> |
| 2753 | main() |
| 2754 | { |
| 2755 | FILE *f=fopen("conftestval", "w"); |
| 2756 | if (!f) exit(1); |
| 2757 | fprintf(f, "%d\n", sizeof(off_t)); |
| 2758 | exit(0); |
| 2759 | } |
| 2760 | EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2761 | if { (eval echo configure:2762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2762 | then |
| 2763 | ac_cv_sizeof_off_t=`cat conftestval` |
| 2764 | else |
| 2765 | echo "configure: failed program was:" >&5 |
| 2766 | cat conftest.$ac_ext >&5 |
| 2767 | rm -fr conftest* |
| 2768 | ac_cv_sizeof_off_t=0 |
| 2769 | fi |
| 2770 | rm -fr conftest* |
| 2771 | fi |
| 2772 | |
| 2773 | |
| 2774 | fi |
| 2775 | |
| 2776 | echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6 |
| 2777 | cat >> confdefs.h <<EOF |
| 2778 | #define SIZEOF_OFF_T $ac_cv_sizeof_off_t |
| 2779 | EOF |
| 2780 | |
| 2781 | |
| 2782 | echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2783 | echo "configure:2784: checking whether to enable large file support" >&5 |
Guido van Rossum | 96f2eb9 | 1999-04-10 16:02:18 +0000 | [diff] [blame] | 2784 | if test "$have_long_long" = yes -a \ |
| 2785 | "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \ |
| 2786 | "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2787 | cat >> confdefs.h <<\EOF |
| 2788 | #define HAVE_LARGEFILE_SUPPORT 1 |
| 2789 | EOF |
| 2790 | |
| 2791 | echo "$ac_t""yes" 1>&6 |
| 2792 | else |
| 2793 | echo "$ac_t""no" 1>&6 |
| 2794 | fi |
| 2795 | |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2796 | # AC_CHECK_SIZEOF() doesn't include <time.h>. |
| 2797 | echo $ac_n "checking size of time_t""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2798 | echo "configure:2799: checking size of time_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2799 | if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2800 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2801 | else |
| 2802 | if test "$cross_compiling" = yes; then |
| 2803 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2804 | else |
| 2805 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2806 | #line 2807 "configure" |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2807 | #include "confdefs.h" |
| 2808 | #include <stdio.h> |
| 2809 | #include <time.h> |
| 2810 | main() |
| 2811 | { |
| 2812 | FILE *f=fopen("conftestval", "w"); |
| 2813 | if (!f) exit(1); |
| 2814 | fprintf(f, "%d\n", sizeof(time_t)); |
| 2815 | exit(0); |
| 2816 | } |
| 2817 | EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2818 | if { (eval echo configure:2819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2819 | then |
| 2820 | ac_cv_sizeof_time_t=`cat conftestval` |
| 2821 | else |
| 2822 | echo "configure: failed program was:" >&5 |
| 2823 | cat conftest.$ac_ext >&5 |
| 2824 | rm -fr conftest* |
| 2825 | ac_cv_sizeof_time_t=0 |
| 2826 | fi |
| 2827 | rm -fr conftest* |
| 2828 | fi |
| 2829 | |
| 2830 | |
| 2831 | fi |
| 2832 | |
| 2833 | echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6 |
| 2834 | cat >> confdefs.h <<EOF |
| 2835 | #define SIZEOF_TIME_T $ac_cv_sizeof_time_t |
| 2836 | EOF |
| 2837 | |
| 2838 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2839 | |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2840 | # if have pthread_t then define SIZEOF_PTHREAD_T |
Martin v. Löwis | 123cbd2 | 2001-07-19 14:21:10 +0000 | [diff] [blame] | 2841 | ac_save_cc="$CC" |
| 2842 | if test "$ac_cv_kpthread" = "yes" |
| 2843 | then CC="$CC -Kpthread" |
| 2844 | fi |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2845 | echo $ac_n "checking for pthread_t""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2846 | echo "configure:2847: checking for pthread_t" >&5 |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2847 | have_pthread_t=no |
| 2848 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2849 | #line 2850 "configure" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2850 | #include "confdefs.h" |
| 2851 | #include <pthread.h> |
| 2852 | int main() { |
Guido van Rossum | 1258049 | 2000-09-24 16:47:19 +0000 | [diff] [blame] | 2853 | pthread_t x; x = *(pthread_t*)0; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2854 | ; return 0; } |
| 2855 | EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2856 | if { (eval echo configure:2857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2857 | rm -rf conftest* |
| 2858 | have_pthread_t=yes |
| 2859 | else |
| 2860 | echo "configure: failed program was:" >&5 |
| 2861 | cat conftest.$ac_ext >&5 |
| 2862 | fi |
| 2863 | rm -f conftest* |
| 2864 | echo "$ac_t""$have_pthread_t" 1>&6 |
| 2865 | if test "$have_pthread_t" = yes ; then |
| 2866 | # AC_CHECK_SIZEOF() doesn't include <pthread.h>. |
| 2867 | echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2868 | echo "configure:2869: checking size of pthread_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2869 | if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2870 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2871 | else |
| 2872 | if test "$cross_compiling" = yes; then |
| 2873 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2874 | else |
| 2875 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2876 | #line 2877 "configure" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2877 | #include "confdefs.h" |
| 2878 | #include <stdio.h> |
| 2879 | #include <pthread.h> |
| 2880 | main() |
| 2881 | { |
| 2882 | FILE *f=fopen("conftestval", "w"); |
| 2883 | if (!f) exit(1); |
| 2884 | fprintf(f, "%d\n", sizeof(pthread_t)); |
| 2885 | exit(0); |
| 2886 | } |
| 2887 | EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2888 | if { (eval echo configure:2889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2889 | then |
| 2890 | ac_cv_sizeof_pthread_t=`cat conftestval` |
| 2891 | else |
| 2892 | echo "configure: failed program was:" >&5 |
| 2893 | cat conftest.$ac_ext >&5 |
| 2894 | rm -fr conftest* |
| 2895 | ac_cv_sizeof_pthread_t=0 |
| 2896 | fi |
| 2897 | rm -fr conftest* |
| 2898 | fi |
| 2899 | |
| 2900 | |
| 2901 | fi |
| 2902 | |
| 2903 | echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6 |
| 2904 | cat >> confdefs.h <<EOF |
| 2905 | #define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t |
| 2906 | EOF |
| 2907 | |
| 2908 | fi |
Martin v. Löwis | 123cbd2 | 2001-07-19 14:21:10 +0000 | [diff] [blame] | 2909 | CC="$ac_save_cc" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2910 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2911 | echo $ac_n "checking for --enable-toolbox-glue""... $ac_c" 1>&6 |
| 2912 | echo "configure:2913: checking for --enable-toolbox-glue" >&5 |
| 2913 | # Check whether --enable-toolbox-glue or --disable-toolbox-glue was given. |
| 2914 | if test "${enable_toolbox_glue+set}" = set; then |
| 2915 | enableval="$enable_toolbox_glue" |
| 2916 | : |
| 2917 | fi |
| 2918 | |
| 2919 | |
| 2920 | if test -z "$enable_toolbox_glue" |
| 2921 | then |
| 2922 | case $ac_sys_system/$ac_sys_release in |
| 2923 | Darwin/*) |
| 2924 | enable_toolbox_glue="yes";; |
| 2925 | *) |
| 2926 | enable_toolbox_glue="no";; |
| 2927 | esac |
| 2928 | fi |
| 2929 | case "$enable_toolbox_glue" in |
| 2930 | yes) |
| 2931 | extra_frameworks="-framework Carbon -framework Foundation" |
| 2932 | extra_machdep_objs="Python/mactoolboxglue.o" |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 2933 | extra_undefs="-u __dummy -u _PyMac_Error" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2934 | cat >> confdefs.h <<\EOF |
| 2935 | #define USE_TOOLBOX_OBJECT_GLUE 1 |
| 2936 | EOF |
| 2937 | |
| 2938 | ;; |
| 2939 | *) |
| 2940 | extra_frameworks="" |
| 2941 | extra_machdep_objs="" |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 2942 | extra_undefs="" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2943 | ;; |
| 2944 | esac |
| 2945 | echo "$ac_t""$enable_toolbox_glue" 1>&6 |
| 2946 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2947 | |
| 2948 | case $ac_sys_system/$ac_sys_release in |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 2949 | Darwin/*) |
| 2950 | ns_undef_sym='_environ' |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2951 | LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym" |
| 2952 | LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks" |
| 2953 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python' |
| 2954 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2955 | esac |
| 2956 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2957 | echo $ac_n "checking for --enable-framework""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 2958 | echo "configure:2959: checking for --enable-framework" >&5 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2959 | if test "$enable_framework" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2960 | then |
Jack Jansen | ca06bc6 | 2001-08-03 15:32:23 +0000 | [diff] [blame] | 2961 | OPT="$OPT -fno-common -dynamic" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2962 | # -U __environ is needed since bundles don't have access |
| 2963 | # to crt0 when built but will always be linked against it |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2964 | # -F. is needed to allow linking to the framework while |
| 2965 | # in the build location. |
| 2966 | |
| 2967 | LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2968 | cat >> confdefs.h <<\EOF |
| 2969 | #define WITH_NEXT_FRAMEWORK 1 |
| 2970 | EOF |
| 2971 | |
| 2972 | echo "$ac_t""yes" 1>&6 |
| 2973 | else |
| 2974 | echo "$ac_t""no" 1>&6 |
| 2975 | fi |
| 2976 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2977 | echo $ac_n "checking for dyld""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 2978 | echo "configure:2979: checking for dyld" >&5 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2979 | case $ac_sys_system/$ac_sys_release in |
| 2980 | Darwin/*) |
| 2981 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2982 | #define WITH_DYLD 1 |
| 2983 | EOF |
| 2984 | |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2985 | echo "$ac_t""always on for Darwin" 1>&6 |
| 2986 | ;; |
| 2987 | *) |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2988 | echo "$ac_t""no" 1>&6 |
| 2989 | ;; |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2990 | esac |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2991 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2992 | # Set info about shared libraries. |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2993 | |
| 2994 | |
| 2995 | |
| 2996 | |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 2997 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2998 | # SO is the extension of shared libraries `(including the dot!) |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 2999 | # -- usually .so, .sl on HP-UX, .dll on Cygwin |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3000 | echo $ac_n "checking SO""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3001 | echo "configure:3002: checking SO" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3002 | if test -z "$SO" |
| 3003 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3004 | case $ac_sys_system in |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 3005 | hp*|HP*) SO=.sl;; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3006 | CYGWIN*) SO=.dll;; |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 3007 | *) SO=.so;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3008 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3009 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3010 | echo "$ac_t""$SO" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3011 | # LDSHARED is the ld *command* used to create shared library |
| 3012 | # -- "ld" on SunOS 4.x.x, "ld -G" on SunOS 5.x, "ld -shared" on IRIX 5 |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3013 | # (Shared libraries in this instance are shared modules to be loaded into |
| 3014 | # Python, as opposed to building Python itself as a shared library.) |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3015 | echo $ac_n "checking LDSHARED""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3016 | echo "configure:3017: checking LDSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3017 | if test -z "$LDSHARED" |
| 3018 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3019 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3020 | AIX*) |
| 3021 | BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp" |
| 3022 | LDSHARED="\$(BINLIBDEST)/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/python.exp" |
| 3023 | ;; |
| 3024 | BeOS*) |
| 3025 | BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY" |
| 3026 | LDSHARED="\$(BINLIBDEST)/ld_so_beos \$(LIBDIR)/$LDLIBRARY" |
| 3027 | ;; |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3028 | IRIX/5*) LDSHARED="ld -shared";; |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 3029 | IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3030 | SunOS/4*) LDSHARED="ld";; |
Greg Ward | 57c9a66 | 2000-05-26 12:22:54 +0000 | [diff] [blame] | 3031 | SunOS/5*) |
| 3032 | if test "$GCC" = "yes" |
Neil Schemenauer | 8ba9445 | 2001-02-19 18:18:48 +0000 | [diff] [blame] | 3033 | then LDSHARED='$(CC) -shared' |
Greg Ward | 57c9a66 | 2000-05-26 12:22:54 +0000 | [diff] [blame] | 3034 | else LDSHARED="ld -G"; |
| 3035 | fi ;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3036 | hp*|HP*) LDSHARED="ld -b";; |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 3037 | OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";; |
| 3038 | DYNIX/ptx*) LDSHARED="ld -G";; |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3039 | Darwin/*) |
| 3040 | LDSHARED='$(CC) $(LDFLAGS) -bundle' |
| 3041 | if test "$enable_framework" ; then |
| 3042 | # Link against the framework. All externals should be defined. |
| 3043 | LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)' |
| 3044 | else |
| 3045 | # No framework. Ignore undefined symbols, assuming they come from Python |
| 3046 | LDSHARED="$LDSHARED -undefined suppress" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3047 | fi ;; |
Guido van Rossum | 81652ab | 1996-07-21 02:53:27 +0000 | [diff] [blame] | 3048 | Linux*) LDSHARED="gcc -shared";; |
Guido van Rossum | 3c4bb80 | 1997-12-18 23:55:32 +0000 | [diff] [blame] | 3049 | dgux*) LDSHARED="ld -G";; |
Guido van Rossum | 458e7fa | 1999-09-17 15:40:40 +0000 | [diff] [blame] | 3050 | BSD/OS*/4*) LDSHARED="gcc -shared";; |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 3051 | OpenBSD*) LDSHARED="ld -Bshareable";; |
Guido van Rossum | df69365 | 1999-01-07 21:50:41 +0000 | [diff] [blame] | 3052 | NetBSD*) |
| 3053 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
| 3054 | then |
| 3055 | LDSHARED="cc -shared" |
| 3056 | else |
| 3057 | LDSHARED="ld -Bshareable" |
| 3058 | fi;; |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 3059 | FreeBSD*) |
Jeremy Hylton | 4bcc7c5 | 2000-08-31 17:45:35 +0000 | [diff] [blame] | 3060 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 3061 | then |
| 3062 | LDSHARED="cc -shared ${LDFLAGS}" |
| 3063 | else |
| 3064 | LDSHARED="ld -Bshareable ${LDFLAGS}" |
| 3065 | fi;; |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3066 | UnixWare*) |
| 3067 | if test "$GCC" = "yes" |
| 3068 | then LDSHARED="$(CC) -shared" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3069 | else LDSHARED="$(CC) -G" |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3070 | fi;; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3071 | SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3072 | Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3073 | CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3074 | *) LDSHARED="ld";; |
| 3075 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3076 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3077 | echo "$ac_t""$LDSHARED" 1>&6 |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3078 | BLDSHARED=${BLDSHARED-$LDSHARED} |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3079 | # 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] | 3080 | # library (module) -- this is only needed for a few systems |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3081 | echo $ac_n "checking CCSHARED""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3082 | echo "configure:3083: checking CCSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3083 | if test -z "$CCSHARED" |
| 3084 | then |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3085 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | c761fc8 | 2001-02-19 04:50:49 +0000 | [diff] [blame] | 3086 | SunOS*) if test "$GCC" = yes; |
| 3087 | then CCSHARED="-fPIC"; |
| 3088 | fi;; |
Guido van Rossum | af07a44 | 1995-02-13 19:45:27 +0000 | [diff] [blame] | 3089 | hp*|HP*) if test "$GCC" = yes; |
| 3090 | then CCSHARED="-fpic"; |
| 3091 | else CCSHARED="+z"; |
| 3092 | fi;; |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3093 | Linux*) CCSHARED="-fPIC";; |
Guido van Rossum | f5957ea | 1999-10-05 21:59:33 +0000 | [diff] [blame] | 3094 | BSD/OS*/4*) CCSHARED="-fpic";; |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 3095 | OpenBSD*) CCSHARED="-fpic";; |
| 3096 | FreeBSD*|NetBSD*) CCSHARED="-fPIC";; |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3097 | UnixWare*) |
| 3098 | if test "$GCC" = "yes" |
| 3099 | then CCSHARED="-fPIC" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3100 | else CCSHARED="-KPIC" |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3101 | fi;; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3102 | SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3103 | Monterey*) CCSHARED="-G";; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3104 | IRIX*/6*) case $CC in |
| 3105 | *gcc*) CCSHARED="-shared";; |
Guido van Rossum | ee21f41 | 1998-04-20 18:51:54 +0000 | [diff] [blame] | 3106 | *) CCSHARED="";; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3107 | esac;; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3108 | CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3109 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3110 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3111 | echo "$ac_t""$CCSHARED" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3112 | # LINKFORSHARED are the flags passed to the $(CC) command that links |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3113 | # the python executable -- this is only needed for a few systems |
| 3114 | echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3115 | echo "configure:3116: checking LINKFORSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3116 | if test -z "$LINKFORSHARED" |
| 3117 | then |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3118 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3119 | AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';; |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 3120 | hp*|HP*) |
Guido van Rossum | 304dd2d | 1997-10-20 23:10:56 +0000 | [diff] [blame] | 3121 | LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";; |
Guido van Rossum | f5957ea | 1999-10-05 21:59:33 +0000 | [diff] [blame] | 3122 | BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";; |
Guido van Rossum | 2d9feed | 1997-11-24 17:36:21 +0000 | [diff] [blame] | 3123 | Linux*) LINKFORSHARED="-Xlinker -export-dynamic";; |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3124 | # -u libsys_s pulls in all symbols in libsys |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3125 | Darwin/*) |
| 3126 | # -u __dummy makes the linker aware of the objc runtime |
| 3127 | # in System.framework; otherwise, __objcInit (referenced in |
| 3128 | # crt1.o) gets erroneously defined as common, which breaks dynamic |
| 3129 | # loading of any modules which reference it in System.framework. |
| 3130 | # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is |
| 3131 | # not used by the core itself but which needs to be in the core so |
| 3132 | # that dynamically loaded extension modules have access to it. |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3133 | LINKFORSHARED="$extra_undefs -framework System" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3134 | if test "$enable_framework" |
| 3135 | then |
| 3136 | LINKFORSHARED="$LINKFORSHARED -framework Python" |
| 3137 | fi |
| 3138 | LINKFORSHARED="$LINKFORSHARED $extra_frameworks";; |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3139 | UnixWare*) LINKFORSHARED="-Wl,-Bexport";; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3140 | SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";; |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3141 | ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";; |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 3142 | FreeBSD*|NetBSD*) |
Guido van Rossum | df69365 | 1999-01-07 21:50:41 +0000 | [diff] [blame] | 3143 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
| 3144 | then |
| 3145 | LINKFORSHARED="-Wl,--export-dynamic" |
| 3146 | fi;; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3147 | SunOS/5*) case $CC in |
| 3148 | *gcc*) |
Guido van Rossum | ff48418 | 2000-02-03 13:50:24 +0000 | [diff] [blame] | 3149 | if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null |
Guido van Rossum | 8f4ceb1 | 1997-12-18 23:42:19 +0000 | [diff] [blame] | 3150 | then |
| 3151 | LINKFORSHARED="-Xlinker --export-dynamic" |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3152 | fi;; |
| 3153 | esac;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3154 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3155 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3156 | echo "$ac_t""$LINKFORSHARED" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3157 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3158 | |
| 3159 | echo $ac_n "checking CFLAGSFORSHARED""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3160 | echo "configure:3161: checking CFLAGSFORSHARED" >&5 |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3161 | if test ! "$LIBRARY" = "$LDLIBRARY" |
| 3162 | then |
Neil Schemenauer | 0c6141f | 2001-01-27 21:40:54 +0000 | [diff] [blame] | 3163 | case $ac_sys_system in |
| 3164 | CYGWIN*) |
| 3165 | # Cygwin needs CCSHARED when building extension DLLs |
| 3166 | # but not when building the interpreter DLL. |
| 3167 | CFLAGSFORSHARED='';; |
| 3168 | *) |
| 3169 | CFLAGSFORSHARED='$(CCSHARED)' |
| 3170 | esac |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3171 | fi |
| 3172 | echo "$ac_t""$CFLAGSFORSHARED" 1>&6 |
| 3173 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3174 | # checks for libraries |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3175 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3176 | echo "configure:3177: checking for dlopen in -ldl" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3177 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3178 | 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] | 3179 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3180 | else |
| 3181 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3182 | LIBS="-ldl $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3183 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3184 | #line 3185 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3185 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3186 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3187 | /* We use char because int might match the return type of a gcc2 |
| 3188 | builtin and then its argument prototype would still apply. */ |
| 3189 | char dlopen(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3190 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3191 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3192 | dlopen() |
| 3193 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3194 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3195 | if { (eval echo configure:3196: \"$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] | 3196 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3197 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3198 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3199 | echo "configure: failed program was:" >&5 |
| 3200 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3201 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3202 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3203 | fi |
| 3204 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3205 | LIBS="$ac_save_LIBS" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3206 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3207 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3208 | 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] | 3209 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3210 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 3211 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3212 | cat >> confdefs.h <<EOF |
| 3213 | #define $ac_tr_lib 1 |
| 3214 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3215 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3216 | LIBS="-ldl $LIBS" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3217 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3218 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3219 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3220 | fi |
| 3221 | # Dynamic linking for SunOS/Solaris and SYSV |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3222 | echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3223 | echo "configure:3224: checking for shl_load in -ldld" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3224 | ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3225 | 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] | 3226 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3227 | else |
| 3228 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3229 | LIBS="-ldld $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3230 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3231 | #line 3232 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3232 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3233 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3234 | /* We use char because int might match the return type of a gcc2 |
| 3235 | builtin and then its argument prototype would still apply. */ |
| 3236 | char shl_load(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3237 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3238 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3239 | shl_load() |
| 3240 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3241 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3242 | if { (eval echo configure:3243: \"$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] | 3243 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3244 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3245 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3246 | echo "configure: failed program was:" >&5 |
| 3247 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3248 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3249 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3250 | fi |
| 3251 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3252 | LIBS="$ac_save_LIBS" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3253 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3254 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3255 | 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] | 3256 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3257 | ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 3258 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3259 | cat >> confdefs.h <<EOF |
| 3260 | #define $ac_tr_lib 1 |
| 3261 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3262 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3263 | LIBS="-ldld $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3264 | |
| 3265 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3266 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3267 | fi |
| 3268 | # Dynamic linking for HP-UX |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3269 | |
| 3270 | # checks for system dependent C++ extensions support |
| 3271 | case "$ac_sys_system" in |
| 3272 | AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3273 | echo "configure:3274: checking for genuine AIX C++ extensions support" >&5 |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3274 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3275 | #line 3276 "configure" |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3276 | #include "confdefs.h" |
| 3277 | #include "/usr/lpp/xlC/include/load.h" |
| 3278 | int main() { |
| 3279 | loadAndInit("", 0, "") |
| 3280 | ; return 0; } |
| 3281 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3282 | if { (eval echo configure:3283: \"$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] | 3283 | rm -rf conftest* |
| 3284 | cat >> confdefs.h <<\EOF |
| 3285 | #define AIX_GENUINE_CPLUSPLUS 1 |
| 3286 | EOF |
| 3287 | |
| 3288 | echo "$ac_t""yes" 1>&6 |
| 3289 | else |
| 3290 | echo "configure: failed program was:" >&5 |
| 3291 | cat conftest.$ac_ext >&5 |
| 3292 | rm -rf conftest* |
| 3293 | echo "$ac_t""no" 1>&6 |
| 3294 | fi |
| 3295 | rm -f conftest*;; |
| 3296 | *) ;; |
| 3297 | esac |
| 3298 | |
Guido van Rossum | 70c7f48 | 1998-03-26 18:44:10 +0000 | [diff] [blame] | 3299 | # Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl. |
| 3300 | # However on SGI IRIX, these exist but are broken. |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3301 | # BeOS' sockets are stashed in libnet. |
| 3302 | case "$ac_sys_system" in |
| 3303 | IRIX*) ;; |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3304 | *) |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3305 | echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3306 | echo "configure:3307: checking for t_open in -lnsl" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3307 | ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3308 | 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] | 3309 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3310 | else |
| 3311 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3312 | LIBS="-lnsl $LIBS" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3313 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3314 | #line 3315 "configure" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3315 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3316 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3317 | /* We use char because int might match the return type of a gcc2 |
| 3318 | builtin and then its argument prototype would still apply. */ |
| 3319 | char t_open(); |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3320 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3321 | int main() { |
Guido van Rossum | 0ddb028 | 1995-01-17 16:46:14 +0000 | [diff] [blame] | 3322 | t_open() |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3323 | ; return 0; } |
| 3324 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3325 | if { (eval echo configure:3326: \"$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] | 3326 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3327 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3328 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3329 | echo "configure: failed program was:" >&5 |
| 3330 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3331 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3332 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3333 | fi |
| 3334 | rm -f conftest* |
| 3335 | LIBS="$ac_save_LIBS" |
| 3336 | |
| 3337 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3338 | 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] | 3339 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3340 | LIBS="-lnsl $LIBS" |
| 3341 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3342 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3343 | fi |
Guido van Rossum | 0ddb028 | 1995-01-17 16:46:14 +0000 | [diff] [blame] | 3344 | # SVR4 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3345 | echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3346 | echo "configure:3347: checking for socket in -lsocket" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3347 | ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3348 | 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] | 3349 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3350 | else |
| 3351 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3352 | LIBS="-lsocket $LIBS $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3353 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3354 | #line 3355 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3355 | #include "confdefs.h" |
| 3356 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3357 | /* We use char because int might match the return type of a gcc2 |
| 3358 | builtin and then its argument prototype would still apply. */ |
| 3359 | char socket(); |
| 3360 | |
| 3361 | int main() { |
| 3362 | socket() |
| 3363 | ; return 0; } |
| 3364 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3365 | if { (eval echo configure:3366: \"$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] | 3366 | rm -rf conftest* |
| 3367 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3368 | else |
| 3369 | echo "configure: failed program was:" >&5 |
| 3370 | cat conftest.$ac_ext >&5 |
| 3371 | rm -rf conftest* |
| 3372 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3373 | fi |
| 3374 | rm -f conftest* |
| 3375 | LIBS="$ac_save_LIBS" |
| 3376 | |
| 3377 | fi |
| 3378 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3379 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3380 | LIBS="-lsocket $LIBS" |
| 3381 | else |
| 3382 | echo "$ac_t""no" 1>&6 |
| 3383 | fi |
| 3384 | # SVR4 sockets |
Jeremy Hylton | cb25d5e | 2000-07-27 21:23:28 +0000 | [diff] [blame] | 3385 | ;; |
| 3386 | esac |
| 3387 | case "$ac_sys_system" in |
| 3388 | BeOS*) |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3389 | echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3390 | echo "configure:3391: checking for socket in -lnet" >&5 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3391 | ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3392 | 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] | 3393 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3394 | else |
| 3395 | ac_save_LIBS="$LIBS" |
| 3396 | LIBS="-lnet $LIBS $LIBS" |
| 3397 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3398 | #line 3399 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3399 | #include "confdefs.h" |
| 3400 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3401 | /* We use char because int might match the return type of a gcc2 |
| 3402 | builtin and then its argument prototype would still apply. */ |
| 3403 | char socket(); |
| 3404 | |
| 3405 | int main() { |
| 3406 | socket() |
| 3407 | ; return 0; } |
| 3408 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3409 | if { (eval echo configure:3410: \"$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] | 3410 | rm -rf conftest* |
| 3411 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3412 | else |
| 3413 | echo "configure: failed program was:" >&5 |
| 3414 | cat conftest.$ac_ext >&5 |
| 3415 | rm -rf conftest* |
| 3416 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3417 | fi |
| 3418 | rm -f conftest* |
| 3419 | LIBS="$ac_save_LIBS" |
| 3420 | |
| 3421 | fi |
| 3422 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3423 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3424 | LIBS="-lnet $LIBS" |
| 3425 | else |
| 3426 | echo "$ac_t""no" 1>&6 |
| 3427 | fi |
| 3428 | # BeOS |
| 3429 | ;; |
| 3430 | esac |
Guido van Rossum | 70c7f48 | 1998-03-26 18:44:10 +0000 | [diff] [blame] | 3431 | |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 3432 | echo $ac_n "checking for --with-libs""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3433 | echo "configure:3434: checking for --with-libs" >&5 |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 3434 | # Check whether --with-libs or --without-libs was given. |
| 3435 | if test "${with_libs+set}" = set; then |
| 3436 | withval="$with_libs" |
| 3437 | |
| 3438 | echo "$ac_t""$withval" 1>&6 |
| 3439 | LIBS="$withval $LIBS" |
| 3440 | |
| 3441 | else |
| 3442 | echo "$ac_t""no" 1>&6 |
| 3443 | fi |
| 3444 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3445 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 3446 | # Determine if signalmodule should be used. |
| 3447 | |
| 3448 | |
| 3449 | echo $ac_n "checking for --with-signal-module""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3450 | echo "configure:3451: checking for --with-signal-module" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 3451 | # Check whether --with-signal-module or --without-signal-module was given. |
| 3452 | if test "${with_signal_module+set}" = set; then |
| 3453 | withval="$with_signal_module" |
| 3454 | : |
| 3455 | fi |
| 3456 | |
| 3457 | |
| 3458 | if test -z "$with_signal_module" |
| 3459 | then with_signal_module="yes" |
| 3460 | fi |
| 3461 | echo "$ac_t""$with_signal_module" 1>&6 |
| 3462 | |
| 3463 | if test "${with_signal_module}" = "yes"; then |
| 3464 | USE_SIGNAL_MODULE="" |
| 3465 | SIGNAL_OBJS="" |
| 3466 | else |
| 3467 | USE_SIGNAL_MODULE="#" |
| 3468 | SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o" |
| 3469 | fi |
| 3470 | |
Guido van Rossum | 3d15bd8 | 2001-01-10 18:53:48 +0000 | [diff] [blame] | 3471 | # This is used to generate Setup.config |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 3472 | |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3473 | USE_THREAD_MODULE="" |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 3474 | |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3475 | echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3476 | echo "configure:3477: checking for --with-dec-threads" >&5 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3477 | |
| 3478 | # Check whether --with-dec-threads or --without-dec-threads was given. |
| 3479 | if test "${with_dec_threads+set}" = set; then |
| 3480 | withval="$with_dec_threads" |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3481 | |
| 3482 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3483 | LDLAST=-threads |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3484 | if test "${with_thread+set}" != set; then |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3485 | with_thread="$withval"; |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3486 | fi |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3487 | else |
| 3488 | echo "$ac_t""no" 1>&6 |
| 3489 | fi |
| 3490 | |
| 3491 | |
| 3492 | echo $ac_n "checking for --with-threads""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3493 | echo "configure:3494: checking for --with-threads" >&5 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3494 | # Check whether --with-threads or --without-threads was given. |
| 3495 | if test "${with_threads+set}" = set; then |
| 3496 | withval="$with_threads" |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3497 | : |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3498 | fi |
| 3499 | |
| 3500 | |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3501 | # --with-thread is deprecated, but check for it anyway |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3502 | # Check whether --with-thread or --without-thread was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3503 | if test "${with_thread+set}" = set; then |
| 3504 | withval="$with_thread" |
Barry Warsaw | a0f3c5c | 2000-06-30 16:39:35 +0000 | [diff] [blame] | 3505 | |
| 3506 | with_threads=$with_thread |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3507 | fi |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3508 | |
| 3509 | |
| 3510 | if test -z "$with_threads" |
| 3511 | then with_threads="yes" |
| 3512 | fi |
| 3513 | echo "$ac_t""$with_threads" 1>&6 |
| 3514 | |
| 3515 | if test "$with_threads" = "no" |
| 3516 | then |
| 3517 | USE_THREAD_MODULE="#" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3518 | elif test "$ac_cv_kpthread" = "yes" |
| 3519 | then |
| 3520 | CC="$CC -Kpthread" |
| 3521 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 3522 | #define WITH_THREAD 1 |
| 3523 | EOF |
| 3524 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3525 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 3526 | #define _POSIX_THREADS 1 |
| 3527 | EOF |
| 3528 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3529 | LIBOBJS="$LIBOBJS thread.o" |
| 3530 | else |
| 3531 | if test ! -z "$with_threads" -a -d "$with_threads" |
| 3532 | then LDFLAGS="$LDFLAGS -L$with_threads" |
| 3533 | fi |
| 3534 | if test ! -z "$withval" -a -d "$withval" |
| 3535 | then LDFLAGS="$LDFLAGS -L$withval" |
| 3536 | fi |
| 3537 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9caf77a | 1996-08-01 00:52:26 +0000 | [diff] [blame] | 3538 | #define _REENTRANT 1 |
| 3539 | EOF |
| 3540 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3541 | ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3542 | echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3543 | echo "configure:3544: checking for mach/cthreads.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3544 | 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] | 3545 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3546 | else |
| 3547 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3548 | #line 3549 "configure" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3549 | #include "confdefs.h" |
| 3550 | #include <mach/cthreads.h> |
| 3551 | EOF |
| 3552 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3553 | { (eval echo configure:3554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 3554 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3555 | if test -z "$ac_err"; then |
| 3556 | rm -rf conftest* |
| 3557 | eval "ac_cv_header_$ac_safe=yes" |
| 3558 | else |
| 3559 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3560 | echo "configure: failed program was:" >&5 |
| 3561 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3562 | rm -rf conftest* |
| 3563 | eval "ac_cv_header_$ac_safe=no" |
| 3564 | fi |
| 3565 | rm -f conftest* |
| 3566 | fi |
| 3567 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 3568 | echo "$ac_t""yes" 1>&6 |
| 3569 | cat >> confdefs.h <<\EOF |
| 3570 | #define WITH_THREAD 1 |
| 3571 | EOF |
| 3572 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3573 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3574 | #define C_THREADS 1 |
| 3575 | EOF |
| 3576 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3577 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3578 | else |
| 3579 | echo "$ac_t""no" 1>&6 |
| 3580 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3581 | echo $ac_n "checking for --with-pth""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3582 | echo "configure:3583: checking for --with-pth" >&5 |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3583 | # Check whether --with-pth or --without-pth was given. |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3584 | if test "${with_pth+set}" = set; then |
| 3585 | withval="$with_pth" |
| 3586 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3587 | echo "$ac_t""$withval" 1>&6 |
| 3588 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3589 | #define WITH_THREAD 1 |
| 3590 | EOF |
| 3591 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3592 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3593 | #define HAVE_PTH 1 |
| 3594 | EOF |
| 3595 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3596 | LIBS="-lpth $LIBS" |
| 3597 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3598 | else |
| 3599 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3600 | echo "$ac_t""no" 1>&6 |
| 3601 | echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3602 | echo "configure:3603: checking for pthread_create in -lpthread" >&5 |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3603 | ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3604 | 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] | 3605 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3606 | else |
| 3607 | ac_save_LIBS="$LIBS" |
| 3608 | LIBS="-lpthread $LIBS" |
| 3609 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3610 | #line 3611 "configure" |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3611 | #include "confdefs.h" |
| 3612 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3613 | /* We use char because int might match the return type of a gcc2 |
| 3614 | builtin and then its argument prototype would still apply. */ |
| 3615 | char pthread_create(); |
| 3616 | |
| 3617 | int main() { |
| 3618 | pthread_create() |
| 3619 | ; return 0; } |
| 3620 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3621 | if { (eval echo configure:3622: \"$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] | 3622 | rm -rf conftest* |
| 3623 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3624 | else |
| 3625 | echo "configure: failed program was:" >&5 |
| 3626 | cat conftest.$ac_ext >&5 |
| 3627 | rm -rf conftest* |
| 3628 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3629 | fi |
| 3630 | rm -f conftest* |
| 3631 | LIBS="$ac_save_LIBS" |
| 3632 | |
| 3633 | fi |
| 3634 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3635 | echo "$ac_t""yes" 1>&6 |
| 3636 | cat >> confdefs.h <<\EOF |
| 3637 | #define WITH_THREAD 1 |
| 3638 | EOF |
| 3639 | |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3640 | case $ac_sys_system in |
| 3641 | Darwin*) ;; |
| 3642 | *) cat >> confdefs.h <<\EOF |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3643 | #define _POSIX_THREADS 1 |
| 3644 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3645 | ;; |
| 3646 | esac |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3647 | LIBS="-lpthread $LIBS" |
| 3648 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3649 | else |
| 3650 | echo "$ac_t""no" 1>&6 |
| 3651 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3652 | echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3653 | echo "configure:3654: checking for pthread_detach" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3654 | 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] | 3655 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3656 | else |
| 3657 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3658 | #line 3659 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3659 | #include "confdefs.h" |
| 3660 | /* System header to define __stub macros and hopefully few prototypes, |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3661 | which can conflict with char pthread_detach(); below. */ |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3662 | #include <assert.h> |
| 3663 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3664 | /* We use char because int might match the return type of a gcc2 |
| 3665 | builtin and then its argument prototype would still apply. */ |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3666 | char pthread_detach(); |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3667 | |
| 3668 | int main() { |
| 3669 | |
| 3670 | /* The GNU C library defines this for functions which it implements |
| 3671 | to always fail with ENOSYS. Some functions are actually named |
| 3672 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3673 | #if defined (__stub_pthread_detach) || defined (__stub___pthread_detach) |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3674 | choke me |
| 3675 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3676 | pthread_detach(); |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3677 | #endif |
| 3678 | |
| 3679 | ; return 0; } |
| 3680 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3681 | if { (eval echo configure:3682: \"$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] | 3682 | rm -rf conftest* |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3683 | eval "ac_cv_func_pthread_detach=yes" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3684 | else |
| 3685 | echo "configure: failed program was:" >&5 |
| 3686 | cat conftest.$ac_ext >&5 |
| 3687 | rm -rf conftest* |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3688 | eval "ac_cv_func_pthread_detach=no" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3689 | fi |
| 3690 | rm -f conftest* |
| 3691 | fi |
| 3692 | |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3693 | if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3694 | echo "$ac_t""yes" 1>&6 |
| 3695 | cat >> confdefs.h <<\EOF |
| 3696 | #define WITH_THREAD 1 |
| 3697 | EOF |
| 3698 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3699 | case $ac_sys_system in |
| 3700 | Darwin*) ;; |
| 3701 | *) cat >> confdefs.h <<\EOF |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3702 | #define _POSIX_THREADS 1 |
| 3703 | EOF |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 3704 | ;; |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3705 | esac |
| 3706 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3707 | else |
| 3708 | echo "$ac_t""no" 1>&6 |
| 3709 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3710 | ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'` |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3711 | echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3712 | echo "configure:3713: checking for kernel/OS.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3713 | 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] | 3714 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3715 | else |
| 3716 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3717 | #line 3718 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3718 | #include "confdefs.h" |
| 3719 | #include <kernel/OS.h> |
| 3720 | EOF |
| 3721 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3722 | { (eval echo configure:3723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 3723 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3724 | if test -z "$ac_err"; then |
| 3725 | rm -rf conftest* |
| 3726 | eval "ac_cv_header_$ac_safe=yes" |
| 3727 | else |
| 3728 | echo "$ac_err" >&5 |
| 3729 | echo "configure: failed program was:" >&5 |
| 3730 | cat conftest.$ac_ext >&5 |
| 3731 | rm -rf conftest* |
| 3732 | eval "ac_cv_header_$ac_safe=no" |
| 3733 | fi |
| 3734 | rm -f conftest* |
| 3735 | fi |
| 3736 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 3737 | echo "$ac_t""yes" 1>&6 |
| 3738 | cat >> confdefs.h <<\EOF |
| 3739 | #define WITH_THREAD 1 |
| 3740 | EOF |
| 3741 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3742 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3743 | #define BEOS_THREADS 1 |
| 3744 | EOF |
| 3745 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3746 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3747 | else |
| 3748 | echo "$ac_t""no" 1>&6 |
| 3749 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3750 | echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3751 | echo "configure:3752: checking for pthread_create in -lpthreads" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3752 | ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3753 | 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] | 3754 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3755 | else |
| 3756 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3757 | LIBS="-lpthreads $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3758 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3759 | #line 3760 "configure" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3760 | #include "confdefs.h" |
| 3761 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3762 | /* We use char because int might match the return type of a gcc2 |
| 3763 | builtin and then its argument prototype would still apply. */ |
| 3764 | char pthread_create(); |
| 3765 | |
| 3766 | int main() { |
| 3767 | pthread_create() |
| 3768 | ; return 0; } |
| 3769 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3770 | if { (eval echo configure:3771: \"$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] | 3771 | rm -rf conftest* |
| 3772 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3773 | else |
| 3774 | echo "configure: failed program was:" >&5 |
| 3775 | cat conftest.$ac_ext >&5 |
| 3776 | rm -rf conftest* |
| 3777 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3778 | fi |
| 3779 | rm -f conftest* |
| 3780 | LIBS="$ac_save_LIBS" |
| 3781 | |
| 3782 | fi |
| 3783 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3784 | echo "$ac_t""yes" 1>&6 |
| 3785 | cat >> confdefs.h <<\EOF |
| 3786 | #define WITH_THREAD 1 |
| 3787 | EOF |
| 3788 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3789 | cat >> confdefs.h <<\EOF |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3790 | #define _POSIX_THREADS 1 |
| 3791 | EOF |
| 3792 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3793 | LIBS="$LIBS -lpthreads" |
| 3794 | LIBOBJS="$LIBOBJS thread.o" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3795 | else |
| 3796 | echo "$ac_t""no" 1>&6 |
| 3797 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3798 | echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3799 | echo "configure:3800: checking for pthread_create in -lc_r" >&5 |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3800 | ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3801 | 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] | 3802 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3803 | else |
| 3804 | ac_save_LIBS="$LIBS" |
| 3805 | LIBS="-lc_r $LIBS" |
| 3806 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3807 | #line 3808 "configure" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 3808 | #include "confdefs.h" |
| 3809 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3810 | /* We use char because int might match the return type of a gcc2 |
| 3811 | builtin and then its argument prototype would still apply. */ |
| 3812 | char pthread_create(); |
| 3813 | |
| 3814 | int main() { |
| 3815 | pthread_create() |
| 3816 | ; return 0; } |
| 3817 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3818 | if { (eval echo configure:3819: \"$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] | 3819 | rm -rf conftest* |
| 3820 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3821 | else |
| 3822 | echo "configure: failed program was:" >&5 |
| 3823 | cat conftest.$ac_ext >&5 |
| 3824 | rm -rf conftest* |
| 3825 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3826 | fi |
| 3827 | rm -f conftest* |
| 3828 | LIBS="$ac_save_LIBS" |
| 3829 | |
| 3830 | fi |
| 3831 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3832 | echo "$ac_t""yes" 1>&6 |
| 3833 | cat >> confdefs.h <<\EOF |
| 3834 | #define WITH_THREAD 1 |
| 3835 | EOF |
| 3836 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3837 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 3838 | #define _POSIX_THREADS 1 |
| 3839 | EOF |
| 3840 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3841 | LIBS="$LIBS -lc_r" |
| 3842 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3843 | else |
| 3844 | echo "$ac_t""no" 1>&6 |
| 3845 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3846 | echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3847 | echo "configure:3848: checking for __d6_pthread_create in -lthread" >&5 |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3848 | ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3849 | 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] | 3850 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3851 | else |
| 3852 | ac_save_LIBS="$LIBS" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3853 | LIBS="-lthread $LIBS" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3854 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3855 | #line 3856 "configure" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3856 | #include "confdefs.h" |
| 3857 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3858 | /* We use char because int might match the return type of a gcc2 |
| 3859 | builtin and then its argument prototype would still apply. */ |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3860 | char __d6_pthread_create(); |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3861 | |
| 3862 | int main() { |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3863 | __d6_pthread_create() |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3864 | ; return 0; } |
| 3865 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3866 | if { (eval echo configure:3867: \"$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] | 3867 | rm -rf conftest* |
| 3868 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3869 | else |
| 3870 | echo "configure: failed program was:" >&5 |
| 3871 | cat conftest.$ac_ext >&5 |
| 3872 | rm -rf conftest* |
| 3873 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3874 | fi |
| 3875 | rm -f conftest* |
| 3876 | LIBS="$ac_save_LIBS" |
| 3877 | |
| 3878 | fi |
| 3879 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3880 | echo "$ac_t""yes" 1>&6 |
| 3881 | cat >> confdefs.h <<\EOF |
| 3882 | #define WITH_THREAD 1 |
| 3883 | EOF |
| 3884 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3885 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3886 | #define _POSIX_THREADS 1 |
| 3887 | EOF |
| 3888 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3889 | LIBS="$LIBS -lthread" |
| 3890 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 3891 | else |
| 3892 | echo "$ac_t""no" 1>&6 |
| 3893 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3894 | echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3895 | echo "configure:3896: checking for __pthread_create_system in -lpthread" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3896 | ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'` |
| 3897 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 3898 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3899 | else |
| 3900 | ac_save_LIBS="$LIBS" |
| 3901 | LIBS="-lpthread $LIBS" |
| 3902 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3903 | #line 3904 "configure" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3904 | #include "confdefs.h" |
| 3905 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3906 | /* We use char because int might match the return type of a gcc2 |
| 3907 | builtin and then its argument prototype would still apply. */ |
| 3908 | char __pthread_create_system(); |
| 3909 | |
| 3910 | int main() { |
| 3911 | __pthread_create_system() |
| 3912 | ; return 0; } |
| 3913 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3914 | if { (eval echo configure:3915: \"$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] | 3915 | rm -rf conftest* |
| 3916 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3917 | else |
| 3918 | echo "configure: failed program was:" >&5 |
| 3919 | cat conftest.$ac_ext >&5 |
| 3920 | rm -rf conftest* |
| 3921 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3922 | fi |
| 3923 | rm -f conftest* |
| 3924 | LIBS="$ac_save_LIBS" |
| 3925 | |
| 3926 | fi |
| 3927 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3928 | echo "$ac_t""yes" 1>&6 |
| 3929 | cat >> confdefs.h <<\EOF |
| 3930 | #define WITH_THREAD 1 |
| 3931 | EOF |
| 3932 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3933 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3934 | #define _POSIX_THREADS 1 |
| 3935 | EOF |
| 3936 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3937 | LIBS="$LIBS -lpthread" |
| 3938 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3939 | else |
| 3940 | echo "$ac_t""no" 1>&6 |
| 3941 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3942 | echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3943 | echo "configure:3944: checking for pthread_create in -lcma" >&5 |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3944 | ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3945 | 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] | 3946 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3947 | else |
| 3948 | ac_save_LIBS="$LIBS" |
| 3949 | LIBS="-lcma $LIBS" |
| 3950 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3951 | #line 3952 "configure" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3952 | #include "confdefs.h" |
| 3953 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3954 | /* We use char because int might match the return type of a gcc2 |
| 3955 | builtin and then its argument prototype would still apply. */ |
| 3956 | char pthread_create(); |
| 3957 | |
| 3958 | int main() { |
| 3959 | pthread_create() |
| 3960 | ; return 0; } |
| 3961 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3962 | if { (eval echo configure:3963: \"$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] | 3963 | rm -rf conftest* |
| 3964 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3965 | else |
| 3966 | echo "configure: failed program was:" >&5 |
| 3967 | cat conftest.$ac_ext >&5 |
| 3968 | rm -rf conftest* |
| 3969 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3970 | fi |
| 3971 | rm -f conftest* |
| 3972 | LIBS="$ac_save_LIBS" |
| 3973 | |
| 3974 | fi |
| 3975 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3976 | echo "$ac_t""yes" 1>&6 |
| 3977 | cat >> confdefs.h <<\EOF |
| 3978 | #define WITH_THREAD 1 |
| 3979 | EOF |
| 3980 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3981 | cat >> confdefs.h <<\EOF |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3982 | #define _POSIX_THREADS 1 |
| 3983 | EOF |
| 3984 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3985 | LIBS="$LIBS -lcma" |
| 3986 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3987 | else |
| 3988 | echo "$ac_t""no" 1>&6 |
Thomas Wouters | 0db2b2b | 2000-08-26 11:33:43 +0000 | [diff] [blame] | 3989 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3990 | USE_THREAD_MODULE="#" |
Guido van Rossum | 2d38f91 | 1996-06-26 19:47:01 +0000 | [diff] [blame] | 3991 | fi |
| 3992 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3993 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3994 | fi |
| 3995 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3996 | fi |
| 3997 | |
Guido van Rossum | 0be3e49 | 1997-05-22 20:33:33 +0000 | [diff] [blame] | 3998 | fi |
| 3999 | |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4000 | fi |
| 4001 | |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4002 | fi |
| 4003 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 4004 | fi |
| 4005 | |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 4006 | fi |
| 4007 | |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4008 | fi |
| 4009 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4010 | fi |
| 4011 | |
Guido van Rossum | 0be3e49 | 1997-05-22 20:33:33 +0000 | [diff] [blame] | 4012 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4013 | echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4014 | echo "configure:4015: checking for usconfig in -lmpc" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4015 | ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4016 | 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] | 4017 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4018 | else |
| 4019 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4020 | LIBS="-lmpc $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4021 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4022 | #line 4023 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4023 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4024 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4025 | /* We use char because int might match the return type of a gcc2 |
| 4026 | builtin and then its argument prototype would still apply. */ |
| 4027 | char usconfig(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4028 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4029 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4030 | usconfig() |
| 4031 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4032 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4033 | if { (eval echo configure:4034: \"$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] | 4034 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4035 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4036 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4037 | echo "configure: failed program was:" >&5 |
| 4038 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4039 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4040 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4041 | fi |
| 4042 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4043 | LIBS="$ac_save_LIBS" |
| 4044 | |
| 4045 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4046 | 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] | 4047 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4048 | cat >> confdefs.h <<\EOF |
| 4049 | #define WITH_THREAD 1 |
| 4050 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4051 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4052 | LIBS="$LIBS -lmpc" |
| 4053 | LIBOBJS="$LIBOBJS thread.o" |
| 4054 | USE_THREAD_MODULE="" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4055 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4056 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4057 | fi |
| 4058 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4059 | echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4060 | echo "configure:4061: checking for thr_create in -lthread" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4061 | ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4062 | 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] | 4063 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4064 | else |
| 4065 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4066 | LIBS="-lthread $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4067 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4068 | #line 4069 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4069 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4070 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4071 | /* We use char because int might match the return type of a gcc2 |
| 4072 | builtin and then its argument prototype would still apply. */ |
| 4073 | char thr_create(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4074 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4075 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4076 | thr_create() |
| 4077 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4078 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4079 | if { (eval echo configure:4080: \"$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] | 4080 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4081 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4082 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4083 | echo "configure: failed program was:" >&5 |
| 4084 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4085 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4086 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4087 | fi |
| 4088 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4089 | LIBS="$ac_save_LIBS" |
| 4090 | |
| 4091 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4092 | 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] | 4093 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4094 | cat >> confdefs.h <<\EOF |
| 4095 | #define WITH_THREAD 1 |
| 4096 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4097 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4098 | LIBS="$LIBS -lthread" |
| 4099 | LIBOBJS="$LIBOBJS thread.o" |
| 4100 | USE_THREAD_MODULE="" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4101 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4102 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4103 | fi |
| 4104 | |
Jeremy Hylton | 1a2ca86 | 2000-10-16 16:59:12 +0000 | [diff] [blame] | 4105 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4106 | if test "$USE_THREAD_MODULE" != "#" |
| 4107 | then |
| 4108 | # If the above checks didn't disable threads, (at least) OSF1 |
| 4109 | # needs this '-threads' argument during linking. |
| 4110 | case $ac_sys_system in |
| 4111 | OSF1) LDLAST=-threads;; |
| 4112 | esac |
Jeremy Hylton | 1a2ca86 | 2000-10-16 16:59:12 +0000 | [diff] [blame] | 4113 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4114 | fi |
| 4115 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4116 | # Check for enable-ipv6 |
| 4117 | echo $ac_n "checking whether to enable ipv6""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4118 | echo "configure:4119: checking whether to enable ipv6" >&5 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4119 | # Check whether --enable-ipv6 or --disable-ipv6 was given. |
| 4120 | if test "${enable_ipv6+set}" = set; then |
| 4121 | enableval="$enable_ipv6" |
| 4122 | case "$enableval" in |
| 4123 | no) |
| 4124 | echo "$ac_t""no" 1>&6 |
| 4125 | ipv6=no |
| 4126 | ;; |
| 4127 | *) echo "$ac_t""yes" 1>&6 |
| 4128 | cat >> confdefs.h <<\EOF |
| 4129 | #define ENABLE_IPV6 1 |
| 4130 | EOF |
| 4131 | |
| 4132 | ipv6=yes |
| 4133 | ;; |
| 4134 | esac |
| 4135 | else |
| 4136 | if test "$cross_compiling" = yes; then |
| 4137 | echo "$ac_t""no" 1>&6 |
| 4138 | ipv6=no |
| 4139 | |
| 4140 | else |
| 4141 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4142 | #line 4143 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4143 | #include "confdefs.h" |
| 4144 | /* AF_INET6 available check */ |
| 4145 | #include <sys/types.h> |
| 4146 | #include <sys/socket.h> |
| 4147 | main() |
| 4148 | { |
| 4149 | if (socket(AF_INET6, SOCK_STREAM, 0) < 0) |
| 4150 | exit(1); |
| 4151 | else |
| 4152 | exit(0); |
| 4153 | } |
| 4154 | |
| 4155 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4156 | if { (eval echo configure:4157: \"$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] | 4157 | then |
| 4158 | echo "$ac_t""yes" 1>&6 |
| 4159 | cat >> confdefs.h <<\EOF |
| 4160 | #define ENABLE_IPV6 1 |
| 4161 | EOF |
| 4162 | |
| 4163 | ipv6=yes |
| 4164 | else |
| 4165 | echo "configure: failed program was:" >&5 |
| 4166 | cat conftest.$ac_ext >&5 |
| 4167 | rm -fr conftest* |
| 4168 | echo "$ac_t""no" 1>&6 |
| 4169 | ipv6=no |
| 4170 | fi |
| 4171 | rm -fr conftest* |
| 4172 | fi |
| 4173 | |
| 4174 | fi |
| 4175 | |
| 4176 | |
| 4177 | ipv6type=unknown |
| 4178 | ipv6lib=none |
| 4179 | ipv6trylibc=no |
| 4180 | |
| 4181 | if test "$ipv6" = "yes"; then |
| 4182 | echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4183 | echo "configure:4184: checking ipv6 stack type" >&5 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4184 | for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta; do |
| 4185 | case $i in |
| 4186 | inria) |
| 4187 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4188 | #line 4189 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4189 | #include "confdefs.h" |
| 4190 | dnl |
| 4191 | #include <netinet/in.h> |
| 4192 | #ifdef IPV6_INRIA_VERSION |
| 4193 | yes |
| 4194 | #endif |
| 4195 | EOF |
| 4196 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4197 | egrep "yes" >/dev/null 2>&1; then |
| 4198 | rm -rf conftest* |
| 4199 | ipv6type=$i; |
| 4200 | OPT="-DINET6 $OPT" |
| 4201 | fi |
| 4202 | rm -f conftest* |
| 4203 | |
| 4204 | ;; |
| 4205 | kame) |
| 4206 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4207 | #line 4208 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4208 | #include "confdefs.h" |
| 4209 | dnl |
| 4210 | #include <netinet/in.h> |
| 4211 | #ifdef __KAME__ |
| 4212 | yes |
| 4213 | #endif |
| 4214 | EOF |
| 4215 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4216 | egrep "yes" >/dev/null 2>&1; then |
| 4217 | rm -rf conftest* |
| 4218 | ipv6type=$i; |
| 4219 | ipv6lib=inet6 |
| 4220 | ipv6libdir=/usr/local/v6/lib |
| 4221 | ipv6trylibc=yes |
| 4222 | OPT="-DINET6 $OPT" |
| 4223 | fi |
| 4224 | rm -f conftest* |
| 4225 | |
| 4226 | ;; |
| 4227 | linux-glibc) |
| 4228 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4229 | #line 4230 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4230 | #include "confdefs.h" |
| 4231 | dnl |
| 4232 | #include <features.h> |
| 4233 | #if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)) |
| 4234 | yes |
| 4235 | #endif |
| 4236 | EOF |
| 4237 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4238 | egrep "yes" >/dev/null 2>&1; then |
| 4239 | rm -rf conftest* |
| 4240 | ipv6type=$i; |
| 4241 | ipv6trylibc=yes |
| 4242 | OPT="-DINET6 $OPT" |
| 4243 | fi |
| 4244 | rm -f conftest* |
| 4245 | |
| 4246 | ;; |
| 4247 | linux-inet6) |
| 4248 | if test -d /usr/inet6; then |
| 4249 | ipv6type=$i |
| 4250 | ipv6lib=inet6 |
| 4251 | ipv6libdir=/usr/inet6/lib |
| 4252 | OPT="-DINET6 -I/usr/inet6/include $OPT" |
| 4253 | fi |
| 4254 | ;; |
| 4255 | solaris) |
| 4256 | if test -f /etc/netconfig; then |
| 4257 | if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then |
| 4258 | ipv6type=$i |
| 4259 | ipv6trylibc=yes |
| 4260 | OPT="-DINET6 $OPT" |
| 4261 | fi |
| 4262 | fi |
| 4263 | ;; |
| 4264 | toshiba) |
| 4265 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4266 | #line 4267 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4267 | #include "confdefs.h" |
| 4268 | dnl |
| 4269 | #include <sys/param.h> |
| 4270 | #ifdef _TOSHIBA_INET6 |
| 4271 | yes |
| 4272 | #endif |
| 4273 | EOF |
| 4274 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4275 | egrep "yes" >/dev/null 2>&1; then |
| 4276 | rm -rf conftest* |
| 4277 | ipv6type=$i; |
| 4278 | ipv6lib=inet6; |
| 4279 | ipv6libdir=/usr/local/v6/lib; |
| 4280 | OPT="-DINET6 $OPT" |
| 4281 | fi |
| 4282 | rm -f conftest* |
| 4283 | |
| 4284 | ;; |
| 4285 | v6d) |
| 4286 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4287 | #line 4288 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4288 | #include "confdefs.h" |
| 4289 | dnl |
| 4290 | #include </usr/local/v6/include/sys/v6config.h> |
| 4291 | #ifdef __V6D__ |
| 4292 | yes |
| 4293 | #endif |
| 4294 | EOF |
| 4295 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4296 | egrep "yes" >/dev/null 2>&1; then |
| 4297 | rm -rf conftest* |
| 4298 | ipv6type=$i; |
| 4299 | ipv6lib=v6; |
| 4300 | ipv6libdir=/usr/local/v6/lib; |
| 4301 | OPT="-I/usr/local/v6/include $OPT" |
| 4302 | fi |
| 4303 | rm -f conftest* |
| 4304 | |
| 4305 | ;; |
| 4306 | zeta) |
| 4307 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4308 | #line 4309 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4309 | #include "confdefs.h" |
| 4310 | dnl |
| 4311 | #include <sys/param.h> |
| 4312 | #ifdef _ZETA_MINAMI_INET6 |
| 4313 | yes |
| 4314 | #endif |
| 4315 | EOF |
| 4316 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4317 | egrep "yes" >/dev/null 2>&1; then |
| 4318 | rm -rf conftest* |
| 4319 | ipv6type=$i; |
| 4320 | ipv6lib=inet6; |
| 4321 | ipv6libdir=/usr/local/v6/lib; |
| 4322 | OPT="-DINET6 $OPT" |
| 4323 | fi |
| 4324 | rm -f conftest* |
| 4325 | |
| 4326 | ;; |
| 4327 | esac |
| 4328 | if test "$ipv6type" != "unknown"; then |
| 4329 | break |
| 4330 | fi |
| 4331 | done |
| 4332 | echo "$ac_t""$ipv6type" 1>&6 |
| 4333 | fi |
| 4334 | |
| 4335 | if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then |
| 4336 | if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then |
| 4337 | LIBS="-L$ipv6libdir -l$ipv6lib $LIBS" |
| 4338 | echo "using lib$ipv6lib" |
| 4339 | else |
| 4340 | if test $ipv6trylibc = "yes"; then |
| 4341 | echo "using libc" |
| 4342 | else |
| 4343 | echo 'Fatal: no $ipv6lib library found. cannot continue.' |
| 4344 | echo "You need to fetch lib$ipv6lib.a from appropriate" |
| 4345 | echo 'ipv6 kit and compile beforehand.' |
| 4346 | exit 1 |
| 4347 | fi |
| 4348 | fi |
| 4349 | fi |
| 4350 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4351 | # Check for GC support |
| 4352 | |
| 4353 | USE_GC_MODULE="" |
| 4354 | echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4355 | echo "configure:4356: checking for --with-cycle-gc" >&5 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4356 | # Check whether --with-cycle-gc or --without-cycle-gc was given. |
| 4357 | if test "${with_cycle_gc+set}" = set; then |
| 4358 | withval="$with_cycle_gc" |
| 4359 | : |
| 4360 | fi |
| 4361 | |
| 4362 | |
| 4363 | if test -z "$with_cycle_gc" |
| 4364 | then with_cycle_gc="yes" |
| 4365 | fi |
| 4366 | if test "$with_cycle_gc" = "no" |
| 4367 | then |
| 4368 | USE_GC_MODULE="#" |
| 4369 | else |
| 4370 | cat >> confdefs.h <<\EOF |
| 4371 | #define WITH_CYCLE_GC 1 |
| 4372 | EOF |
| 4373 | |
| 4374 | fi |
| 4375 | echo "$ac_t""$with_cycle_gc" 1>&6 |
| 4376 | |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 4377 | # Check for Python-specific malloc support |
| 4378 | echo $ac_n "checking for --with-pymalloc""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4379 | echo "configure:4380: checking for --with-pymalloc" >&5 |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 4380 | # Check whether --with-pymalloc or --without-pymalloc was given. |
| 4381 | if test "${with_pymalloc+set}" = set; then |
| 4382 | withval="$with_pymalloc" |
| 4383 | |
| 4384 | if test "$withval" != no |
| 4385 | then cat >> confdefs.h <<\EOF |
| 4386 | #define WITH_PYMALLOC 1 |
| 4387 | EOF |
| 4388 | echo "$ac_t""yes" 1>&6 |
| 4389 | else echo "$ac_t""no" 1>&6 |
| 4390 | fi |
| 4391 | else |
| 4392 | echo "$ac_t""no" 1>&6 |
| 4393 | fi |
| 4394 | |
| 4395 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4396 | # Check for --with-wctype-functions |
| 4397 | echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4398 | echo "configure:4399: checking for --with-wctype-functions" >&5 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4399 | # Check whether --with-wctype-functions or --without-wctype-functions was given. |
| 4400 | if test "${with_wctype_functions+set}" = set; then |
| 4401 | withval="$with_wctype_functions" |
| 4402 | |
| 4403 | if test "$withval" != no |
| 4404 | then cat >> confdefs.h <<\EOF |
| 4405 | #define WANT_WCTYPE_FUNCTIONS 1 |
| 4406 | EOF |
| 4407 | echo "$ac_t""yes" 1>&6 |
| 4408 | else echo "$ac_t""no" 1>&6 |
| 4409 | fi |
| 4410 | else |
| 4411 | echo "$ac_t""no" 1>&6 |
| 4412 | fi |
| 4413 | |
| 4414 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4415 | # -I${DLINCLDIR} is added to the compile rule for importdl.o |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4416 | |
| 4417 | DLINCLDIR=/ |
| 4418 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4419 | echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4420 | echo "configure:4421: checking for --with-sgi-dl" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4421 | # Check whether --with-sgi-dl or --without-sgi-dl was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4422 | if test "${with_sgi_dl+set}" = set; then |
| 4423 | withval="$with_sgi_dl" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4424 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4425 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4426 | cat >> confdefs.h <<\EOF |
| 4427 | #define WITH_SGI_DL 1 |
| 4428 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4429 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4430 | DYNLOADFILE="dynload_dl.o" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4431 | dldir=$withval |
Guido van Rossum | 4095101 | 2000-10-07 16:21:27 +0000 | [diff] [blame] | 4432 | if test ! -z "$dldir" -a -d "$dldir" |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 4433 | then LDFLAGS="$LDFLAGS -L$dldir" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4434 | 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] | 4435 | fi |
| 4436 | DLINCLDIR=${dldir} |
| 4437 | LIBS="$LIBS -ldl -lmld" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4438 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4439 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4440 | fi |
| 4441 | |
| 4442 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4443 | echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4444 | echo "configure:4445: checking for --with-dl-dld" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4445 | # Check whether --with-dl-dld or --without-dl-dld was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4446 | if test "${with_dl_dld+set}" = set; then |
| 4447 | withval="$with_dl_dld" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4448 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4449 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4450 | cat >> confdefs.h <<\EOF |
| 4451 | #define WITH_DL_DLD 1 |
| 4452 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4453 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4454 | DYNLOADFILE="dynload_dl.o" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4455 | dldir=`echo "$withval" | sed 's/,.*//'` |
| 4456 | dlddir=`echo "$withval" | sed 's/.*,//'` |
Barry Warsaw | 7d1219d | 2000-10-05 18:45:53 +0000 | [diff] [blame] | 4457 | 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] | 4458 | then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4459 | 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] | 4460 | fi |
| 4461 | DLINCLDIR=${dldir} |
| 4462 | LIBS="$LIBS -ldl -ldld" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4463 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4464 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4465 | fi |
| 4466 | |
| 4467 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4468 | # the dlopen() function means we might want to use dynload_shlib.o. some |
| 4469 | # 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] | 4470 | for ac_func in dlopen |
| 4471 | do |
| 4472 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4473 | echo "configure:4474: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4474 | 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] | 4475 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4476 | else |
| 4477 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4478 | #line 4479 "configure" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4479 | #include "confdefs.h" |
| 4480 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4481 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4482 | #include <assert.h> |
| 4483 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4484 | /* We use char because int might match the return type of a gcc2 |
| 4485 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4486 | char $ac_func(); |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4487 | |
| 4488 | int main() { |
| 4489 | |
| 4490 | /* The GNU C library defines this for functions which it implements |
| 4491 | to always fail with ENOSYS. Some functions are actually named |
| 4492 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4493 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4494 | choke me |
| 4495 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4496 | $ac_func(); |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4497 | #endif |
| 4498 | |
| 4499 | ; return 0; } |
| 4500 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4501 | if { (eval echo configure:4502: \"$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] | 4502 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4503 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4504 | else |
| 4505 | echo "configure: failed program was:" >&5 |
| 4506 | cat conftest.$ac_ext >&5 |
| 4507 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4508 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4509 | fi |
| 4510 | rm -f conftest* |
| 4511 | fi |
| 4512 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4513 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4514 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4515 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4516 | cat >> confdefs.h <<EOF |
| 4517 | #define $ac_tr_func 1 |
| 4518 | EOF |
| 4519 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4520 | else |
| 4521 | echo "$ac_t""no" 1>&6 |
| 4522 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4523 | done |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4524 | |
| 4525 | |
| 4526 | # DYNLOADFILE specifies which dynload_*.o file we will use for dynamic |
| 4527 | # loading of modules. |
| 4528 | |
| 4529 | echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4530 | echo "configure:4531: checking DYNLOADFILE" >&5 |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4531 | if test -z "$DYNLOADFILE" |
| 4532 | then |
| 4533 | case $ac_sys_system/$ac_sys_release in |
| 4534 | AIX*) DYNLOADFILE="dynload_aix.o";; |
| 4535 | BeOS*) DYNLOADFILE="dynload_beos.o";; |
| 4536 | hp*|HP*) DYNLOADFILE="dynload_hpux.o";; |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 4537 | Darwin/*) DYNLOADFILE="dynload_next.o";; |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4538 | *) |
| 4539 | # use dynload_shlib.c and dlopen() if we have it; otherwise stub |
| 4540 | # out any dynamic loading |
| 4541 | if test "$ac_cv_func_dlopen" = yes |
| 4542 | then DYNLOADFILE="dynload_shlib.o" |
| 4543 | else DYNLOADFILE="dynload_stub.o" |
| 4544 | fi |
| 4545 | ;; |
| 4546 | esac |
| 4547 | fi |
| 4548 | echo "$ac_t""$DYNLOADFILE" 1>&6 |
| 4549 | if test "$DYNLOADFILE" != "dynload_stub.o" |
| 4550 | then |
| 4551 | cat >> confdefs.h <<\EOF |
| 4552 | #define HAVE_DYNAMIC_LOADING 1 |
| 4553 | EOF |
| 4554 | |
| 4555 | fi |
| 4556 | |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4557 | # MACHDEP_OBJS can be set to platform-specific object files needed by Python |
| 4558 | |
| 4559 | |
| 4560 | echo $ac_n "checking MACHDEP_OBJS""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4561 | echo "configure:4562: checking MACHDEP_OBJS" >&5 |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4562 | if test -z "$MACHDEP_OBJS" |
| 4563 | then |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 4564 | MACHDEP_OBJS=$extra_machdep_objs |
| 4565 | else |
| 4566 | MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs" |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4567 | fi |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 4568 | echo "$ac_t""MACHDEP_OBJS" 1>&6 |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4569 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4570 | # checks for library functions |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4571 | for ac_func in alarm chown clock confstr ctermid ctermid_r execv \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 4572 | flock fork fsync fdatasync fpathconf ftime ftruncate \ |
Martin v. Löwis | f95dd0a | 2001-08-15 17:14:33 +0000 | [diff] [blame] | 4573 | gai_strerror getgroups getlogin getpeername getpid getpwent getwd \ |
Martin v. Löwis | 864e9ff | 2001-08-04 22:32:03 +0000 | [diff] [blame] | 4574 | hstrerror inet_pton kill link lstat mkfifo mktime mremap \ |
Andrew M. Kuchling | 5821b77 | 2000-08-25 01:14:08 +0000 | [diff] [blame] | 4575 | nice pathconf pause plock poll pthread_init \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 4576 | putenv readlink \ |
Andrew M. Kuchling | 8d2f2b2 | 2000-07-13 01:26:58 +0000 | [diff] [blame] | 4577 | select setegid seteuid setgid \ |
Martin v. Löwis | 791bfda | 2001-07-24 06:33:08 +0000 | [diff] [blame] | 4578 | setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 4579 | sigaction siginterrupt sigrelse strftime strptime symlink sysconf \ |
Fred Drake | 89143df | 1999-12-09 22:03:25 +0000 | [diff] [blame] | 4580 | tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ |
Thomas Wouters | c2c12dc | 2001-07-11 14:45:34 +0000 | [diff] [blame] | 4581 | truncate uname waitpid _getpty getpriority |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4582 | do |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4583 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4584 | echo "configure:4585: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4585 | 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] | 4586 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4587 | else |
| 4588 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4589 | #line 4590 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4590 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4591 | /* System header to define __stub macros and hopefully few prototypes, |
| 4592 | which can conflict with char $ac_func(); below. */ |
| 4593 | #include <assert.h> |
| 4594 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4595 | /* We use char because int might match the return type of a gcc2 |
| 4596 | builtin and then its argument prototype would still apply. */ |
| 4597 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4598 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4599 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4600 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4601 | /* The GNU C library defines this for functions which it implements |
| 4602 | to always fail with ENOSYS. Some functions are actually named |
| 4603 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4604 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4605 | choke me |
| 4606 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4607 | $ac_func(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4608 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4609 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4610 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4611 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4612 | if { (eval echo configure:4613: \"$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] | 4613 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4614 | eval "ac_cv_func_$ac_func=yes" |
| 4615 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4616 | echo "configure: failed program was:" >&5 |
| 4617 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4618 | rm -rf conftest* |
| 4619 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4620 | fi |
| 4621 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4622 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4623 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4624 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4625 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4626 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4627 | cat >> confdefs.h <<EOF |
| 4628 | #define $ac_tr_func 1 |
| 4629 | EOF |
| 4630 | |
| 4631 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4632 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4633 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4634 | done |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 4635 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 4636 | |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4637 | # check for openpty and forkpty |
| 4638 | |
| 4639 | for ac_func in openpty |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4640 | do |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4641 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4642 | echo "configure:4643: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4643 | 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] | 4644 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4645 | else |
| 4646 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4647 | #line 4648 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4648 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4649 | /* System header to define __stub macros and hopefully few prototypes, |
| 4650 | which can conflict with char $ac_func(); below. */ |
| 4651 | #include <assert.h> |
| 4652 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4653 | /* We use char because int might match the return type of a gcc2 |
| 4654 | builtin and then its argument prototype would still apply. */ |
| 4655 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4656 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4657 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4658 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4659 | /* The GNU C library defines this for functions which it implements |
| 4660 | to always fail with ENOSYS. Some functions are actually named |
| 4661 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4662 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4663 | choke me |
| 4664 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4665 | $ac_func(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4666 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4667 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4668 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4669 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4670 | if { (eval echo configure:4671: \"$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] | 4671 | rm -rf conftest* |
| 4672 | eval "ac_cv_func_$ac_func=yes" |
| 4673 | else |
| 4674 | echo "configure: failed program was:" >&5 |
| 4675 | cat conftest.$ac_ext >&5 |
| 4676 | rm -rf conftest* |
| 4677 | eval "ac_cv_func_$ac_func=no" |
| 4678 | fi |
| 4679 | rm -f conftest* |
| 4680 | fi |
| 4681 | |
| 4682 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4683 | echo "$ac_t""yes" 1>&6 |
| 4684 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4685 | cat >> confdefs.h <<EOF |
| 4686 | #define $ac_tr_func 1 |
| 4687 | EOF |
| 4688 | |
| 4689 | else |
| 4690 | echo "$ac_t""no" 1>&6 |
| 4691 | echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4692 | echo "configure:4693: checking for openpty in -lutil" >&5 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4693 | ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4694 | 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] | 4695 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4696 | else |
| 4697 | ac_save_LIBS="$LIBS" |
| 4698 | LIBS="-lutil $LIBS" |
| 4699 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4700 | #line 4701 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4701 | #include "confdefs.h" |
| 4702 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4703 | /* We use char because int might match the return type of a gcc2 |
| 4704 | builtin and then its argument prototype would still apply. */ |
| 4705 | char openpty(); |
| 4706 | |
| 4707 | int main() { |
| 4708 | openpty() |
| 4709 | ; return 0; } |
| 4710 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4711 | if { (eval echo configure:4712: \"$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] | 4712 | rm -rf conftest* |
| 4713 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 4714 | else |
| 4715 | echo "configure: failed program was:" >&5 |
| 4716 | cat conftest.$ac_ext >&5 |
| 4717 | rm -rf conftest* |
| 4718 | eval "ac_cv_lib_$ac_lib_var=no" |
| 4719 | fi |
| 4720 | rm -f conftest* |
| 4721 | LIBS="$ac_save_LIBS" |
| 4722 | |
| 4723 | fi |
| 4724 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4725 | echo "$ac_t""yes" 1>&6 |
| 4726 | cat >> confdefs.h <<\EOF |
| 4727 | #define HAVE_OPENPTY 1 |
| 4728 | EOF |
| 4729 | LIBS="$LIBS -lutil" |
| 4730 | else |
| 4731 | echo "$ac_t""no" 1>&6 |
| 4732 | fi |
| 4733 | |
| 4734 | fi |
| 4735 | done |
| 4736 | |
| 4737 | for ac_func in forkpty |
| 4738 | do |
| 4739 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4740 | echo "configure:4741: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4741 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4742 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4743 | else |
| 4744 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4745 | #line 4746 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4746 | #include "confdefs.h" |
| 4747 | /* System header to define __stub macros and hopefully few prototypes, |
| 4748 | which can conflict with char $ac_func(); below. */ |
| 4749 | #include <assert.h> |
| 4750 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4751 | /* We use char because int might match the return type of a gcc2 |
| 4752 | builtin and then its argument prototype would still apply. */ |
| 4753 | char $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4754 | |
| 4755 | int main() { |
| 4756 | |
| 4757 | /* The GNU C library defines this for functions which it implements |
| 4758 | to always fail with ENOSYS. Some functions are actually named |
| 4759 | something starting with __ and the normal name is an alias. */ |
| 4760 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 4761 | choke me |
| 4762 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4763 | $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4764 | #endif |
| 4765 | |
| 4766 | ; return 0; } |
| 4767 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4768 | if { (eval echo configure:4769: \"$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] | 4769 | rm -rf conftest* |
| 4770 | eval "ac_cv_func_$ac_func=yes" |
| 4771 | else |
| 4772 | echo "configure: failed program was:" >&5 |
| 4773 | cat conftest.$ac_ext >&5 |
| 4774 | rm -rf conftest* |
| 4775 | eval "ac_cv_func_$ac_func=no" |
| 4776 | fi |
| 4777 | rm -f conftest* |
| 4778 | fi |
| 4779 | |
| 4780 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4781 | echo "$ac_t""yes" 1>&6 |
| 4782 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4783 | cat >> confdefs.h <<EOF |
| 4784 | #define $ac_tr_func 1 |
| 4785 | EOF |
| 4786 | |
| 4787 | else |
| 4788 | echo "$ac_t""no" 1>&6 |
| 4789 | echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4790 | echo "configure:4791: checking for forkpty in -lutil" >&5 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4791 | ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4792 | 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] | 4793 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4794 | else |
| 4795 | ac_save_LIBS="$LIBS" |
| 4796 | LIBS="-lutil $LIBS" |
| 4797 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4798 | #line 4799 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4799 | #include "confdefs.h" |
| 4800 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4801 | /* We use char because int might match the return type of a gcc2 |
| 4802 | builtin and then its argument prototype would still apply. */ |
| 4803 | char forkpty(); |
| 4804 | |
| 4805 | int main() { |
| 4806 | forkpty() |
| 4807 | ; return 0; } |
| 4808 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4809 | if { (eval echo configure:4810: \"$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] | 4810 | rm -rf conftest* |
| 4811 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 4812 | else |
| 4813 | echo "configure: failed program was:" >&5 |
| 4814 | cat conftest.$ac_ext >&5 |
| 4815 | rm -rf conftest* |
| 4816 | eval "ac_cv_lib_$ac_lib_var=no" |
| 4817 | fi |
| 4818 | rm -f conftest* |
| 4819 | LIBS="$ac_save_LIBS" |
| 4820 | |
| 4821 | fi |
| 4822 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4823 | echo "$ac_t""yes" 1>&6 |
| 4824 | cat >> confdefs.h <<\EOF |
| 4825 | #define HAVE_FORKPTY 1 |
| 4826 | EOF |
| 4827 | LIBS="$LIBS -lutil" |
| 4828 | else |
| 4829 | echo "$ac_t""no" 1>&6 |
| 4830 | fi |
| 4831 | |
| 4832 | fi |
| 4833 | done |
| 4834 | |
| 4835 | |
| 4836 | # check for long file support functions |
| 4837 | for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs |
| 4838 | do |
| 4839 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4840 | echo "configure:4841: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4841 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4842 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4843 | else |
| 4844 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4845 | #line 4846 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4846 | #include "confdefs.h" |
| 4847 | /* System header to define __stub macros and hopefully few prototypes, |
| 4848 | which can conflict with char $ac_func(); below. */ |
| 4849 | #include <assert.h> |
| 4850 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4851 | /* We use char because int might match the return type of a gcc2 |
| 4852 | builtin and then its argument prototype would still apply. */ |
| 4853 | char $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4854 | |
| 4855 | int main() { |
| 4856 | |
| 4857 | /* The GNU C library defines this for functions which it implements |
| 4858 | to always fail with ENOSYS. Some functions are actually named |
| 4859 | something starting with __ and the normal name is an alias. */ |
| 4860 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 4861 | choke me |
| 4862 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4863 | $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4864 | #endif |
| 4865 | |
| 4866 | ; return 0; } |
| 4867 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4868 | if { (eval echo configure:4869: \"$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] | 4869 | rm -rf conftest* |
| 4870 | eval "ac_cv_func_$ac_func=yes" |
| 4871 | else |
| 4872 | echo "configure: failed program was:" >&5 |
| 4873 | cat conftest.$ac_ext >&5 |
| 4874 | rm -rf conftest* |
| 4875 | eval "ac_cv_func_$ac_func=no" |
| 4876 | fi |
| 4877 | rm -f conftest* |
| 4878 | fi |
| 4879 | |
| 4880 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4881 | echo "$ac_t""yes" 1>&6 |
| 4882 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4883 | cat >> confdefs.h <<EOF |
| 4884 | #define $ac_tr_func 1 |
| 4885 | EOF |
| 4886 | |
| 4887 | else |
| 4888 | echo "$ac_t""no" 1>&6 |
| 4889 | fi |
| 4890 | done |
| 4891 | |
| 4892 | |
| 4893 | for ac_func in dup2 getcwd strdup strerror memmove |
| 4894 | do |
| 4895 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4896 | echo "configure:4897: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4897 | 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] | 4898 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4899 | else |
| 4900 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4901 | #line 4902 "configure" |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 4902 | #include "confdefs.h" |
| 4903 | /* System header to define __stub macros and hopefully few prototypes, |
| 4904 | which can conflict with char $ac_func(); below. */ |
| 4905 | #include <assert.h> |
| 4906 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4907 | /* We use char because int might match the return type of a gcc2 |
| 4908 | builtin and then its argument prototype would still apply. */ |
| 4909 | char $ac_func(); |
| 4910 | |
| 4911 | int main() { |
| 4912 | |
| 4913 | /* The GNU C library defines this for functions which it implements |
| 4914 | to always fail with ENOSYS. Some functions are actually named |
| 4915 | something starting with __ and the normal name is an alias. */ |
| 4916 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 4917 | choke me |
| 4918 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4919 | $ac_func(); |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 4920 | #endif |
| 4921 | |
| 4922 | ; return 0; } |
| 4923 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4924 | if { (eval echo configure:4925: \"$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] | 4925 | rm -rf conftest* |
| 4926 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4927 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4928 | echo "configure: failed program was:" >&5 |
| 4929 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4930 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4931 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4932 | fi |
| 4933 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4934 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4935 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4936 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4937 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4938 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4939 | cat >> confdefs.h <<EOF |
| 4940 | #define $ac_tr_func 1 |
| 4941 | EOF |
| 4942 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4943 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4944 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 4945 | LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4946 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4947 | done |
| 4948 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4949 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4950 | for ac_func in getpgrp |
| 4951 | do |
| 4952 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4953 | echo "configure:4954: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4954 | 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] | 4955 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4956 | else |
| 4957 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4958 | #line 4959 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4959 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4960 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4961 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4962 | #include <assert.h> |
| 4963 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4964 | /* We use char because int might match the return type of a gcc2 |
| 4965 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4966 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4967 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4968 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4969 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4970 | /* The GNU C library defines this for functions which it implements |
| 4971 | to always fail with ENOSYS. Some functions are actually named |
| 4972 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4973 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4974 | choke me |
| 4975 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4976 | $ac_func(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4977 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4978 | |
| 4979 | ; return 0; } |
| 4980 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 4981 | if { (eval echo configure:4982: \"$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] | 4982 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4983 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4984 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4985 | echo "configure: failed program was:" >&5 |
| 4986 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4987 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4988 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4989 | fi |
| 4990 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4991 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4992 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4993 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4994 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4995 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4996 | cat >> confdefs.h <<EOF |
| 4997 | #define $ac_tr_func 1 |
| 4998 | EOF |
| 4999 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5000 | #line 5001 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5001 | #include "confdefs.h" |
| 5002 | #include <unistd.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5003 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5004 | getpgrp(0); |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5005 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5006 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5007 | if { (eval echo configure:5008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5008 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5009 | cat >> confdefs.h <<\EOF |
| 5010 | #define GETPGRP_HAVE_ARG 1 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5011 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5012 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5013 | else |
| 5014 | echo "configure: failed program was:" >&5 |
| 5015 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5016 | fi |
| 5017 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5018 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5019 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5020 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5021 | done |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5022 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5023 | for ac_func in setpgrp |
| 5024 | do |
| 5025 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5026 | echo "configure:5027: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5027 | 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] | 5028 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5029 | else |
| 5030 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5031 | #line 5032 "configure" |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5032 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5033 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5034 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5035 | #include <assert.h> |
| 5036 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5037 | /* We use char because int might match the return type of a gcc2 |
| 5038 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5039 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5040 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5041 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5042 | |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5043 | /* The GNU C library defines this for functions which it implements |
| 5044 | to always fail with ENOSYS. Some functions are actually named |
| 5045 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5046 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5047 | choke me |
| 5048 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5049 | $ac_func(); |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5050 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5051 | |
| 5052 | ; return 0; } |
| 5053 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5054 | if { (eval echo configure:5055: \"$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] | 5055 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5056 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5057 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5058 | echo "configure: failed program was:" >&5 |
| 5059 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5060 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5061 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5062 | fi |
| 5063 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5064 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5065 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5066 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5067 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5068 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5069 | cat >> confdefs.h <<EOF |
| 5070 | #define $ac_tr_func 1 |
| 5071 | EOF |
| 5072 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5073 | #line 5074 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5074 | #include "confdefs.h" |
| 5075 | #include <unistd.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5076 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5077 | setpgrp(0,0); |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5078 | ; return 0; } |
| 5079 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5080 | if { (eval echo configure:5081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5081 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5082 | cat >> confdefs.h <<\EOF |
| 5083 | #define SETPGRP_HAVE_ARG 1 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5084 | EOF |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5085 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5086 | else |
| 5087 | echo "configure: failed program was:" >&5 |
| 5088 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5089 | fi |
| 5090 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5091 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5092 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5093 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5094 | done |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5095 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5096 | for ac_func in gettimeofday |
| 5097 | do |
| 5098 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5099 | echo "configure:5100: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5100 | 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] | 5101 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5102 | else |
| 5103 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5104 | #line 5105 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5105 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5106 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5107 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5108 | #include <assert.h> |
| 5109 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5110 | /* We use char because int might match the return type of a gcc2 |
| 5111 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5112 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5113 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5114 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5115 | |
| 5116 | /* The GNU C library defines this for functions which it implements |
| 5117 | to always fail with ENOSYS. Some functions are actually named |
| 5118 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5119 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5120 | choke me |
| 5121 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5122 | $ac_func(); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5123 | #endif |
| 5124 | |
| 5125 | ; return 0; } |
| 5126 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5127 | if { (eval echo configure:5128: \"$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] | 5128 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5129 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5130 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5131 | echo "configure: failed program was:" >&5 |
| 5132 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5133 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5134 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5135 | fi |
| 5136 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5137 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5138 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5139 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5140 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5141 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5142 | cat >> confdefs.h <<EOF |
| 5143 | #define $ac_tr_func 1 |
| 5144 | EOF |
| 5145 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5146 | #line 5147 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5147 | #include "confdefs.h" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5148 | #include <sys/time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5149 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5150 | gettimeofday((struct timeval*)0,(struct timezone*)0); |
| 5151 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5152 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5153 | if { (eval echo configure:5154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5154 | : |
| 5155 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5156 | echo "configure: failed program was:" >&5 |
| 5157 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5158 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5159 | cat >> confdefs.h <<\EOF |
| 5160 | #define GETTIMEOFDAY_NO_TZ 1 |
| 5161 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5162 | |
| 5163 | fi |
| 5164 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5165 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5166 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5167 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5168 | done |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5169 | |
| 5170 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5171 | for ac_func in getaddrinfo |
| 5172 | do |
| 5173 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5174 | echo "configure:5175: checking for $ac_func" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5175 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5176 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5177 | else |
| 5178 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5179 | #line 5180 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5180 | #include "confdefs.h" |
| 5181 | /* System header to define __stub macros and hopefully few prototypes, |
| 5182 | which can conflict with char $ac_func(); below. */ |
| 5183 | #include <assert.h> |
| 5184 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5185 | /* We use char because int might match the return type of a gcc2 |
| 5186 | builtin and then its argument prototype would still apply. */ |
| 5187 | char $ac_func(); |
| 5188 | |
| 5189 | int main() { |
| 5190 | |
| 5191 | /* The GNU C library defines this for functions which it implements |
| 5192 | to always fail with ENOSYS. Some functions are actually named |
| 5193 | something starting with __ and the normal name is an alias. */ |
| 5194 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5195 | choke me |
| 5196 | #else |
| 5197 | $ac_func(); |
| 5198 | #endif |
| 5199 | |
| 5200 | ; return 0; } |
| 5201 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5202 | if { (eval echo configure:5203: \"$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] | 5203 | rm -rf conftest* |
| 5204 | eval "ac_cv_func_$ac_func=yes" |
| 5205 | else |
| 5206 | echo "configure: failed program was:" >&5 |
| 5207 | cat conftest.$ac_ext >&5 |
| 5208 | rm -rf conftest* |
| 5209 | eval "ac_cv_func_$ac_func=no" |
| 5210 | fi |
| 5211 | rm -f conftest* |
| 5212 | fi |
| 5213 | |
| 5214 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5215 | echo "$ac_t""yes" 1>&6 |
| 5216 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5217 | cat >> confdefs.h <<EOF |
| 5218 | #define $ac_tr_func 1 |
| 5219 | EOF |
| 5220 | echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5221 | echo "configure:5222: checking getaddrinfo bug" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5222 | if test "$cross_compiling" = yes; then |
| 5223 | echo "$ac_t""buggy" 1>&6 |
| 5224 | buggygetaddrinfo=yes |
| 5225 | else |
| 5226 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5227 | #line 5228 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5228 | #include "confdefs.h" |
| 5229 | |
| 5230 | #include <sys/types.h> |
| 5231 | #include <netdb.h> |
| 5232 | #include <string.h> |
| 5233 | #include <sys/socket.h> |
| 5234 | #include <netinet/in.h> |
| 5235 | |
| 5236 | main() |
| 5237 | { |
| 5238 | int passive, gaierr, inet4 = 0, inet6 = 0; |
| 5239 | struct addrinfo hints, *ai, *aitop; |
| 5240 | char straddr[INET6_ADDRSTRLEN], strport[16]; |
| 5241 | |
| 5242 | for (passive = 0; passive <= 1; passive++) { |
| 5243 | memset(&hints, 0, sizeof(hints)); |
| 5244 | hints.ai_family = AF_UNSPEC; |
| 5245 | hints.ai_flags = passive ? AI_PASSIVE : 0; |
| 5246 | hints.ai_socktype = SOCK_STREAM; |
| 5247 | if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) { |
| 5248 | (void)gai_strerror(gaierr); |
| 5249 | goto bad; |
| 5250 | } |
| 5251 | for (ai = aitop; ai; ai = ai->ai_next) { |
| 5252 | if (ai->ai_addr == NULL || |
| 5253 | ai->ai_addrlen == 0 || |
| 5254 | getnameinfo(ai->ai_addr, ai->ai_addrlen, |
| 5255 | straddr, sizeof(straddr), strport, sizeof(strport), |
| 5256 | NI_NUMERICHOST|NI_NUMERICSERV) != 0) { |
| 5257 | goto bad; |
| 5258 | } |
| 5259 | switch (ai->ai_family) { |
| 5260 | case AF_INET: |
| 5261 | if (strcmp(strport, "54321") != 0) { |
| 5262 | goto bad; |
| 5263 | } |
| 5264 | if (passive) { |
| 5265 | if (strcmp(straddr, "0.0.0.0") != 0) { |
| 5266 | goto bad; |
| 5267 | } |
| 5268 | } else { |
| 5269 | if (strcmp(straddr, "127.0.0.1") != 0) { |
| 5270 | goto bad; |
| 5271 | } |
| 5272 | } |
| 5273 | inet4++; |
| 5274 | break; |
| 5275 | case AF_INET6: |
| 5276 | if (strcmp(strport, "54321") != 0) { |
| 5277 | goto bad; |
| 5278 | } |
| 5279 | if (passive) { |
| 5280 | if (strcmp(straddr, "::") != 0) { |
| 5281 | goto bad; |
| 5282 | } |
| 5283 | } else { |
| 5284 | if (strcmp(straddr, "::1") != 0) { |
| 5285 | goto bad; |
| 5286 | } |
| 5287 | } |
| 5288 | inet6++; |
| 5289 | break; |
| 5290 | case AF_UNSPEC: |
| 5291 | goto bad; |
| 5292 | break; |
| 5293 | default: |
| 5294 | /* another family support? */ |
| 5295 | break; |
| 5296 | } |
| 5297 | } |
| 5298 | } |
| 5299 | |
| 5300 | if (!(inet4 == 0 || inet4 == 2)) |
| 5301 | goto bad; |
| 5302 | if (!(inet6 == 0 || inet6 == 2)) |
| 5303 | goto bad; |
| 5304 | |
| 5305 | if (aitop) |
| 5306 | freeaddrinfo(aitop); |
| 5307 | exit(0); |
| 5308 | |
| 5309 | bad: |
| 5310 | if (aitop) |
| 5311 | freeaddrinfo(aitop); |
| 5312 | exit(1); |
| 5313 | } |
| 5314 | |
| 5315 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5316 | if { (eval echo configure:5317: \"$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] | 5317 | then |
| 5318 | echo "$ac_t""good" 1>&6 |
| 5319 | buggygetaddrinfo=no |
| 5320 | else |
| 5321 | echo "configure: failed program was:" >&5 |
| 5322 | cat conftest.$ac_ext >&5 |
| 5323 | rm -fr conftest* |
| 5324 | echo "$ac_t""buggy" 1>&6 |
| 5325 | buggygetaddrinfo=yes |
| 5326 | fi |
| 5327 | rm -fr conftest* |
| 5328 | fi |
| 5329 | |
| 5330 | else |
| 5331 | echo "$ac_t""no" 1>&6 |
| 5332 | buggygetaddrinfo=yes |
| 5333 | fi |
| 5334 | done |
| 5335 | |
| 5336 | |
| 5337 | if test "$buggygetaddrinfo" = "yes"; then |
| 5338 | if test "$ipv6" = "yes"; then |
| 5339 | echo 'Fatal: You must get working getaddrinfo() function.' |
| 5340 | echo ' or you can specify "--disable-ipv6"'. |
| 5341 | exit 1 |
| 5342 | fi |
| 5343 | fi |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5344 | for ac_func in getnameinfo |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5345 | do |
| 5346 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5347 | echo "configure:5348: checking for $ac_func" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5348 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5349 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5350 | else |
| 5351 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5352 | #line 5353 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5353 | #include "confdefs.h" |
| 5354 | /* System header to define __stub macros and hopefully few prototypes, |
| 5355 | which can conflict with char $ac_func(); below. */ |
| 5356 | #include <assert.h> |
| 5357 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5358 | /* We use char because int might match the return type of a gcc2 |
| 5359 | builtin and then its argument prototype would still apply. */ |
| 5360 | char $ac_func(); |
| 5361 | |
| 5362 | int main() { |
| 5363 | |
| 5364 | /* The GNU C library defines this for functions which it implements |
| 5365 | to always fail with ENOSYS. Some functions are actually named |
| 5366 | something starting with __ and the normal name is an alias. */ |
| 5367 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5368 | choke me |
| 5369 | #else |
| 5370 | $ac_func(); |
| 5371 | #endif |
| 5372 | |
| 5373 | ; return 0; } |
| 5374 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5375 | if { (eval echo configure:5376: \"$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] | 5376 | rm -rf conftest* |
| 5377 | eval "ac_cv_func_$ac_func=yes" |
| 5378 | else |
| 5379 | echo "configure: failed program was:" >&5 |
| 5380 | cat conftest.$ac_ext >&5 |
| 5381 | rm -rf conftest* |
| 5382 | eval "ac_cv_func_$ac_func=no" |
| 5383 | fi |
| 5384 | rm -f conftest* |
| 5385 | fi |
| 5386 | |
| 5387 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5388 | echo "$ac_t""yes" 1>&6 |
| 5389 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5390 | cat >> confdefs.h <<EOF |
| 5391 | #define $ac_tr_func 1 |
| 5392 | EOF |
| 5393 | |
| 5394 | else |
| 5395 | echo "$ac_t""no" 1>&6 |
| 5396 | fi |
| 5397 | done |
| 5398 | |
| 5399 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5400 | # checks for structures |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5401 | echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5402 | echo "configure:5403: 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] | 5403 | if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5404 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5405 | else |
| 5406 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5407 | #line 5408 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5408 | #include "confdefs.h" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5409 | #include <sys/types.h> |
| 5410 | #include <sys/time.h> |
| 5411 | #include <time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5412 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5413 | struct tm *tp; |
| 5414 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5415 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5416 | if { (eval echo configure:5417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5417 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5418 | ac_cv_header_time=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5419 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5420 | echo "configure: failed program was:" >&5 |
| 5421 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5422 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5423 | ac_cv_header_time=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5424 | fi |
| 5425 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5426 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5427 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5428 | echo "$ac_t""$ac_cv_header_time" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5429 | if test $ac_cv_header_time = yes; then |
| 5430 | cat >> confdefs.h <<\EOF |
| 5431 | #define TIME_WITH_SYS_TIME 1 |
| 5432 | EOF |
| 5433 | |
| 5434 | fi |
| 5435 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5436 | echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5437 | echo "configure:5438: 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] | 5438 | if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5439 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5440 | else |
| 5441 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5442 | #line 5443 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5443 | #include "confdefs.h" |
| 5444 | #include <sys/types.h> |
| 5445 | #include <time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5446 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5447 | struct tm *tp; tp->tm_sec; |
| 5448 | ; return 0; } |
| 5449 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5450 | if { (eval echo configure:5451: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5451 | rm -rf conftest* |
| 5452 | ac_cv_struct_tm=time.h |
| 5453 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5454 | echo "configure: failed program was:" >&5 |
| 5455 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5456 | rm -rf conftest* |
| 5457 | ac_cv_struct_tm=sys/time.h |
| 5458 | fi |
| 5459 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5460 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5461 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5462 | echo "$ac_t""$ac_cv_struct_tm" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5463 | if test $ac_cv_struct_tm = sys/time.h; then |
| 5464 | cat >> confdefs.h <<\EOF |
| 5465 | #define TM_IN_SYS_TIME 1 |
| 5466 | EOF |
| 5467 | |
| 5468 | fi |
| 5469 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5470 | echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5471 | echo "configure:5472: checking for tm_zone in struct tm" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5472 | 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] | 5473 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5474 | else |
| 5475 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5476 | #line 5477 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5477 | #include "confdefs.h" |
| 5478 | #include <sys/types.h> |
| 5479 | #include <$ac_cv_struct_tm> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5480 | int main() { |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5481 | struct tm tm; tm.tm_zone; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5482 | ; return 0; } |
| 5483 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5484 | if { (eval echo configure:5485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5485 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5486 | ac_cv_struct_tm_zone=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5487 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5488 | echo "configure: failed program was:" >&5 |
| 5489 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5490 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5491 | ac_cv_struct_tm_zone=no |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5492 | fi |
| 5493 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5494 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5495 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5496 | echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6 |
| 5497 | if test "$ac_cv_struct_tm_zone" = yes; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5498 | cat >> confdefs.h <<\EOF |
| 5499 | #define HAVE_TM_ZONE 1 |
| 5500 | EOF |
| 5501 | |
| 5502 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5503 | echo $ac_n "checking for tzname""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5504 | echo "configure:5505: checking for tzname" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5505 | if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5506 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5507 | else |
| 5508 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5509 | #line 5510 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5510 | #include "confdefs.h" |
| 5511 | #include <time.h> |
| 5512 | #ifndef tzname /* For SGI. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5513 | extern char *tzname[]; /* RS6000 and others reject char **tzname. */ |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5514 | #endif |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5515 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5516 | atoi(*tzname); |
| 5517 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5518 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5519 | if { (eval echo configure:5520: \"$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] | 5520 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5521 | ac_cv_var_tzname=yes |
| 5522 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5523 | echo "configure: failed program was:" >&5 |
| 5524 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5525 | rm -rf conftest* |
| 5526 | ac_cv_var_tzname=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5527 | fi |
| 5528 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5529 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5530 | |
| 5531 | echo "$ac_t""$ac_cv_var_tzname" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5532 | if test $ac_cv_var_tzname = yes; then |
| 5533 | cat >> confdefs.h <<\EOF |
| 5534 | #define HAVE_TZNAME 1 |
| 5535 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5536 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5537 | fi |
| 5538 | fi |
| 5539 | |
| 5540 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5541 | echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5542 | echo "configure:5543: checking for time.h that defines altzone" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5543 | 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] | 5544 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5545 | else |
| 5546 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5547 | #line 5548 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5548 | #include "confdefs.h" |
| 5549 | #include <time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5550 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5551 | return altzone; |
| 5552 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5553 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5554 | if { (eval echo configure:5555: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5555 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5556 | ac_cv_header_time_altzone=yes |
| 5557 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5558 | echo "configure: failed program was:" >&5 |
| 5559 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5560 | rm -rf conftest* |
| 5561 | ac_cv_header_time_altzone=no |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5562 | fi |
| 5563 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5564 | fi |
| 5565 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5566 | echo "$ac_t""$ac_cv_header_time_altzone" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5567 | if test $ac_cv_header_time_altzone = yes; then |
| 5568 | cat >> confdefs.h <<\EOF |
| 5569 | #define HAVE_ALTZONE 1 |
| 5570 | EOF |
| 5571 | |
| 5572 | fi |
| 5573 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5574 | was_it_defined=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5575 | echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5576 | echo "configure:5577: 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] | 5577 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5578 | #line 5579 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5579 | #include "confdefs.h" |
| 5580 | |
| 5581 | #include <sys/types.h> |
| 5582 | #include <sys/select.h> |
| 5583 | #include <sys/time.h> |
| 5584 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5585 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5586 | ; |
| 5587 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5588 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5589 | if { (eval echo configure:5590: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5590 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5591 | cat >> confdefs.h <<\EOF |
| 5592 | #define SYS_SELECT_WITH_SYS_TIME 1 |
| 5593 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5594 | was_it_defined=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5595 | else |
| 5596 | echo "configure: failed program was:" >&5 |
| 5597 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5598 | fi |
| 5599 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5600 | echo "$ac_t""$was_it_defined" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5601 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5602 | echo $ac_n "checking for addrinfo""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5603 | echo "configure:5604: checking for addrinfo" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5604 | if eval "test \"`echo '$''{'ac_cv_struct_addrinfo'+set}'`\" = set"; then |
| 5605 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5606 | else |
| 5607 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5608 | #line 5609 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5609 | #include "confdefs.h" |
| 5610 | |
| 5611 | # include <netdb.h> |
| 5612 | int main() { |
| 5613 | struct addrinfo a |
| 5614 | ; return 0; } |
| 5615 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5616 | if { (eval echo configure:5617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5617 | rm -rf conftest* |
| 5618 | ac_cv_struct_addrinfo=yes |
| 5619 | else |
| 5620 | echo "configure: failed program was:" >&5 |
| 5621 | cat conftest.$ac_ext >&5 |
| 5622 | rm -rf conftest* |
| 5623 | ac_cv_struct_addrinfo=no |
| 5624 | fi |
| 5625 | rm -f conftest* |
| 5626 | fi |
| 5627 | |
| 5628 | echo "$ac_t""$ac_cv_struct_addrinfo" 1>&6 |
| 5629 | if test $ac_cv_struct_addrinfo = yes; then |
| 5630 | cat >> confdefs.h <<\EOF |
| 5631 | #define HAVE_ADDRINFO 1 |
| 5632 | EOF |
| 5633 | |
| 5634 | fi |
| 5635 | |
| 5636 | echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5637 | echo "configure:5638: checking for sockaddr_storage" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5638 | if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then |
| 5639 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5640 | else |
| 5641 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5642 | #line 5643 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5643 | #include "confdefs.h" |
| 5644 | |
| 5645 | # include <sys/types.h> |
| 5646 | # include <sys/socket.h> |
| 5647 | int main() { |
| 5648 | struct sockaddr_storage s |
| 5649 | ; return 0; } |
| 5650 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5651 | if { (eval echo configure:5652: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5652 | rm -rf conftest* |
| 5653 | ac_cv_struct_sockaddr_storage=yes |
| 5654 | else |
| 5655 | echo "configure: failed program was:" >&5 |
| 5656 | cat conftest.$ac_ext >&5 |
| 5657 | rm -rf conftest* |
| 5658 | ac_cv_struct_sockaddr_storage=no |
| 5659 | fi |
| 5660 | rm -f conftest* |
| 5661 | fi |
| 5662 | |
| 5663 | echo "$ac_t""$ac_cv_struct_sockaddr_storage" 1>&6 |
| 5664 | if test $ac_cv_struct_sockaddr_storage = yes; then |
| 5665 | cat >> confdefs.h <<\EOF |
| 5666 | #define HAVE_SOCKADDR_STORAGE 1 |
| 5667 | EOF |
| 5668 | |
| 5669 | fi |
| 5670 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5671 | # checks for compiler characteristics |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5672 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5673 | echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5674 | echo "configure:5675: checking whether char is unsigned" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5675 | 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] | 5676 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5677 | else |
| 5678 | if test "$GCC" = yes; then |
| 5679 | # GCC predefines this symbol on systems where it applies. |
| 5680 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5681 | #line 5682 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5682 | #include "confdefs.h" |
| 5683 | #ifdef __CHAR_UNSIGNED__ |
| 5684 | yes |
| 5685 | #endif |
| 5686 | |
| 5687 | EOF |
| 5688 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 5689 | egrep "yes" >/dev/null 2>&1; then |
| 5690 | rm -rf conftest* |
| 5691 | ac_cv_c_char_unsigned=yes |
| 5692 | else |
| 5693 | rm -rf conftest* |
| 5694 | ac_cv_c_char_unsigned=no |
| 5695 | fi |
| 5696 | rm -f conftest* |
| 5697 | |
| 5698 | else |
| 5699 | if test "$cross_compiling" = yes; then |
| 5700 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 5701 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5702 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5703 | #line 5704 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5704 | #include "confdefs.h" |
| 5705 | /* volatile prevents gcc2 from optimizing the test away on sparcs. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5706 | #if !defined(__STDC__) || __STDC__ != 1 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5707 | #define volatile |
| 5708 | #endif |
| 5709 | main() { |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5710 | volatile char c = 255; exit(c < 0); |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5711 | } |
| 5712 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5713 | if { (eval echo configure:5714: \"$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] | 5714 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5715 | ac_cv_c_char_unsigned=yes |
| 5716 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5717 | echo "configure: failed program was:" >&5 |
| 5718 | cat conftest.$ac_ext >&5 |
| 5719 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5720 | ac_cv_c_char_unsigned=no |
| 5721 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5722 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5723 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5724 | |
| 5725 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5726 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5727 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5728 | echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5729 | if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then |
| 5730 | cat >> confdefs.h <<\EOF |
| 5731 | #define __CHAR_UNSIGNED__ 1 |
| 5732 | EOF |
| 5733 | |
| 5734 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5735 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5736 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5737 | echo "configure:5738: checking for working const" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5738 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5739 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5740 | else |
| 5741 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5742 | #line 5743 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5743 | #include "confdefs.h" |
| 5744 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5745 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5746 | |
| 5747 | /* Ultrix mips cc rejects this. */ |
Martin v. Löwis | 9db2f57 | 2001-07-23 01:30:10 +0000 | [diff] [blame] | 5748 | typedef int charset[2]; const charset x; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5749 | /* SunOS 4.1.1 cc rejects this. */ |
| 5750 | char const *const *ccp; |
| 5751 | char **p; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5752 | /* NEC SVR4.0.2 mips cc rejects this. */ |
| 5753 | struct point {int x, y;}; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5754 | static struct point const zero = {0,0}; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5755 | /* AIX XL C 1.02.0.0 rejects this. |
| 5756 | It does not let you subtract one const X* pointer from another in an arm |
| 5757 | of an if-expression whose if-part is not a constant expression */ |
| 5758 | const char *g = "string"; |
| 5759 | ccp = &g + (g ? g-g : 0); |
| 5760 | /* HPUX 7.0 cc rejects these. */ |
| 5761 | ++ccp; |
| 5762 | p = (char**) ccp; |
| 5763 | ccp = (char const *const *) p; |
| 5764 | { /* SCO 3.2v4 cc rejects this. */ |
| 5765 | char *t; |
| 5766 | char const *s = 0 ? (char *) 0 : (char const *) 0; |
| 5767 | |
| 5768 | *t++ = 0; |
| 5769 | } |
| 5770 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5771 | int x[] = {25, 17}; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5772 | const int *foo = &x[0]; |
| 5773 | ++foo; |
| 5774 | } |
| 5775 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ |
| 5776 | typedef const int *iptr; |
| 5777 | iptr p = 0; |
| 5778 | ++p; |
| 5779 | } |
| 5780 | { /* AIX XL C 1.02.0.0 rejects this saying |
| 5781 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ |
| 5782 | struct s { int j; const int *ap[3]; }; |
| 5783 | struct s *b; b->j = 5; |
| 5784 | } |
| 5785 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ |
| 5786 | const int foo = 10; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5787 | } |
| 5788 | |
| 5789 | ; return 0; } |
| 5790 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5791 | if { (eval echo configure:5792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5792 | rm -rf conftest* |
| 5793 | ac_cv_c_const=yes |
| 5794 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5795 | echo "configure: failed program was:" >&5 |
| 5796 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5797 | rm -rf conftest* |
| 5798 | ac_cv_c_const=no |
| 5799 | fi |
| 5800 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5801 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5802 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5803 | echo "$ac_t""$ac_cv_c_const" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5804 | if test $ac_cv_c_const = no; then |
| 5805 | cat >> confdefs.h <<\EOF |
| 5806 | #define const |
| 5807 | EOF |
| 5808 | |
| 5809 | fi |
| 5810 | |
| 5811 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5812 | works=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5813 | echo $ac_n "checking for working volatile""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5814 | echo "configure:5815: checking for working volatile" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5815 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5816 | #line 5817 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5817 | #include "confdefs.h" |
| 5818 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5819 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5820 | volatile int x; x = 0; |
| 5821 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5822 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5823 | if { (eval echo configure:5824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5824 | rm -rf conftest* |
| 5825 | works=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5826 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5827 | echo "configure: failed program was:" >&5 |
| 5828 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5829 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5830 | cat >> confdefs.h <<\EOF |
| 5831 | #define volatile |
| 5832 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5833 | |
| 5834 | fi |
| 5835 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5836 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5837 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5838 | works=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5839 | echo $ac_n "checking for working signed char""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5840 | echo "configure:5841: checking for working signed char" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5841 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5842 | #line 5843 "configure" |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 5843 | #include "confdefs.h" |
| 5844 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5845 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5846 | signed char c; |
| 5847 | ; return 0; } |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 5848 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5849 | if { (eval echo configure:5850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5850 | rm -rf conftest* |
| 5851 | works=yes |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 5852 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5853 | echo "configure: failed program was:" >&5 |
| 5854 | cat conftest.$ac_ext >&5 |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 5855 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5856 | cat >> confdefs.h <<\EOF |
| 5857 | #define signed |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5858 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5859 | |
| 5860 | fi |
| 5861 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5862 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5863 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5864 | have_prototypes=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5865 | echo $ac_n "checking for prototypes""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5866 | echo "configure:5867: checking for prototypes" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5867 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5868 | #line 5869 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5869 | #include "confdefs.h" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5870 | int foo(int x) { return 0; } |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5871 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5872 | return foo(10); |
| 5873 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5874 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5875 | if { (eval echo configure:5876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5876 | rm -rf conftest* |
| 5877 | cat >> confdefs.h <<\EOF |
| 5878 | #define HAVE_PROTOTYPES 1 |
| 5879 | EOF |
| 5880 | have_prototypes=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5881 | else |
| 5882 | echo "configure: failed program was:" >&5 |
| 5883 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5884 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5885 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5886 | echo "$ac_t""$have_prototypes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5887 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5888 | works=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5889 | echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5890 | echo "configure:5891: checking for variable length prototypes and stdarg.h" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5891 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5892 | #line 5893 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5893 | #include "confdefs.h" |
| 5894 | |
| 5895 | #include <stdarg.h> |
Guido van Rossum | 90eea07 | 1996-08-30 20:58:57 +0000 | [diff] [blame] | 5896 | int foo(int x, ...) { |
| 5897 | va_list va; |
| 5898 | va_start(va, x); |
| 5899 | va_arg(va, int); |
| 5900 | va_arg(va, char *); |
| 5901 | va_arg(va, double); |
| 5902 | return 0; |
| 5903 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5904 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5905 | int main() { |
Guido van Rossum | 90eea07 | 1996-08-30 20:58:57 +0000 | [diff] [blame] | 5906 | return foo(10, "", 3.14); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5907 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5908 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5909 | if { (eval echo configure:5910: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5910 | rm -rf conftest* |
| 5911 | cat >> confdefs.h <<\EOF |
| 5912 | #define HAVE_STDARG_PROTOTYPES 1 |
| 5913 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5914 | works=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5915 | else |
| 5916 | echo "configure: failed program was:" >&5 |
| 5917 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5918 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5919 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5920 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5921 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5922 | if test "$have_prototypes" = yes; then |
| 5923 | bad_prototypes=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5924 | echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5925 | echo "configure:5926: checking for bad exec* prototypes" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5926 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5927 | #line 5928 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5928 | #include "confdefs.h" |
| 5929 | #include <unistd.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5930 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5931 | char **t;execve("@",t,t); |
| 5932 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5933 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5934 | if { (eval echo configure:5935: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5935 | : |
| 5936 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5937 | echo "configure: failed program was:" >&5 |
| 5938 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5939 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5940 | cat >> confdefs.h <<\EOF |
| 5941 | #define BAD_EXEC_PROTOTYPES 1 |
| 5942 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5943 | bad_prototypes=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5944 | fi |
| 5945 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5946 | echo "$ac_t""$bad_prototypes" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5947 | fi |
| 5948 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5949 | # check if sockaddr has sa_len member |
| 5950 | echo $ac_n "checking if sockaddr has sa_len member""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5951 | echo "configure:5952: checking if sockaddr has sa_len member" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5952 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5953 | #line 5954 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5954 | #include "confdefs.h" |
| 5955 | #include <sys/types.h> |
| 5956 | #include <sys/socket.h> |
| 5957 | int main() { |
| 5958 | struct sockaddr x; |
| 5959 | x.sa_len = 0; |
| 5960 | ; return 0; } |
| 5961 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5962 | if { (eval echo configure:5963: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5963 | rm -rf conftest* |
| 5964 | echo "$ac_t""yes" 1>&6 |
| 5965 | cat >> confdefs.h <<\EOF |
| 5966 | #define HAVE_SOCKADDR_SA_LEN 1 |
| 5967 | EOF |
| 5968 | |
| 5969 | else |
| 5970 | echo "configure: failed program was:" >&5 |
| 5971 | cat conftest.$ac_ext >&5 |
| 5972 | rm -rf conftest* |
| 5973 | echo "$ac_t""no" 1>&6 |
| 5974 | fi |
| 5975 | rm -f conftest* |
| 5976 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5977 | echo $ac_n "checking for bad static forward""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5978 | echo "configure:5979: checking for bad static forward" >&5 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 5979 | if eval "test \"`echo '$''{'ac_cv_bad_static_forward'+set}'`\" = set"; then |
| 5980 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5981 | else |
| 5982 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5983 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 5984 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5985 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 5986 | #line 5987 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5987 | #include "confdefs.h" |
| 5988 | |
| 5989 | struct s { int a; int b; }; |
| 5990 | static struct s foo; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5991 | int foobar() { |
| 5992 | static int random; |
| 5993 | random = (int) &foo; |
| 5994 | return random; |
| 5995 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5996 | static struct s foo = { 1, 2 }; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5997 | main() { |
| 5998 | exit(!((int)&foo == foobar())); |
| 5999 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6000 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 6001 | if { (eval echo configure:6002: \"$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] | 6002 | then |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6003 | ac_cv_bad_static_forward=no |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6004 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6005 | echo "configure: failed program was:" >&5 |
| 6006 | cat conftest.$ac_ext >&5 |
| 6007 | rm -fr conftest* |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6008 | ac_cv_bad_static_forward=yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6009 | fi |
| 6010 | rm -fr conftest* |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6011 | fi |
| 6012 | |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6013 | fi |
| 6014 | |
| 6015 | echo "$ac_t""$ac_cv_bad_static_forward" 1>&6 |
| 6016 | if test "$ac_cv_bad_static_forward" = yes |
| 6017 | then |
| 6018 | cat >> confdefs.h <<\EOF |
| 6019 | #define BAD_STATIC_FORWARD 1 |
| 6020 | EOF |
| 6021 | |
| 6022 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6023 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6024 | va_list_is_array=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6025 | echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 6026 | echo "configure:6027: checking whether va_list is an array" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6027 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 6028 | #line 6029 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6029 | #include "confdefs.h" |
| 6030 | |
| 6031 | #ifdef HAVE_STDARG_PROTOTYPES |
| 6032 | #include <stdarg.h> |
| 6033 | #else |
| 6034 | #include <varargs.h> |
| 6035 | #endif |
| 6036 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6037 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6038 | va_list list1, list2; list1 = list2; |
| 6039 | ; return 0; } |
| 6040 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 6041 | if { (eval echo configure:6042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6042 | : |
| 6043 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6044 | echo "configure: failed program was:" >&5 |
| 6045 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6046 | rm -rf conftest* |
| 6047 | cat >> confdefs.h <<\EOF |
| 6048 | #define VA_LIST_IS_ARRAY 1 |
| 6049 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6050 | va_list_is_array=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6051 | fi |
| 6052 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6053 | echo "$ac_t""$va_list_is_array" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6054 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6055 | # sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-( |
| 6056 | echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 6057 | echo "configure:6058: checking for gethostbyname_r" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6058 | 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] | 6059 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6060 | else |
| 6061 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 6062 | #line 6063 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6063 | #include "confdefs.h" |
| 6064 | /* System header to define __stub macros and hopefully few prototypes, |
| 6065 | which can conflict with char gethostbyname_r(); below. */ |
| 6066 | #include <assert.h> |
| 6067 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6068 | /* We use char because int might match the return type of a gcc2 |
| 6069 | builtin and then its argument prototype would still apply. */ |
| 6070 | char gethostbyname_r(); |
| 6071 | |
| 6072 | int main() { |
| 6073 | |
| 6074 | /* The GNU C library defines this for functions which it implements |
| 6075 | to always fail with ENOSYS. Some functions are actually named |
| 6076 | something starting with __ and the normal name is an alias. */ |
| 6077 | #if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r) |
| 6078 | choke me |
| 6079 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6080 | gethostbyname_r(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6081 | #endif |
| 6082 | |
| 6083 | ; return 0; } |
| 6084 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 6085 | if { (eval echo configure:6086: \"$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] | 6086 | rm -rf conftest* |
| 6087 | eval "ac_cv_func_gethostbyname_r=yes" |
| 6088 | else |
| 6089 | echo "configure: failed program was:" >&5 |
| 6090 | cat conftest.$ac_ext >&5 |
| 6091 | rm -rf conftest* |
| 6092 | eval "ac_cv_func_gethostbyname_r=no" |
| 6093 | fi |
| 6094 | rm -f conftest* |
| 6095 | fi |
| 6096 | |
| 6097 | if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then |
| 6098 | echo "$ac_t""yes" 1>&6 |
| 6099 | |
| 6100 | cat >> confdefs.h <<\EOF |
| 6101 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6102 | EOF |
| 6103 | |
| 6104 | echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 6105 | echo "configure:6106: checking gethostbyname_r with 6 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6106 | OLD_CFLAGS=$CFLAGS |
| 6107 | CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS" |
| 6108 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 6109 | #line 6110 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6110 | #include "confdefs.h" |
| 6111 | |
| 6112 | # include <netdb.h> |
| 6113 | |
| 6114 | int main() { |
| 6115 | |
| 6116 | char *name; |
| 6117 | struct hostent *he, *res; |
| 6118 | char buffer[2048]; |
| 6119 | int buflen = 2048; |
| 6120 | int h_errnop; |
| 6121 | |
| 6122 | (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop) |
| 6123 | |
| 6124 | ; return 0; } |
| 6125 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 6126 | if { (eval echo configure:6127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6127 | rm -rf conftest* |
| 6128 | |
| 6129 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6130 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6131 | EOF |
| 6132 | |
| 6133 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6134 | #define HAVE_GETHOSTBYNAME_R_6_ARG 1 |
| 6135 | EOF |
| 6136 | |
| 6137 | echo "$ac_t""yes" 1>&6 |
| 6138 | |
| 6139 | else |
| 6140 | echo "configure: failed program was:" >&5 |
| 6141 | cat conftest.$ac_ext >&5 |
| 6142 | rm -rf conftest* |
| 6143 | |
| 6144 | echo "$ac_t""no" 1>&6 |
| 6145 | echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 6146 | echo "configure:6147: checking gethostbyname_r with 5 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6147 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 6148 | #line 6149 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6149 | #include "confdefs.h" |
| 6150 | |
| 6151 | # include <netdb.h> |
| 6152 | |
| 6153 | int main() { |
| 6154 | |
| 6155 | char *name; |
| 6156 | struct hostent *he; |
| 6157 | char buffer[2048]; |
| 6158 | int buflen = 2048; |
| 6159 | int h_errnop; |
| 6160 | |
| 6161 | (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop) |
| 6162 | |
| 6163 | ; return 0; } |
| 6164 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 6165 | if { (eval echo configure:6166: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6166 | rm -rf conftest* |
| 6167 | |
| 6168 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6169 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6170 | EOF |
| 6171 | |
| 6172 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6173 | #define HAVE_GETHOSTBYNAME_R_5_ARG 1 |
| 6174 | EOF |
| 6175 | |
| 6176 | echo "$ac_t""yes" 1>&6 |
| 6177 | |
| 6178 | else |
| 6179 | echo "configure: failed program was:" >&5 |
| 6180 | cat conftest.$ac_ext >&5 |
| 6181 | rm -rf conftest* |
| 6182 | |
| 6183 | echo "$ac_t""no" 1>&6 |
| 6184 | echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 6185 | echo "configure:6186: checking gethostbyname_r with 3 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6186 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 6187 | #line 6188 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6188 | #include "confdefs.h" |
| 6189 | |
| 6190 | # include <netdb.h> |
| 6191 | |
| 6192 | int main() { |
| 6193 | |
| 6194 | char *name; |
| 6195 | struct hostent *he; |
| 6196 | struct hostent_data data; |
| 6197 | |
| 6198 | (void) gethostbyname_r(name, he, &data); |
| 6199 | |
| 6200 | ; return 0; } |
| 6201 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 6202 | if { (eval echo configure:6203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6203 | rm -rf conftest* |
| 6204 | |
| 6205 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6206 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6207 | EOF |
| 6208 | |
| 6209 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6210 | #define HAVE_GETHOSTBYNAME_R_3_ARG 1 |
| 6211 | EOF |
| 6212 | |
| 6213 | echo "$ac_t""yes" 1>&6 |
| 6214 | |
| 6215 | else |
| 6216 | echo "configure: failed program was:" >&5 |
| 6217 | cat conftest.$ac_ext >&5 |
| 6218 | rm -rf conftest* |
| 6219 | |
| 6220 | echo "$ac_t""no" 1>&6 |
| 6221 | |
| 6222 | fi |
| 6223 | rm -f conftest* |
| 6224 | |
| 6225 | fi |
| 6226 | rm -f conftest* |
| 6227 | |
| 6228 | fi |
| 6229 | rm -f conftest* |
| 6230 | CFLAGS=$OLD_CFLAGS |
| 6231 | |
| 6232 | else |
| 6233 | echo "$ac_t""no" 1>&6 |
| 6234 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6235 | for ac_func in gethostbyname |
| 6236 | do |
| 6237 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 6238 | echo "configure:6239: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6239 | 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] | 6240 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6241 | else |
| 6242 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 6243 | #line 6244 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6244 | #include "confdefs.h" |
| 6245 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6246 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6247 | #include <assert.h> |
| 6248 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6249 | /* We use char because int might match the return type of a gcc2 |
| 6250 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6251 | char $ac_func(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6252 | |
| 6253 | int main() { |
| 6254 | |
| 6255 | /* The GNU C library defines this for functions which it implements |
| 6256 | to always fail with ENOSYS. Some functions are actually named |
| 6257 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6258 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6259 | choke me |
| 6260 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6261 | $ac_func(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6262 | #endif |
| 6263 | |
| 6264 | ; return 0; } |
| 6265 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 6266 | if { (eval echo configure:6267: \"$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] | 6267 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6268 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6269 | else |
| 6270 | echo "configure: failed program was:" >&5 |
| 6271 | cat conftest.$ac_ext >&5 |
| 6272 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6273 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6274 | fi |
| 6275 | rm -f conftest* |
| 6276 | fi |
| 6277 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6278 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6279 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6280 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 6281 | cat >> confdefs.h <<EOF |
| 6282 | #define $ac_tr_func 1 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6283 | EOF |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6284 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6285 | else |
| 6286 | echo "$ac_t""no" 1>&6 |
| 6287 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6288 | done |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6289 | |
| 6290 | |
| 6291 | fi |
| 6292 | |
| 6293 | |
| 6294 | |
| 6295 | |
| 6296 | |
| 6297 | |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6298 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6299 | # checks for system services |
| 6300 | # (none yet) |
| 6301 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6302 | # Linux requires this for correct f.p. operations |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6303 | echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 6304 | echo "configure:6305: checking for __fpu_control" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6305 | if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6306 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6307 | else |
| 6308 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 6309 | #line 6310 "configure" |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6310 | #include "confdefs.h" |
| 6311 | /* System header to define __stub macros and hopefully few prototypes, |
| 6312 | which can conflict with char __fpu_control(); below. */ |
| 6313 | #include <assert.h> |
| 6314 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6315 | /* We use char because int might match the return type of a gcc2 |
| 6316 | builtin and then its argument prototype would still apply. */ |
| 6317 | char __fpu_control(); |
| 6318 | |
| 6319 | int main() { |
| 6320 | |
| 6321 | /* The GNU C library defines this for functions which it implements |
| 6322 | to always fail with ENOSYS. Some functions are actually named |
| 6323 | something starting with __ and the normal name is an alias. */ |
| 6324 | #if defined (__stub___fpu_control) || defined (__stub_____fpu_control) |
| 6325 | choke me |
| 6326 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6327 | __fpu_control(); |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6328 | #endif |
| 6329 | |
| 6330 | ; return 0; } |
| 6331 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 6332 | if { (eval echo configure:6333: \"$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] | 6333 | rm -rf conftest* |
| 6334 | eval "ac_cv_func___fpu_control=yes" |
| 6335 | else |
| 6336 | echo "configure: failed program was:" >&5 |
| 6337 | cat conftest.$ac_ext >&5 |
| 6338 | rm -rf conftest* |
| 6339 | eval "ac_cv_func___fpu_control=no" |
| 6340 | fi |
| 6341 | rm -f conftest* |
| 6342 | fi |
| 6343 | |
| 6344 | if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then |
| 6345 | echo "$ac_t""yes" 1>&6 |
| 6346 | : |
| 6347 | else |
| 6348 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6349 | echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 6350 | echo "configure:6351: checking for __fpu_control in -lieee" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6351 | ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6352 | 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] | 6353 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6354 | else |
| 6355 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6356 | LIBS="-lieee $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6357 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 6358 | #line 6359 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6359 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6360 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6361 | /* We use char because int might match the return type of a gcc2 |
| 6362 | builtin and then its argument prototype would still apply. */ |
| 6363 | char __fpu_control(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6364 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6365 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6366 | __fpu_control() |
| 6367 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6368 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 6369 | if { (eval echo configure:6370: \"$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] | 6370 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6371 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6372 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6373 | echo "configure: failed program was:" >&5 |
| 6374 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6375 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6376 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6377 | fi |
| 6378 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6379 | LIBS="$ac_save_LIBS" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6380 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6381 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6382 | 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] | 6383 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6384 | ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 6385 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6386 | cat >> confdefs.h <<EOF |
| 6387 | #define $ac_tr_lib 1 |
| 6388 | EOF |
| 6389 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6390 | LIBS="-lieee $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6391 | |
| 6392 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6393 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6394 | fi |
| 6395 | |
| 6396 | |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6397 | fi |
| 6398 | |
| 6399 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6400 | # Check for --with-fpectl |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6401 | echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 6402 | echo "configure:6403: checking for --with-fpectl" >&5 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6403 | # Check whether --with-fpectl or --without-fpectl was given. |
| 6404 | if test "${with_fpectl+set}" = set; then |
| 6405 | withval="$with_fpectl" |
| 6406 | |
| 6407 | if test "$withval" != no |
| 6408 | then cat >> confdefs.h <<\EOF |
| 6409 | #define WANT_SIGFPE_HANDLER 1 |
| 6410 | EOF |
| 6411 | echo "$ac_t""yes" 1>&6 |
| 6412 | else echo "$ac_t""no" 1>&6 |
| 6413 | fi |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6414 | else |
| 6415 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6416 | fi |
| 6417 | |
| 6418 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6419 | # check for --with-libm=... |
| 6420 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 6421 | case $ac_sys_system in |
Guido van Rossum | 3dc0a51 | 2000-10-05 18:00:06 +0000 | [diff] [blame] | 6422 | Darwin) ;; |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 6423 | BeOS) ;; |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 6424 | *) LIBM=-lm |
| 6425 | esac |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6426 | echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 6427 | echo "configure:6428: checking for --with-libm=STRING" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6428 | # Check whether --with-libm or --without-libm was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6429 | if test "${with_libm+set}" = set; then |
| 6430 | withval="$with_libm" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6431 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6432 | if test "$withval" = no |
| 6433 | then LIBM= |
| 6434 | echo "$ac_t""force LIBM empty" 1>&6 |
| 6435 | elif test "$withval" != yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6436 | then LIBM=$withval |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6437 | echo "$ac_t""set LIBM=\"$withval\"" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6438 | 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] | 6439 | fi |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6440 | else |
| 6441 | echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6442 | fi |
| 6443 | |
| 6444 | |
| 6445 | # check for --with-libc=... |
| 6446 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6447 | echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 6448 | echo "configure:6449: checking for --with-libc=STRING" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6449 | # Check whether --with-libc or --without-libc was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6450 | if test "${with_libc+set}" = set; then |
| 6451 | withval="$with_libc" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6452 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6453 | if test "$withval" = no |
| 6454 | then LIBC= |
| 6455 | echo "$ac_t""force LIBC empty" 1>&6 |
| 6456 | elif test "$withval" != yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6457 | then LIBC=$withval |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6458 | echo "$ac_t""set LIBC=\"$withval\"" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6459 | 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] | 6460 | fi |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6461 | else |
| 6462 | echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6463 | fi |
| 6464 | |
| 6465 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6466 | # check for hypot() in math library |
| 6467 | LIBS_SAVE=$LIBS |
| 6468 | LIBS="$LIBS $LIBM" |
| 6469 | for ac_func in hypot |
| 6470 | do |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6471 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 6472 | echo "configure:6473: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6473 | 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] | 6474 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6475 | else |
| 6476 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 6477 | #line 6478 "configure" |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6478 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6479 | /* System header to define __stub macros and hopefully few prototypes, |
| 6480 | which can conflict with char $ac_func(); below. */ |
| 6481 | #include <assert.h> |
| 6482 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6483 | /* We use char because int might match the return type of a gcc2 |
| 6484 | builtin and then its argument prototype would still apply. */ |
| 6485 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6486 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6487 | int main() { |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6488 | |
| 6489 | /* The GNU C library defines this for functions which it implements |
| 6490 | to always fail with ENOSYS. Some functions are actually named |
| 6491 | something starting with __ and the normal name is an alias. */ |
| 6492 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 6493 | choke me |
| 6494 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6495 | $ac_func(); |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6496 | #endif |
| 6497 | |
| 6498 | ; return 0; } |
| 6499 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 6500 | if { (eval echo configure:6501: \"$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] | 6501 | rm -rf conftest* |
| 6502 | eval "ac_cv_func_$ac_func=yes" |
| 6503 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6504 | echo "configure: failed program was:" >&5 |
| 6505 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6506 | rm -rf conftest* |
| 6507 | eval "ac_cv_func_$ac_func=no" |
| 6508 | fi |
| 6509 | rm -f conftest* |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6510 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6511 | |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6512 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 6513 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6514 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 6515 | cat >> confdefs.h <<EOF |
| 6516 | #define $ac_tr_func 1 |
| 6517 | EOF |
| 6518 | |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6519 | else |
| 6520 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 6521 | LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6522 | fi |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6523 | done |
| 6524 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6525 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6526 | LIBS=$LIBS_SAVE |
| 6527 | |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6528 | # check whether malloc(0) returns NULL or not |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6529 | echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 6530 | echo "configure:6531: checking what malloc(0) returns" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6531 | if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6532 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6533 | else |
| 6534 | if test "$cross_compiling" = yes; then |
| 6535 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 6536 | else |
| 6537 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 6538 | #line 6539 "configure" |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6539 | #include "confdefs.h" |
| 6540 | #include <stdio.h> |
| 6541 | #ifdef HAVE_STDLIB |
| 6542 | #include <stdlib.h> |
| 6543 | #else |
| 6544 | char *malloc(), *realloc(); |
| 6545 | int *free(); |
| 6546 | #endif |
| 6547 | main() { |
| 6548 | char *p; |
| 6549 | p = malloc(0); |
| 6550 | if (p == NULL) exit(1); |
| 6551 | p = realloc(p, 0); |
| 6552 | if (p == NULL) exit(1); |
| 6553 | free(p); |
| 6554 | exit(0); |
| 6555 | } |
| 6556 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 6557 | if { (eval echo configure:6558: \"$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] | 6558 | then |
| 6559 | ac_cv_malloc_zero=nonnull |
| 6560 | else |
| 6561 | echo "configure: failed program was:" >&5 |
| 6562 | cat conftest.$ac_ext >&5 |
| 6563 | rm -fr conftest* |
| 6564 | ac_cv_malloc_zero=null |
| 6565 | fi |
| 6566 | rm -fr conftest* |
| 6567 | fi |
| 6568 | |
| 6569 | fi |
| 6570 | |
| 6571 | echo "$ac_t""$ac_cv_malloc_zero" 1>&6 |
| 6572 | if test "$ac_cv_malloc_zero" = null |
| 6573 | then |
| 6574 | cat >> confdefs.h <<\EOF |
| 6575 | #define MALLOC_ZERO_RETURNS_NULL 1 |
| 6576 | EOF |
| 6577 | |
| 6578 | fi |
| 6579 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6580 | # check for wchar.h |
| 6581 | ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'` |
| 6582 | echo $ac_n "checking for wchar.h""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 6583 | echo "configure:6584: checking for wchar.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6584 | 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] | 6585 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6586 | else |
| 6587 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 6588 | #line 6589 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6589 | #include "confdefs.h" |
| 6590 | #include <wchar.h> |
| 6591 | EOF |
| 6592 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 6593 | { (eval echo configure:6594: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6594 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 6595 | if test -z "$ac_err"; then |
| 6596 | rm -rf conftest* |
| 6597 | eval "ac_cv_header_$ac_safe=yes" |
| 6598 | else |
| 6599 | echo "$ac_err" >&5 |
| 6600 | echo "configure: failed program was:" >&5 |
| 6601 | cat conftest.$ac_ext >&5 |
| 6602 | rm -rf conftest* |
| 6603 | eval "ac_cv_header_$ac_safe=no" |
| 6604 | fi |
| 6605 | rm -f conftest* |
| 6606 | fi |
| 6607 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 6608 | echo "$ac_t""yes" 1>&6 |
| 6609 | cat >> confdefs.h <<\EOF |
| 6610 | #define HAVE_WCHAR_H 1 |
| 6611 | EOF |
| 6612 | wchar_h="yes" |
| 6613 | else |
| 6614 | echo "$ac_t""no" 1>&6 |
| 6615 | wchar_h="no" |
| 6616 | |
| 6617 | fi |
| 6618 | |
| 6619 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6620 | # determine wchar_t size |
| 6621 | if test "$wchar_h" = yes |
| 6622 | then |
| 6623 | echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 6624 | echo "configure:6625: checking size of wchar_t" >&5 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6625 | if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then |
| 6626 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6627 | else |
| 6628 | if test "$cross_compiling" = yes; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6629 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 6630 | else |
| 6631 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 6632 | #line 6633 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6633 | #include "confdefs.h" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6634 | #include <stdio.h> |
| 6635 | main() |
| 6636 | { |
| 6637 | FILE *f=fopen("conftestval", "w"); |
| 6638 | if (!f) exit(1); |
| 6639 | fprintf(f, "%d\n", sizeof(wchar_t)); |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6640 | exit(0); |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6641 | } |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6642 | EOF |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 6643 | if { (eval echo configure:6644: \"$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] | 6644 | then |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6645 | ac_cv_sizeof_wchar_t=`cat conftestval` |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6646 | else |
| 6647 | echo "configure: failed program was:" >&5 |
| 6648 | cat conftest.$ac_ext >&5 |
| 6649 | rm -fr conftest* |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6650 | ac_cv_sizeof_wchar_t=0 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6651 | fi |
| 6652 | rm -fr conftest* |
| 6653 | fi |
| 6654 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6655 | fi |
| 6656 | echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 |
| 6657 | cat >> confdefs.h <<EOF |
| 6658 | #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t |
| 6659 | EOF |
| 6660 | |
| 6661 | |
| 6662 | fi |
| 6663 | |
| 6664 | echo $ac_n "checking what type to use for unicode""... $ac_c" 1>&6 |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 6665 | echo "configure:6666: checking what type to use for unicode" >&5 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6666 | # Check whether --enable-unicode or --disable-unicode was given. |
| 6667 | if test "${enable_unicode+set}" = set; then |
| 6668 | enableval="$enable_unicode" |
| 6669 | : |
| 6670 | else |
| 6671 | enable_unicode=yes |
| 6672 | fi |
| 6673 | |
| 6674 | |
| 6675 | if test $enable_unicode = yes |
| 6676 | then |
Martin v. Löwis | fd91779 | 2001-06-27 20:22:04 +0000 | [diff] [blame] | 6677 | # Without any arguments, Py_UNICODE defaults to two-byte mode |
| 6678 | enable_unicode="ucs2" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6679 | fi |
| 6680 | |
| 6681 | case "$enable_unicode" in |
| 6682 | ucs2) unicode_size="2" |
| 6683 | cat >> confdefs.h <<\EOF |
| 6684 | #define Py_UNICODE_SIZE 2 |
| 6685 | EOF |
| 6686 | |
| 6687 | ;; |
| 6688 | ucs4) unicode_size="4" |
| 6689 | cat >> confdefs.h <<\EOF |
| 6690 | #define Py_UNICODE_SIZE 4 |
| 6691 | EOF |
| 6692 | |
| 6693 | ;; |
| 6694 | esac |
| 6695 | |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 6696 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6697 | if test "$enable_unicode" = "no" |
| 6698 | then |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 6699 | UNICODE_OBJS="" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6700 | echo "$ac_t""not used" 1>&6 |
| 6701 | else |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 6702 | UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6703 | cat >> confdefs.h <<\EOF |
| 6704 | #define Py_USING_UNICODE 1 |
| 6705 | EOF |
| 6706 | |
| 6707 | if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" |
| 6708 | then |
| 6709 | PY_UNICODE_TYPE="wchar_t" |
| 6710 | cat >> confdefs.h <<\EOF |
| 6711 | #define HAVE_USABLE_WCHAR_T 1 |
| 6712 | EOF |
| 6713 | |
| 6714 | cat >> confdefs.h <<\EOF |
| 6715 | #define PY_UNICODE_TYPE wchar_t |
| 6716 | EOF |
| 6717 | |
| 6718 | elif test "$ac_cv_sizeof_short" = "$unicode_size" |
| 6719 | then |
| 6720 | PY_UNICODE_TYPE="unsigned short" |
| 6721 | cat >> confdefs.h <<\EOF |
| 6722 | #define PY_UNICODE_TYPE unsigned short |
| 6723 | EOF |
| 6724 | |
| 6725 | elif test "$ac_cv_sizeof_long" = "$unicode_size" |
| 6726 | then |
| 6727 | PY_UNICODE_TYPE="unsigned long" |
| 6728 | cat >> confdefs.h <<\EOF |
| 6729 | #define PY_UNICODE_TYPE unsigned long |
| 6730 | EOF |
| 6731 | |
| 6732 | else |
| 6733 | PY_UNICODE_TYPE="no type found" |
| 6734 | fi |
| 6735 | echo "$ac_t""$PY_UNICODE_TYPE" 1>&6 |
| 6736 | fi |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6737 | |
| 6738 | # check for endianness |
| 6739 | echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 6740 | echo "configure:6741: checking whether byte ordering is bigendian" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6741 | if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6742 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6743 | else |
| 6744 | ac_cv_c_bigendian=unknown |
| 6745 | # See if sys/param.h defines the BYTE_ORDER macro. |
| 6746 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 6747 | #line 6748 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6748 | #include "confdefs.h" |
| 6749 | #include <sys/types.h> |
| 6750 | #include <sys/param.h> |
| 6751 | int main() { |
| 6752 | |
| 6753 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN |
| 6754 | bogus endian macros |
| 6755 | #endif |
| 6756 | ; return 0; } |
| 6757 | EOF |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 6758 | if { (eval echo configure:6759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6759 | rm -rf conftest* |
| 6760 | # It does; now see whether it defined to BIG_ENDIAN or not. |
| 6761 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 6762 | #line 6763 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6763 | #include "confdefs.h" |
| 6764 | #include <sys/types.h> |
| 6765 | #include <sys/param.h> |
| 6766 | int main() { |
| 6767 | |
| 6768 | #if BYTE_ORDER != BIG_ENDIAN |
| 6769 | not big endian |
| 6770 | #endif |
| 6771 | ; return 0; } |
| 6772 | EOF |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 6773 | if { (eval echo configure:6774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6774 | rm -rf conftest* |
| 6775 | ac_cv_c_bigendian=yes |
| 6776 | else |
| 6777 | echo "configure: failed program was:" >&5 |
| 6778 | cat conftest.$ac_ext >&5 |
| 6779 | rm -rf conftest* |
| 6780 | ac_cv_c_bigendian=no |
| 6781 | fi |
| 6782 | rm -f conftest* |
| 6783 | else |
| 6784 | echo "configure: failed program was:" >&5 |
| 6785 | cat conftest.$ac_ext >&5 |
| 6786 | fi |
| 6787 | rm -f conftest* |
| 6788 | if test $ac_cv_c_bigendian = unknown; then |
| 6789 | if test "$cross_compiling" = yes; then |
| 6790 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 6791 | else |
| 6792 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 6793 | #line 6794 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6794 | #include "confdefs.h" |
| 6795 | main () { |
| 6796 | /* Are we little or big endian? From Harbison&Steele. */ |
| 6797 | union |
| 6798 | { |
| 6799 | long l; |
| 6800 | char c[sizeof (long)]; |
| 6801 | } u; |
| 6802 | u.l = 1; |
| 6803 | exit (u.c[sizeof (long) - 1] == 1); |
| 6804 | } |
| 6805 | EOF |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 6806 | if { (eval echo configure:6807: \"$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] | 6807 | then |
| 6808 | ac_cv_c_bigendian=no |
| 6809 | else |
| 6810 | echo "configure: failed program was:" >&5 |
| 6811 | cat conftest.$ac_ext >&5 |
| 6812 | rm -fr conftest* |
| 6813 | ac_cv_c_bigendian=yes |
| 6814 | fi |
| 6815 | rm -fr conftest* |
| 6816 | fi |
| 6817 | |
| 6818 | fi |
| 6819 | fi |
| 6820 | |
| 6821 | echo "$ac_t""$ac_cv_c_bigendian" 1>&6 |
| 6822 | if test $ac_cv_c_bigendian = yes; then |
| 6823 | cat >> confdefs.h <<\EOF |
| 6824 | #define WORDS_BIGENDIAN 1 |
| 6825 | EOF |
| 6826 | |
| 6827 | fi |
| 6828 | |
| 6829 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6830 | # Check whether right shifting a negative integer extends the sign bit |
| 6831 | # or fills with zeros (like the Cray J90, according to Tim Peters). |
| 6832 | echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6 |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 6833 | echo "configure:6834: checking whether right shift extends the sign bit" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6834 | if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 6835 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6836 | else |
| 6837 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6838 | if test "$cross_compiling" = yes; then |
| 6839 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 6840 | else |
| 6841 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 6842 | #line 6843 "configure" |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6843 | #include "confdefs.h" |
| 6844 | |
| 6845 | int main() |
| 6846 | { |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 6847 | exit(((-1)>>3 == -1) ? 0 : 1); |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6848 | } |
| 6849 | |
| 6850 | EOF |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 6851 | if { (eval echo configure:6852: \"$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] | 6852 | then |
| 6853 | ac_cv_rshift_extends_sign=yes |
| 6854 | else |
| 6855 | echo "configure: failed program was:" >&5 |
| 6856 | cat conftest.$ac_ext >&5 |
| 6857 | rm -fr conftest* |
| 6858 | ac_cv_rshift_extends_sign=no |
| 6859 | fi |
| 6860 | rm -fr conftest* |
| 6861 | fi |
| 6862 | |
| 6863 | fi |
| 6864 | |
| 6865 | echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6 |
| 6866 | if test "$ac_cv_rshift_extends_sign" = no |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6867 | then |
| 6868 | cat >> confdefs.h <<\EOF |
| 6869 | #define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1 |
| 6870 | EOF |
| 6871 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6872 | fi |
| 6873 | |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 6874 | # check for getc_unlocked and related locking functions |
| 6875 | echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6 |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 6876 | echo "configure:6877: checking for getc_unlocked() and friends" >&5 |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 6877 | if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then |
| 6878 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6879 | else |
| 6880 | |
| 6881 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 6882 | #line 6883 "configure" |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 6883 | #include "confdefs.h" |
| 6884 | #include <stdio.h> |
| 6885 | int main() { |
| 6886 | |
| 6887 | FILE *f = fopen("/dev/null", "r"); |
| 6888 | flockfile(f); |
| 6889 | getc_unlocked(f); |
| 6890 | funlockfile(f); |
| 6891 | |
| 6892 | ; return 0; } |
| 6893 | EOF |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 6894 | if { (eval echo configure:6895: \"$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] | 6895 | rm -rf conftest* |
| 6896 | ac_cv_have_getc_unlocked=yes |
| 6897 | else |
| 6898 | echo "configure: failed program was:" >&5 |
| 6899 | cat conftest.$ac_ext >&5 |
| 6900 | rm -rf conftest* |
| 6901 | ac_cv_have_getc_unlocked=no |
| 6902 | fi |
| 6903 | rm -f conftest* |
| 6904 | fi |
| 6905 | |
| 6906 | echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6 |
| 6907 | if test "$ac_cv_have_getc_unlocked" = yes |
| 6908 | then |
| 6909 | cat >> confdefs.h <<\EOF |
| 6910 | #define HAVE_GETC_UNLOCKED 1 |
| 6911 | EOF |
| 6912 | |
| 6913 | fi |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6914 | |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 6915 | # check for readline 4.2 |
| 6916 | echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6 |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 6917 | echo "configure:6918: checking for rl_completion_matches in -lreadline" >&5 |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 6918 | ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'` |
| 6919 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 6920 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6921 | else |
| 6922 | ac_save_LIBS="$LIBS" |
| 6923 | LIBS="-lreadline -ltermcap $LIBS" |
| 6924 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 6925 | #line 6926 "configure" |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 6926 | #include "confdefs.h" |
| 6927 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6928 | /* We use char because int might match the return type of a gcc2 |
| 6929 | builtin and then its argument prototype would still apply. */ |
| 6930 | char rl_completion_matches(); |
| 6931 | |
| 6932 | int main() { |
| 6933 | rl_completion_matches() |
| 6934 | ; return 0; } |
| 6935 | EOF |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 6936 | if { (eval echo configure:6937: \"$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] | 6937 | rm -rf conftest* |
| 6938 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 6939 | else |
| 6940 | echo "configure: failed program was:" >&5 |
| 6941 | cat conftest.$ac_ext >&5 |
| 6942 | rm -rf conftest* |
| 6943 | eval "ac_cv_lib_$ac_lib_var=no" |
| 6944 | fi |
| 6945 | rm -f conftest* |
| 6946 | LIBS="$ac_save_LIBS" |
| 6947 | |
| 6948 | fi |
| 6949 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 6950 | echo "$ac_t""yes" 1>&6 |
| 6951 | cat >> confdefs.h <<\EOF |
| 6952 | #define HAVE_RL_COMPLETION_MATCHES 1 |
| 6953 | EOF |
| 6954 | |
| 6955 | else |
| 6956 | echo "$ac_t""no" 1>&6 |
| 6957 | fi |
| 6958 | |
| 6959 | |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 6960 | echo $ac_n "checking for broken nice()""... $ac_c" 1>&6 |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 6961 | echo "configure:6962: checking for broken nice()" >&5 |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 6962 | if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then |
| 6963 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6964 | else |
| 6965 | |
| 6966 | if test "$cross_compiling" = yes; then |
| 6967 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 6968 | else |
| 6969 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 6970 | #line 6971 "configure" |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 6971 | #include "confdefs.h" |
| 6972 | |
| 6973 | int main() |
| 6974 | { |
| 6975 | int val1 = nice(1); |
| 6976 | if (val1 != -1 && val1 == nice(2)) |
| 6977 | exit(0); |
| 6978 | exit(1); |
| 6979 | } |
| 6980 | |
| 6981 | EOF |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 6982 | if { (eval echo configure:6983: \"$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] | 6983 | then |
| 6984 | ac_cv_broken_nice=yes |
| 6985 | else |
| 6986 | echo "configure: failed program was:" >&5 |
| 6987 | cat conftest.$ac_ext >&5 |
| 6988 | rm -fr conftest* |
| 6989 | ac_cv_broken_nice=no |
| 6990 | fi |
| 6991 | rm -fr conftest* |
| 6992 | fi |
| 6993 | |
| 6994 | fi |
| 6995 | |
| 6996 | echo "$ac_t""$ac_cv_broken_nice" 1>&6 |
| 6997 | if test "$ac_cv_broken_nice" = yes |
| 6998 | then |
| 6999 | cat >> confdefs.h <<\EOF |
| 7000 | #define HAVE_BROKEN_NICE 1 |
| 7001 | EOF |
| 7002 | |
| 7003 | fi |
| 7004 | |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7005 | # THIS MUST BE LAST, IT CAN BREAK OTHER TESTS! |
| 7006 | # Add sys/socket.h to confdefs.h |
| 7007 | cat >> confdefs.h <<\EOF |
| 7008 | #ifdef HAVE_SYS_SOCKET_H |
| 7009 | #include <sys/socket.h> |
| 7010 | #endif |
| 7011 | EOF |
| 7012 | echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 7013 | echo "configure:7014: checking for socklen_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7014 | 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] | 7015 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 7016 | else |
| 7017 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 7018 | #line 7019 "configure" |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7019 | #include "confdefs.h" |
| 7020 | #include <sys/types.h> |
| 7021 | #if STDC_HEADERS |
| 7022 | #include <stdlib.h> |
| 7023 | #include <stddef.h> |
| 7024 | #endif |
| 7025 | EOF |
| 7026 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 7027 | egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
| 7028 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7029 | ac_cv_type_socklen_t=yes |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7030 | else |
| 7031 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7032 | ac_cv_type_socklen_t=no |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7033 | fi |
| 7034 | rm -f conftest* |
| 7035 | |
| 7036 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7037 | echo "$ac_t""$ac_cv_type_socklen_t" 1>&6 |
| 7038 | if test $ac_cv_type_socklen_t = no; then |
| 7039 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7040 | #define socklen_t int |
| 7041 | EOF |
| 7042 | |
| 7043 | fi |
| 7044 | |
| 7045 | |
Neil Schemenauer | f25cf6c | 2001-03-04 06:39:33 +0000 | [diff] [blame] | 7046 | # Add Python/ prefix to LIBOBJS |
| 7047 | libobjs=$LIBOBJS |
| 7048 | LIBOBJS= |
| 7049 | for obj in $libobjs; do |
| 7050 | LIBOBJS="$LIBOBJS Python/$obj" |
| 7051 | done |
| 7052 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7053 | #AC_MSG_CHECKING(for Modules/Setup) |
| 7054 | #if test ! -f Modules/Setup ; then |
| 7055 | # if test ! -d Modules ; then |
| 7056 | # mkdir Modules |
| 7057 | # fi |
| 7058 | # cp "$srcdir/Modules/Setup.dist" Modules/Setup |
| 7059 | # AC_MSG_RESULT(creating) |
| 7060 | #else |
| 7061 | # AC_MSG_RESULT(already exists) |
| 7062 | #fi |
| 7063 | |
| 7064 | |
Neil Schemenauer | acbf9ef | 2001-02-27 02:15:14 +0000 | [diff] [blame] | 7065 | SRCDIRS="Parser Grammar Objects Python Modules" |
Andrew M. Kuchling | 8abedde | 2001-01-26 22:55:24 +0000 | [diff] [blame] | 7066 | echo $ac_n "checking for build directories""... $ac_c" 1>&6 |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 7067 | echo "configure:7068: checking for build directories" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7068 | for dir in $SRCDIRS; do |
| 7069 | if test ! -d $dir; then |
| 7070 | mkdir $dir |
Guido van Rossum | 262cf20 | 2000-11-02 19:33:53 +0000 | [diff] [blame] | 7071 | fi |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7072 | done |
| 7073 | echo "$ac_t""done" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 7074 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7075 | # generate output files |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7076 | trap '' 1 2 15 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7077 | cat > confcache <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7078 | # This file is a shell script that caches the results of configure |
| 7079 | # tests run on this system so they can be shared between configure |
| 7080 | # scripts and configure runs. It is not useful on other systems. |
| 7081 | # If it contains results you don't want to keep, you may remove or edit it. |
| 7082 | # |
| 7083 | # By default, configure uses ./config.cache as the cache file, |
| 7084 | # creating it if it does not exist already. You can give configure |
| 7085 | # the --cache-file=FILE option to use a different cache file; that is |
| 7086 | # what configure does when it calls configure scripts in |
| 7087 | # subdirectories, so they share the cache. |
| 7088 | # Giving --cache-file=/dev/null disables caching, for debugging configure. |
| 7089 | # config.status only pays attention to the cache file if you give it the |
| 7090 | # --recheck option to rerun configure. |
| 7091 | # |
| 7092 | EOF |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7093 | # The following way of writing the cache mishandles newlines in values, |
| 7094 | # but we know of no workaround that is simple, portable, and efficient. |
| 7095 | # So, don't put newlines in cache variables' values. |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7096 | # Ultrix sh set writes to stderr and can't be redirected directly, |
| 7097 | # 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] | 7098 | (set) 2>&1 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 7099 | case `(ac_space=' '; set | grep ac_space) 2>&1` in |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7100 | *ac_space=\ *) |
| 7101 | # `set' does not quote correctly, so add quotes (double-quote substitution |
| 7102 | # turns \\\\ into \\, and sed turns \\ into \). |
| 7103 | sed -n \ |
| 7104 | -e "s/'/'\\\\''/g" \ |
| 7105 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" |
| 7106 | ;; |
| 7107 | *) |
| 7108 | # `set' quotes correctly as required by POSIX, so do not add quotes. |
| 7109 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' |
| 7110 | ;; |
| 7111 | esac >> confcache |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7112 | if cmp -s $cache_file confcache; then |
| 7113 | : |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7114 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7115 | if test -w $cache_file; then |
| 7116 | echo "updating cache $cache_file" |
| 7117 | cat confcache > $cache_file |
| 7118 | else |
| 7119 | echo "not updating unwritable cache $cache_file" |
| 7120 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7121 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7122 | rm -f confcache |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7123 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7124 | 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] | 7125 | |
| 7126 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
| 7127 | # Let make expand exec_prefix. |
| 7128 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7129 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7130 | # Any assignment to VPATH causes Sun make to only execute |
| 7131 | # the first set of double-colon rules, so remove it if not needed. |
| 7132 | # If there is a colon in the path, we need to keep it. |
| 7133 | if test "x$srcdir" = x.; then |
| 7134 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' |
| 7135 | fi |
| 7136 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7137 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7138 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7139 | DEFS=-DHAVE_CONFIG_H |
| 7140 | |
| 7141 | # Without the "./", some shells look in PATH for config.status. |
| 7142 | : ${CONFIG_STATUS=./config.status} |
| 7143 | |
| 7144 | echo creating $CONFIG_STATUS |
| 7145 | rm -f $CONFIG_STATUS |
| 7146 | cat > $CONFIG_STATUS <<EOF |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7147 | #! /bin/sh |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7148 | # Generated automatically by configure. |
| 7149 | # Run this file to recreate the current configuration. |
| 7150 | # This directory was configured as follows, |
| 7151 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: |
| 7152 | # |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7153 | # $0 $ac_configure_args |
| 7154 | # |
| 7155 | # Compiler output produced by configure, useful for debugging |
| 7156 | # configure, is in ./config.log if it exists. |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7157 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7158 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7159 | for ac_option |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7160 | do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7161 | case "\$ac_option" in |
| 7162 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7163 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" |
| 7164 | 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] | 7165 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7166 | echo "$CONFIG_STATUS generated by autoconf version 2.13" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7167 | exit 0 ;; |
| 7168 | -help | --help | --hel | --he | --h) |
| 7169 | echo "\$ac_cs_usage"; exit 0 ;; |
| 7170 | *) echo "\$ac_cs_usage"; exit 1 ;; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7171 | esac |
| 7172 | done |
| 7173 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7174 | ac_given_srcdir=$srcdir |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7175 | ac_given_INSTALL="$INSTALL" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7176 | |
Martin v. Löwis | 4f1cd8b | 2001-07-26 13:41:06 +0000 | [diff] [blame] | 7177 | 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] | 7178 | EOF |
| 7179 | cat >> $CONFIG_STATUS <<EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7180 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7181 | # Protect against being on the right side of a sed subst in config.status. |
| 7182 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; |
| 7183 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7184 | $ac_vpsub |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7185 | $extrasub |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 7186 | s%@SHELL@%$SHELL%g |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7187 | s%@CFLAGS@%$CFLAGS%g |
| 7188 | s%@CPPFLAGS@%$CPPFLAGS%g |
| 7189 | s%@CXXFLAGS@%$CXXFLAGS%g |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 7190 | s%@FFLAGS@%$FFLAGS%g |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7191 | s%@DEFS@%$DEFS%g |
| 7192 | s%@LDFLAGS@%$LDFLAGS%g |
| 7193 | s%@LIBS@%$LIBS%g |
| 7194 | s%@exec_prefix@%$exec_prefix%g |
| 7195 | s%@prefix@%$prefix%g |
| 7196 | s%@program_transform_name@%$program_transform_name%g |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7197 | s%@bindir@%$bindir%g |
| 7198 | s%@sbindir@%$sbindir%g |
| 7199 | s%@libexecdir@%$libexecdir%g |
| 7200 | s%@datadir@%$datadir%g |
| 7201 | s%@sysconfdir@%$sysconfdir%g |
| 7202 | s%@sharedstatedir@%$sharedstatedir%g |
| 7203 | s%@localstatedir@%$localstatedir%g |
| 7204 | s%@libdir@%$libdir%g |
| 7205 | s%@includedir@%$includedir%g |
| 7206 | s%@oldincludedir@%$oldincludedir%g |
| 7207 | s%@infodir@%$infodir%g |
| 7208 | s%@mandir@%$mandir%g |
Guido van Rossum | 1fd74a7 | 1997-07-19 19:36:02 +0000 | [diff] [blame] | 7209 | s%@VERSION@%$VERSION%g |
Neil Schemenauer | 4edbc2a | 2001-03-22 00:34:03 +0000 | [diff] [blame] | 7210 | s%@CONFIG_ARGS@%$CONFIG_ARGS%g |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 7211 | s%@PYTHONFRAMEWORK@%$PYTHONFRAMEWORK%g |
| 7212 | s%@PYTHONFRAMEWORKDIR@%$PYTHONFRAMEWORKDIR%g |
| 7213 | s%@PYTHONFRAMEWORKPREFIX@%$PYTHONFRAMEWORKPREFIX%g |
| 7214 | s%@PYTHONFRAMEWORKINSTALLDIR@%$PYTHONFRAMEWORKINSTALLDIR%g |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 7215 | s%@MACHDEP@%$MACHDEP%g |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 7216 | s%@SGI_ABI@%$SGI_ABI%g |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 7217 | s%@CXX@%$CXX%g |
Guido van Rossum | ca563f2 | 2001-01-23 01:52:44 +0000 | [diff] [blame] | 7218 | s%@MAINOBJ@%$MAINOBJ%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7219 | s%@CC@%$CC%g |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 7220 | s%@CPP@%$CPP%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7221 | s%@EXEEXT@%$EXEEXT%g |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 7222 | s%@LIBRARY@%$LIBRARY%g |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 7223 | s%@LDLIBRARY@%$LDLIBRARY%g |
Guido van Rossum | ca563f2 | 2001-01-23 01:52:44 +0000 | [diff] [blame] | 7224 | s%@DLLLIBRARY@%$DLLLIBRARY%g |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 7225 | s%@BLDLIBRARY@%$BLDLIBRARY%g |
| 7226 | s%@LDLIBRARYDIR@%$LDLIBRARYDIR%g |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 7227 | s%@LINKCC@%$LINKCC%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7228 | s%@RANLIB@%$RANLIB%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7229 | s%@AR@%$AR%g |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 7230 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7231 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 7232 | s%@INSTALL_DATA@%$INSTALL_DATA%g |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 7233 | s%@LN@%$LN%g |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 7234 | s%@OPT@%$OPT%g |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 7235 | s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7236 | s%@SO@%$SO%g |
| 7237 | s%@LDSHARED@%$LDSHARED%g |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 7238 | s%@BLDSHARED@%$BLDSHARED%g |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7239 | s%@CCSHARED@%$CCSHARED%g |
| 7240 | s%@LINKFORSHARED@%$LINKFORSHARED%g |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 7241 | s%@CFLAGSFORSHARED@%$CFLAGSFORSHARED%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7242 | s%@USE_SIGNAL_MODULE@%$USE_SIGNAL_MODULE%g |
| 7243 | s%@SIGNAL_OBJS@%$SIGNAL_OBJS%g |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 7244 | s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 7245 | s%@LDLAST@%$LDLAST%g |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 7246 | s%@USE_GC_MODULE@%$USE_GC_MODULE%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7247 | s%@DLINCLDIR@%$DLINCLDIR%g |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 7248 | s%@DYNLOADFILE@%$DYNLOADFILE%g |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 7249 | s%@MACHDEP_OBJS@%$MACHDEP_OBJS%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7250 | s%@LIBOBJS@%$LIBOBJS%g |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 7251 | s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g |
| 7252 | s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g |
| 7253 | 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] | 7254 | s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 7255 | s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7256 | s%@LIBM@%$LIBM%g |
| 7257 | s%@LIBC@%$LIBC%g |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 7258 | s%@UNICODE_OBJS@%$UNICODE_OBJS%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7259 | s%@SRCDIRS@%$SRCDIRS%g |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7260 | |
| 7261 | CEOF |
| 7262 | EOF |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7263 | |
| 7264 | cat >> $CONFIG_STATUS <<\EOF |
| 7265 | |
| 7266 | # Split the substitutions into bite-sized pieces for seds with |
| 7267 | # small command number limits, like on Digital OSF/1 and HP-UX. |
| 7268 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. |
| 7269 | ac_file=1 # Number of current file. |
| 7270 | ac_beg=1 # First line for current file. |
| 7271 | ac_end=$ac_max_sed_cmds # Line after last line for current file. |
| 7272 | ac_more_lines=: |
| 7273 | ac_sed_cmds="" |
| 7274 | while $ac_more_lines; do |
| 7275 | if test $ac_beg -gt 1; then |
| 7276 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file |
| 7277 | else |
| 7278 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file |
| 7279 | fi |
| 7280 | if test ! -s conftest.s$ac_file; then |
| 7281 | ac_more_lines=false |
| 7282 | rm -f conftest.s$ac_file |
| 7283 | else |
| 7284 | if test -z "$ac_sed_cmds"; then |
| 7285 | ac_sed_cmds="sed -f conftest.s$ac_file" |
| 7286 | else |
| 7287 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" |
| 7288 | fi |
| 7289 | ac_file=`expr $ac_file + 1` |
| 7290 | ac_beg=$ac_end |
| 7291 | ac_end=`expr $ac_end + $ac_max_sed_cmds` |
| 7292 | fi |
| 7293 | done |
| 7294 | if test -z "$ac_sed_cmds"; then |
| 7295 | ac_sed_cmds=cat |
| 7296 | fi |
| 7297 | EOF |
| 7298 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7299 | cat >> $CONFIG_STATUS <<EOF |
| 7300 | |
Andrew M. Kuchling | 8abedde | 2001-01-26 22:55:24 +0000 | [diff] [blame] | 7301 | CONFIG_FILES=\${CONFIG_FILES-"Makefile.pre Modules/Setup.config"} |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7302 | EOF |
| 7303 | cat >> $CONFIG_STATUS <<\EOF |
| 7304 | 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] | 7305 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7306 | case "$ac_file" in |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7307 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7308 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
| 7309 | *) ac_file_in="${ac_file}.in" ;; |
| 7310 | esac |
| 7311 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7312 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7313 | |
| 7314 | # Remove last slash and all that follows it. Not all systems have dirname. |
| 7315 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` |
| 7316 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then |
| 7317 | # The file is in a subdirectory. |
| 7318 | test ! -d "$ac_dir" && mkdir "$ac_dir" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7319 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7320 | # A "../" for each directory in $ac_dir_suffix. |
| 7321 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` |
| 7322 | else |
| 7323 | ac_dir_suffix= ac_dots= |
| 7324 | fi |
| 7325 | |
| 7326 | case "$ac_given_srcdir" in |
| 7327 | .) srcdir=. |
| 7328 | if test -z "$ac_dots"; then top_srcdir=. |
| 7329 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; |
| 7330 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; |
| 7331 | *) # Relative path. |
| 7332 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" |
| 7333 | top_srcdir="$ac_dots$ac_given_srcdir" ;; |
| 7334 | esac |
| 7335 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7336 | case "$ac_given_INSTALL" in |
| 7337 | [/$]*) INSTALL="$ac_given_INSTALL" ;; |
| 7338 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; |
| 7339 | esac |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7340 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7341 | echo creating "$ac_file" |
| 7342 | rm -f "$ac_file" |
| 7343 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." |
| 7344 | case "$ac_file" in |
| 7345 | *Makefile*) ac_comsub="1i\\ |
| 7346 | # $configure_input" ;; |
| 7347 | *) ac_comsub= ;; |
| 7348 | esac |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7349 | |
| 7350 | 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] | 7351 | sed -e "$ac_comsub |
| 7352 | s%@configure_input@%$configure_input%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7353 | s%@srcdir@%$srcdir%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7354 | s%@top_srcdir@%$top_srcdir%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7355 | s%@INSTALL@%$INSTALL%g |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7356 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7357 | fi; done |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7358 | rm -f conftest.s* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7359 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7360 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where |
| 7361 | # 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] | 7362 | # |
| 7363 | # ac_d sets the value in "#define NAME VALUE" lines. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7364 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' |
| 7365 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7366 | ac_dC='\3' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7367 | ac_dD='%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7368 | # 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] | 7369 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
| 7370 | ac_uB='\([ ]\)%\1#\2define\3' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7371 | ac_uC=' ' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7372 | ac_uD='\4%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7373 | # 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] | 7374 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
| 7375 | ac_eB='$%\1#\2define\3' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7376 | ac_eC=' ' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7377 | ac_eD='%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7378 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7379 | if test "${CONFIG_HEADERS+set}" != set; then |
| 7380 | EOF |
| 7381 | cat >> $CONFIG_STATUS <<EOF |
Martin v. Löwis | 4f1cd8b | 2001-07-26 13:41:06 +0000 | [diff] [blame] | 7382 | CONFIG_HEADERS="pyconfig.h" |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7383 | EOF |
| 7384 | cat >> $CONFIG_STATUS <<\EOF |
| 7385 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7386 | 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] | 7387 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7388 | case "$ac_file" in |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7389 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7390 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
| 7391 | *) ac_file_in="${ac_file}.in" ;; |
| 7392 | esac |
| 7393 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7394 | echo creating $ac_file |
| 7395 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7396 | rm -f conftest.frag conftest.in conftest.out |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7397 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
| 7398 | cat $ac_file_inputs > conftest.in |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7399 | |
| 7400 | EOF |
| 7401 | |
| 7402 | # Transform confdefs.h into a sed script conftest.vals that substitutes |
| 7403 | # 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] | 7404 | # 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] | 7405 | # Protect against being in an unquoted here document in config.status. |
| 7406 | rm -f conftest.vals |
| 7407 | cat > conftest.hdr <<\EOF |
| 7408 | s/[\\&%]/\\&/g |
| 7409 | s%[\\$`]%\\&%g |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7410 | 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] | 7411 | s%ac_d%ac_u%gp |
| 7412 | s%ac_u%ac_e%gp |
| 7413 | EOF |
| 7414 | sed -n -f conftest.hdr confdefs.h > conftest.vals |
| 7415 | rm -f conftest.hdr |
| 7416 | |
| 7417 | # This sed command replaces #undef with comments. This is necessary, for |
| 7418 | # example, in the case of _POSIX_SOURCE, which is predefined and required |
| 7419 | # on some systems where configure will not decide to define it. |
| 7420 | cat >> conftest.vals <<\EOF |
| 7421 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% |
| 7422 | EOF |
| 7423 | |
| 7424 | # Break up conftest.vals because some shells have a limit on |
| 7425 | # 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] | 7426 | |
| 7427 | rm -f conftest.tail |
| 7428 | while : |
| 7429 | do |
| 7430 | ac_lines=`grep -c . conftest.vals` |
| 7431 | # grep -c gives empty output for an empty file on some AIX systems. |
| 7432 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi |
| 7433 | # Write a limited-size here document to conftest.frag. |
| 7434 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS |
| 7435 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS |
| 7436 | echo 'CEOF |
| 7437 | sed -f conftest.frag conftest.in > conftest.out |
| 7438 | rm -f conftest.in |
| 7439 | mv conftest.out conftest.in |
| 7440 | ' >> $CONFIG_STATUS |
| 7441 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail |
| 7442 | rm -f conftest.vals |
| 7443 | mv conftest.tail conftest.vals |
| 7444 | done |
| 7445 | rm -f conftest.vals |
| 7446 | |
| 7447 | cat >> $CONFIG_STATUS <<\EOF |
| 7448 | rm -f conftest.frag conftest.h |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7449 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7450 | cat conftest.in >> conftest.h |
| 7451 | rm -f conftest.in |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7452 | if cmp -s $ac_file conftest.h 2>/dev/null; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7453 | echo "$ac_file is unchanged" |
| 7454 | rm -f conftest.h |
| 7455 | else |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7456 | # Remove last slash and all that follows it. Not all systems have dirname. |
| 7457 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` |
| 7458 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then |
| 7459 | # The file is in a subdirectory. |
| 7460 | test ! -d "$ac_dir" && mkdir "$ac_dir" |
| 7461 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7462 | rm -f $ac_file |
| 7463 | mv conftest.h $ac_file |
| 7464 | fi |
| 7465 | fi; done |
| 7466 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7467 | EOF |
| 7468 | cat >> $CONFIG_STATUS <<EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7469 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7470 | EOF |
| 7471 | cat >> $CONFIG_STATUS <<\EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7472 | |
| 7473 | exit 0 |
| 7474 | EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7475 | chmod +x $CONFIG_STATUS |
| 7476 | rm -fr confdefs* $ac_clean_files |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7477 | 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] | 7478 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 7479 | |
| 7480 | echo "creating Setup" |
| 7481 | if test ! -f Modules/Setup |
| 7482 | then |
| 7483 | cp $srcdir/Modules/Setup.dist Modules/Setup |
| 7484 | fi |
| 7485 | |
| 7486 | echo "creating Setup.local" |
| 7487 | if test ! -f Modules/Setup.local |
| 7488 | then |
| 7489 | echo "# Edit this file for local setup changes" >Modules/Setup.local |
| 7490 | fi |
| 7491 | |
| 7492 | echo "creating Makefile" |
| 7493 | $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \ |
| 7494 | -s Modules Modules/Setup.config \ |
Neil Schemenauer | f8b71c5 | 2001-04-21 17:41:16 +0000 | [diff] [blame] | 7495 | Modules/Setup.local Modules/Setup |
Neil Schemenauer | c761fc8 | 2001-02-19 04:50:49 +0000 | [diff] [blame] | 7496 | mv config.c Modules |