Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1 | #! /bin/sh |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2 | |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 3 | # From configure.in Revision: 1.291 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +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. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6 | # Generated automatically using autoconf version 2.13 |
| 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 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 12 | # Defaults: |
| 13 | ac_help= |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 14 | ac_default_prefix=/usr/local |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 15 | # Any additions from configure.in: |
| 16 | ac_help="$ac_help |
| 17 | --enable-framework[=INSTALLDIR] Build (MacOSX|Darwin) framework" |
| 18 | ac_help="$ac_help |
| 19 | --without-gcc never use gcc" |
| 20 | ac_help="$ac_help |
| 21 | --with-cxx=<compiler> enable C++ support" |
| 22 | ac_help="$ac_help |
| 23 | --with-suffix=.exe set executable suffix" |
| 24 | ac_help="$ac_help |
| 25 | --with-pydebug build with Py_DEBUG defined" |
| 26 | ac_help="$ac_help |
| 27 | --enable-toolbox-glue disable/enable MacOSX glue code for extensions" |
| 28 | ac_help="$ac_help |
| 29 | --with-libs='lib1 ...' link against additional libs" |
| 30 | ac_help="$ac_help |
| 31 | --with-signal-module disable/enable signal module" |
| 32 | ac_help="$ac_help |
| 33 | --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries" |
| 34 | ac_help="$ac_help |
| 35 | --with(out)-threads[=DIRECTORY] disable/enable thread support" |
| 36 | ac_help="$ac_help |
| 37 | --with(out)-thread[=DIRECTORY] deprecated; use --with(out)-threads" |
| 38 | ac_help="$ac_help |
| 39 | --with-pth use GNU pth threading libraries" |
| 40 | ac_help="$ac_help |
| 41 | --enable-ipv6 Enable ipv6 (with ipv4) support |
| 42 | --disable-ipv6 Disable ipv6 support" |
| 43 | ac_help="$ac_help |
| 44 | --with(out)-cycle-gc disable/enable garbage collection" |
| 45 | ac_help="$ac_help |
| 46 | --with(out)-pymalloc disable/enable specialized mallocs" |
| 47 | ac_help="$ac_help |
| 48 | --with-wctype-functions use wctype.h functions" |
| 49 | ac_help="$ac_help |
| 50 | --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking" |
| 51 | ac_help="$ac_help |
| 52 | --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking" |
| 53 | ac_help="$ac_help |
| 54 | --with-fpectl enable SIGFPE catching" |
| 55 | ac_help="$ac_help |
| 56 | --with-libm=STRING math library" |
| 57 | ac_help="$ac_help |
| 58 | --with-libc=STRING C library" |
| 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. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 65 | build=NONE |
| 66 | cache_file=./config.cache |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 67 | exec_prefix=NONE |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 68 | host=NONE |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 69 | no_create= |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 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= |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 79 | target=NONE |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 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 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 96 | # Initialize some other variables. |
| 97 | subdirs= |
| 98 | MFLAGS= MAKEFLAGS= |
| 99 | SHELL=${CONFIG_SHELL-/bin/sh} |
| 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 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +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 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +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 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 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 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 121 | case "$ac_option" in |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 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=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 126 | bindir="$ac_optarg" ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 127 | |
| 128 | -build | --build | --buil | --bui | --bu) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +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=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 131 | build="$ac_optarg" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 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=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 138 | cache_file="$ac_optarg" ;; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 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=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 144 | datadir="$ac_optarg" ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 145 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 146 | -disable-* | --disable-*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 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. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 149 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then |
| 150 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } |
| 151 | fi |
| 152 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` |
| 153 | eval "enable_${ac_feature}=no" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 154 | |
| 155 | -enable-* | --enable-*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 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. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 158 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then |
| 159 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } |
| 160 | fi |
| 161 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` |
| 162 | case "$ac_option" in |
| 163 | *=*) ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 164 | *) ac_optarg=yes ;; |
| 165 | esac |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 166 | eval "enable_${ac_feature}='$ac_optarg'" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 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=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 175 | exec_prefix="$ac_optarg" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 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 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 181 | -help | --help | --hel | --he) |
| 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. |
| 184 | cat << EOF |
| 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] |
| 196 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
| 197 | [same as prefix] |
| 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] |
| 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 |
| 215 | --program-transform-name=PROGRAM |
| 216 | run sed PROGRAM on installed program names |
| 217 | EOF |
| 218 | cat << EOF |
| 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 |
| 230 | EOF |
| 231 | if test -n "$ac_help"; then |
| 232 | echo "--enable and --with options recognized:$ac_help" |
| 233 | fi |
| 234 | exit 0 ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 235 | |
| 236 | -host | --host | --hos | --ho) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 237 | ac_prev=host ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 238 | -host=* | --host=* | --hos=* | --ho=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 239 | host="$ac_optarg" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 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=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 246 | includedir="$ac_optarg" ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 247 | |
| 248 | -infodir | --infodir | --infodi | --infod | --info | --inf) |
| 249 | ac_prev=infodir ;; |
| 250 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 251 | infodir="$ac_optarg" ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 252 | |
| 253 | -libdir | --libdir | --libdi | --libd) |
| 254 | ac_prev=libdir ;; |
| 255 | -libdir=* | --libdir=* | --libdi=* | --libd=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 256 | libdir="$ac_optarg" ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 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=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 263 | libexecdir="$ac_optarg" ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 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=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 272 | localstatedir="$ac_optarg" ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 273 | |
| 274 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) |
| 275 | ac_prev=mandir ;; |
| 276 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 277 | mandir="$ac_optarg" ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 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=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 298 | oldincludedir="$ac_optarg" ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 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=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 303 | prefix="$ac_optarg" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 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=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 310 | program_prefix="$ac_optarg" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 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=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 317 | program_suffix="$ac_optarg" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 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=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 334 | program_transform_name="$ac_optarg" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 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=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 344 | sbindir="$ac_optarg" ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 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=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 355 | sharedstatedir="$ac_optarg" ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 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=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 360 | site="$ac_optarg" ;; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 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=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 365 | srcdir="$ac_optarg" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 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=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 372 | sysconfdir="$ac_optarg" ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 373 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 374 | -target | --target | --targe | --targ | --tar | --ta | --t) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 375 | ac_prev=target ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 376 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 377 | target="$ac_optarg" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 378 | |
| 379 | -v | -verbose | --verbose | --verbos | --verbo | --verb) |
| 380 | verbose=yes ;; |
| 381 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 382 | -version | --version | --versio | --versi | --vers) |
| 383 | echo "configure generated by autoconf version 2.13" |
| 384 | exit 0 ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 385 | |
| 386 | -with-* | --with-*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 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. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 389 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then |
| 390 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } |
| 391 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 392 | ac_package=`echo $ac_package| sed 's/-/_/g'` |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 393 | case "$ac_option" in |
| 394 | *=*) ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 395 | *) ac_optarg=yes ;; |
| 396 | esac |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 397 | eval "with_${ac_package}='$ac_optarg'" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 398 | |
| 399 | -without-* | --without-*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 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. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 402 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then |
| 403 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } |
| 404 | fi |
| 405 | ac_package=`echo $ac_package| sed 's/-/_/g'` |
| 406 | eval "with_${ac_package}=no" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 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=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 417 | x_includes="$ac_optarg" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 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=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 424 | x_libraries="$ac_optarg" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 425 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +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 | *) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 430 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then |
| 431 | echo "configure: warning: $ac_option: invalid host type" 1>&2 |
| 432 | fi |
| 433 | if test "x$nonopt" != xNONE; then |
| 434 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } |
| 435 | fi |
| 436 | nonopt="$ac_option" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 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 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +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 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 446 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 |
| 447 | |
| 448 | # File descriptor usage: |
| 449 | # 0 standard input |
| 450 | # 1 file creation |
| 451 | # 2 errors and warnings |
| 452 | # 3 some systems may open it to /dev/tty |
| 453 | # 4 used on the Kubota Titan |
| 454 | # 6 checking for... messages and results |
| 455 | # 5 compiler messages saved in config.log |
| 456 | if test "$silent" = yes; then |
| 457 | exec 6>/dev/null |
| 458 | else |
| 459 | exec 6>&1 |
| 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 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 472 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 473 | case "$ac_arg" in |
| 474 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ |
| 475 | | --no-cr | --no-c) ;; |
| 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 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 484 | # NLS nuisances. |
| 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. |
| 489 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi |
| 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 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 494 | # confdefs.h avoids OS command line length limits that DEFS can exceed. |
| 495 | rm -rf conftest* confdefs.h |
| 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 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 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. |
| 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 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 508 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 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 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 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 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +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 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 524 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 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 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 536 | echo "loading site script $ac_site_file" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 537 | . "$ac_site_file" |
| 538 | fi |
| 539 | done |
| 540 | |
| 541 | if test -r "$cache_file"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 542 | echo "loading cache $cache_file" |
| 543 | . $cache_file |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 544 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 545 | echo "creating cache $cache_file" |
| 546 | > $cache_file |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 547 | fi |
| 548 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 549 | ac_ext=c |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +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' |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 552 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 553 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 554 | cross_compiling=$ac_cv_prog_cc_cross |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 555 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 556 | ac_exeext= |
| 557 | ac_objext=o |
| 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 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 566 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 567 | ac_n= ac_c='\c' ac_t= |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 568 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 569 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 570 | |
| 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 | |
Andrew M. Kuchling | f2f219d | 2002-02-11 16:31:10 +0000 | [diff] [blame] | 575 | VERSION=2.3 |
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 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +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" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 585 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 586 | case $enableval in |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 587 | yes) |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 588 | enableval=/Library/Frameworks |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 589 | esac |
| 590 | case $enableval in |
| 591 | no) |
| 592 | PYTHONFRAMEWORK= |
| 593 | PYTHONFRAMEWORKDIR=no-framework |
| 594 | PYTHONFRAMEWORKPREFIX= |
| 595 | PYTHONFRAMEWORKINSTALLDIR= |
| 596 | enable_framework= |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 597 | ;; |
| 598 | *) |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 599 | PYTHONFRAMEWORK=Python |
| 600 | PYTHONFRAMEWORKDIR=Python.framework |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 601 | PYTHONFRAMEWORKPREFIX=$enableval |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 602 | PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR |
| 603 | prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 604 | esac |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 605 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 606 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 607 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 608 | PYTHONFRAMEWORK= |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 609 | PYTHONFRAMEWORKDIR=no-framework |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 610 | PYTHONFRAMEWORKPREFIX= |
| 611 | PYTHONFRAMEWORKINSTALLDIR= |
| 612 | enable_framework= |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 613 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 614 | fi |
| 615 | |
| 616 | |
| 617 | |
| 618 | |
| 619 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 620 | |
| 621 | ##AC_ARG_WITH(dyld, |
| 622 | ##[ --with-dyld Use (OpenStep|Rhapsody) dynamic linker],,) |
| 623 | ## |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 624 | # Set name for machine-dependent library files |
| 625 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 626 | echo $ac_n "checking MACHDEP""... $ac_c" 1>&6 |
| 627 | echo "configure:628: checking MACHDEP" >&5 |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 628 | if test -z "$MACHDEP" |
| 629 | then |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 630 | ac_sys_system=`uname -s` |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 631 | if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 632 | ac_sys_release=`uname -v` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 633 | else |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 634 | ac_sys_release=`uname -r` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 635 | fi |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 636 | ac_md_system=`echo $ac_sys_system | |
| 637 | tr -d '/ ' | tr '[A-Z]' '[a-z]'` |
| 638 | ac_md_release=`echo $ac_sys_release | |
Guido van Rossum | 67b2659 | 2001-10-20 14:21:45 +0000 | [diff] [blame] | 639 | tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'` |
Guido van Rossum | b97ef17 | 1997-09-28 05:44:03 +0000 | [diff] [blame] | 640 | MACHDEP="$ac_md_system$ac_md_release" |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 641 | |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 642 | case $MACHDEP in |
Andrew M. Kuchling | 5a3e4cb | 2001-07-20 19:29:04 +0000 | [diff] [blame] | 643 | cygwin*) MACHDEP="cygwin";; |
Jack Jansen | 8a97f4a | 2001-12-05 23:27:32 +0000 | [diff] [blame] | 644 | darwin*) MACHDEP="darwin";; |
Guido van Rossum | b97ef17 | 1997-09-28 05:44:03 +0000 | [diff] [blame] | 645 | '') MACHDEP="unknown";; |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 646 | esac |
| 647 | fi |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 648 | |
| 649 | # |
| 650 | # SGI compilers allow the specification of the both the ABI and the |
| 651 | # ISA on the command line. Depending on the values of these switches, |
| 652 | # different and often incompatable code will be generated. |
| 653 | # |
| 654 | # The SGI_ABI variable can be used to modify the CC and LDFLAGS and |
| 655 | # thus supply support for various ABI/ISA combinations. The MACHDEP |
| 656 | # variable is also adjusted. |
| 657 | # |
| 658 | |
| 659 | if test ! -z "$SGI_ABI" |
| 660 | then |
| 661 | CC="cc $SGI_ABI" |
| 662 | LDFLAGS="$SGI_ABI $LDFLAGS" |
| 663 | MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'` |
| 664 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 665 | echo "$ac_t""$MACHDEP" 1>&6 |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 666 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 667 | # checks for alternative programs |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 668 | echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6 |
| 669 | echo "configure:670: checking for --without-gcc" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 670 | # Check whether --with-gcc or --without-gcc was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 671 | if test "${with_gcc+set}" = set; then |
| 672 | withval="$with_gcc" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 673 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 674 | case $withval in |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 675 | no) CC=cc |
| 676 | without_gcc=yes;; |
| 677 | yes) CC=gcc |
| 678 | without_gcc=no;; |
| 679 | *) CC=$withval |
| 680 | without_gcc=$withval;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 681 | esac |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 682 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 683 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 684 | case $ac_sys_system in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 685 | AIX*) CC=cc_r |
| 686 | without_gcc=;; |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 687 | BeOS*) |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 688 | case $BE_HOST_CPU in |
| 689 | ppc) |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 690 | CC=mwcc |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 691 | without_gcc=yes |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 692 | 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] | 693 | CCSHARED="-UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'" |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 694 | LDFLAGS="$LDFLAGS -nodup" |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 695 | ;; |
| 696 | x86) |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 697 | CC=gcc |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 698 | without_gcc=no |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 699 | OPT=-O |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 700 | ;; |
| 701 | *) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 702 | { 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] | 703 | ;; |
| 704 | esac |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 705 | AR="\$(srcdir)/Modules/ar_beos" |
| 706 | RANLIB=: |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 707 | ;; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 708 | Monterey*) |
| 709 | RANLIB=: |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 710 | without_gcc=;; |
| 711 | *) without_gcc=no;; |
Guido van Rossum | e77438c | 1995-09-13 18:59:59 +0000 | [diff] [blame] | 712 | esac |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 713 | fi |
| 714 | |
| 715 | echo "$ac_t""$without_gcc" 1>&6 |
| 716 | |
| 717 | |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 718 | |
Fred Drake | a1a84e7 | 2001-03-06 05:52:16 +0000 | [diff] [blame] | 719 | MAINOBJ=python.o |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 720 | echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6 |
| 721 | echo "configure:722: checking for --with-cxx=<compiler>" >&5 |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 722 | # Check whether --with-cxx or --without-cxx was given. |
| 723 | if test "${with_cxx+set}" = set; then |
| 724 | withval="$with_cxx" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 725 | |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 726 | check_cxx=no |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 727 | case $withval in |
| 728 | no) CXX= |
| 729 | with_cxx=no;; |
| 730 | *) CXX=$withval |
Fred Drake | a1a84e7 | 2001-03-06 05:52:16 +0000 | [diff] [blame] | 731 | MAINOBJ=ccpython.o |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 732 | with_cxx=$withval;; |
| 733 | esac |
| 734 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 735 | |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 736 | with_cxx=no |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 737 | check_cxx=yes |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 738 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 739 | fi |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 740 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 741 | echo "$ac_t""$with_cxx" 1>&6 |
| 742 | |
| 743 | if test "$with_cxx" = "yes" |
| 744 | then |
| 745 | { echo "configure: error: must supply a compiler when using --with-cxx" 1>&2; exit 1; } |
| 746 | fi |
| 747 | |
| 748 | |
| 749 | |
| 750 | |
| 751 | if test "$check_cxx" = "yes" |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 752 | then |
| 753 | for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl |
| 754 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 755 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 756 | set dummy $ac_prog; ac_word=$2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 757 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| 758 | echo "configure:759: checking for $ac_word" >&5 |
| 759 | if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then |
| 760 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 761 | else |
| 762 | if test -n "$CXX"; then |
| 763 | ac_cv_prog_CXX="$CXX" # Let the user override the test. |
| 764 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 765 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 766 | ac_dummy="$PATH" |
| 767 | for ac_dir in $ac_dummy; do |
| 768 | test -z "$ac_dir" && ac_dir=. |
| 769 | if test -f $ac_dir/$ac_word; then |
| 770 | ac_cv_prog_CXX="$ac_prog" |
| 771 | break |
| 772 | fi |
| 773 | done |
| 774 | IFS="$ac_save_ifs" |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 775 | fi |
| 776 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 777 | CXX="$ac_cv_prog_CXX" |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 778 | if test -n "$CXX"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 779 | echo "$ac_t""$CXX" 1>&6 |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 780 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 781 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 782 | fi |
| 783 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 784 | test -n "$CXX" && break |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 785 | done |
| 786 | test -n "$CXX" || CXX="notfound" |
| 787 | |
| 788 | if test "$CXX" = "notfound" |
| 789 | then |
| 790 | CXX= |
| 791 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 792 | echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
| 793 | echo "configure:794: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 |
| 794 | |
| 795 | ac_ext=C |
| 796 | # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 797 | ac_cpp='$CXXCPP $CPPFLAGS' |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 798 | ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 799 | ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 800 | cross_compiling=$ac_cv_prog_cxx_cross |
| 801 | |
| 802 | cat > conftest.$ac_ext << EOF |
| 803 | |
| 804 | #line 805 "configure" |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 805 | #include "confdefs.h" |
| 806 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 807 | int main(){return(0);} |
| 808 | EOF |
| 809 | if { (eval echo configure:810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| 810 | ac_cv_prog_cxx_works=yes |
| 811 | # If we can't run a trivial program, we are probably using a cross compiler. |
| 812 | if (./conftest; exit) 2>/dev/null; then |
| 813 | ac_cv_prog_cxx_cross=no |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 814 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 815 | ac_cv_prog_cxx_cross=yes |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 816 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 817 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 818 | echo "configure: failed program was:" >&5 |
| 819 | cat conftest.$ac_ext >&5 |
| 820 | ac_cv_prog_cxx_works=no |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 821 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 822 | rm -fr conftest* |
| 823 | ac_ext=c |
| 824 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 825 | ac_cpp='$CPP $CPPFLAGS' |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 826 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 827 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 828 | cross_compiling=$ac_cv_prog_cc_cross |
| 829 | |
| 830 | echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6 |
| 831 | if test $ac_cv_prog_cxx_works = no; then |
| 832 | { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } |
| 833 | fi |
| 834 | echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 |
| 835 | echo "configure:836: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 |
| 836 | echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 |
| 837 | cross_compiling=$ac_cv_prog_cxx_cross |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 838 | |
| 839 | fi |
| 840 | fi |
| 841 | |
Guido van Rossum | 8b131c5 | 1995-03-09 14:10:13 +0000 | [diff] [blame] | 842 | # If the user switches compilers, we can't believe the cache |
| 843 | if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC" |
| 844 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 845 | { echo "configure: error: cached CC is different -- throw away $cache_file |
| 846 | (it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; } |
Guido van Rossum | 8b131c5 | 1995-03-09 14:10:13 +0000 | [diff] [blame] | 847 | fi |
| 848 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 849 | # Extract the first word of "gcc", so it can be a program name with args. |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 850 | set dummy gcc; ac_word=$2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 851 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| 852 | echo "configure:853: checking for $ac_word" >&5 |
| 853 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
| 854 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 855 | else |
| 856 | if test -n "$CC"; then |
| 857 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 858 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 859 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 860 | ac_dummy="$PATH" |
| 861 | for ac_dir in $ac_dummy; do |
| 862 | test -z "$ac_dir" && ac_dir=. |
| 863 | if test -f $ac_dir/$ac_word; then |
| 864 | ac_cv_prog_CC="gcc" |
| 865 | break |
| 866 | fi |
| 867 | done |
| 868 | IFS="$ac_save_ifs" |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 869 | fi |
| 870 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 871 | CC="$ac_cv_prog_CC" |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 872 | if test -n "$CC"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 873 | echo "$ac_t""$CC" 1>&6 |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 874 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 875 | echo "$ac_t""no" 1>&6 |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 876 | fi |
| 877 | |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 878 | if test -z "$CC"; then |
| 879 | # Extract the first word of "cc", so it can be a program name with args. |
| 880 | set dummy cc; ac_word=$2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 881 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| 882 | echo "configure:883: checking for $ac_word" >&5 |
| 883 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
| 884 | echo $ac_n "(cached) $ac_c" 1>&6 |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 885 | else |
| 886 | if test -n "$CC"; then |
| 887 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 888 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 889 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 890 | ac_prog_rejected=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 891 | ac_dummy="$PATH" |
| 892 | for ac_dir in $ac_dummy; do |
| 893 | test -z "$ac_dir" && ac_dir=. |
| 894 | if test -f $ac_dir/$ac_word; then |
| 895 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then |
| 896 | ac_prog_rejected=yes |
| 897 | continue |
| 898 | fi |
| 899 | ac_cv_prog_CC="cc" |
| 900 | break |
| 901 | fi |
| 902 | done |
| 903 | IFS="$ac_save_ifs" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 904 | if test $ac_prog_rejected = yes; then |
| 905 | # We found a bogon in the path, so make sure we never use it. |
| 906 | set dummy $ac_cv_prog_CC |
| 907 | shift |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 908 | if test $# -gt 0; then |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 909 | # We chose a different compiler from the bogus one. |
| 910 | # However, it has the same basename, so the bogon will be chosen |
| 911 | # first if we set CC to just the basename; use the full file name. |
| 912 | shift |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 913 | set dummy "$ac_dir/$ac_word" "$@" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 914 | shift |
| 915 | ac_cv_prog_CC="$@" |
| 916 | fi |
| 917 | fi |
| 918 | fi |
| 919 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 920 | CC="$ac_cv_prog_CC" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 921 | if test -n "$CC"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 922 | echo "$ac_t""$CC" 1>&6 |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 923 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 924 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 925 | fi |
| 926 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 927 | if test -z "$CC"; then |
| 928 | case "`uname -s`" in |
| 929 | *win32* | *WIN32*) |
| 930 | # Extract the first word of "cl", so it can be a program name with args. |
| 931 | set dummy cl; ac_word=$2 |
| 932 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| 933 | echo "configure:934: checking for $ac_word" >&5 |
| 934 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
| 935 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 936 | else |
| 937 | if test -n "$CC"; then |
| 938 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 939 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 940 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 941 | ac_dummy="$PATH" |
| 942 | for ac_dir in $ac_dummy; do |
| 943 | test -z "$ac_dir" && ac_dir=. |
| 944 | if test -f $ac_dir/$ac_word; then |
| 945 | ac_cv_prog_CC="cl" |
| 946 | break |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 947 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 948 | done |
| 949 | IFS="$ac_save_ifs" |
| 950 | fi |
| 951 | fi |
| 952 | CC="$ac_cv_prog_CC" |
| 953 | if test -n "$CC"; then |
| 954 | echo "$ac_t""$CC" 1>&6 |
| 955 | else |
| 956 | echo "$ac_t""no" 1>&6 |
| 957 | fi |
| 958 | ;; |
| 959 | esac |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 960 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 961 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 962 | fi |
| 963 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 964 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
| 965 | echo "configure:966: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 966 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 967 | ac_ext=c |
| 968 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 969 | ac_cpp='$CPP $CPPFLAGS' |
| 970 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 971 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 972 | cross_compiling=$ac_cv_prog_cc_cross |
| 973 | |
| 974 | cat > conftest.$ac_ext << EOF |
| 975 | |
| 976 | #line 977 "configure" |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 977 | #include "confdefs.h" |
| 978 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 979 | main(){return(0);} |
| 980 | EOF |
| 981 | if { (eval echo configure:982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| 982 | ac_cv_prog_cc_works=yes |
| 983 | # If we can't run a trivial program, we are probably using a cross compiler. |
| 984 | if (./conftest; exit) 2>/dev/null; then |
| 985 | ac_cv_prog_cc_cross=no |
| 986 | else |
| 987 | ac_cv_prog_cc_cross=yes |
| 988 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 989 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 990 | echo "configure: failed program was:" >&5 |
| 991 | cat conftest.$ac_ext >&5 |
| 992 | ac_cv_prog_cc_works=no |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 993 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 994 | rm -fr conftest* |
| 995 | ac_ext=c |
| 996 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 997 | ac_cpp='$CPP $CPPFLAGS' |
| 998 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 999 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 1000 | cross_compiling=$ac_cv_prog_cc_cross |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 1001 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1002 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 |
| 1003 | if test $ac_cv_prog_cc_works = no; then |
| 1004 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 1005 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1006 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 |
| 1007 | echo "configure:1008: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
| 1008 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
| 1009 | cross_compiling=$ac_cv_prog_cc_cross |
| 1010 | |
| 1011 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 |
| 1012 | echo "configure:1013: checking whether we are using GNU C" >&5 |
| 1013 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
| 1014 | echo $ac_n "(cached) $ac_c" 1>&6 |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 1015 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1016 | cat > conftest.c <<EOF |
| 1017 | #ifdef __GNUC__ |
| 1018 | yes; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1019 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1020 | EOF |
| 1021 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
| 1022 | ac_cv_prog_gcc=yes |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1023 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1024 | ac_cv_prog_gcc=no |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1025 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1026 | fi |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1027 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1028 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 |
| 1029 | |
| 1030 | if test $ac_cv_prog_gcc = yes; then |
| 1031 | GCC=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1032 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1033 | GCC= |
| 1034 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 1035 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1036 | ac_test_CFLAGS="${CFLAGS+set}" |
| 1037 | ac_save_CFLAGS="$CFLAGS" |
| 1038 | CFLAGS= |
| 1039 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 |
| 1040 | echo "configure:1041: checking whether ${CC-cc} accepts -g" >&5 |
| 1041 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
| 1042 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1043 | else |
| 1044 | echo 'void f(){}' > conftest.c |
| 1045 | 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] | 1046 | ac_cv_prog_cc_g=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1047 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1048 | ac_cv_prog_cc_g=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1049 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1050 | rm -f conftest* |
| 1051 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1052 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1053 | |
| 1054 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1055 | if test "$ac_test_CFLAGS" = set; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1056 | CFLAGS="$ac_save_CFLAGS" |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1057 | elif test $ac_cv_prog_cc_g = yes; then |
| 1058 | if test "$GCC" = yes; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1059 | CFLAGS="-g -O2" |
| 1060 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1061 | CFLAGS="-g" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1062 | fi |
| 1063 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1064 | if test "$GCC" = yes; then |
| 1065 | CFLAGS="-O2" |
| 1066 | else |
| 1067 | CFLAGS= |
| 1068 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1069 | fi |
| 1070 | |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1071 | |
| 1072 | # checks for UNIX variants that set C preprocessor variables |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1073 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
| 1074 | echo "configure:1075: checking how to run the C preprocessor" >&5 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1075 | # On Suns, sometimes $CPP names a directory. |
| 1076 | if test -n "$CPP" && test -d "$CPP"; then |
| 1077 | CPP= |
| 1078 | fi |
| 1079 | if test -z "$CPP"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1080 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then |
| 1081 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1082 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1083 | # This must be in double quotes, not single quotes, because CPP may get |
| 1084 | # substituted into the Makefile and "${CC-cc}" will confuse make. |
| 1085 | CPP="${CC-cc} -E" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1086 | # On the NeXT, cc -E runs the code through the compiler's parser, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1087 | # not just through cpp. |
| 1088 | cat > conftest.$ac_ext <<EOF |
| 1089 | #line 1090 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1090 | #include "confdefs.h" |
| 1091 | #include <assert.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1092 | Syntax Error |
| 1093 | EOF |
| 1094 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
| 1095 | { (eval echo configure:1096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
| 1096 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1097 | if test -z "$ac_err"; then |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1098 | : |
| 1099 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1100 | echo "$ac_err" >&5 |
| 1101 | echo "configure: failed program was:" >&5 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1102 | cat conftest.$ac_ext >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1103 | rm -rf conftest* |
| 1104 | CPP="${CC-cc} -E -traditional-cpp" |
| 1105 | cat > conftest.$ac_ext <<EOF |
| 1106 | #line 1107 "configure" |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 1107 | #include "confdefs.h" |
| 1108 | #include <assert.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1109 | Syntax Error |
| 1110 | EOF |
| 1111 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
| 1112 | { (eval echo configure:1113: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
| 1113 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1114 | if test -z "$ac_err"; then |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 1115 | : |
| 1116 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1117 | echo "$ac_err" >&5 |
| 1118 | echo "configure: failed program was:" >&5 |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 1119 | cat conftest.$ac_ext >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1120 | rm -rf conftest* |
| 1121 | CPP="${CC-cc} -nologo -E" |
| 1122 | cat > conftest.$ac_ext <<EOF |
| 1123 | #line 1124 "configure" |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 1124 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1125 | #include <assert.h> |
| 1126 | Syntax Error |
| 1127 | EOF |
| 1128 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
| 1129 | { (eval echo configure:1130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
| 1130 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1131 | if test -z "$ac_err"; then |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 1132 | : |
| 1133 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1134 | echo "$ac_err" >&5 |
| 1135 | echo "configure: failed program was:" >&5 |
| 1136 | cat conftest.$ac_ext >&5 |
| 1137 | rm -rf conftest* |
| 1138 | CPP=/lib/cpp |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 1139 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1140 | rm -f conftest* |
| 1141 | fi |
| 1142 | rm -f conftest* |
| 1143 | fi |
| 1144 | rm -f conftest* |
| 1145 | ac_cv_prog_CPP="$CPP" |
| 1146 | fi |
| 1147 | CPP="$ac_cv_prog_CPP" |
| 1148 | else |
| 1149 | ac_cv_prog_CPP="$CPP" |
| 1150 | fi |
| 1151 | echo "$ac_t""$CPP" 1>&6 |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 1152 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1153 | echo $ac_n "checking for AIX""... $ac_c" 1>&6 |
| 1154 | echo "configure:1155: checking for AIX" >&5 |
| 1155 | cat > conftest.$ac_ext <<EOF |
| 1156 | #line 1157 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1157 | #include "confdefs.h" |
| 1158 | #ifdef _AIX |
| 1159 | yes |
| 1160 | #endif |
| 1161 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1162 | EOF |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1163 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1164 | egrep "yes" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1165 | rm -rf conftest* |
| 1166 | echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1167 | #define _ALL_SOURCE 1 |
| 1168 | EOF |
| 1169 | |
| 1170 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1171 | rm -rf conftest* |
| 1172 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1173 | fi |
| 1174 | rm -f conftest* |
| 1175 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1176 | |
| 1177 | ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'` |
| 1178 | echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 |
| 1179 | echo "configure:1180: checking for minix/config.h" >&5 |
| 1180 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 1181 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1182 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1183 | cat > conftest.$ac_ext <<EOF |
| 1184 | #line 1185 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1185 | #include "confdefs.h" |
| 1186 | #include <minix/config.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1187 | EOF |
| 1188 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
| 1189 | { (eval echo configure:1190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
| 1190 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1191 | if test -z "$ac_err"; then |
| 1192 | rm -rf conftest* |
| 1193 | eval "ac_cv_header_$ac_safe=yes" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1194 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1195 | echo "$ac_err" >&5 |
| 1196 | echo "configure: failed program was:" >&5 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1197 | cat conftest.$ac_ext >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1198 | rm -rf conftest* |
| 1199 | eval "ac_cv_header_$ac_safe=no" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1200 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1201 | rm -f conftest* |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1202 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1203 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 1204 | echo "$ac_t""yes" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1205 | MINIX=yes |
| 1206 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1207 | echo "$ac_t""no" 1>&6 |
| 1208 | MINIX= |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1209 | fi |
| 1210 | |
| 1211 | if test "$MINIX" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1212 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1213 | #define _POSIX_SOURCE 1 |
| 1214 | EOF |
| 1215 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1216 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1217 | #define _POSIX_1_SOURCE 2 |
| 1218 | EOF |
| 1219 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1220 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1221 | #define _MINIX 1 |
| 1222 | EOF |
| 1223 | |
| 1224 | fi |
| 1225 | |
| 1226 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1227 | echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 |
| 1228 | echo "configure:1229: checking for Cygwin environment" >&5 |
| 1229 | if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then |
| 1230 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1231 | else |
| 1232 | cat > conftest.$ac_ext <<EOF |
| 1233 | #line 1234 "configure" |
| 1234 | #include "confdefs.h" |
| 1235 | |
| 1236 | int main() { |
| 1237 | |
| 1238 | #ifndef __CYGWIN__ |
| 1239 | #define __CYGWIN__ __CYGWIN32__ |
| 1240 | #endif |
| 1241 | return __CYGWIN__; |
| 1242 | ; return 0; } |
| 1243 | EOF |
| 1244 | if { (eval echo configure:1245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| 1245 | rm -rf conftest* |
| 1246 | ac_cv_cygwin=yes |
| 1247 | else |
| 1248 | echo "configure: failed program was:" >&5 |
| 1249 | cat conftest.$ac_ext >&5 |
| 1250 | rm -rf conftest* |
| 1251 | ac_cv_cygwin=no |
| 1252 | fi |
| 1253 | rm -f conftest* |
| 1254 | rm -f conftest* |
| 1255 | fi |
| 1256 | |
| 1257 | echo "$ac_t""$ac_cv_cygwin" 1>&6 |
| 1258 | CYGWIN= |
| 1259 | test "$ac_cv_cygwin" = yes && CYGWIN=yes |
| 1260 | echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 |
| 1261 | echo "configure:1262: checking for mingw32 environment" >&5 |
| 1262 | if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then |
| 1263 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1264 | else |
| 1265 | cat > conftest.$ac_ext <<EOF |
| 1266 | #line 1267 "configure" |
| 1267 | #include "confdefs.h" |
| 1268 | |
| 1269 | int main() { |
| 1270 | return __MINGW32__; |
| 1271 | ; return 0; } |
| 1272 | EOF |
| 1273 | if { (eval echo configure:1274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| 1274 | rm -rf conftest* |
| 1275 | ac_cv_mingw32=yes |
| 1276 | else |
| 1277 | echo "configure: failed program was:" >&5 |
| 1278 | cat conftest.$ac_ext >&5 |
| 1279 | rm -rf conftest* |
| 1280 | ac_cv_mingw32=no |
| 1281 | fi |
| 1282 | rm -f conftest* |
| 1283 | rm -f conftest* |
| 1284 | fi |
| 1285 | |
| 1286 | echo "$ac_t""$ac_cv_mingw32" 1>&6 |
| 1287 | MINGW32= |
| 1288 | test "$ac_cv_mingw32" = yes && MINGW32=yes |
| 1289 | |
| 1290 | |
| 1291 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 |
| 1292 | echo "configure:1293: checking for executable suffix" >&5 |
| 1293 | if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then |
| 1294 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1295 | else |
| 1296 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then |
| 1297 | ac_cv_exeext=.exe |
| 1298 | else |
| 1299 | rm -f conftest* |
| 1300 | echo 'int main () { return 0; }' > conftest.$ac_ext |
| 1301 | ac_cv_exeext= |
| 1302 | if { (eval echo configure:1303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
| 1303 | for file in conftest.*; do |
| 1304 | case $file in |
| 1305 | *.c | *.o | *.obj) ;; |
| 1306 | *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; |
| 1307 | esac |
| 1308 | done |
| 1309 | else |
| 1310 | { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } |
| 1311 | fi |
| 1312 | rm -f conftest* |
| 1313 | test x"${ac_cv_exeext}" = x && ac_cv_exeext=no |
| 1314 | fi |
| 1315 | fi |
| 1316 | |
| 1317 | EXEEXT="" |
| 1318 | test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} |
| 1319 | echo "$ac_t""${ac_cv_exeext}" 1>&6 |
| 1320 | ac_exeext=$EXEEXT |
| 1321 | |
| 1322 | echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6 |
| 1323 | echo "configure:1324: checking for --with-suffix" >&5 |
Neil Schemenauer | dfb38e4 | 2001-01-27 06:57:08 +0000 | [diff] [blame] | 1324 | # Check whether --with-suffix or --without-suffix was given. |
| 1325 | if test "${with_suffix+set}" = set; then |
| 1326 | withval="$with_suffix" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1327 | |
Neil Schemenauer | dfb38e4 | 2001-01-27 06:57:08 +0000 | [diff] [blame] | 1328 | case $withval in |
| 1329 | no) EXEEXT=;; |
| 1330 | yes) EXEEXT=.exe;; |
| 1331 | *) EXEEXT=$withval;; |
| 1332 | esac |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1333 | fi |
| 1334 | |
| 1335 | echo "$ac_t""$EXEEXT" 1>&6 |
Jack Jansen | 1999ef4 | 2001-12-06 21:47:20 +0000 | [diff] [blame] | 1336 | |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1337 | # Test whether we're running on a non-case-sensitive system, in which |
| 1338 | # case we give a warning if no ext is given |
Jack Jansen | 1999ef4 | 2001-12-06 21:47:20 +0000 | [diff] [blame] | 1339 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1340 | echo $ac_n "checking for case-insensitive build directory""... $ac_c" 1>&6 |
| 1341 | echo "configure:1342: checking for case-insensitive build directory" >&5 |
Jack Jansen | 1999ef4 | 2001-12-06 21:47:20 +0000 | [diff] [blame] | 1342 | if test -d "python" |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1343 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1344 | echo "$ac_t""yes" 1>&6 |
Jack Jansen | 1999ef4 | 2001-12-06 21:47:20 +0000 | [diff] [blame] | 1345 | BUILDEXEEXT=.exe |
| 1346 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1347 | echo "$ac_t""no" 1>&6 |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 1348 | BUILDEXEEXT=$EXEEXT |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1349 | fi |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1350 | |
Guido van Rossum | dd997f7 | 1998-10-07 19:58:26 +0000 | [diff] [blame] | 1351 | case $MACHDEP in |
| 1352 | bsdos*) |
| 1353 | case $CC in |
| 1354 | gcc) CC="$CC -D_HAVE_BSDI";; |
| 1355 | esac;; |
| 1356 | esac |
| 1357 | |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1358 | case $ac_sys_system in |
| 1359 | hp*|HP*) |
| 1360 | case $CC in |
Guido van Rossum | cd5ff9f | 2000-09-22 16:15:54 +0000 | [diff] [blame] | 1361 | cc|*/cc) CC="$CC -Ae";; |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1362 | esac;; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1363 | Monterey*) |
| 1364 | case $CC in |
| 1365 | cc) CC="$CC -Wl,-Bexport";; |
| 1366 | esac;; |
Martin v. Löwis | a30c100 | 2001-03-06 12:10:20 +0000 | [diff] [blame] | 1367 | SunOS*) |
| 1368 | # Some functions have a prototype only with that define, e.g. confstr |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1369 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | a30c100 | 2001-03-06 12:10:20 +0000 | [diff] [blame] | 1370 | #define __EXTENSIONS__ 1 |
| 1371 | EOF |
| 1372 | |
| 1373 | ;; |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1374 | esac |
| 1375 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1376 | |
| 1377 | |
| 1378 | echo $ac_n "checking LIBRARY""... $ac_c" 1>&6 |
| 1379 | echo "configure:1380: checking LIBRARY" >&5 |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1380 | if test -z "$LIBRARY" |
| 1381 | then |
| 1382 | LIBRARY='libpython$(VERSION).a' |
| 1383 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1384 | echo "$ac_t""$LIBRARY" 1>&6 |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1385 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1386 | # 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] | 1387 | # name of the library into which to insert object files). BLDLIBRARY is also |
| 1388 | # the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY |
| 1389 | # is blank as the main program is not linked directly against LDLIBRARY. |
| 1390 | # LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On |
| 1391 | # systems without shared libraries, LDLIBRARY is the same as LIBRARY |
| 1392 | # (defined in the Makefiles). On Cygwin LDLIBRARY is the import library, |
| 1393 | # DLLLIBRARY is the shared (i.e., DLL) library. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1394 | # |
| 1395 | |
| 1396 | |
| 1397 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1398 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1399 | LDLIBRARY="$LIBRARY" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1400 | BLDLIBRARY='$(LDLIBRARY)' |
Guido van Rossum | ca563f2 | 2001-01-23 01:52:44 +0000 | [diff] [blame] | 1401 | DLLLIBRARY='' |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1402 | LDLIBRARYDIR='' |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1403 | |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1404 | # LINKCC is the command that links the python executable -- default is $(CC). |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1405 | # If CXX is set, and if it is needed to link a main function that was |
| 1406 | # compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable: |
| 1407 | # python might then depend on the C++ runtime |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1408 | # 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] | 1409 | # linking. |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1410 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1411 | echo $ac_n "checking LINKCC""... $ac_c" 1>&6 |
| 1412 | echo "configure:1413: checking LINKCC" >&5 |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1413 | if test -z "$LINKCC" |
| 1414 | then |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1415 | if test -z "$CXX"; then |
| 1416 | LINKCC="\$(PURIFY) \$(CC)" |
| 1417 | else |
| 1418 | echo 'int main(){return 0;}' > conftest.$ac_ext |
| 1419 | $CXX -c conftest.$ac_ext 2>&5 |
| 1420 | if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \ |
| 1421 | && test -s conftest$ac_exeext && ./conftest$ac_exeext |
| 1422 | then |
| 1423 | LINKCC="\$(PURIFY) \$(CC)" |
| 1424 | else |
| 1425 | LINKCC="\$(PURIFY) \$(CXX)" |
| 1426 | fi |
| 1427 | rm -fr conftest* |
| 1428 | fi |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1429 | case $ac_sys_system in |
| 1430 | AIX*) |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1431 | LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $(LINKCC)";; |
Guido van Rossum | 3c4bb80 | 1997-12-18 23:55:32 +0000 | [diff] [blame] | 1432 | dgux*) |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1433 | LINKCC="LD_RUN_PATH=$libdir $(LINKCC)";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1434 | Monterey64*) |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1435 | LINKCC="$(LINKCC) -L/usr/lib/ia64l64";; |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1436 | esac |
| 1437 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1438 | echo "$ac_t""$LINKCC" 1>&6 |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1439 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1440 | echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6 |
| 1441 | echo "configure:1442: checking LDLIBRARY" >&5 |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1442 | |
| 1443 | # 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] | 1444 | case $MACHDEP in |
| 1445 | dguxR4) |
| 1446 | LDLIBRARY='libpython$(VERSION).so' |
| 1447 | OPT="$OPT -pic" |
| 1448 | ;; |
| 1449 | beos*) |
| 1450 | LDLIBRARY='libpython$(VERSION).so' |
| 1451 | ;; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1452 | cygwin*) |
| 1453 | LDLIBRARY='libpython$(VERSION).dll.a' |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1454 | DLLLIBRARY='libpython$(VERSION).dll' |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1455 | ;; |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 1456 | esac |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1457 | |
Guido van Rossum | b855216 | 2001-09-05 14:58:11 +0000 | [diff] [blame] | 1458 | # MacOSX framework builds need more magic. LDLIBRARY is the dynamic |
| 1459 | # library that we build, but we do not want to link against it (we |
| 1460 | # will find it with a -framework option). For this reason there is an |
| 1461 | # extra variable BLDLIBRARY against which Python and the extension |
| 1462 | # modules are linked, BLDLIBRARY. This is normally the same as |
| 1463 | # LDLIBRARY, but empty for MacOSX framework builds. |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1464 | if test "$enable_framework" |
| 1465 | then |
| 1466 | LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' |
| 1467 | LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)' |
| 1468 | BLDLIBRARY='' |
| 1469 | else |
| 1470 | BLDLIBRARY='$(LDLIBRARY)' |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1471 | fi |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1472 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1473 | echo "$ac_t""$LDLIBRARY" 1>&6 |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1474 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1475 | # Extract the first word of "ranlib", so it can be a program name with args. |
| 1476 | set dummy ranlib; ac_word=$2 |
| 1477 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| 1478 | echo "configure:1479: checking for $ac_word" >&5 |
| 1479 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
| 1480 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1481 | else |
| 1482 | if test -n "$RANLIB"; then |
| 1483 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. |
| 1484 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1485 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 1486 | ac_dummy="$PATH" |
| 1487 | for ac_dir in $ac_dummy; do |
| 1488 | test -z "$ac_dir" && ac_dir=. |
| 1489 | if test -f $ac_dir/$ac_word; then |
| 1490 | ac_cv_prog_RANLIB="ranlib" |
| 1491 | break |
| 1492 | fi |
| 1493 | done |
| 1494 | IFS="$ac_save_ifs" |
| 1495 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1496 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1497 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1498 | RANLIB="$ac_cv_prog_RANLIB" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1499 | if test -n "$RANLIB"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1500 | echo "$ac_t""$RANLIB" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1501 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1502 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1503 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1504 | |
| 1505 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1506 | for ac_prog in ar aal |
| 1507 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1508 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1509 | set dummy $ac_prog; ac_word=$2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1510 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| 1511 | echo "configure:1512: checking for $ac_word" >&5 |
| 1512 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
| 1513 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1514 | else |
| 1515 | if test -n "$AR"; then |
| 1516 | ac_cv_prog_AR="$AR" # Let the user override the test. |
| 1517 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1518 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 1519 | ac_dummy="$PATH" |
| 1520 | for ac_dir in $ac_dummy; do |
| 1521 | test -z "$ac_dir" && ac_dir=. |
| 1522 | if test -f $ac_dir/$ac_word; then |
| 1523 | ac_cv_prog_AR="$ac_prog" |
| 1524 | break |
| 1525 | fi |
| 1526 | done |
| 1527 | IFS="$ac_save_ifs" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1528 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1529 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1530 | AR="$ac_cv_prog_AR" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1531 | if test -n "$AR"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1532 | echo "$ac_t""$AR" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1533 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1534 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1535 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1536 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1537 | test -n "$AR" && break |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1538 | done |
| 1539 | test -n "$AR" || AR="ar" |
| 1540 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1541 | |
Neil Schemenauer | a42c827 | 2001-03-31 00:01:55 +0000 | [diff] [blame] | 1542 | case $MACHDEP in |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 1543 | bsdos*|hp*|HP*) |
| 1544 | # install -d does not work on BSDI or HP-UX |
Neil Schemenauer | a42c827 | 2001-03-31 00:01:55 +0000 | [diff] [blame] | 1545 | if test -z "$INSTALL" |
| 1546 | then |
| 1547 | INSTALL="${srcdir}/install-sh -c" |
| 1548 | fi |
| 1549 | esac |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1550 | ac_aux_dir= |
| 1551 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do |
| 1552 | if test -f $ac_dir/install-sh; then |
| 1553 | ac_aux_dir=$ac_dir |
| 1554 | ac_install_sh="$ac_aux_dir/install-sh -c" |
| 1555 | break |
| 1556 | elif test -f $ac_dir/install.sh; then |
| 1557 | ac_aux_dir=$ac_dir |
| 1558 | ac_install_sh="$ac_aux_dir/install.sh -c" |
| 1559 | break |
| 1560 | fi |
| 1561 | done |
| 1562 | if test -z "$ac_aux_dir"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1563 | { 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] | 1564 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1565 | ac_config_guess=$ac_aux_dir/config.guess |
| 1566 | ac_config_sub=$ac_aux_dir/config.sub |
| 1567 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1568 | |
| 1569 | # Find a good install program. We prefer a C program (faster), |
| 1570 | # so one script is as good as another. But avoid the broken or |
| 1571 | # incompatible versions: |
| 1572 | # SysV /etc/install, /usr/sbin/install |
| 1573 | # SunOS /usr/etc/install |
| 1574 | # IRIX /sbin/install |
| 1575 | # AIX /bin/install |
| 1576 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag |
| 1577 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args |
| 1578 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" |
| 1579 | # ./install, which can be erroneously created by make from ./install.sh. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1580 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 |
| 1581 | echo "configure:1582: checking for a BSD compatible install" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1582 | if test -z "$INSTALL"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1583 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then |
| 1584 | echo $ac_n "(cached) $ac_c" 1>&6 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1585 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1586 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1587 | for ac_dir in $PATH; do |
| 1588 | # Account for people who put trailing slashes in PATH elements. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1589 | case "$ac_dir/" in |
| 1590 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1591 | *) |
| 1592 | # OSF1 and SCO ODT 3.0 have their own names for install. |
| 1593 | # Don't use installbsd from OSF since it installs stuff as root |
| 1594 | # by default. |
| 1595 | for ac_prog in ginstall scoinst install; do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1596 | if test -f $ac_dir/$ac_prog; then |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1597 | if test $ac_prog = install && |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1598 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1599 | # AIX install. It has an incompatible calling convention. |
| 1600 | : |
| 1601 | else |
| 1602 | ac_cv_path_install="$ac_dir/$ac_prog -c" |
| 1603 | break 2 |
| 1604 | fi |
| 1605 | fi |
| 1606 | done |
| 1607 | ;; |
| 1608 | esac |
| 1609 | done |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1610 | IFS="$ac_save_IFS" |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1611 | |
| 1612 | fi |
| 1613 | if test "${ac_cv_path_install+set}" = set; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1614 | INSTALL="$ac_cv_path_install" |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1615 | else |
| 1616 | # As a last resort, use the slow shell script. We don't cache a |
| 1617 | # path for INSTALL within a source directory, because that will |
| 1618 | # break other packages using the cache if that directory is |
| 1619 | # removed, or if the path is relative. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1620 | INSTALL="$ac_install_sh" |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1621 | fi |
| 1622 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1623 | echo "$ac_t""$INSTALL" 1>&6 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1624 | |
| 1625 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. |
| 1626 | # It thinks the first close brace ends the variable substitution. |
| 1627 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' |
| 1628 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1629 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1630 | |
| 1631 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' |
| 1632 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1633 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 1634 | # Not every filesystem supports hard links |
| 1635 | |
| 1636 | if test -z "$LN" ; then |
| 1637 | case $ac_sys_system in |
| 1638 | BeOS*) LN="ln -s";; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1639 | CYGWIN*) LN="ln -s";; |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 1640 | *) LN=ln;; |
| 1641 | esac |
| 1642 | fi |
| 1643 | |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1644 | # Check for --with-pydebug |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1645 | echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6 |
| 1646 | echo "configure:1647: checking for --with-pydebug" >&5 |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1647 | # Check whether --with-pydebug or --without-pydebug was given. |
| 1648 | if test "${with_pydebug+set}" = set; then |
| 1649 | withval="$with_pydebug" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1650 | |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1651 | if test "$withval" != no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1652 | then cat >> confdefs.h <<\EOF |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1653 | #define Py_DEBUG 1 |
| 1654 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1655 | echo "$ac_t""yes" 1>&6; Py_DEBUG='true' |
| 1656 | else echo "$ac_t""no" 1>&6; Py_DEBUG='false' |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1657 | fi |
| 1658 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1659 | echo "$ac_t""no" 1>&6 |
| 1660 | fi |
| 1661 | |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1662 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1663 | # Optimizer/debugger flags |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1664 | |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1665 | if test -z "$OPT" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1666 | then |
Guido van Rossum | edca74a | 1997-07-18 23:29:40 +0000 | [diff] [blame] | 1667 | case $GCC in |
| 1668 | yes) |
| 1669 | case $ac_cv_prog_cc_g in |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1670 | yes) |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1671 | if test "$Py_DEBUG" = 'true' ; then |
| 1672 | # Optimization messes up debuggers, so turn it off for |
| 1673 | # debug builds. |
| 1674 | OPT="-g -Wall -Wstrict-prototypes" |
| 1675 | else |
| 1676 | OPT="-g -O3 -Wall -Wstrict-prototypes" |
| 1677 | fi;; |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1678 | *) |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1679 | OPT="-O3 -Wall -Wstrict-prototypes";; |
| 1680 | esac |
| 1681 | ;; |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1682 | *) |
| 1683 | case $ac_sys_system in |
Martin v. Löwis | 25ae43b | 2001-10-07 08:39:18 +0000 | [diff] [blame] | 1684 | OpenUNIX*|UnixWare*) |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1685 | OPT="-O -K pentium,host,inline,loop_unroll,alloca ";; |
| 1686 | *) |
| 1687 | OPT="-O";; |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1688 | esac |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1689 | esac |
Jack Jansen | ca06bc6 | 2001-08-03 15:32:23 +0000 | [diff] [blame] | 1690 | case $ac_sys_system in |
| 1691 | Darwin*) |
| 1692 | OPT="$OPT -no-cpp-precomp";; |
| 1693 | esac |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1694 | fi |
| 1695 | |
Fred Drake | e1ceaa0 | 2001-12-04 20:55:47 +0000 | [diff] [blame] | 1696 | if test "$Py_DEBUG" = 'true'; then |
| 1697 | : |
| 1698 | else |
| 1699 | OPT="-DNDEBUG $OPT" |
| 1700 | fi |
| 1701 | |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1702 | # The current (beta) Monterey compiler dies with optimizations |
| 1703 | case $ac_sys_system in |
| 1704 | Monterey*) OPT="";; |
| 1705 | esac |
| 1706 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 1707 | if test "$ac_arch_flags" |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 1708 | then |
| 1709 | OPT="$OPT $ac_arch_flags" |
| 1710 | fi |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 1711 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1712 | echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6 |
| 1713 | echo "configure:1714: checking whether $CC accepts -OPT:Olimit=0" >&5 |
| 1714 | if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then |
| 1715 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1716 | else |
| 1717 | ac_save_cc="$CC" |
| 1718 | CC="$CC -OPT:Olimit=0" |
| 1719 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 1720 | ac_cv_opt_olimit_ok=no |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1721 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1722 | cat > conftest.$ac_ext <<EOF |
| 1723 | #line 1724 "configure" |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1724 | #include "confdefs.h" |
| 1725 | int main() { return 0; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1726 | EOF |
| 1727 | if { (eval echo configure:1728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
| 1728 | then |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1729 | ac_cv_opt_olimit_ok=yes |
| 1730 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1731 | echo "configure: failed program was:" >&5 |
| 1732 | cat conftest.$ac_ext >&5 |
| 1733 | rm -fr conftest* |
| 1734 | ac_cv_opt_olimit_ok=no |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1735 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1736 | rm -fr conftest* |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1737 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1738 | |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1739 | CC="$ac_save_cc" |
| 1740 | fi |
| 1741 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1742 | echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6 |
Guido van Rossum | 2efa34b | 1997-10-23 17:43:11 +0000 | [diff] [blame] | 1743 | if test $ac_cv_opt_olimit_ok = yes; then |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 1744 | case $ac_sys_system in |
| 1745 | Darwin*) OPT="$OPT" ;; |
| 1746 | *) OPT="$OPT -OPT:Olimit=0";; |
| 1747 | esac |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1748 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1749 | echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6 |
| 1750 | echo "configure:1751: checking whether $CC accepts -Olimit 1500" >&5 |
| 1751 | if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then |
| 1752 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1753 | else |
| 1754 | ac_save_cc="$CC" |
| 1755 | CC="$CC -Olimit 1500" |
| 1756 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 1757 | ac_cv_olimit_ok=no |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1758 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1759 | cat > conftest.$ac_ext <<EOF |
| 1760 | #line 1761 "configure" |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1761 | #include "confdefs.h" |
| 1762 | int main() { return 0; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1763 | EOF |
| 1764 | if { (eval echo configure:1765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
| 1765 | then |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1766 | ac_cv_olimit_ok=yes |
| 1767 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1768 | echo "configure: failed program was:" >&5 |
| 1769 | cat conftest.$ac_ext >&5 |
| 1770 | rm -fr conftest* |
| 1771 | ac_cv_olimit_ok=no |
Guido van Rossum | 201afe5 | 1997-05-14 21:14:44 +0000 | [diff] [blame] | 1772 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1773 | rm -fr conftest* |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1774 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1775 | |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1776 | CC="$ac_save_cc" |
| 1777 | fi |
| 1778 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1779 | echo "$ac_t""$ac_cv_olimit_ok" 1>&6 |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1780 | if test $ac_cv_olimit_ok = yes; then |
| 1781 | OPT="$OPT -Olimit 1500" |
| 1782 | fi |
| 1783 | fi |
| 1784 | |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1785 | # On some compilers, pthreads are available without further options |
| 1786 | # (e.g. MacOS X). On some of these systems, the compiler will not |
| 1787 | # complain if unaccepted options are passed (e.g. gcc on Mac OS X). |
| 1788 | # So we have to see first whether pthreads are available without |
| 1789 | # options before we can check whether -Kpthread improves anything. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1790 | echo $ac_n "checking whether pthreads are available without options""... $ac_c" 1>&6 |
| 1791 | echo "configure:1792: checking whether pthreads are available without options" >&5 |
| 1792 | if eval "test \"`echo '$''{'ac_cv_pthread_is_default'+set}'`\" = set"; then |
| 1793 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1794 | else |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1795 | if test "$cross_compiling" = yes; then |
| 1796 | ac_cv_pthread_is_default=no |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame] | 1797 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1798 | cat > conftest.$ac_ext <<EOF |
| 1799 | #line 1800 "configure" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1800 | #include "confdefs.h" |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame] | 1801 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1802 | #include <pthread.h> |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame] | 1803 | |
| 1804 | void* routine(void* p){return NULL;} |
| 1805 | |
| 1806 | int main(){ |
| 1807 | pthread_t p; |
| 1808 | if(pthread_create(&p,NULL,routine,NULL)!=0) |
| 1809 | return 1; |
| 1810 | return 0; |
| 1811 | } |
| 1812 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1813 | EOF |
| 1814 | if { (eval echo configure:1815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
| 1815 | then |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1816 | ac_cv_pthread_is_default=yes |
| 1817 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1818 | echo "configure: failed program was:" >&5 |
| 1819 | cat conftest.$ac_ext >&5 |
| 1820 | rm -fr conftest* |
| 1821 | ac_cv_pthread_is_default=no |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1822 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1823 | rm -fr conftest* |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1824 | fi |
| 1825 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1826 | |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1827 | fi |
| 1828 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1829 | echo "$ac_t""$ac_cv_pthread_is_default" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1830 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1831 | |
| 1832 | if test $ac_cv_pthread_is_default = yes |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1833 | then |
| 1834 | ac_cv_kpthread=no |
| 1835 | else |
| 1836 | # -Kpthread, if available, provides the right #defines |
| 1837 | # and linker options to make pthread_create available |
| 1838 | # Some compilers won't report that they do not support -Kpthread, |
| 1839 | # so we need to run a program to see whether it really made the |
| 1840 | # function available. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1841 | echo $ac_n "checking whether $CC accepts -Kpthread""... $ac_c" 1>&6 |
| 1842 | echo "configure:1843: checking whether $CC accepts -Kpthread" >&5 |
| 1843 | if eval "test \"`echo '$''{'ac_cv_kpthread'+set}'`\" = set"; then |
| 1844 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1845 | else |
| 1846 | ac_save_cc="$CC" |
| 1847 | CC="$CC -Kpthread" |
| 1848 | if test "$cross_compiling" = yes; then |
| 1849 | ac_cv_kpthread=no |
| 1850 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1851 | cat > conftest.$ac_ext <<EOF |
| 1852 | #line 1853 "configure" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1853 | #include "confdefs.h" |
| 1854 | |
| 1855 | #include <pthread.h> |
| 1856 | |
| 1857 | void* routine(void* p){return NULL;} |
| 1858 | |
| 1859 | int main(){ |
| 1860 | pthread_t p; |
| 1861 | if(pthread_create(&p,NULL,routine,NULL)!=0) |
| 1862 | return 1; |
| 1863 | return 0; |
| 1864 | } |
| 1865 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1866 | EOF |
| 1867 | if { (eval echo configure:1868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
| 1868 | then |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1869 | ac_cv_kpthread=yes |
| 1870 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1871 | echo "configure: failed program was:" >&5 |
| 1872 | cat conftest.$ac_ext >&5 |
| 1873 | rm -fr conftest* |
| 1874 | ac_cv_kpthread=no |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1875 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1876 | rm -fr conftest* |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame] | 1877 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1878 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1879 | CC="$ac_save_cc" |
| 1880 | fi |
| 1881 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1882 | echo "$ac_t""$ac_cv_kpthread" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1883 | fi |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1884 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1885 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1886 | # checks for header files |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1887 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 |
| 1888 | echo "configure:1889: checking for ANSI C header files" >&5 |
| 1889 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
| 1890 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1891 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1892 | cat > conftest.$ac_ext <<EOF |
| 1893 | #line 1894 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1894 | #include "confdefs.h" |
| 1895 | #include <stdlib.h> |
| 1896 | #include <stdarg.h> |
| 1897 | #include <string.h> |
| 1898 | #include <float.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1899 | EOF |
| 1900 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
| 1901 | { (eval echo configure:1902: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
| 1902 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1903 | if test -z "$ac_err"; then |
| 1904 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1905 | ac_cv_header_stdc=yes |
| 1906 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1907 | echo "$ac_err" >&5 |
| 1908 | echo "configure: failed program was:" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1909 | cat conftest.$ac_ext >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1910 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1911 | ac_cv_header_stdc=no |
| 1912 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1913 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1914 | |
| 1915 | if test $ac_cv_header_stdc = yes; then |
| 1916 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1917 | cat > conftest.$ac_ext <<EOF |
| 1918 | #line 1919 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1919 | #include "confdefs.h" |
| 1920 | #include <string.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1921 | EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1922 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1923 | egrep "memchr" >/dev/null 2>&1; then |
| 1924 | : |
| 1925 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1926 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1927 | ac_cv_header_stdc=no |
| 1928 | fi |
| 1929 | rm -f conftest* |
| 1930 | |
| 1931 | fi |
| 1932 | |
| 1933 | if test $ac_cv_header_stdc = yes; then |
| 1934 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1935 | cat > conftest.$ac_ext <<EOF |
| 1936 | #line 1937 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1937 | #include "confdefs.h" |
| 1938 | #include <stdlib.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1939 | EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1940 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1941 | egrep "free" >/dev/null 2>&1; then |
| 1942 | : |
| 1943 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1944 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1945 | ac_cv_header_stdc=no |
| 1946 | fi |
| 1947 | rm -f conftest* |
| 1948 | |
| 1949 | fi |
| 1950 | |
| 1951 | if test $ac_cv_header_stdc = yes; then |
| 1952 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1953 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1954 | : |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1955 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1956 | cat > conftest.$ac_ext <<EOF |
| 1957 | #line 1958 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1958 | #include "confdefs.h" |
| 1959 | #include <ctype.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1960 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') |
| 1961 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 1962 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1963 | int main () { int i; for (i = 0; i < 256; i++) |
| 1964 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); |
| 1965 | exit (0); } |
| 1966 | |
| 1967 | EOF |
| 1968 | if { (eval echo configure:1969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
| 1969 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1970 | : |
| 1971 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1972 | echo "configure: failed program was:" >&5 |
| 1973 | cat conftest.$ac_ext >&5 |
| 1974 | rm -fr conftest* |
| 1975 | ac_cv_header_stdc=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1976 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1977 | rm -fr conftest* |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1978 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 1979 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1980 | fi |
| 1981 | fi |
| 1982 | |
| 1983 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 |
| 1984 | if test $ac_cv_header_stdc = yes; then |
| 1985 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1986 | #define STDC_HEADERS 1 |
| 1987 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1988 | |
| 1989 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1990 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1991 | for ac_hdr in dlfcn.h fcntl.h grp.h limits.h langinfo.h locale.h \ |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 1992 | ncurses.h poll.h pthread.h \ |
Eric S. Raymond | d2d75d3 | 2001-01-16 15:26:34 +0000 | [diff] [blame] | 1993 | 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] | 1994 | 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] | 1995 | sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \ |
Martin v. Löwis | 6953233 | 2001-10-13 09:12:41 +0000 | [diff] [blame] | 1996 | sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \ |
Martin v. Löwis | f24b2f3 | 2001-08-10 20:29:40 +0000 | [diff] [blame] | 1997 | 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] | 1998 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1999 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
| 2000 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
| 2001 | echo "configure:2002: checking for $ac_hdr" >&5 |
| 2002 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 2003 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2004 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2005 | cat > conftest.$ac_ext <<EOF |
| 2006 | #line 2007 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2007 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2008 | #include <$ac_hdr> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2009 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2010 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
| 2011 | { (eval echo configure:2012: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
| 2012 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 2013 | if test -z "$ac_err"; then |
| 2014 | rm -rf conftest* |
| 2015 | eval "ac_cv_header_$ac_safe=yes" |
| 2016 | else |
| 2017 | echo "$ac_err" >&5 |
| 2018 | echo "configure: failed program was:" >&5 |
| 2019 | cat conftest.$ac_ext >&5 |
| 2020 | rm -rf conftest* |
| 2021 | eval "ac_cv_header_$ac_safe=no" |
| 2022 | fi |
| 2023 | rm -f conftest* |
| 2024 | fi |
| 2025 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 2026 | echo "$ac_t""yes" 1>&6 |
| 2027 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
| 2028 | cat >> confdefs.h <<EOF |
| 2029 | #define $ac_tr_hdr 1 |
| 2030 | EOF |
| 2031 | |
| 2032 | else |
| 2033 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2034 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2035 | done |
| 2036 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2037 | ac_header_dirent=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2038 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h |
| 2039 | do |
| 2040 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
| 2041 | echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 |
| 2042 | echo "configure:2043: checking for $ac_hdr that defines DIR" >&5 |
| 2043 | if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then |
| 2044 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2045 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2046 | cat > conftest.$ac_ext <<EOF |
| 2047 | #line 2048 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2048 | #include "confdefs.h" |
| 2049 | #include <sys/types.h> |
| 2050 | #include <$ac_hdr> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2051 | int main() { |
| 2052 | DIR *dirp = 0; |
| 2053 | ; return 0; } |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2054 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2055 | if { (eval echo configure:2056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| 2056 | rm -rf conftest* |
| 2057 | eval "ac_cv_header_dirent_$ac_safe=yes" |
| 2058 | else |
| 2059 | echo "configure: failed program was:" >&5 |
| 2060 | cat conftest.$ac_ext >&5 |
| 2061 | rm -rf conftest* |
| 2062 | eval "ac_cv_header_dirent_$ac_safe=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2063 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2064 | rm -f conftest* |
| 2065 | fi |
| 2066 | if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then |
| 2067 | echo "$ac_t""yes" 1>&6 |
| 2068 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
| 2069 | cat >> confdefs.h <<EOF |
| 2070 | #define $ac_tr_hdr 1 |
| 2071 | EOF |
| 2072 | ac_header_dirent=$ac_hdr; break |
| 2073 | else |
| 2074 | echo "$ac_t""no" 1>&6 |
| 2075 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2076 | done |
| 2077 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. |
| 2078 | if test $ac_header_dirent = dirent.h; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2079 | echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 |
| 2080 | echo "configure:2081: checking for opendir in -ldir" >&5 |
| 2081 | ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` |
| 2082 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 2083 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2084 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2085 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2086 | LIBS="-ldir $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2087 | cat > conftest.$ac_ext <<EOF |
| 2088 | #line 2089 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2089 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2090 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 2091 | /* We use char because int might match the return type of a gcc2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2092 | builtin and then its argument prototype would still apply. */ |
| 2093 | char opendir(); |
| 2094 | |
| 2095 | int main() { |
| 2096 | opendir() |
| 2097 | ; return 0; } |
| 2098 | EOF |
| 2099 | if { (eval echo configure:2100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| 2100 | rm -rf conftest* |
| 2101 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2102 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2103 | echo "configure: failed program was:" >&5 |
| 2104 | cat conftest.$ac_ext >&5 |
| 2105 | rm -rf conftest* |
| 2106 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2107 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2108 | rm -f conftest* |
| 2109 | LIBS="$ac_save_LIBS" |
| 2110 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2111 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2112 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 2113 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2114 | LIBS="$LIBS -ldir" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2115 | else |
| 2116 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2117 | fi |
| 2118 | |
| 2119 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2120 | echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 |
| 2121 | echo "configure:2122: checking for opendir in -lx" >&5 |
| 2122 | ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` |
| 2123 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 2124 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2125 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2126 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2127 | LIBS="-lx $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2128 | cat > conftest.$ac_ext <<EOF |
| 2129 | #line 2130 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2130 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2131 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 2132 | /* We use char because int might match the return type of a gcc2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2133 | builtin and then its argument prototype would still apply. */ |
| 2134 | char opendir(); |
| 2135 | |
| 2136 | int main() { |
| 2137 | opendir() |
| 2138 | ; return 0; } |
| 2139 | EOF |
| 2140 | if { (eval echo configure:2141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| 2141 | rm -rf conftest* |
| 2142 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2143 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2144 | echo "configure: failed program was:" >&5 |
| 2145 | cat conftest.$ac_ext >&5 |
| 2146 | rm -rf conftest* |
| 2147 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2148 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2149 | rm -f conftest* |
| 2150 | LIBS="$ac_save_LIBS" |
| 2151 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2152 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2153 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 2154 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2155 | LIBS="$LIBS -lx" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2156 | else |
| 2157 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2158 | fi |
| 2159 | |
| 2160 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2161 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2162 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2163 | # checks for typedefs |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2164 | was_it_defined=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2165 | echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6 |
| 2166 | echo "configure:2167: checking for clock_t in time.h" >&5 |
| 2167 | cat > conftest.$ac_ext <<EOF |
| 2168 | #line 2169 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2169 | #include "confdefs.h" |
| 2170 | #include <time.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2171 | EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2172 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2173 | egrep "clock_t" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2174 | rm -rf conftest* |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2175 | was_it_defined=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2176 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2177 | rm -rf conftest* |
| 2178 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2179 | #define clock_t long |
| 2180 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2181 | |
| 2182 | fi |
| 2183 | rm -f conftest* |
| 2184 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2185 | echo "$ac_t""$was_it_defined" 1>&6 |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2186 | |
Guido van Rossum | 810cc51 | 2001-09-09 23:51:39 +0000 | [diff] [blame] | 2187 | # Two defines needed to enable largefile support on various platforms |
| 2188 | # These may affect some typedefs |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2189 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 810cc51 | 2001-09-09 23:51:39 +0000 | [diff] [blame] | 2190 | #define _LARGEFILE_SOURCE 1 |
| 2191 | EOF |
| 2192 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2193 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 810cc51 | 2001-09-09 23:51:39 +0000 | [diff] [blame] | 2194 | #define _FILE_OFFSET_BITS 64 |
| 2195 | EOF |
| 2196 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2197 | |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 2198 | # Add some code to confdefs.h so that the test for off_t works on SCO |
| 2199 | cat >> confdefs.h <<\EOF |
| 2200 | #if defined(SCO_DS) |
| 2201 | #undef _OFF_T |
| 2202 | #endif |
| 2203 | EOF |
| 2204 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2205 | # Type availability checks |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2206 | echo $ac_n "checking for mode_t""... $ac_c" 1>&6 |
| 2207 | echo "configure:2208: checking for mode_t" >&5 |
| 2208 | if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then |
| 2209 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2210 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2211 | cat > conftest.$ac_ext <<EOF |
| 2212 | #line 2213 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2213 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2214 | #include <sys/types.h> |
| 2215 | #if STDC_HEADERS |
| 2216 | #include <stdlib.h> |
| 2217 | #include <stddef.h> |
| 2218 | #endif |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 2219 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2220 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2221 | egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
| 2222 | rm -rf conftest* |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 2223 | ac_cv_type_mode_t=yes |
| 2224 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2225 | rm -rf conftest* |
| 2226 | ac_cv_type_mode_t=no |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 2227 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2228 | rm -f conftest* |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 2229 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2230 | fi |
| 2231 | echo "$ac_t""$ac_cv_type_mode_t" 1>&6 |
| 2232 | if test $ac_cv_type_mode_t = no; then |
| 2233 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2234 | #define mode_t int |
| 2235 | EOF |
| 2236 | |
| 2237 | fi |
| 2238 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2239 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 |
| 2240 | echo "configure:2241: checking for off_t" >&5 |
| 2241 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
| 2242 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2243 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2244 | cat > conftest.$ac_ext <<EOF |
| 2245 | #line 2246 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2246 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2247 | #include <sys/types.h> |
| 2248 | #if STDC_HEADERS |
| 2249 | #include <stdlib.h> |
| 2250 | #include <stddef.h> |
| 2251 | #endif |
| 2252 | EOF |
| 2253 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2254 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
| 2255 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2256 | ac_cv_type_off_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2257 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2258 | rm -rf conftest* |
| 2259 | ac_cv_type_off_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2260 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2261 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2262 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2263 | fi |
| 2264 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 |
| 2265 | if test $ac_cv_type_off_t = no; then |
| 2266 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2267 | #define off_t long |
| 2268 | EOF |
| 2269 | |
| 2270 | fi |
| 2271 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2272 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
| 2273 | echo "configure:2274: checking for pid_t" >&5 |
| 2274 | if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then |
| 2275 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2276 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2277 | cat > conftest.$ac_ext <<EOF |
| 2278 | #line 2279 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2279 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2280 | #include <sys/types.h> |
| 2281 | #if STDC_HEADERS |
| 2282 | #include <stdlib.h> |
| 2283 | #include <stddef.h> |
| 2284 | #endif |
| 2285 | EOF |
| 2286 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2287 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
| 2288 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2289 | ac_cv_type_pid_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2290 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2291 | rm -rf conftest* |
| 2292 | ac_cv_type_pid_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2293 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2294 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2295 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2296 | fi |
| 2297 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 |
| 2298 | if test $ac_cv_type_pid_t = no; then |
| 2299 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2300 | #define pid_t int |
| 2301 | EOF |
| 2302 | |
| 2303 | fi |
| 2304 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2305 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 |
| 2306 | echo "configure:2307: checking return type of signal handlers" >&5 |
| 2307 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
| 2308 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2309 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2310 | cat > conftest.$ac_ext <<EOF |
| 2311 | #line 2312 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2312 | #include "confdefs.h" |
| 2313 | #include <sys/types.h> |
| 2314 | #include <signal.h> |
| 2315 | #ifdef signal |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2316 | #undef signal |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2317 | #endif |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2318 | #ifdef __cplusplus |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2319 | extern "C" void (*signal (int, void (*)(int)))(int); |
| 2320 | #else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2321 | void (*signal ()) (); |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2322 | #endif |
| 2323 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2324 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2325 | int i; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2326 | ; return 0; } |
| 2327 | EOF |
| 2328 | if { (eval echo configure:2329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| 2329 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2330 | ac_cv_type_signal=void |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2331 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2332 | echo "configure: failed program was:" >&5 |
| 2333 | cat conftest.$ac_ext >&5 |
| 2334 | rm -rf conftest* |
| 2335 | ac_cv_type_signal=int |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2336 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2337 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2338 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2339 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2340 | echo "$ac_t""$ac_cv_type_signal" 1>&6 |
| 2341 | cat >> confdefs.h <<EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2342 | #define RETSIGTYPE $ac_cv_type_signal |
| 2343 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2344 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2345 | |
| 2346 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 |
| 2347 | echo "configure:2348: checking for size_t" >&5 |
| 2348 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
| 2349 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2350 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2351 | cat > conftest.$ac_ext <<EOF |
| 2352 | #line 2353 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2353 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2354 | #include <sys/types.h> |
| 2355 | #if STDC_HEADERS |
| 2356 | #include <stdlib.h> |
| 2357 | #include <stddef.h> |
| 2358 | #endif |
| 2359 | EOF |
| 2360 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2361 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
| 2362 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2363 | ac_cv_type_size_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2364 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2365 | rm -rf conftest* |
| 2366 | ac_cv_type_size_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2367 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2368 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2369 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2370 | fi |
| 2371 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 |
| 2372 | if test $ac_cv_type_size_t = no; then |
| 2373 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2374 | #define size_t unsigned |
| 2375 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2376 | |
| 2377 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2378 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2379 | echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 |
| 2380 | echo "configure:2381: checking for uid_t in sys/types.h" >&5 |
| 2381 | if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then |
| 2382 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2383 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2384 | cat > conftest.$ac_ext <<EOF |
| 2385 | #line 2386 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2386 | #include "confdefs.h" |
| 2387 | #include <sys/types.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2388 | EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2389 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2390 | egrep "uid_t" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2391 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2392 | ac_cv_type_uid_t=yes |
| 2393 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2394 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2395 | ac_cv_type_uid_t=no |
| 2396 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2397 | rm -f conftest* |
| 2398 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2399 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 2400 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2401 | echo "$ac_t""$ac_cv_type_uid_t" 1>&6 |
| 2402 | if test $ac_cv_type_uid_t = no; then |
| 2403 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2404 | #define uid_t int |
| 2405 | EOF |
| 2406 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2407 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2408 | #define gid_t int |
| 2409 | EOF |
| 2410 | |
| 2411 | fi |
| 2412 | |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 2413 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2414 | # Sizes of various common basic types |
| 2415 | echo $ac_n "checking size of int""... $ac_c" 1>&6 |
| 2416 | echo "configure:2417: checking size of int" >&5 |
| 2417 | if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then |
| 2418 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2419 | else |
| 2420 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2421 | ac_cv_sizeof_int=4 |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2422 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2423 | cat > conftest.$ac_ext <<EOF |
| 2424 | #line 2425 "configure" |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2425 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2426 | #include <stdio.h> |
| 2427 | main() |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2428 | { |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2429 | FILE *f=fopen("conftestval", "w"); |
| 2430 | if (!f) exit(1); |
| 2431 | fprintf(f, "%d\n", sizeof(int)); |
| 2432 | exit(0); |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2433 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2434 | EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2435 | if { (eval echo configure:2436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2436 | then |
| 2437 | ac_cv_sizeof_int=`cat conftestval` |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2438 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2439 | echo "configure: failed program was:" >&5 |
| 2440 | cat conftest.$ac_ext >&5 |
| 2441 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2442 | ac_cv_sizeof_int=0 |
| 2443 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2444 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2445 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2446 | |
| 2447 | fi |
| 2448 | echo "$ac_t""$ac_cv_sizeof_int" 1>&6 |
| 2449 | cat >> confdefs.h <<EOF |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2450 | #define SIZEOF_INT $ac_cv_sizeof_int |
| 2451 | EOF |
| 2452 | |
| 2453 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2454 | echo $ac_n "checking size of long""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2455 | echo "configure:2456: checking size of long" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2456 | if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then |
| 2457 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2458 | else |
| 2459 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2460 | ac_cv_sizeof_long=4 |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2461 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2462 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2463 | #line 2464 "configure" |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2464 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2465 | #include <stdio.h> |
| 2466 | main() |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2467 | { |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2468 | FILE *f=fopen("conftestval", "w"); |
| 2469 | if (!f) exit(1); |
| 2470 | fprintf(f, "%d\n", sizeof(long)); |
| 2471 | exit(0); |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2472 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2473 | EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2474 | if { (eval echo configure:2475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2475 | then |
| 2476 | ac_cv_sizeof_long=`cat conftestval` |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2477 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2478 | echo "configure: failed program was:" >&5 |
| 2479 | cat conftest.$ac_ext >&5 |
| 2480 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2481 | ac_cv_sizeof_long=0 |
| 2482 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2483 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2484 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2485 | |
| 2486 | fi |
| 2487 | echo "$ac_t""$ac_cv_sizeof_long" 1>&6 |
| 2488 | cat >> confdefs.h <<EOF |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2489 | #define SIZEOF_LONG $ac_cv_sizeof_long |
| 2490 | EOF |
| 2491 | |
| 2492 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2493 | echo $ac_n "checking size of void *""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2494 | echo "configure:2495: checking size of void *" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2495 | if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then |
| 2496 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2497 | else |
| 2498 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2499 | ac_cv_sizeof_void_p=4 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2500 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2501 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2502 | #line 2503 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2503 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2504 | #include <stdio.h> |
| 2505 | main() |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2506 | { |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2507 | FILE *f=fopen("conftestval", "w"); |
| 2508 | if (!f) exit(1); |
| 2509 | fprintf(f, "%d\n", sizeof(void *)); |
| 2510 | exit(0); |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2511 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2512 | EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2513 | if { (eval echo configure:2514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2514 | then |
| 2515 | ac_cv_sizeof_void_p=`cat conftestval` |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2516 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2517 | echo "configure: failed program was:" >&5 |
| 2518 | cat conftest.$ac_ext >&5 |
| 2519 | rm -fr conftest* |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2520 | ac_cv_sizeof_void_p=0 |
| 2521 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2522 | rm -fr conftest* |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2523 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2524 | |
| 2525 | fi |
| 2526 | echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6 |
| 2527 | cat >> confdefs.h <<EOF |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2528 | #define SIZEOF_VOID_P $ac_cv_sizeof_void_p |
| 2529 | EOF |
| 2530 | |
| 2531 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2532 | echo $ac_n "checking size of char""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2533 | echo "configure:2534: checking size of char" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2534 | if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then |
| 2535 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2536 | else |
| 2537 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2538 | ac_cv_sizeof_char=1 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2539 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2540 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2541 | #line 2542 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2542 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2543 | #include <stdio.h> |
| 2544 | main() |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2545 | { |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2546 | FILE *f=fopen("conftestval", "w"); |
| 2547 | if (!f) exit(1); |
| 2548 | fprintf(f, "%d\n", sizeof(char)); |
| 2549 | exit(0); |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2550 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2551 | EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2552 | if { (eval echo configure:2553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2553 | then |
| 2554 | ac_cv_sizeof_char=`cat conftestval` |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2555 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2556 | echo "configure: failed program was:" >&5 |
| 2557 | cat conftest.$ac_ext >&5 |
| 2558 | rm -fr conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2559 | ac_cv_sizeof_char=0 |
| 2560 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2561 | rm -fr conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2562 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2563 | |
| 2564 | fi |
| 2565 | echo "$ac_t""$ac_cv_sizeof_char" 1>&6 |
| 2566 | cat >> confdefs.h <<EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2567 | #define SIZEOF_CHAR $ac_cv_sizeof_char |
| 2568 | EOF |
| 2569 | |
| 2570 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2571 | echo $ac_n "checking size of short""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2572 | echo "configure:2573: checking size of short" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2573 | if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then |
| 2574 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2575 | else |
| 2576 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2577 | ac_cv_sizeof_short=2 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2578 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2579 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2580 | #line 2581 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2581 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2582 | #include <stdio.h> |
| 2583 | main() |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2584 | { |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2585 | FILE *f=fopen("conftestval", "w"); |
| 2586 | if (!f) exit(1); |
| 2587 | fprintf(f, "%d\n", sizeof(short)); |
| 2588 | exit(0); |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2589 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2590 | EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2591 | if { (eval echo configure:2592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2592 | then |
| 2593 | ac_cv_sizeof_short=`cat conftestval` |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2594 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2595 | echo "configure: failed program was:" >&5 |
| 2596 | cat conftest.$ac_ext >&5 |
| 2597 | rm -fr conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2598 | ac_cv_sizeof_short=0 |
| 2599 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2600 | rm -fr conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2601 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2602 | |
| 2603 | fi |
| 2604 | echo "$ac_t""$ac_cv_sizeof_short" 1>&6 |
| 2605 | cat >> confdefs.h <<EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2606 | #define SIZEOF_SHORT $ac_cv_sizeof_short |
| 2607 | EOF |
| 2608 | |
| 2609 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2610 | echo $ac_n "checking size of float""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2611 | echo "configure:2612: checking size of float" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2612 | if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then |
| 2613 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2614 | else |
| 2615 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2616 | ac_cv_sizeof_float=4 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2617 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2618 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2619 | #line 2620 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2620 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2621 | #include <stdio.h> |
| 2622 | main() |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2623 | { |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2624 | FILE *f=fopen("conftestval", "w"); |
| 2625 | if (!f) exit(1); |
| 2626 | fprintf(f, "%d\n", sizeof(float)); |
| 2627 | exit(0); |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2628 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2629 | EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2630 | if { (eval echo configure:2631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2631 | then |
| 2632 | ac_cv_sizeof_float=`cat conftestval` |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2633 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2634 | echo "configure: failed program was:" >&5 |
| 2635 | cat conftest.$ac_ext >&5 |
| 2636 | rm -fr conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2637 | ac_cv_sizeof_float=0 |
| 2638 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2639 | rm -fr conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2640 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2641 | |
| 2642 | fi |
| 2643 | echo "$ac_t""$ac_cv_sizeof_float" 1>&6 |
| 2644 | cat >> confdefs.h <<EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2645 | #define SIZEOF_FLOAT $ac_cv_sizeof_float |
| 2646 | EOF |
| 2647 | |
| 2648 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2649 | echo $ac_n "checking size of double""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2650 | echo "configure:2651: checking size of double" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2651 | if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then |
| 2652 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2653 | else |
| 2654 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2655 | ac_cv_sizeof_double=8 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2656 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2657 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2658 | #line 2659 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2659 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2660 | #include <stdio.h> |
| 2661 | main() |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2662 | { |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2663 | FILE *f=fopen("conftestval", "w"); |
| 2664 | if (!f) exit(1); |
| 2665 | fprintf(f, "%d\n", sizeof(double)); |
| 2666 | exit(0); |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2667 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2668 | EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2669 | if { (eval echo configure:2670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2670 | then |
| 2671 | ac_cv_sizeof_double=`cat conftestval` |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2672 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2673 | echo "configure: failed program was:" >&5 |
| 2674 | cat conftest.$ac_ext >&5 |
| 2675 | rm -fr conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2676 | ac_cv_sizeof_double=0 |
| 2677 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2678 | rm -fr conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2679 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2680 | |
| 2681 | fi |
| 2682 | echo "$ac_t""$ac_cv_sizeof_double" 1>&6 |
| 2683 | cat >> confdefs.h <<EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2684 | #define SIZEOF_DOUBLE $ac_cv_sizeof_double |
| 2685 | EOF |
| 2686 | |
| 2687 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2688 | echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2689 | echo "configure:2690: checking size of fpos_t" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2690 | if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then |
| 2691 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2692 | else |
| 2693 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2694 | ac_cv_sizeof_fpos_t=4 |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2695 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2696 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2697 | #line 2698 "configure" |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2698 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2699 | #include <stdio.h> |
| 2700 | main() |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2701 | { |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2702 | FILE *f=fopen("conftestval", "w"); |
| 2703 | if (!f) exit(1); |
| 2704 | fprintf(f, "%d\n", sizeof(fpos_t)); |
| 2705 | exit(0); |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2706 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2707 | EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2708 | if { (eval echo configure:2709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2709 | then |
| 2710 | ac_cv_sizeof_fpos_t=`cat conftestval` |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2711 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2712 | echo "configure: failed program was:" >&5 |
| 2713 | cat conftest.$ac_ext >&5 |
| 2714 | rm -fr conftest* |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2715 | ac_cv_sizeof_fpos_t=0 |
| 2716 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2717 | rm -fr conftest* |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2718 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2719 | |
| 2720 | fi |
| 2721 | echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6 |
| 2722 | cat >> confdefs.h <<EOF |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2723 | #define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t |
| 2724 | EOF |
| 2725 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2726 | |
| 2727 | |
| 2728 | echo $ac_n "checking for long long support""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2729 | echo "configure:2730: checking for long long support" >&5 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2730 | have_long_long=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2731 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2732 | #line 2733 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2733 | #include "confdefs.h" |
| 2734 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2735 | int main() { |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2736 | long long x; x = (long long)0; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2737 | ; return 0; } |
| 2738 | EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2739 | if { (eval echo configure:2740: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2740 | rm -rf conftest* |
| 2741 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2742 | #define HAVE_LONG_LONG 1 |
| 2743 | EOF |
| 2744 | have_long_long=yes |
| 2745 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2746 | echo "configure: failed program was:" >&5 |
| 2747 | cat conftest.$ac_ext >&5 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2748 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2749 | rm -f conftest* |
| 2750 | echo "$ac_t""$have_long_long" 1>&6 |
Guido van Rossum | 96f2eb9 | 1999-04-10 16:02:18 +0000 | [diff] [blame] | 2751 | if test "$have_long_long" = yes ; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2752 | echo $ac_n "checking size of long long""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2753 | echo "configure:2754: checking size of long long" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2754 | if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then |
| 2755 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2756 | else |
| 2757 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2758 | ac_cv_sizeof_long_long=8 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2759 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2760 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2761 | #line 2762 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2762 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2763 | #include <stdio.h> |
| 2764 | main() |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2765 | { |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2766 | FILE *f=fopen("conftestval", "w"); |
| 2767 | if (!f) exit(1); |
| 2768 | fprintf(f, "%d\n", sizeof(long long)); |
| 2769 | exit(0); |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2770 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2771 | EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2772 | if { (eval echo configure:2773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2773 | then |
| 2774 | ac_cv_sizeof_long_long=`cat conftestval` |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2775 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2776 | echo "configure: failed program was:" >&5 |
| 2777 | cat conftest.$ac_ext >&5 |
| 2778 | rm -fr conftest* |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2779 | ac_cv_sizeof_long_long=0 |
| 2780 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2781 | rm -fr conftest* |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2782 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2783 | |
| 2784 | fi |
| 2785 | echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 |
| 2786 | cat >> confdefs.h <<EOF |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2787 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long |
| 2788 | EOF |
| 2789 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2790 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2791 | fi |
| 2792 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2793 | echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2794 | echo "configure:2795: checking for uintptr_t support" >&5 |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2795 | have_uintptr_t=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2796 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2797 | #line 2798 "configure" |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2798 | #include "confdefs.h" |
| 2799 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2800 | int main() { |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2801 | uintptr_t x; x = (uintptr_t)0; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2802 | ; return 0; } |
| 2803 | EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2804 | if { (eval echo configure:2805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2805 | rm -rf conftest* |
| 2806 | cat >> confdefs.h <<\EOF |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2807 | #define HAVE_UINTPTR_T 1 |
| 2808 | EOF |
| 2809 | have_uintptr_t=yes |
| 2810 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2811 | echo "configure: failed program was:" >&5 |
| 2812 | cat conftest.$ac_ext >&5 |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2813 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2814 | rm -f conftest* |
| 2815 | echo "$ac_t""$have_uintptr_t" 1>&6 |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2816 | if test "$have_uintptr_t" = yes ; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2817 | echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2818 | echo "configure:2819: checking size of uintptr_t" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2819 | if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then |
| 2820 | echo $ac_n "(cached) $ac_c" 1>&6 |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2821 | else |
| 2822 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2823 | ac_cv_sizeof_uintptr_t=4 |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2824 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2825 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2826 | #line 2827 "configure" |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2827 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2828 | #include <stdio.h> |
| 2829 | main() |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2830 | { |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2831 | FILE *f=fopen("conftestval", "w"); |
| 2832 | if (!f) exit(1); |
| 2833 | fprintf(f, "%d\n", sizeof(uintptr_t)); |
| 2834 | exit(0); |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2835 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2836 | EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2837 | if { (eval echo configure:2838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2838 | then |
| 2839 | ac_cv_sizeof_uintptr_t=`cat conftestval` |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2840 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2841 | echo "configure: failed program was:" >&5 |
| 2842 | cat conftest.$ac_ext >&5 |
| 2843 | rm -fr conftest* |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2844 | ac_cv_sizeof_uintptr_t=0 |
| 2845 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2846 | rm -fr conftest* |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2847 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2848 | |
| 2849 | fi |
| 2850 | echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6 |
| 2851 | cat >> confdefs.h <<EOF |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2852 | #define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t |
| 2853 | EOF |
| 2854 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2855 | |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2856 | fi |
| 2857 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2858 | # Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2859 | echo $ac_n "checking size of off_t""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2860 | echo "configure:2861: checking size of off_t" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2861 | if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then |
| 2862 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2863 | else |
| 2864 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2865 | ac_cv_sizeof_off_t=4 |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2866 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2867 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2868 | #line 2869 "configure" |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2869 | #include "confdefs.h" |
| 2870 | #include <stdio.h> |
| 2871 | #include <sys/types.h> |
| 2872 | main() |
| 2873 | { |
| 2874 | FILE *f=fopen("conftestval", "w"); |
| 2875 | if (!f) exit(1); |
| 2876 | fprintf(f, "%d\n", sizeof(off_t)); |
| 2877 | exit(0); |
| 2878 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2879 | EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2880 | if { (eval echo configure:2881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2881 | then |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2882 | ac_cv_sizeof_off_t=`cat conftestval` |
| 2883 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2884 | echo "configure: failed program was:" >&5 |
| 2885 | cat conftest.$ac_ext >&5 |
| 2886 | rm -fr conftest* |
| 2887 | ac_cv_sizeof_off_t=0 |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2888 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2889 | rm -fr conftest* |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2890 | fi |
| 2891 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2892 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2893 | fi |
| 2894 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2895 | echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6 |
| 2896 | cat >> confdefs.h <<EOF |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2897 | #define SIZEOF_OFF_T $ac_cv_sizeof_off_t |
| 2898 | EOF |
| 2899 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2900 | |
| 2901 | echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2902 | echo "configure:2903: checking whether to enable large file support" >&5 |
Guido van Rossum | 96f2eb9 | 1999-04-10 16:02:18 +0000 | [diff] [blame] | 2903 | if test "$have_long_long" = yes -a \ |
| 2904 | "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \ |
| 2905 | "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2906 | cat >> confdefs.h <<\EOF |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2907 | #define HAVE_LARGEFILE_SUPPORT 1 |
| 2908 | EOF |
| 2909 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2910 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2911 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2912 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2913 | fi |
| 2914 | |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2915 | # AC_CHECK_SIZEOF() doesn't include <time.h>. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2916 | echo $ac_n "checking size of time_t""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2917 | echo "configure:2918: checking size of time_t" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2918 | if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then |
| 2919 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2920 | else |
| 2921 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2922 | ac_cv_sizeof_time_t=4 |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2923 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2924 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2925 | #line 2926 "configure" |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2926 | #include "confdefs.h" |
| 2927 | #include <stdio.h> |
| 2928 | #include <time.h> |
| 2929 | main() |
| 2930 | { |
| 2931 | FILE *f=fopen("conftestval", "w"); |
| 2932 | if (!f) exit(1); |
| 2933 | fprintf(f, "%d\n", sizeof(time_t)); |
| 2934 | exit(0); |
| 2935 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2936 | EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2937 | if { (eval echo configure:2938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2938 | then |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2939 | ac_cv_sizeof_time_t=`cat conftestval` |
| 2940 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2941 | echo "configure: failed program was:" >&5 |
| 2942 | cat conftest.$ac_ext >&5 |
| 2943 | rm -fr conftest* |
| 2944 | ac_cv_sizeof_time_t=0 |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2945 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2946 | rm -fr conftest* |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2947 | fi |
| 2948 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2949 | |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2950 | fi |
| 2951 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2952 | echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6 |
| 2953 | cat >> confdefs.h <<EOF |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2954 | #define SIZEOF_TIME_T $ac_cv_sizeof_time_t |
| 2955 | EOF |
| 2956 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2957 | |
| 2958 | |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2959 | # if have pthread_t then define SIZEOF_PTHREAD_T |
Martin v. Löwis | 123cbd2 | 2001-07-19 14:21:10 +0000 | [diff] [blame] | 2960 | ac_save_cc="$CC" |
| 2961 | if test "$ac_cv_kpthread" = "yes" |
| 2962 | then CC="$CC -Kpthread" |
| 2963 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2964 | echo $ac_n "checking for pthread_t""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2965 | echo "configure:2966: checking for pthread_t" >&5 |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2966 | have_pthread_t=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2967 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2968 | #line 2969 "configure" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2969 | #include "confdefs.h" |
| 2970 | #include <pthread.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2971 | int main() { |
Guido van Rossum | 1258049 | 2000-09-24 16:47:19 +0000 | [diff] [blame] | 2972 | pthread_t x; x = *(pthread_t*)0; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2973 | ; return 0; } |
| 2974 | EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2975 | if { (eval echo configure:2976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2976 | rm -rf conftest* |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2977 | have_pthread_t=yes |
| 2978 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2979 | echo "configure: failed program was:" >&5 |
| 2980 | cat conftest.$ac_ext >&5 |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2981 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2982 | rm -f conftest* |
| 2983 | echo "$ac_t""$have_pthread_t" 1>&6 |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2984 | if test "$have_pthread_t" = yes ; then |
| 2985 | # AC_CHECK_SIZEOF() doesn't include <pthread.h>. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2986 | echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2987 | echo "configure:2988: checking size of pthread_t" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2988 | if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then |
| 2989 | echo $ac_n "(cached) $ac_c" 1>&6 |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2990 | else |
| 2991 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2992 | ac_cv_sizeof_pthread_t=4 |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2993 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2994 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 2995 | #line 2996 "configure" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2996 | #include "confdefs.h" |
| 2997 | #include <stdio.h> |
| 2998 | #include <pthread.h> |
| 2999 | main() |
| 3000 | { |
| 3001 | FILE *f=fopen("conftestval", "w"); |
| 3002 | if (!f) exit(1); |
| 3003 | fprintf(f, "%d\n", sizeof(pthread_t)); |
| 3004 | exit(0); |
| 3005 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3006 | EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3007 | if { (eval echo configure:3008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3008 | then |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3009 | ac_cv_sizeof_pthread_t=`cat conftestval` |
| 3010 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3011 | echo "configure: failed program was:" >&5 |
| 3012 | cat conftest.$ac_ext >&5 |
| 3013 | rm -fr conftest* |
| 3014 | ac_cv_sizeof_pthread_t=0 |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3015 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3016 | rm -fr conftest* |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3017 | fi |
| 3018 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3019 | |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3020 | fi |
| 3021 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3022 | echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6 |
| 3023 | cat >> confdefs.h <<EOF |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3024 | #define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t |
| 3025 | EOF |
| 3026 | |
| 3027 | fi |
Martin v. Löwis | 123cbd2 | 2001-07-19 14:21:10 +0000 | [diff] [blame] | 3028 | CC="$ac_save_cc" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3029 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3030 | echo $ac_n "checking for --enable-toolbox-glue""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3031 | echo "configure:3032: checking for --enable-toolbox-glue" >&5 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3032 | # Check whether --enable-toolbox-glue or --disable-toolbox-glue was given. |
| 3033 | if test "${enable_toolbox_glue+set}" = set; then |
| 3034 | enableval="$enable_toolbox_glue" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3035 | : |
| 3036 | fi |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3037 | |
| 3038 | |
| 3039 | if test -z "$enable_toolbox_glue" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3040 | then |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3041 | case $ac_sys_system/$ac_sys_release in |
| 3042 | Darwin/*) |
| 3043 | enable_toolbox_glue="yes";; |
| 3044 | *) |
| 3045 | enable_toolbox_glue="no";; |
| 3046 | esac |
| 3047 | fi |
| 3048 | case "$enable_toolbox_glue" in |
| 3049 | yes) |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 3050 | extra_frameworks="-framework CoreServices -framework Foundation" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3051 | extra_machdep_objs="Python/mactoolboxglue.o" |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3052 | extra_undefs="-u __dummy -u _PyMac_Error" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3053 | cat >> confdefs.h <<\EOF |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3054 | #define USE_TOOLBOX_OBJECT_GLUE 1 |
| 3055 | EOF |
| 3056 | |
| 3057 | ;; |
| 3058 | *) |
| 3059 | extra_frameworks="" |
| 3060 | extra_machdep_objs="" |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3061 | extra_undefs="" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3062 | ;; |
| 3063 | esac |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3064 | echo "$ac_t""$enable_toolbox_glue" 1>&6 |
| 3065 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3066 | |
| 3067 | case $ac_sys_system/$ac_sys_release in |
Jack Jansen | 418c3b1 | 2001-11-14 10:59:57 +0000 | [diff] [blame] | 3068 | Darwin/1.3*) |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 3069 | ns_undef_sym='_environ' |
Jack Jansen | 418c3b1 | 2001-11-14 10:59:57 +0000 | [diff] [blame] | 3070 | LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym" |
| 3071 | LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks" |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 3072 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python' |
| 3073 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 3074 | Darwin/*) |
| 3075 | ns_undef_sym='_environ' |
Jack Jansen | 418c3b1 | 2001-11-14 10:59:57 +0000 | [diff] [blame] | 3076 | LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -flat_namespace -U $ns_undef_sym" |
| 3077 | LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3078 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python' |
| 3079 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3080 | esac |
| 3081 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3082 | echo $ac_n "checking for --enable-framework""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3083 | echo "configure:3084: checking for --enable-framework" >&5 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3084 | if test "$enable_framework" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3085 | then |
Jack Jansen | ca06bc6 | 2001-08-03 15:32:23 +0000 | [diff] [blame] | 3086 | OPT="$OPT -fno-common -dynamic" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3087 | # -U __environ is needed since bundles don't have access |
| 3088 | # to crt0 when built but will always be linked against it |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3089 | # -F. is needed to allow linking to the framework while |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3090 | # in the build location. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3091 | |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 3092 | case $ac_sys_system/$ac_sys_release in |
Jack Jansen | 418c3b1 | 2001-11-14 10:59:57 +0000 | [diff] [blame] | 3093 | Darwin/1.3*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym";; |
| 3094 | Darwin/*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-flat_namespace,-U,$ns_undef_sym";; |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 3095 | esac |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3096 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3097 | #define WITH_NEXT_FRAMEWORK 1 |
| 3098 | EOF |
| 3099 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3100 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3101 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3102 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3103 | fi |
| 3104 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3105 | echo $ac_n "checking for dyld""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3106 | echo "configure:3107: checking for dyld" >&5 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3107 | case $ac_sys_system/$ac_sys_release in |
| 3108 | Darwin/*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3109 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3110 | #define WITH_DYLD 1 |
| 3111 | EOF |
| 3112 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3113 | echo "$ac_t""always on for Darwin" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3114 | ;; |
| 3115 | *) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3116 | echo "$ac_t""no" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3117 | ;; |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3118 | esac |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3119 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3120 | # Set info about shared libraries. |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3121 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3122 | |
| 3123 | |
| 3124 | |
| 3125 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3126 | # SO is the extension of shared libraries `(including the dot!) |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3127 | # -- usually .so, .sl on HP-UX, .dll on Cygwin |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3128 | echo $ac_n "checking SO""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3129 | echo "configure:3130: checking SO" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3130 | if test -z "$SO" |
| 3131 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3132 | case $ac_sys_system in |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 3133 | hp*|HP*) SO=.sl;; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3134 | CYGWIN*) SO=.dll;; |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 3135 | *) SO=.so;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3136 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3137 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3138 | echo "$ac_t""$SO" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3139 | # LDSHARED is the ld *command* used to create shared library |
Martin v. Löwis | 5b718fc | 2001-09-10 15:34:42 +0000 | [diff] [blame] | 3140 | # -- "ld" on SunOS 4.x.x, "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5 |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3141 | # (Shared libraries in this instance are shared modules to be loaded into |
| 3142 | # Python, as opposed to building Python itself as a shared library.) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3143 | echo $ac_n "checking LDSHARED""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3144 | echo "configure:3145: checking LDSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3145 | if test -z "$LDSHARED" |
| 3146 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3147 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3148 | AIX*) |
| 3149 | BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp" |
Guido van Rossum | ce608b0 | 2001-09-28 15:59:38 +0000 | [diff] [blame] | 3150 | LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp" |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3151 | ;; |
| 3152 | BeOS*) |
| 3153 | BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY" |
Guido van Rossum | ce608b0 | 2001-09-28 15:59:38 +0000 | [diff] [blame] | 3154 | LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY" |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3155 | ;; |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3156 | IRIX/5*) LDSHARED="ld -shared";; |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 3157 | IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3158 | SunOS/4*) LDSHARED="ld";; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3159 | SunOS/5*) |
Greg Ward | 57c9a66 | 2000-05-26 12:22:54 +0000 | [diff] [blame] | 3160 | if test "$GCC" = "yes" |
Neil Schemenauer | 8ba9445 | 2001-02-19 18:18:48 +0000 | [diff] [blame] | 3161 | then LDSHARED='$(CC) -shared' |
Martin v. Löwis | 5b718fc | 2001-09-10 15:34:42 +0000 | [diff] [blame] | 3162 | else LDSHARED="$(CC) -G"; |
Greg Ward | 57c9a66 | 2000-05-26 12:22:54 +0000 | [diff] [blame] | 3163 | fi ;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3164 | hp*|HP*) LDSHARED="ld -b";; |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 3165 | OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";; |
| 3166 | DYNIX/ptx*) LDSHARED="ld -G";; |
Jack Jansen | 418c3b1 | 2001-11-14 10:59:57 +0000 | [diff] [blame] | 3167 | Darwin/1.3*) |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 3168 | LDSHARED='$(CC) $(LDFLAGS) -bundle' |
| 3169 | if test "$enable_framework" ; then |
| 3170 | # Link against the framework. All externals should be defined. |
| 3171 | LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)' |
| 3172 | else |
| 3173 | # No framework. Ignore undefined symbols, assuming they come from Python |
Jack Jansen | 418c3b1 | 2001-11-14 10:59:57 +0000 | [diff] [blame] | 3174 | LDSHARED="$LDSHARED -undefined suppress" |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 3175 | fi ;; |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3176 | Darwin/*) |
| 3177 | LDSHARED='$(CC) $(LDFLAGS) -bundle' |
| 3178 | if test "$enable_framework" ; then |
| 3179 | # Link against the framework. All externals should be defined. |
| 3180 | LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)' |
| 3181 | else |
| 3182 | # No framework. Ignore undefined symbols, assuming they come from Python |
Jack Jansen | 418c3b1 | 2001-11-14 10:59:57 +0000 | [diff] [blame] | 3183 | LDSHARED="$LDSHARED -flat_namespace -undefined suppress" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3184 | fi ;; |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3185 | Linux*|GNU*) LDSHARED="gcc -shared";; |
Guido van Rossum | 3c4bb80 | 1997-12-18 23:55:32 +0000 | [diff] [blame] | 3186 | dgux*) LDSHARED="ld -G";; |
Guido van Rossum | 458e7fa | 1999-09-17 15:40:40 +0000 | [diff] [blame] | 3187 | BSD/OS*/4*) LDSHARED="gcc -shared";; |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame] | 3188 | OpenBSD*|NetBSD*|FreeBSD*) |
Jeremy Hylton | 4bcc7c5 | 2000-08-31 17:45:35 +0000 | [diff] [blame] | 3189 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 3190 | then |
| 3191 | LDSHARED="cc -shared ${LDFLAGS}" |
| 3192 | else |
| 3193 | LDSHARED="ld -Bshareable ${LDFLAGS}" |
| 3194 | fi;; |
Martin v. Löwis | 25ae43b | 2001-10-07 08:39:18 +0000 | [diff] [blame] | 3195 | OpenUNIX*|UnixWare*) |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3196 | if test "$GCC" = "yes" |
| 3197 | then LDSHARED="$(CC) -shared" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3198 | else LDSHARED="$(CC) -G" |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3199 | fi;; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3200 | SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3201 | Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3202 | CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3203 | *) LDSHARED="ld";; |
| 3204 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3205 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3206 | echo "$ac_t""$LDSHARED" 1>&6 |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3207 | BLDSHARED=${BLDSHARED-$LDSHARED} |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3208 | # 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] | 3209 | # library (module) -- this is only needed for a few systems |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3210 | echo $ac_n "checking CCSHARED""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3211 | echo "configure:3212: checking CCSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3212 | if test -z "$CCSHARED" |
| 3213 | then |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3214 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | c761fc8 | 2001-02-19 04:50:49 +0000 | [diff] [blame] | 3215 | SunOS*) if test "$GCC" = yes; |
| 3216 | then CCSHARED="-fPIC"; |
| 3217 | fi;; |
Guido van Rossum | af07a44 | 1995-02-13 19:45:27 +0000 | [diff] [blame] | 3218 | hp*|HP*) if test "$GCC" = yes; |
Martin v. Löwis | 703ad70 | 2001-09-05 08:36:52 +0000 | [diff] [blame] | 3219 | then CCSHARED="-fPIC"; |
Guido van Rossum | af07a44 | 1995-02-13 19:45:27 +0000 | [diff] [blame] | 3220 | else CCSHARED="+z"; |
| 3221 | fi;; |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3222 | Linux*|GNU*) CCSHARED="-fPIC";; |
Guido van Rossum | f5957ea | 1999-10-05 21:59:33 +0000 | [diff] [blame] | 3223 | BSD/OS*/4*) CCSHARED="-fpic";; |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame] | 3224 | FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";; |
Martin v. Löwis | 25ae43b | 2001-10-07 08:39:18 +0000 | [diff] [blame] | 3225 | OpenUNIX*|UnixWare*) |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3226 | if test "$GCC" = "yes" |
| 3227 | then CCSHARED="-fPIC" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3228 | else CCSHARED="-KPIC" |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3229 | fi;; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3230 | SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3231 | Monterey*) CCSHARED="-G";; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3232 | IRIX*/6*) case $CC in |
| 3233 | *gcc*) CCSHARED="-shared";; |
Guido van Rossum | ee21f41 | 1998-04-20 18:51:54 +0000 | [diff] [blame] | 3234 | *) CCSHARED="";; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3235 | esac;; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3236 | CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3237 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3238 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3239 | echo "$ac_t""$CCSHARED" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3240 | # LINKFORSHARED are the flags passed to the $(CC) command that links |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3241 | # the python executable -- this is only needed for a few systems |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3242 | echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3243 | echo "configure:3244: checking LINKFORSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3244 | if test -z "$LINKFORSHARED" |
| 3245 | then |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3246 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3247 | AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';; |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 3248 | hp*|HP*) |
Guido van Rossum | 304dd2d | 1997-10-20 23:10:56 +0000 | [diff] [blame] | 3249 | LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";; |
Guido van Rossum | f5957ea | 1999-10-05 21:59:33 +0000 | [diff] [blame] | 3250 | BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";; |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3251 | Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";; |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3252 | # -u libsys_s pulls in all symbols in libsys |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3253 | Darwin/*) |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3254 | # -u __dummy makes the linker aware of the objc runtime |
| 3255 | # in System.framework; otherwise, __objcInit (referenced in |
| 3256 | # crt1.o) gets erroneously defined as common, which breaks dynamic |
| 3257 | # loading of any modules which reference it in System.framework. |
| 3258 | # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is |
| 3259 | # not used by the core itself but which needs to be in the core so |
| 3260 | # that dynamically loaded extension modules have access to it. |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3261 | LINKFORSHARED="$extra_undefs -framework System" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3262 | if test "$enable_framework" |
| 3263 | then |
| 3264 | LINKFORSHARED="$LINKFORSHARED -framework Python" |
| 3265 | fi |
| 3266 | LINKFORSHARED="$LINKFORSHARED $extra_frameworks";; |
Martin v. Löwis | 25ae43b | 2001-10-07 08:39:18 +0000 | [diff] [blame] | 3267 | OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3268 | SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";; |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3269 | ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3270 | FreeBSD*|NetBSD*|OpenBSD*) |
Guido van Rossum | df69365 | 1999-01-07 21:50:41 +0000 | [diff] [blame] | 3271 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
| 3272 | then |
| 3273 | LINKFORSHARED="-Wl,--export-dynamic" |
| 3274 | fi;; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3275 | SunOS/5*) case $CC in |
| 3276 | *gcc*) |
Guido van Rossum | ff48418 | 2000-02-03 13:50:24 +0000 | [diff] [blame] | 3277 | if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null |
Guido van Rossum | 8f4ceb1 | 1997-12-18 23:42:19 +0000 | [diff] [blame] | 3278 | then |
| 3279 | LINKFORSHARED="-Xlinker --export-dynamic" |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3280 | fi;; |
| 3281 | esac;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3282 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3283 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3284 | echo "$ac_t""$LINKFORSHARED" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3285 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3286 | |
| 3287 | echo $ac_n "checking CFLAGSFORSHARED""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3288 | echo "configure:3289: checking CFLAGSFORSHARED" >&5 |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3289 | if test ! "$LIBRARY" = "$LDLIBRARY" |
| 3290 | then |
Neil Schemenauer | 0c6141f | 2001-01-27 21:40:54 +0000 | [diff] [blame] | 3291 | case $ac_sys_system in |
| 3292 | CYGWIN*) |
| 3293 | # Cygwin needs CCSHARED when building extension DLLs |
| 3294 | # but not when building the interpreter DLL. |
| 3295 | CFLAGSFORSHARED='';; |
| 3296 | *) |
| 3297 | CFLAGSFORSHARED='$(CCSHARED)' |
| 3298 | esac |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3299 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3300 | echo "$ac_t""$CFLAGSFORSHARED" 1>&6 |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3301 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3302 | # checks for libraries |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3303 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3304 | echo "configure:3305: checking for dlopen in -ldl" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3305 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
| 3306 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 3307 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3308 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3309 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3310 | LIBS="-ldl $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3311 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3312 | #line 3313 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3313 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3314 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3315 | /* We use char because int might match the return type of a gcc2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3316 | builtin and then its argument prototype would still apply. */ |
| 3317 | char dlopen(); |
| 3318 | |
| 3319 | int main() { |
| 3320 | dlopen() |
| 3321 | ; return 0; } |
| 3322 | EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3323 | if { (eval echo configure:3324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3324 | rm -rf conftest* |
| 3325 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3326 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3327 | echo "configure: failed program was:" >&5 |
| 3328 | cat conftest.$ac_ext >&5 |
| 3329 | rm -rf conftest* |
| 3330 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3331 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3332 | rm -f conftest* |
| 3333 | LIBS="$ac_save_LIBS" |
| 3334 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3335 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3336 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3337 | echo "$ac_t""yes" 1>&6 |
| 3338 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 3339 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
| 3340 | cat >> confdefs.h <<EOF |
| 3341 | #define $ac_tr_lib 1 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3342 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3343 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3344 | LIBS="-ldl $LIBS" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3345 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3346 | else |
| 3347 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3348 | fi |
| 3349 | # Dynamic linking for SunOS/Solaris and SYSV |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3350 | echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3351 | echo "configure:3352: checking for shl_load in -ldld" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3352 | ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` |
| 3353 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 3354 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3355 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3356 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3357 | LIBS="-ldld $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3358 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3359 | #line 3360 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3360 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3361 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3362 | /* We use char because int might match the return type of a gcc2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3363 | builtin and then its argument prototype would still apply. */ |
| 3364 | char shl_load(); |
| 3365 | |
| 3366 | int main() { |
| 3367 | shl_load() |
| 3368 | ; return 0; } |
| 3369 | EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3370 | if { (eval echo configure:3371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3371 | rm -rf conftest* |
| 3372 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3373 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3374 | echo "configure: failed program was:" >&5 |
| 3375 | cat conftest.$ac_ext >&5 |
| 3376 | rm -rf conftest* |
| 3377 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3378 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3379 | rm -f conftest* |
| 3380 | LIBS="$ac_save_LIBS" |
| 3381 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3382 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3383 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3384 | echo "$ac_t""yes" 1>&6 |
| 3385 | ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 3386 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
| 3387 | cat >> confdefs.h <<EOF |
| 3388 | #define $ac_tr_lib 1 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3389 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3390 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3391 | LIBS="-ldld $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3392 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3393 | else |
| 3394 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3395 | fi |
| 3396 | # Dynamic linking for HP-UX |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3397 | |
| 3398 | # checks for system dependent C++ extensions support |
| 3399 | case "$ac_sys_system" in |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3400 | AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3401 | echo "configure:3402: checking for genuine AIX C++ extensions support" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3402 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3403 | #line 3404 "configure" |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3404 | #include "confdefs.h" |
| 3405 | #include "/usr/lpp/xlC/include/load.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3406 | int main() { |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3407 | loadAndInit("", 0, "") |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3408 | ; return 0; } |
| 3409 | EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3410 | if { (eval echo configure:3411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3411 | rm -rf conftest* |
| 3412 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3413 | #define AIX_GENUINE_CPLUSPLUS 1 |
| 3414 | EOF |
| 3415 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3416 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3417 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3418 | echo "configure: failed program was:" >&5 |
| 3419 | cat conftest.$ac_ext >&5 |
| 3420 | rm -rf conftest* |
| 3421 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3422 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3423 | rm -f conftest*;; |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3424 | *) ;; |
| 3425 | esac |
| 3426 | |
Guido van Rossum | 70c7f48 | 1998-03-26 18:44:10 +0000 | [diff] [blame] | 3427 | # Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl. |
| 3428 | # However on SGI IRIX, these exist but are broken. |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3429 | # BeOS' sockets are stashed in libnet. |
| 3430 | case "$ac_sys_system" in |
| 3431 | IRIX*) ;; |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3432 | *) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3433 | echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3434 | echo "configure:3435: checking for t_open in -lnsl" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3435 | ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'` |
| 3436 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 3437 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3438 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3439 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3440 | LIBS="-lnsl $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3441 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3442 | #line 3443 "configure" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3443 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3444 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3445 | /* We use char because int might match the return type of a gcc2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3446 | builtin and then its argument prototype would still apply. */ |
| 3447 | char t_open(); |
| 3448 | |
| 3449 | int main() { |
| 3450 | t_open() |
| 3451 | ; return 0; } |
| 3452 | EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3453 | if { (eval echo configure:3454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3454 | rm -rf conftest* |
| 3455 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3456 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3457 | echo "configure: failed program was:" >&5 |
| 3458 | cat conftest.$ac_ext >&5 |
| 3459 | rm -rf conftest* |
| 3460 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3461 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3462 | rm -f conftest* |
| 3463 | LIBS="$ac_save_LIBS" |
| 3464 | |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3465 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3466 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3467 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3468 | LIBS="-lnsl $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3469 | else |
| 3470 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3471 | fi |
Guido van Rossum | 0ddb028 | 1995-01-17 16:46:14 +0000 | [diff] [blame] | 3472 | # SVR4 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3473 | echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3474 | echo "configure:3475: checking for socket in -lsocket" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3475 | ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` |
| 3476 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 3477 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3478 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3479 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3480 | LIBS="-lsocket $LIBS $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3481 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3482 | #line 3483 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3483 | #include "confdefs.h" |
| 3484 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3485 | /* We use char because int might match the return type of a gcc2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3486 | builtin and then its argument prototype would still apply. */ |
| 3487 | char socket(); |
| 3488 | |
| 3489 | int main() { |
| 3490 | socket() |
| 3491 | ; return 0; } |
| 3492 | EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3493 | if { (eval echo configure:3494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3494 | rm -rf conftest* |
| 3495 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3496 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3497 | echo "configure: failed program was:" >&5 |
| 3498 | cat conftest.$ac_ext >&5 |
| 3499 | rm -rf conftest* |
| 3500 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3501 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3502 | rm -f conftest* |
| 3503 | LIBS="$ac_save_LIBS" |
| 3504 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3505 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3506 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3507 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3508 | LIBS="-lsocket $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3509 | else |
| 3510 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3511 | fi |
| 3512 | # SVR4 sockets |
Jeremy Hylton | cb25d5e | 2000-07-27 21:23:28 +0000 | [diff] [blame] | 3513 | ;; |
| 3514 | esac |
| 3515 | case "$ac_sys_system" in |
| 3516 | BeOS*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3517 | echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3518 | echo "configure:3519: checking for socket in -lnet" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3519 | ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'` |
| 3520 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 3521 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3522 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3523 | ac_save_LIBS="$LIBS" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3524 | LIBS="-lnet $LIBS $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3525 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3526 | #line 3527 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3527 | #include "confdefs.h" |
| 3528 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3529 | /* We use char because int might match the return type of a gcc2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3530 | builtin and then its argument prototype would still apply. */ |
| 3531 | char socket(); |
| 3532 | |
| 3533 | int main() { |
| 3534 | socket() |
| 3535 | ; return 0; } |
| 3536 | EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3537 | if { (eval echo configure:3538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3538 | rm -rf conftest* |
| 3539 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3540 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3541 | echo "configure: failed program was:" >&5 |
| 3542 | cat conftest.$ac_ext >&5 |
| 3543 | rm -rf conftest* |
| 3544 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3545 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3546 | rm -f conftest* |
| 3547 | LIBS="$ac_save_LIBS" |
| 3548 | |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3549 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3550 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3551 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3552 | LIBS="-lnet $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3553 | else |
| 3554 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3555 | fi |
| 3556 | # BeOS |
| 3557 | ;; |
| 3558 | esac |
Guido van Rossum | 70c7f48 | 1998-03-26 18:44:10 +0000 | [diff] [blame] | 3559 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3560 | echo $ac_n "checking for --with-libs""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3561 | echo "configure:3562: checking for --with-libs" >&5 |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 3562 | # Check whether --with-libs or --without-libs was given. |
| 3563 | if test "${with_libs+set}" = set; then |
| 3564 | withval="$with_libs" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3565 | |
| 3566 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 3567 | LIBS="$withval $LIBS" |
| 3568 | |
| 3569 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3570 | echo "$ac_t""no" 1>&6 |
| 3571 | fi |
| 3572 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3573 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 3574 | # Determine if signalmodule should be used. |
| 3575 | |
| 3576 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3577 | echo $ac_n "checking for --with-signal-module""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3578 | echo "configure:3579: checking for --with-signal-module" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 3579 | # Check whether --with-signal-module or --without-signal-module was given. |
| 3580 | if test "${with_signal_module+set}" = set; then |
| 3581 | withval="$with_signal_module" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3582 | : |
| 3583 | fi |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 3584 | |
| 3585 | |
| 3586 | if test -z "$with_signal_module" |
| 3587 | then with_signal_module="yes" |
| 3588 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3589 | echo "$ac_t""$with_signal_module" 1>&6 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 3590 | |
| 3591 | if test "${with_signal_module}" = "yes"; then |
| 3592 | USE_SIGNAL_MODULE="" |
| 3593 | SIGNAL_OBJS="" |
| 3594 | else |
| 3595 | USE_SIGNAL_MODULE="#" |
| 3596 | SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o" |
| 3597 | fi |
| 3598 | |
Guido van Rossum | 3d15bd8 | 2001-01-10 18:53:48 +0000 | [diff] [blame] | 3599 | # This is used to generate Setup.config |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 3600 | |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3601 | USE_THREAD_MODULE="" |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 3602 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3603 | echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3604 | echo "configure:3605: checking for --with-dec-threads" >&5 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3605 | |
| 3606 | # Check whether --with-dec-threads or --without-dec-threads was given. |
| 3607 | if test "${with_dec_threads+set}" = set; then |
| 3608 | withval="$with_dec_threads" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3609 | |
| 3610 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3611 | LDLAST=-threads |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3612 | if test "${with_thread+set}" != set; then |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3613 | with_thread="$withval"; |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3614 | fi |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3615 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3616 | echo "$ac_t""no" 1>&6 |
| 3617 | fi |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3618 | |
| 3619 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3620 | echo $ac_n "checking for --with-threads""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3621 | echo "configure:3622: checking for --with-threads" >&5 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3622 | # Check whether --with-threads or --without-threads was given. |
| 3623 | if test "${with_threads+set}" = set; then |
| 3624 | withval="$with_threads" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3625 | : |
| 3626 | fi |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3627 | |
| 3628 | |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3629 | # --with-thread is deprecated, but check for it anyway |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3630 | # Check whether --with-thread or --without-thread was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3631 | if test "${with_thread+set}" = set; then |
| 3632 | withval="$with_thread" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3633 | |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 3634 | with_threads=$with_thread |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3635 | fi |
| 3636 | |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3637 | |
| 3638 | if test -z "$with_threads" |
| 3639 | then with_threads="yes" |
| 3640 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3641 | echo "$ac_t""$with_threads" 1>&6 |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3642 | |
| 3643 | if test "$with_threads" = "no" |
| 3644 | then |
| 3645 | USE_THREAD_MODULE="#" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3646 | elif test "$ac_cv_pthread_is_default" = yes |
| 3647 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3648 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3649 | #define WITH_THREAD 1 |
| 3650 | EOF |
| 3651 | |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3652 | # Defining _REENTRANT on system with POSIX threads should not hurt. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3653 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3654 | #define _REENTRANT 1 |
| 3655 | EOF |
| 3656 | |
| 3657 | posix_threads=yes |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3658 | LIBOBJS="$LIBOBJS thread.o" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3659 | elif test "$ac_cv_kpthread" = "yes" |
| 3660 | then |
| 3661 | CC="$CC -Kpthread" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3662 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 3663 | #define WITH_THREAD 1 |
| 3664 | EOF |
| 3665 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 3666 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3667 | LIBOBJS="$LIBOBJS thread.o" |
| 3668 | else |
| 3669 | if test ! -z "$with_threads" -a -d "$with_threads" |
| 3670 | then LDFLAGS="$LDFLAGS -L$with_threads" |
| 3671 | fi |
| 3672 | if test ! -z "$withval" -a -d "$withval" |
| 3673 | then LDFLAGS="$LDFLAGS -L$withval" |
| 3674 | fi |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3675 | |
| 3676 | # According to the POSIX spec, a pthreads implementation must |
| 3677 | # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3678 | echo $ac_n "checking for _POSIX_THREADS in unistd.h""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3679 | echo "configure:3680: checking for _POSIX_THREADS in unistd.h" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3680 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3681 | #line 3682 "configure" |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3682 | #include "confdefs.h" |
| 3683 | #include <unistd.h> |
| 3684 | #ifdef _POSIX_THREADS |
| 3685 | yes |
| 3686 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3687 | |
| 3688 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3689 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 3690 | egrep "yes" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3691 | rm -rf conftest* |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3692 | unistd_defines_pthreads=yes |
| 3693 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3694 | rm -rf conftest* |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3695 | unistd_defines_pthreads=no |
| 3696 | fi |
| 3697 | rm -f conftest* |
| 3698 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3699 | echo "$ac_t""$unistd_defines_pthreads" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3700 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3701 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9caf77a | 1996-08-01 00:52:26 +0000 | [diff] [blame] | 3702 | #define _REENTRANT 1 |
| 3703 | EOF |
| 3704 | |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3705 | ac_safe=`echo "cthreads.h" | sed 'y%./+-%__p_%'` |
| 3706 | echo $ac_n "checking for cthreads.h""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3707 | echo "configure:3708: checking for cthreads.h" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3708 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 3709 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3710 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3711 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3712 | #line 3713 "configure" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3713 | #include "confdefs.h" |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3714 | #include <cthreads.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3715 | EOF |
| 3716 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3717 | { (eval echo configure:3718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3718 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 3719 | if test -z "$ac_err"; then |
| 3720 | rm -rf conftest* |
| 3721 | eval "ac_cv_header_$ac_safe=yes" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3722 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3723 | echo "$ac_err" >&5 |
| 3724 | echo "configure: failed program was:" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3725 | cat conftest.$ac_ext >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3726 | rm -rf conftest* |
| 3727 | eval "ac_cv_header_$ac_safe=no" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3728 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3729 | rm -f conftest* |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3730 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3731 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 3732 | echo "$ac_t""yes" 1>&6 |
| 3733 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3734 | #define WITH_THREAD 1 |
| 3735 | EOF |
| 3736 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3737 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3738 | #define C_THREADS 1 |
| 3739 | EOF |
| 3740 | |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3741 | cat >> confdefs.h <<\EOF |
| 3742 | #define HURD_C_THREADS 1 |
| 3743 | EOF |
| 3744 | |
| 3745 | LIBS="$LIBS -lthreads" |
| 3746 | LIBOBJS="$LIBOBJS thread.o" |
| 3747 | else |
| 3748 | echo "$ac_t""no" 1>&6 |
| 3749 | |
| 3750 | ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'` |
| 3751 | echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3752 | echo "configure:3753: checking for mach/cthreads.h" >&5 |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3753 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 3754 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3755 | else |
| 3756 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3757 | #line 3758 "configure" |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3758 | #include "confdefs.h" |
| 3759 | #include <mach/cthreads.h> |
| 3760 | EOF |
| 3761 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3762 | { (eval echo configure:3763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3763 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 3764 | if test -z "$ac_err"; then |
| 3765 | rm -rf conftest* |
| 3766 | eval "ac_cv_header_$ac_safe=yes" |
| 3767 | else |
| 3768 | echo "$ac_err" >&5 |
| 3769 | echo "configure: failed program was:" >&5 |
| 3770 | cat conftest.$ac_ext >&5 |
| 3771 | rm -rf conftest* |
| 3772 | eval "ac_cv_header_$ac_safe=no" |
| 3773 | fi |
| 3774 | rm -f conftest* |
| 3775 | fi |
| 3776 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 3777 | echo "$ac_t""yes" 1>&6 |
| 3778 | cat >> confdefs.h <<\EOF |
| 3779 | #define WITH_THREAD 1 |
| 3780 | EOF |
| 3781 | |
| 3782 | cat >> confdefs.h <<\EOF |
| 3783 | #define C_THREADS 1 |
| 3784 | EOF |
| 3785 | |
| 3786 | cat >> confdefs.h <<\EOF |
| 3787 | #define MACH_C_THREADS 1 |
| 3788 | EOF |
| 3789 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3790 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3791 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3792 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3793 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3794 | echo $ac_n "checking for --with-pth""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3795 | echo "configure:3796: checking for --with-pth" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3796 | # Check whether --with-pth or --without-pth was given. |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3797 | if test "${with_pth+set}" = set; then |
| 3798 | withval="$with_pth" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3799 | |
| 3800 | echo "$ac_t""$withval" 1>&6 |
| 3801 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3802 | #define WITH_THREAD 1 |
| 3803 | EOF |
| 3804 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3805 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3806 | #define HAVE_PTH 1 |
| 3807 | EOF |
| 3808 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3809 | LIBS="-lpth $LIBS" |
| 3810 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3811 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3812 | |
| 3813 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3814 | |
| 3815 | # Just looking for pthread_create in libpthread is not enough: |
| 3816 | # on HP/UX, pthread.h renames pthread_create to a different symbol name. |
| 3817 | # So we really have to include pthread.h, and then link. |
| 3818 | _libs=$LIBS |
| 3819 | LIBS="$LIBS -lpthread" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3820 | echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3821 | echo "configure:3822: checking for pthread_create in -lpthread" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3822 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3823 | #line 3824 "configure" |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3824 | #include "confdefs.h" |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3825 | #include <pthread.h> |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3826 | |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3827 | void * start_routine (void *arg) { exit (0); } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3828 | int main() { |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3829 | |
| 3830 | pthread_create (NULL, NULL, start_routine, NULL) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3831 | ; return 0; } |
| 3832 | EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3833 | if { (eval echo configure:3834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3834 | rm -rf conftest* |
| 3835 | |
| 3836 | echo "$ac_t""yes" 1>&6 |
| 3837 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3838 | #define WITH_THREAD 1 |
| 3839 | EOF |
| 3840 | |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3841 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3842 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3843 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3844 | echo "configure: failed program was:" >&5 |
| 3845 | cat conftest.$ac_ext >&5 |
| 3846 | rm -rf conftest* |
| 3847 | |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3848 | LIBS=$_libs |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3849 | echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3850 | echo "configure:3851: checking for pthread_detach" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3851 | if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then |
| 3852 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3853 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3854 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3855 | #line 3856 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3856 | #include "confdefs.h" |
| 3857 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3858 | which can conflict with char pthread_detach(); below. */ |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3859 | #include <assert.h> |
| 3860 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3861 | /* We use char because int might match the return type of a gcc2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3862 | builtin and then its argument prototype would still apply. */ |
| 3863 | char pthread_detach(); |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3864 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3865 | int main() { |
| 3866 | |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3867 | /* The GNU C library defines this for functions which it implements |
| 3868 | to always fail with ENOSYS. Some functions are actually named |
| 3869 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3870 | #if defined (__stub_pthread_detach) || defined (__stub___pthread_detach) |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3871 | choke me |
| 3872 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3873 | pthread_detach(); |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3874 | #endif |
| 3875 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3876 | ; return 0; } |
| 3877 | EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3878 | if { (eval echo configure:3879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3879 | rm -rf conftest* |
| 3880 | eval "ac_cv_func_pthread_detach=yes" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3881 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3882 | echo "configure: failed program was:" >&5 |
| 3883 | cat conftest.$ac_ext >&5 |
| 3884 | rm -rf conftest* |
| 3885 | eval "ac_cv_func_pthread_detach=no" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3886 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3887 | rm -f conftest* |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3888 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3889 | |
| 3890 | if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then |
| 3891 | echo "$ac_t""yes" 1>&6 |
| 3892 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3893 | #define WITH_THREAD 1 |
| 3894 | EOF |
| 3895 | |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3896 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3897 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3898 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3899 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3900 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3901 | ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'` |
| 3902 | echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3903 | echo "configure:3904: checking for kernel/OS.h" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3904 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 3905 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3906 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3907 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3908 | #line 3909 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3909 | #include "confdefs.h" |
| 3910 | #include <kernel/OS.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3911 | EOF |
| 3912 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3913 | { (eval echo configure:3914: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3914 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 3915 | if test -z "$ac_err"; then |
| 3916 | rm -rf conftest* |
| 3917 | eval "ac_cv_header_$ac_safe=yes" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3918 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3919 | echo "$ac_err" >&5 |
| 3920 | echo "configure: failed program was:" >&5 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3921 | cat conftest.$ac_ext >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3922 | rm -rf conftest* |
| 3923 | eval "ac_cv_header_$ac_safe=no" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3924 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3925 | rm -f conftest* |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3926 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3927 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 3928 | echo "$ac_t""yes" 1>&6 |
| 3929 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3930 | #define WITH_THREAD 1 |
| 3931 | EOF |
| 3932 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3933 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3934 | #define BEOS_THREADS 1 |
| 3935 | EOF |
| 3936 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3937 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3938 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3939 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3940 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3941 | echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3942 | echo "configure:3943: checking for pthread_create in -lpthreads" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3943 | ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'` |
| 3944 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 3945 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3946 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3947 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3948 | LIBS="-lpthreads $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3949 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3950 | #line 3951 "configure" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3951 | #include "confdefs.h" |
| 3952 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3953 | /* We use char because int might match the return type of a gcc2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3954 | builtin and then its argument prototype would still apply. */ |
| 3955 | char pthread_create(); |
| 3956 | |
| 3957 | int main() { |
| 3958 | pthread_create() |
| 3959 | ; return 0; } |
| 3960 | EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3961 | if { (eval echo configure:3962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3962 | rm -rf conftest* |
| 3963 | eval "ac_cv_lib_$ac_lib_var=yes" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3964 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3965 | echo "configure: failed program was:" >&5 |
| 3966 | cat conftest.$ac_ext >&5 |
| 3967 | rm -rf conftest* |
| 3968 | eval "ac_cv_lib_$ac_lib_var=no" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3969 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3970 | rm -f conftest* |
| 3971 | LIBS="$ac_save_LIBS" |
| 3972 | |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3973 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3974 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3975 | echo "$ac_t""yes" 1>&6 |
| 3976 | cat >> confdefs.h <<\EOF |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3977 | #define WITH_THREAD 1 |
| 3978 | EOF |
| 3979 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 3980 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3981 | LIBS="$LIBS -lpthreads" |
| 3982 | LIBOBJS="$LIBOBJS thread.o" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3983 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3984 | echo "$ac_t""no" 1>&6 |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3985 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3986 | echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3987 | echo "configure:3988: checking for pthread_create in -lc_r" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3988 | ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` |
| 3989 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 3990 | echo $ac_n "(cached) $ac_c" 1>&6 |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3991 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3992 | ac_save_LIBS="$LIBS" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3993 | LIBS="-lc_r $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3994 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 3995 | #line 3996 "configure" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 3996 | #include "confdefs.h" |
| 3997 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3998 | /* We use char because int might match the return type of a gcc2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3999 | builtin and then its argument prototype would still apply. */ |
| 4000 | char pthread_create(); |
| 4001 | |
| 4002 | int main() { |
| 4003 | pthread_create() |
| 4004 | ; return 0; } |
| 4005 | EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 4006 | if { (eval echo configure:4007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4007 | rm -rf conftest* |
| 4008 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4009 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4010 | echo "configure: failed program was:" >&5 |
| 4011 | cat conftest.$ac_ext >&5 |
| 4012 | rm -rf conftest* |
| 4013 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4014 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4015 | rm -f conftest* |
| 4016 | LIBS="$ac_save_LIBS" |
| 4017 | |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4018 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4019 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4020 | echo "$ac_t""yes" 1>&6 |
| 4021 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4022 | #define WITH_THREAD 1 |
| 4023 | EOF |
| 4024 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4025 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4026 | LIBS="$LIBS -lc_r" |
| 4027 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4028 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4029 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4030 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4031 | echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 4032 | echo "configure:4033: checking for __d6_pthread_create in -lthread" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4033 | ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'` |
| 4034 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 4035 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4036 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4037 | ac_save_LIBS="$LIBS" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4038 | LIBS="-lthread $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4039 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 4040 | #line 4041 "configure" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4041 | #include "confdefs.h" |
| 4042 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4043 | /* We use char because int might match the return type of a gcc2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4044 | builtin and then its argument prototype would still apply. */ |
| 4045 | char __d6_pthread_create(); |
| 4046 | |
| 4047 | int main() { |
| 4048 | __d6_pthread_create() |
| 4049 | ; return 0; } |
| 4050 | EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 4051 | if { (eval echo configure:4052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4052 | rm -rf conftest* |
| 4053 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4054 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4055 | echo "configure: failed program was:" >&5 |
| 4056 | cat conftest.$ac_ext >&5 |
| 4057 | rm -rf conftest* |
| 4058 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4059 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4060 | rm -f conftest* |
| 4061 | LIBS="$ac_save_LIBS" |
| 4062 | |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4063 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4064 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4065 | echo "$ac_t""yes" 1>&6 |
| 4066 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4067 | #define WITH_THREAD 1 |
| 4068 | EOF |
| 4069 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4070 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4071 | LIBS="$LIBS -lthread" |
| 4072 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4073 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4074 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4075 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4076 | echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 4077 | echo "configure:4078: checking for __pthread_create_system in -lpthread" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4078 | ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'` |
| 4079 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 4080 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4081 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4082 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4083 | LIBS="-lpthread $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4084 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 4085 | #line 4086 "configure" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4086 | #include "confdefs.h" |
| 4087 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4088 | /* We use char because int might match the return type of a gcc2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4089 | builtin and then its argument prototype would still apply. */ |
| 4090 | char __pthread_create_system(); |
| 4091 | |
| 4092 | int main() { |
| 4093 | __pthread_create_system() |
| 4094 | ; return 0; } |
| 4095 | EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 4096 | if { (eval echo configure:4097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4097 | rm -rf conftest* |
| 4098 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4099 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4100 | echo "configure: failed program was:" >&5 |
| 4101 | cat conftest.$ac_ext >&5 |
| 4102 | rm -rf conftest* |
| 4103 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4104 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4105 | rm -f conftest* |
| 4106 | LIBS="$ac_save_LIBS" |
| 4107 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4108 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4109 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4110 | echo "$ac_t""yes" 1>&6 |
| 4111 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4112 | #define WITH_THREAD 1 |
| 4113 | EOF |
| 4114 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4115 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4116 | LIBS="$LIBS -lpthread" |
| 4117 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4118 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4119 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4120 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4121 | echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 4122 | echo "configure:4123: checking for pthread_create in -lcma" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4123 | ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'` |
| 4124 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 4125 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4126 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4127 | ac_save_LIBS="$LIBS" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4128 | LIBS="-lcma $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4129 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 4130 | #line 4131 "configure" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4131 | #include "confdefs.h" |
| 4132 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4133 | /* We use char because int might match the return type of a gcc2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4134 | builtin and then its argument prototype would still apply. */ |
| 4135 | char pthread_create(); |
| 4136 | |
| 4137 | int main() { |
| 4138 | pthread_create() |
| 4139 | ; return 0; } |
| 4140 | EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 4141 | if { (eval echo configure:4142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4142 | rm -rf conftest* |
| 4143 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4144 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4145 | echo "configure: failed program was:" >&5 |
| 4146 | cat conftest.$ac_ext >&5 |
| 4147 | rm -rf conftest* |
| 4148 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4149 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4150 | rm -f conftest* |
| 4151 | LIBS="$ac_save_LIBS" |
| 4152 | |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4153 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4154 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4155 | echo "$ac_t""yes" 1>&6 |
| 4156 | cat >> confdefs.h <<\EOF |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4157 | #define WITH_THREAD 1 |
| 4158 | EOF |
| 4159 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4160 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4161 | LIBS="$LIBS -lcma" |
| 4162 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4163 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4164 | echo "$ac_t""no" 1>&6 |
Thomas Wouters | 0db2b2b | 2000-08-26 11:33:43 +0000 | [diff] [blame] | 4165 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4166 | USE_THREAD_MODULE="#" |
Guido van Rossum | 2d38f91 | 1996-06-26 19:47:01 +0000 | [diff] [blame] | 4167 | fi |
| 4168 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4169 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4170 | fi |
| 4171 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 4172 | fi |
| 4173 | |
Guido van Rossum | 0be3e49 | 1997-05-22 20:33:33 +0000 | [diff] [blame] | 4174 | fi |
| 4175 | |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4176 | fi |
| 4177 | |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4178 | fi |
| 4179 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 4180 | fi |
| 4181 | |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 4182 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4183 | rm -f conftest* |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4184 | fi |
| 4185 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4186 | fi |
| 4187 | |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 4188 | fi |
| 4189 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4190 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4191 | if test "$posix_threads" = "yes"; then |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4192 | if test "$unistd_defines_pthreads" = "no"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4193 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4194 | #define _POSIX_THREADS 1 |
| 4195 | EOF |
| 4196 | |
| 4197 | fi |
| 4198 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4199 | echo $ac_n "checking if PTHREAD_SCOPE_SYSTEM is supported""... $ac_c" 1>&6 |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 4200 | echo "configure:4201: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4201 | if eval "test \"`echo '$''{'ac_cv_pthread_system_supported'+set}'`\" = set"; then |
| 4202 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4203 | else |
| 4204 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 4205 | ac_cv_pthread_system_supported=no |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4206 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4207 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 4208 | #line 4209 "configure" |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4209 | #include "confdefs.h" |
| 4210 | #include <pthread.h> |
| 4211 | void *foo(void *parm) { |
| 4212 | return NULL; |
| 4213 | } |
| 4214 | main() { |
| 4215 | pthread_attr_t attr; |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 4216 | pthread_t id; |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4217 | if (pthread_attr_init(&attr)) exit(-1); |
| 4218 | if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1); |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 4219 | if (pthread_create(&id, &attr, foo, NULL)) exit(-1); |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4220 | exit(0); |
| 4221 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4222 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 4223 | if { (eval echo configure:4224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4224 | then |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4225 | ac_cv_pthread_system_supported=yes |
| 4226 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4227 | echo "configure: failed program was:" >&5 |
| 4228 | cat conftest.$ac_ext >&5 |
| 4229 | rm -fr conftest* |
| 4230 | ac_cv_pthread_system_supported=no |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4231 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4232 | rm -fr conftest* |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4233 | fi |
| 4234 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4235 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4236 | fi |
| 4237 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4238 | echo "$ac_t""$ac_cv_pthread_system_supported" 1>&6 |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4239 | if test "$ac_cv_pthread_system_supported" = "yes"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4240 | cat >> confdefs.h <<\EOF |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4241 | #define PTHREAD_SYSTEM_SCHED_SUPPORTED 1 |
| 4242 | EOF |
| 4243 | |
| 4244 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4245 | for ac_func in pthread_sigmask |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4246 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4247 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 4248 | echo "configure:4249: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4249 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 4250 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4251 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4252 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 4253 | #line 4254 "configure" |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4254 | #include "confdefs.h" |
| 4255 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4256 | which can conflict with char $ac_func(); below. */ |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4257 | #include <assert.h> |
| 4258 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4259 | /* We use char because int might match the return type of a gcc2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4260 | builtin and then its argument prototype would still apply. */ |
| 4261 | char $ac_func(); |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4262 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4263 | int main() { |
| 4264 | |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4265 | /* The GNU C library defines this for functions which it implements |
| 4266 | to always fail with ENOSYS. Some functions are actually named |
| 4267 | something starting with __ and the normal name is an alias. */ |
| 4268 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 4269 | choke me |
| 4270 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4271 | $ac_func(); |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4272 | #endif |
| 4273 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4274 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 4275 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 4276 | if { (eval echo configure:4277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4277 | rm -rf conftest* |
| 4278 | eval "ac_cv_func_$ac_func=yes" |
| 4279 | else |
| 4280 | echo "configure: failed program was:" >&5 |
| 4281 | cat conftest.$ac_ext >&5 |
| 4282 | rm -rf conftest* |
| 4283 | eval "ac_cv_func_$ac_func=no" |
| 4284 | fi |
| 4285 | rm -f conftest* |
| 4286 | fi |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4287 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4288 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4289 | echo "$ac_t""yes" 1>&6 |
| 4290 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4291 | cat >> confdefs.h <<EOF |
| 4292 | #define $ac_tr_func 1 |
| 4293 | EOF |
| 4294 | |
| 4295 | else |
| 4296 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4297 | fi |
| 4298 | done |
| 4299 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4300 | fi |
| 4301 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4302 | echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 4303 | echo "configure:4304: checking for usconfig in -lmpc" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4304 | ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'` |
| 4305 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 4306 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4307 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4308 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4309 | LIBS="-lmpc $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4310 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 4311 | #line 4312 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4312 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4313 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4314 | /* We use char because int might match the return type of a gcc2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4315 | builtin and then its argument prototype would still apply. */ |
| 4316 | char usconfig(); |
| 4317 | |
| 4318 | int main() { |
| 4319 | usconfig() |
| 4320 | ; return 0; } |
| 4321 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 4322 | if { (eval echo configure:4323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4323 | rm -rf conftest* |
| 4324 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4325 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4326 | echo "configure: failed program was:" >&5 |
| 4327 | cat conftest.$ac_ext >&5 |
| 4328 | rm -rf conftest* |
| 4329 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4330 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4331 | rm -f conftest* |
| 4332 | LIBS="$ac_save_LIBS" |
| 4333 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4334 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4335 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4336 | echo "$ac_t""yes" 1>&6 |
| 4337 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4338 | #define WITH_THREAD 1 |
| 4339 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4340 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4341 | LIBS="$LIBS -lmpc" |
| 4342 | LIBOBJS="$LIBOBJS thread.o" |
| 4343 | USE_THREAD_MODULE="" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4344 | else |
| 4345 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4346 | fi |
| 4347 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4348 | echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 4349 | echo "configure:4350: checking for thr_create in -lthread" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4350 | ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'` |
| 4351 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 4352 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4353 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4354 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4355 | LIBS="-lthread $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4356 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 4357 | #line 4358 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4358 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4359 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4360 | /* We use char because int might match the return type of a gcc2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4361 | builtin and then its argument prototype would still apply. */ |
| 4362 | char thr_create(); |
| 4363 | |
| 4364 | int main() { |
| 4365 | thr_create() |
| 4366 | ; return 0; } |
| 4367 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 4368 | if { (eval echo configure:4369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4369 | rm -rf conftest* |
| 4370 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4371 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4372 | echo "configure: failed program was:" >&5 |
| 4373 | cat conftest.$ac_ext >&5 |
| 4374 | rm -rf conftest* |
| 4375 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4376 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4377 | rm -f conftest* |
| 4378 | LIBS="$ac_save_LIBS" |
| 4379 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4380 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4381 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4382 | echo "$ac_t""yes" 1>&6 |
| 4383 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4384 | #define WITH_THREAD 1 |
| 4385 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4386 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4387 | LIBS="$LIBS -lthread" |
| 4388 | LIBOBJS="$LIBOBJS thread.o" |
| 4389 | USE_THREAD_MODULE="" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4390 | else |
| 4391 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4392 | fi |
| 4393 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4394 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4395 | if test "$USE_THREAD_MODULE" != "#" |
| 4396 | then |
| 4397 | # If the above checks didn't disable threads, (at least) OSF1 |
| 4398 | # needs this '-threads' argument during linking. |
| 4399 | case $ac_sys_system in |
| 4400 | OSF1) LDLAST=-threads;; |
| 4401 | esac |
Jeremy Hylton | 1a2ca86 | 2000-10-16 16:59:12 +0000 | [diff] [blame] | 4402 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4403 | fi |
| 4404 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4405 | # Check for enable-ipv6 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4406 | echo $ac_n "checking if --enable-ipv6 is specified""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 4407 | echo "configure:4408: checking if --enable-ipv6 is specified" >&5 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4408 | # Check whether --enable-ipv6 or --disable-ipv6 was given. |
| 4409 | if test "${enable_ipv6+set}" = set; then |
| 4410 | enableval="$enable_ipv6" |
| 4411 | case "$enableval" in |
| 4412 | no) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4413 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4414 | ipv6=no |
| 4415 | ;; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4416 | *) echo "$ac_t""yes" 1>&6 |
| 4417 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4418 | #define ENABLE_IPV6 1 |
| 4419 | EOF |
| 4420 | |
| 4421 | ipv6=yes |
| 4422 | ;; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4423 | esac |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4424 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4425 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4426 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4427 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4428 | ipv6=no |
| 4429 | |
| 4430 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4431 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 4432 | #line 4433 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4433 | #include "confdefs.h" |
| 4434 | /* AF_INET6 available check */ |
| 4435 | #include <sys/types.h> |
| 4436 | #include <sys/socket.h> |
| 4437 | main() |
| 4438 | { |
| 4439 | if (socket(AF_INET6, SOCK_STREAM, 0) < 0) |
| 4440 | exit(1); |
| 4441 | else |
| 4442 | exit(0); |
| 4443 | } |
| 4444 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4445 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 4446 | if { (eval echo configure:4447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4447 | then |
| 4448 | echo "$ac_t""yes" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4449 | ipv6=yes |
| 4450 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4451 | echo "configure: failed program was:" >&5 |
| 4452 | cat conftest.$ac_ext >&5 |
| 4453 | rm -fr conftest* |
| 4454 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4455 | ipv6=no |
| 4456 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4457 | rm -fr conftest* |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4458 | fi |
| 4459 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4460 | |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4461 | if test "$ipv6" = "yes"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4462 | echo $ac_n "checking if RFC2553 API is available""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 4463 | echo "configure:4464: checking if RFC2553 API is available" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4464 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 4465 | #line 4466 "configure" |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4466 | #include "confdefs.h" |
| 4467 | #include <sys/types.h> |
| 4468 | #include <netinet/in.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4469 | int main() { |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4470 | struct sockaddr_in6 x; |
| 4471 | x.sin6_scope_id; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4472 | ; return 0; } |
| 4473 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 4474 | if { (eval echo configure:4475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4475 | rm -rf conftest* |
| 4476 | echo "$ac_t""yes" 1>&6 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4477 | ipv6=yes |
| 4478 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4479 | echo "configure: failed program was:" >&5 |
| 4480 | cat conftest.$ac_ext >&5 |
| 4481 | rm -rf conftest* |
| 4482 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4483 | ipv6=no |
| 4484 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4485 | rm -f conftest* |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4486 | fi |
| 4487 | |
| 4488 | if test "$ipv6" = "yes"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4489 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4490 | #define ENABLE_IPV6 1 |
| 4491 | EOF |
| 4492 | |
| 4493 | fi |
| 4494 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4495 | fi |
| 4496 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4497 | |
| 4498 | ipv6type=unknown |
| 4499 | ipv6lib=none |
| 4500 | ipv6trylibc=no |
| 4501 | |
| 4502 | if test "$ipv6" = "yes"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4503 | echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 4504 | echo "configure:4505: checking ipv6 stack type" >&5 |
Guido van Rossum | b855216 | 2001-09-05 14:58:11 +0000 | [diff] [blame] | 4505 | for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta; |
| 4506 | do |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4507 | case $i in |
| 4508 | inria) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4509 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 4510 | #line 4511 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4511 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4512 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4513 | #include <netinet/in.h> |
| 4514 | #ifdef IPV6_INRIA_VERSION |
| 4515 | yes |
| 4516 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4517 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4518 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4519 | egrep "yes" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4520 | rm -rf conftest* |
Martin v. Löwis | 44ddbde | 2001-12-02 10:15:37 +0000 | [diff] [blame] | 4521 | ipv6type=$i |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4522 | fi |
| 4523 | rm -f conftest* |
| 4524 | |
| 4525 | ;; |
| 4526 | kame) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4527 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 4528 | #line 4529 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4529 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4530 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4531 | #include <netinet/in.h> |
| 4532 | #ifdef __KAME__ |
| 4533 | yes |
| 4534 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4535 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4536 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4537 | egrep "yes" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4538 | rm -rf conftest* |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4539 | ipv6type=$i; |
| 4540 | ipv6lib=inet6 |
| 4541 | ipv6libdir=/usr/local/v6/lib |
| 4542 | ipv6trylibc=yes |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4543 | fi |
| 4544 | rm -f conftest* |
| 4545 | |
| 4546 | ;; |
| 4547 | linux-glibc) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4548 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 4549 | #line 4550 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4550 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4551 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4552 | #include <features.h> |
| 4553 | #if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)) |
| 4554 | yes |
| 4555 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4556 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4557 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4558 | egrep "yes" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4559 | rm -rf conftest* |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4560 | ipv6type=$i; |
| 4561 | ipv6trylibc=yes |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4562 | fi |
| 4563 | rm -f conftest* |
| 4564 | |
| 4565 | ;; |
| 4566 | linux-inet6) |
| 4567 | if test -d /usr/inet6; then |
| 4568 | ipv6type=$i |
| 4569 | ipv6lib=inet6 |
| 4570 | ipv6libdir=/usr/inet6/lib |
Martin v. Löwis | 44ddbde | 2001-12-02 10:15:37 +0000 | [diff] [blame] | 4571 | OPT="-I/usr/inet6/include $OPT" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4572 | fi |
| 4573 | ;; |
| 4574 | solaris) |
| 4575 | if test -f /etc/netconfig; then |
| 4576 | if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then |
| 4577 | ipv6type=$i |
| 4578 | ipv6trylibc=yes |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4579 | fi |
| 4580 | fi |
| 4581 | ;; |
| 4582 | toshiba) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4583 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 4584 | #line 4585 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4585 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4586 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4587 | #include <sys/param.h> |
| 4588 | #ifdef _TOSHIBA_INET6 |
| 4589 | yes |
| 4590 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4591 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4592 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4593 | egrep "yes" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4594 | rm -rf conftest* |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4595 | ipv6type=$i; |
| 4596 | ipv6lib=inet6; |
Martin v. Löwis | 44ddbde | 2001-12-02 10:15:37 +0000 | [diff] [blame] | 4597 | ipv6libdir=/usr/local/v6/lib |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4598 | fi |
| 4599 | rm -f conftest* |
| 4600 | |
| 4601 | ;; |
| 4602 | v6d) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4603 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 4604 | #line 4605 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4605 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4606 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4607 | #include </usr/local/v6/include/sys/v6config.h> |
| 4608 | #ifdef __V6D__ |
| 4609 | yes |
| 4610 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4611 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4612 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4613 | egrep "yes" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4614 | rm -rf conftest* |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4615 | ipv6type=$i; |
| 4616 | ipv6lib=v6; |
| 4617 | ipv6libdir=/usr/local/v6/lib; |
| 4618 | OPT="-I/usr/local/v6/include $OPT" |
| 4619 | fi |
| 4620 | rm -f conftest* |
| 4621 | |
| 4622 | ;; |
| 4623 | zeta) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4624 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 4625 | #line 4626 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4626 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4627 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4628 | #include <sys/param.h> |
| 4629 | #ifdef _ZETA_MINAMI_INET6 |
| 4630 | yes |
| 4631 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4632 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4633 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4634 | egrep "yes" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4635 | rm -rf conftest* |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4636 | ipv6type=$i; |
| 4637 | ipv6lib=inet6; |
Martin v. Löwis | 44ddbde | 2001-12-02 10:15:37 +0000 | [diff] [blame] | 4638 | ipv6libdir=/usr/local/v6/lib |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4639 | fi |
| 4640 | rm -f conftest* |
| 4641 | |
| 4642 | ;; |
| 4643 | esac |
| 4644 | if test "$ipv6type" != "unknown"; then |
| 4645 | break |
| 4646 | fi |
| 4647 | done |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4648 | echo "$ac_t""$ipv6type" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4649 | fi |
| 4650 | |
| 4651 | if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then |
| 4652 | if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then |
| 4653 | LIBS="-L$ipv6libdir -l$ipv6lib $LIBS" |
| 4654 | echo "using lib$ipv6lib" |
| 4655 | else |
| 4656 | if test $ipv6trylibc = "yes"; then |
| 4657 | echo "using libc" |
| 4658 | else |
| 4659 | echo 'Fatal: no $ipv6lib library found. cannot continue.' |
| 4660 | echo "You need to fetch lib$ipv6lib.a from appropriate" |
| 4661 | echo 'ipv6 kit and compile beforehand.' |
| 4662 | exit 1 |
| 4663 | fi |
| 4664 | fi |
| 4665 | fi |
| 4666 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4667 | # Check for GC support |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4668 | echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 4669 | echo "configure:4670: checking for --with-cycle-gc" >&5 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4670 | # Check whether --with-cycle-gc or --without-cycle-gc was given. |
| 4671 | if test "${with_cycle_gc+set}" = set; then |
| 4672 | withval="$with_cycle_gc" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4673 | : |
| 4674 | fi |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4675 | |
| 4676 | |
| 4677 | if test -z "$with_cycle_gc" |
| 4678 | then with_cycle_gc="yes" |
| 4679 | fi |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame] | 4680 | if test "$with_cycle_gc" != "no" |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4681 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4682 | cat >> confdefs.h <<\EOF |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4683 | #define WITH_CYCLE_GC 1 |
| 4684 | EOF |
| 4685 | |
| 4686 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4687 | echo "$ac_t""$with_cycle_gc" 1>&6 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4688 | |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 4689 | # Check for Python-specific malloc support |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4690 | echo $ac_n "checking for --with-pymalloc""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 4691 | echo "configure:4692: checking for --with-pymalloc" >&5 |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 4692 | # Check whether --with-pymalloc or --without-pymalloc was given. |
| 4693 | if test "${with_pymalloc+set}" = set; then |
| 4694 | withval="$with_pymalloc" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4695 | |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 4696 | if test "$withval" != no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4697 | then cat >> confdefs.h <<\EOF |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 4698 | #define WITH_PYMALLOC 1 |
| 4699 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4700 | echo "$ac_t""yes" 1>&6 |
| 4701 | else echo "$ac_t""no" 1>&6 |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 4702 | fi |
| 4703 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4704 | echo "$ac_t""no" 1>&6 |
| 4705 | fi |
| 4706 | |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 4707 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4708 | # Check for --with-wctype-functions |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4709 | echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 4710 | echo "configure:4711: checking for --with-wctype-functions" >&5 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4711 | # Check whether --with-wctype-functions or --without-wctype-functions was given. |
| 4712 | if test "${with_wctype_functions+set}" = set; then |
| 4713 | withval="$with_wctype_functions" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4714 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4715 | if test "$withval" != no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4716 | then cat >> confdefs.h <<\EOF |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4717 | #define WANT_WCTYPE_FUNCTIONS 1 |
| 4718 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4719 | echo "$ac_t""yes" 1>&6 |
| 4720 | else echo "$ac_t""no" 1>&6 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4721 | fi |
| 4722 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4723 | echo "$ac_t""no" 1>&6 |
| 4724 | fi |
| 4725 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4726 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4727 | # -I${DLINCLDIR} is added to the compile rule for importdl.o |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4728 | |
Guido van Rossum | 98935bf | 2001-09-05 19:13:16 +0000 | [diff] [blame] | 4729 | DLINCLDIR=. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4730 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4731 | echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 4732 | echo "configure:4733: checking for --with-sgi-dl" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4733 | # Check whether --with-sgi-dl or --without-sgi-dl was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4734 | if test "${with_sgi_dl+set}" = set; then |
| 4735 | withval="$with_sgi_dl" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4736 | |
| 4737 | echo "$ac_t""$withval" 1>&6 |
| 4738 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4739 | #define WITH_SGI_DL 1 |
| 4740 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4741 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4742 | DYNLOADFILE="dynload_dl.o" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4743 | dldir=$withval |
Guido van Rossum | 4095101 | 2000-10-07 16:21:27 +0000 | [diff] [blame] | 4744 | if test ! -z "$dldir" -a -d "$dldir" |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 4745 | then LDFLAGS="$LDFLAGS -L$dldir" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4746 | 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] | 4747 | fi |
| 4748 | DLINCLDIR=${dldir} |
| 4749 | LIBS="$LIBS -ldl -lmld" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4750 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4751 | echo "$ac_t""no" 1>&6 |
| 4752 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4753 | |
| 4754 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4755 | echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 4756 | echo "configure:4757: checking for --with-dl-dld" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4757 | # Check whether --with-dl-dld or --without-dl-dld was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4758 | if test "${with_dl_dld+set}" = set; then |
| 4759 | withval="$with_dl_dld" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4760 | |
| 4761 | echo "$ac_t""$withval" 1>&6 |
| 4762 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4763 | #define WITH_DL_DLD 1 |
| 4764 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4765 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4766 | DYNLOADFILE="dynload_dl.o" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4767 | dldir=`echo "$withval" | sed 's/,.*//'` |
| 4768 | dlddir=`echo "$withval" | sed 's/.*,//'` |
Barry Warsaw | 7d1219d | 2000-10-05 18:45:53 +0000 | [diff] [blame] | 4769 | 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] | 4770 | then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4771 | 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] | 4772 | fi |
| 4773 | DLINCLDIR=${dldir} |
| 4774 | LIBS="$LIBS -ldl -ldld" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4775 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4776 | echo "$ac_t""no" 1>&6 |
| 4777 | fi |
| 4778 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4779 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4780 | # the dlopen() function means we might want to use dynload_shlib.o. some |
| 4781 | # 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] | 4782 | for ac_func in dlopen |
| 4783 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4784 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 4785 | echo "configure:4786: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4786 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 4787 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4788 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4789 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 4790 | #line 4791 "configure" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4791 | #include "confdefs.h" |
| 4792 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4793 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4794 | #include <assert.h> |
| 4795 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4796 | /* We use char because int might match the return type of a gcc2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4797 | builtin and then its argument prototype would still apply. */ |
| 4798 | char $ac_func(); |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4799 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4800 | int main() { |
| 4801 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4802 | /* The GNU C library defines this for functions which it implements |
| 4803 | to always fail with ENOSYS. Some functions are actually named |
| 4804 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4805 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4806 | choke me |
| 4807 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4808 | $ac_func(); |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4809 | #endif |
| 4810 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4811 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 4812 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 4813 | if { (eval echo configure:4814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4814 | rm -rf conftest* |
| 4815 | eval "ac_cv_func_$ac_func=yes" |
| 4816 | else |
| 4817 | echo "configure: failed program was:" >&5 |
| 4818 | cat conftest.$ac_ext >&5 |
| 4819 | rm -rf conftest* |
| 4820 | eval "ac_cv_func_$ac_func=no" |
| 4821 | fi |
| 4822 | rm -f conftest* |
| 4823 | fi |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4824 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4825 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4826 | echo "$ac_t""yes" 1>&6 |
| 4827 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4828 | cat >> confdefs.h <<EOF |
| 4829 | #define $ac_tr_func 1 |
| 4830 | EOF |
| 4831 | |
| 4832 | else |
| 4833 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4834 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4835 | done |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4836 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4837 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4838 | # DYNLOADFILE specifies which dynload_*.o file we will use for dynamic |
| 4839 | # loading of modules. |
| 4840 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4841 | echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 4842 | echo "configure:4843: checking DYNLOADFILE" >&5 |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4843 | if test -z "$DYNLOADFILE" |
| 4844 | then |
| 4845 | case $ac_sys_system/$ac_sys_release in |
| 4846 | AIX*) DYNLOADFILE="dynload_aix.o";; |
| 4847 | BeOS*) DYNLOADFILE="dynload_beos.o";; |
| 4848 | hp*|HP*) DYNLOADFILE="dynload_hpux.o";; |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 4849 | Darwin/*) DYNLOADFILE="dynload_next.o";; |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4850 | *) |
| 4851 | # use dynload_shlib.c and dlopen() if we have it; otherwise stub |
| 4852 | # out any dynamic loading |
| 4853 | if test "$ac_cv_func_dlopen" = yes |
| 4854 | then DYNLOADFILE="dynload_shlib.o" |
| 4855 | else DYNLOADFILE="dynload_stub.o" |
| 4856 | fi |
| 4857 | ;; |
| 4858 | esac |
| 4859 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4860 | echo "$ac_t""$DYNLOADFILE" 1>&6 |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4861 | if test "$DYNLOADFILE" != "dynload_stub.o" |
| 4862 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4863 | cat >> confdefs.h <<\EOF |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4864 | #define HAVE_DYNAMIC_LOADING 1 |
| 4865 | EOF |
| 4866 | |
| 4867 | fi |
| 4868 | |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4869 | # MACHDEP_OBJS can be set to platform-specific object files needed by Python |
| 4870 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4871 | |
| 4872 | echo $ac_n "checking MACHDEP_OBJS""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 4873 | echo "configure:4874: checking MACHDEP_OBJS" >&5 |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4874 | if test -z "$MACHDEP_OBJS" |
| 4875 | then |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 4876 | MACHDEP_OBJS=$extra_machdep_objs |
| 4877 | else |
| 4878 | MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs" |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4879 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4880 | echo "$ac_t""MACHDEP_OBJS" 1>&6 |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4881 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4882 | # checks for library functions |
Martin v. Löwis | 244edc8 | 2001-10-04 22:44:26 +0000 | [diff] [blame] | 4883 | for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 4884 | flock fork fsync fdatasync fpathconf ftime ftruncate \ |
Martin v. Löwis | f95dd0a | 2001-08-15 17:14:33 +0000 | [diff] [blame] | 4885 | gai_strerror getgroups getlogin getpeername getpid getpwent getwd \ |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 4886 | hstrerror inet_pton kill killpg link lstat mkfifo mktime mremap \ |
Andrew M. Kuchling | 5821b77 | 2000-08-25 01:14:08 +0000 | [diff] [blame] | 4887 | nice pathconf pause plock poll pthread_init \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 4888 | putenv readlink \ |
Martin v. Löwis | 61c5edf | 2001-10-18 04:06:00 +0000 | [diff] [blame] | 4889 | select setegid seteuid setgid setgroups \ |
Martin v. Löwis | 791bfda | 2001-07-24 06:33:08 +0000 | [diff] [blame] | 4890 | setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 4891 | sigaction siginterrupt sigrelse strftime strptime symlink sysconf \ |
Fred Drake | 89143df | 1999-12-09 22:03:25 +0000 | [diff] [blame] | 4892 | tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ |
Guido van Rossum | c524d95 | 2001-10-19 01:31:59 +0000 | [diff] [blame] | 4893 | truncate uname unsetenv waitpid _getpty getpriority |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4894 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4895 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 4896 | echo "configure:4897: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4897 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 4898 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4899 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4900 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 4901 | #line 4902 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4902 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4903 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4904 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4905 | #include <assert.h> |
| 4906 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4907 | /* We use char because int might match the return type of a gcc2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4908 | builtin and then its argument prototype would still apply. */ |
| 4909 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4910 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4911 | int main() { |
| 4912 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 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. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4916 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4917 | choke me |
| 4918 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4919 | $ac_func(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4920 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4921 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4922 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 4923 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 4924 | if { (eval echo configure:4925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4925 | rm -rf conftest* |
| 4926 | eval "ac_cv_func_$ac_func=yes" |
| 4927 | else |
| 4928 | echo "configure: failed program was:" >&5 |
| 4929 | cat conftest.$ac_ext >&5 |
| 4930 | rm -rf conftest* |
| 4931 | eval "ac_cv_func_$ac_func=no" |
| 4932 | fi |
| 4933 | rm -f conftest* |
| 4934 | fi |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4935 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4936 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4937 | echo "$ac_t""yes" 1>&6 |
| 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 | |
| 4943 | else |
| 4944 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4945 | fi |
| 4946 | done |
| 4947 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4948 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4949 | # check for openpty and forkpty |
| 4950 | |
| 4951 | for ac_func in openpty |
| 4952 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4953 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 4954 | echo "configure:4955: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4955 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 4956 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4957 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4958 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 4959 | #line 4960 "configure" |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4960 | #include "confdefs.h" |
| 4961 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4962 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4963 | #include <assert.h> |
| 4964 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4965 | /* We use char because int might match the return type of a gcc2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4966 | builtin and then its argument prototype would still apply. */ |
| 4967 | char $ac_func(); |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4968 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4969 | int main() { |
| 4970 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4971 | /* The GNU C library defines this for functions which it implements |
| 4972 | to always fail with ENOSYS. Some functions are actually named |
| 4973 | something starting with __ and the normal name is an alias. */ |
| 4974 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 4975 | choke me |
| 4976 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4977 | $ac_func(); |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4978 | #endif |
| 4979 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4980 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 4981 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 4982 | if { (eval echo configure:4983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4983 | rm -rf conftest* |
| 4984 | eval "ac_cv_func_$ac_func=yes" |
| 4985 | else |
| 4986 | echo "configure: failed program was:" >&5 |
| 4987 | cat conftest.$ac_ext >&5 |
| 4988 | rm -rf conftest* |
| 4989 | eval "ac_cv_func_$ac_func=no" |
| 4990 | fi |
| 4991 | rm -f conftest* |
| 4992 | fi |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4993 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4994 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4995 | echo "$ac_t""yes" 1>&6 |
| 4996 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4997 | cat >> confdefs.h <<EOF |
| 4998 | #define $ac_tr_func 1 |
| 4999 | EOF |
| 5000 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 5001 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5002 | echo "$ac_t""no" 1>&6 |
| 5003 | echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5004 | echo "configure:5005: checking for openpty in -lutil" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5005 | ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'` |
| 5006 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 5007 | echo $ac_n "(cached) $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5008 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5009 | ac_save_LIBS="$LIBS" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5010 | LIBS="-lutil $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5011 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5012 | #line 5013 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5013 | #include "confdefs.h" |
| 5014 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5015 | /* We use char because int might match the return type of a gcc2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5016 | builtin and then its argument prototype would still apply. */ |
| 5017 | char openpty(); |
| 5018 | |
| 5019 | int main() { |
| 5020 | openpty() |
| 5021 | ; return 0; } |
| 5022 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5023 | if { (eval echo configure:5024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5024 | rm -rf conftest* |
| 5025 | eval "ac_cv_lib_$ac_lib_var=yes" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5026 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5027 | echo "configure: failed program was:" >&5 |
| 5028 | cat conftest.$ac_ext >&5 |
| 5029 | rm -rf conftest* |
| 5030 | eval "ac_cv_lib_$ac_lib_var=no" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5031 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5032 | rm -f conftest* |
| 5033 | LIBS="$ac_save_LIBS" |
| 5034 | |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5035 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5036 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 5037 | echo "$ac_t""yes" 1>&6 |
| 5038 | cat >> confdefs.h <<\EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5039 | #define HAVE_OPENPTY 1 |
| 5040 | EOF |
| 5041 | LIBS="$LIBS -lutil" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5042 | else |
| 5043 | echo "$ac_t""no" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5044 | fi |
| 5045 | |
| 5046 | fi |
| 5047 | done |
| 5048 | |
| 5049 | for ac_func in forkpty |
| 5050 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5051 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5052 | echo "configure:5053: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5053 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5054 | echo $ac_n "(cached) $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5055 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5056 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5057 | #line 5058 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5058 | #include "confdefs.h" |
| 5059 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5060 | which can conflict with char $ac_func(); below. */ |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5061 | #include <assert.h> |
| 5062 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5063 | /* We use char because int might match the return type of a gcc2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5064 | builtin and then its argument prototype would still apply. */ |
| 5065 | char $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5066 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5067 | int main() { |
| 5068 | |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5069 | /* The GNU C library defines this for functions which it implements |
| 5070 | to always fail with ENOSYS. Some functions are actually named |
| 5071 | something starting with __ and the normal name is an alias. */ |
| 5072 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5073 | choke me |
| 5074 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5075 | $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5076 | #endif |
| 5077 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5078 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5079 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5080 | if { (eval echo configure:5081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5081 | rm -rf conftest* |
| 5082 | eval "ac_cv_func_$ac_func=yes" |
| 5083 | else |
| 5084 | echo "configure: failed program was:" >&5 |
| 5085 | cat conftest.$ac_ext >&5 |
| 5086 | rm -rf conftest* |
| 5087 | eval "ac_cv_func_$ac_func=no" |
| 5088 | fi |
| 5089 | rm -f conftest* |
| 5090 | fi |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5091 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5092 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5093 | echo "$ac_t""yes" 1>&6 |
| 5094 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5095 | cat >> confdefs.h <<EOF |
| 5096 | #define $ac_tr_func 1 |
| 5097 | EOF |
| 5098 | |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5099 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5100 | echo "$ac_t""no" 1>&6 |
| 5101 | echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5102 | echo "configure:5103: checking for forkpty in -lutil" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5103 | ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'` |
| 5104 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 5105 | echo $ac_n "(cached) $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5106 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5107 | ac_save_LIBS="$LIBS" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5108 | LIBS="-lutil $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5109 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5110 | #line 5111 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5111 | #include "confdefs.h" |
| 5112 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5113 | /* We use char because int might match the return type of a gcc2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5114 | builtin and then its argument prototype would still apply. */ |
| 5115 | char forkpty(); |
| 5116 | |
| 5117 | int main() { |
| 5118 | forkpty() |
| 5119 | ; return 0; } |
| 5120 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5121 | if { (eval echo configure:5122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5122 | rm -rf conftest* |
| 5123 | eval "ac_cv_lib_$ac_lib_var=yes" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5124 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5125 | echo "configure: failed program was:" >&5 |
| 5126 | cat conftest.$ac_ext >&5 |
| 5127 | rm -rf conftest* |
| 5128 | eval "ac_cv_lib_$ac_lib_var=no" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5129 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5130 | rm -f conftest* |
| 5131 | LIBS="$ac_save_LIBS" |
| 5132 | |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5133 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5134 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 5135 | echo "$ac_t""yes" 1>&6 |
| 5136 | cat >> confdefs.h <<\EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5137 | #define HAVE_FORKPTY 1 |
| 5138 | EOF |
| 5139 | LIBS="$LIBS -lutil" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5140 | else |
| 5141 | echo "$ac_t""no" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5142 | fi |
| 5143 | |
| 5144 | fi |
| 5145 | done |
| 5146 | |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5147 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5148 | # check for long file support functions |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5149 | for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs |
| 5150 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5151 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5152 | echo "configure:5153: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5153 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5154 | echo $ac_n "(cached) $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5155 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5156 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5157 | #line 5158 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5158 | #include "confdefs.h" |
| 5159 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5160 | which can conflict with char $ac_func(); below. */ |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5161 | #include <assert.h> |
| 5162 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5163 | /* We use char because int might match the return type of a gcc2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5164 | builtin and then its argument prototype would still apply. */ |
| 5165 | char $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5166 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5167 | int main() { |
| 5168 | |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5169 | /* The GNU C library defines this for functions which it implements |
| 5170 | to always fail with ENOSYS. Some functions are actually named |
| 5171 | something starting with __ and the normal name is an alias. */ |
| 5172 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5173 | choke me |
| 5174 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5175 | $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5176 | #endif |
| 5177 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5178 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5179 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5180 | if { (eval echo configure:5181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5181 | rm -rf conftest* |
| 5182 | eval "ac_cv_func_$ac_func=yes" |
| 5183 | else |
| 5184 | echo "configure: failed program was:" >&5 |
| 5185 | cat conftest.$ac_ext >&5 |
| 5186 | rm -rf conftest* |
| 5187 | eval "ac_cv_func_$ac_func=no" |
| 5188 | fi |
| 5189 | rm -f conftest* |
| 5190 | fi |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5191 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5192 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5193 | echo "$ac_t""yes" 1>&6 |
| 5194 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5195 | cat >> confdefs.h <<EOF |
| 5196 | #define $ac_tr_func 1 |
| 5197 | EOF |
| 5198 | |
| 5199 | else |
| 5200 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5201 | fi |
| 5202 | done |
| 5203 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5204 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5205 | for ac_func in dup2 getcwd strdup strerror memmove |
| 5206 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5207 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5208 | echo "configure:5209: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5209 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5210 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5211 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5212 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5213 | #line 5214 "configure" |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5214 | #include "confdefs.h" |
| 5215 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5216 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5217 | #include <assert.h> |
| 5218 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5219 | /* We use char because int might match the return type of a gcc2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5220 | builtin and then its argument prototype would still apply. */ |
| 5221 | char $ac_func(); |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5222 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5223 | int main() { |
| 5224 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5225 | /* The GNU C library defines this for functions which it implements |
| 5226 | to always fail with ENOSYS. Some functions are actually named |
| 5227 | something starting with __ and the normal name is an alias. */ |
| 5228 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5229 | choke me |
| 5230 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5231 | $ac_func(); |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5232 | #endif |
| 5233 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5234 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5235 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5236 | if { (eval echo configure:5237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5237 | rm -rf conftest* |
| 5238 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5239 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5240 | echo "configure: failed program was:" >&5 |
| 5241 | cat conftest.$ac_ext >&5 |
| 5242 | rm -rf conftest* |
| 5243 | eval "ac_cv_func_$ac_func=no" |
| 5244 | fi |
| 5245 | rm -f conftest* |
| 5246 | fi |
| 5247 | |
| 5248 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5249 | echo "$ac_t""yes" 1>&6 |
| 5250 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5251 | cat >> confdefs.h <<EOF |
| 5252 | #define $ac_tr_func 1 |
| 5253 | EOF |
| 5254 | |
| 5255 | else |
| 5256 | echo "$ac_t""no" 1>&6 |
| 5257 | LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5258 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5259 | done |
| 5260 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5261 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5262 | for ac_func in getpgrp |
| 5263 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5264 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5265 | echo "configure:5266: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5266 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5267 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5268 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5269 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5270 | #line 5271 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5271 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5272 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5273 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5274 | #include <assert.h> |
| 5275 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5276 | /* We use char because int might match the return type of a gcc2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5277 | builtin and then its argument prototype would still apply. */ |
| 5278 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5279 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5280 | int main() { |
| 5281 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5282 | /* The GNU C library defines this for functions which it implements |
| 5283 | to always fail with ENOSYS. Some functions are actually named |
| 5284 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5285 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5286 | choke me |
| 5287 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5288 | $ac_func(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5289 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5290 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5291 | ; return 0; } |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5292 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5293 | if { (eval echo configure:5294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5294 | rm -rf conftest* |
| 5295 | eval "ac_cv_func_$ac_func=yes" |
| 5296 | else |
| 5297 | echo "configure: failed program was:" >&5 |
| 5298 | cat conftest.$ac_ext >&5 |
| 5299 | rm -rf conftest* |
| 5300 | eval "ac_cv_func_$ac_func=no" |
| 5301 | fi |
| 5302 | rm -f conftest* |
| 5303 | fi |
| 5304 | |
| 5305 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5306 | echo "$ac_t""yes" 1>&6 |
| 5307 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5308 | cat >> confdefs.h <<EOF |
| 5309 | #define $ac_tr_func 1 |
| 5310 | EOF |
| 5311 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5312 | #line 5313 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5313 | #include "confdefs.h" |
| 5314 | #include <unistd.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5315 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5316 | getpgrp(0); |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5317 | ; return 0; } |
| 5318 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5319 | if { (eval echo configure:5320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5320 | rm -rf conftest* |
| 5321 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5322 | #define GETPGRP_HAVE_ARG 1 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5323 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5324 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5325 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5326 | echo "configure: failed program was:" >&5 |
| 5327 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5328 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5329 | rm -f conftest* |
| 5330 | else |
| 5331 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5332 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5333 | done |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5334 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5335 | for ac_func in setpgrp |
| 5336 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5337 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5338 | echo "configure:5339: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5339 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5340 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5341 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5342 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5343 | #line 5344 "configure" |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5344 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5345 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5346 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5347 | #include <assert.h> |
| 5348 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5349 | /* We use char because int might match the return type of a gcc2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5350 | builtin and then its argument prototype would still apply. */ |
| 5351 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5352 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5353 | int main() { |
| 5354 | |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5355 | /* The GNU C library defines this for functions which it implements |
| 5356 | to always fail with ENOSYS. Some functions are actually named |
| 5357 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5358 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5359 | choke me |
| 5360 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5361 | $ac_func(); |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5362 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5363 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5364 | ; return 0; } |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5365 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5366 | if { (eval echo configure:5367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5367 | rm -rf conftest* |
| 5368 | eval "ac_cv_func_$ac_func=yes" |
| 5369 | else |
| 5370 | echo "configure: failed program was:" >&5 |
| 5371 | cat conftest.$ac_ext >&5 |
| 5372 | rm -rf conftest* |
| 5373 | eval "ac_cv_func_$ac_func=no" |
| 5374 | fi |
| 5375 | rm -f conftest* |
| 5376 | fi |
| 5377 | |
| 5378 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5379 | echo "$ac_t""yes" 1>&6 |
| 5380 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5381 | cat >> confdefs.h <<EOF |
| 5382 | #define $ac_tr_func 1 |
| 5383 | EOF |
| 5384 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5385 | #line 5386 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5386 | #include "confdefs.h" |
| 5387 | #include <unistd.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5388 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5389 | setpgrp(0,0); |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5390 | ; return 0; } |
| 5391 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5392 | if { (eval echo configure:5393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5393 | rm -rf conftest* |
| 5394 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5395 | #define SETPGRP_HAVE_ARG 1 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5396 | EOF |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5397 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5398 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5399 | echo "configure: failed program was:" >&5 |
| 5400 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5401 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5402 | rm -f conftest* |
| 5403 | else |
| 5404 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5405 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5406 | done |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5407 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5408 | for ac_func in gettimeofday |
| 5409 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5410 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5411 | echo "configure:5412: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5412 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5413 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5414 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5415 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5416 | #line 5417 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5417 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5418 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5419 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5420 | #include <assert.h> |
| 5421 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5422 | /* We use char because int might match the return type of a gcc2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5423 | builtin and then its argument prototype would still apply. */ |
| 5424 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5425 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5426 | int main() { |
| 5427 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5428 | /* The GNU C library defines this for functions which it implements |
| 5429 | to always fail with ENOSYS. Some functions are actually named |
| 5430 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5431 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5432 | choke me |
| 5433 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5434 | $ac_func(); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5435 | #endif |
| 5436 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5437 | ; return 0; } |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5438 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5439 | if { (eval echo configure:5440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5440 | rm -rf conftest* |
| 5441 | eval "ac_cv_func_$ac_func=yes" |
| 5442 | else |
| 5443 | echo "configure: failed program was:" >&5 |
| 5444 | cat conftest.$ac_ext >&5 |
| 5445 | rm -rf conftest* |
| 5446 | eval "ac_cv_func_$ac_func=no" |
| 5447 | fi |
| 5448 | rm -f conftest* |
| 5449 | fi |
| 5450 | |
| 5451 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5452 | echo "$ac_t""yes" 1>&6 |
| 5453 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5454 | cat >> confdefs.h <<EOF |
| 5455 | #define $ac_tr_func 1 |
| 5456 | EOF |
| 5457 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5458 | #line 5459 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5459 | #include "confdefs.h" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5460 | #include <sys/time.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5461 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5462 | gettimeofday((struct timeval*)0,(struct timezone*)0); |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5463 | ; return 0; } |
| 5464 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5465 | if { (eval echo configure:5466: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5466 | : |
| 5467 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5468 | echo "configure: failed program was:" >&5 |
| 5469 | cat conftest.$ac_ext >&5 |
| 5470 | rm -rf conftest* |
| 5471 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5472 | #define GETTIMEOFDAY_NO_TZ 1 |
| 5473 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5474 | |
| 5475 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5476 | rm -f conftest* |
| 5477 | else |
| 5478 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5479 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5480 | done |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5481 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5482 | |
| 5483 | |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 5484 | # On OSF/1 V5.1, getaddrinfo is available, but a define |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5485 | # for [no]getaddrinfo in netdb.h. |
| 5486 | echo $ac_n "checking for getaddrinfo""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5487 | echo "configure:5488: checking for getaddrinfo" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5488 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5489 | #line 5490 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5490 | #include "confdefs.h" |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 5491 | |
Martin v. Löwis | c010b6d | 2001-11-09 17:50:52 +0000 | [diff] [blame] | 5492 | #include <sys/types.h> |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 5493 | #include <sys/socket.h> |
| 5494 | #include <netdb.h> |
Martin v. Löwis | c010b6d | 2001-11-09 17:50:52 +0000 | [diff] [blame] | 5495 | #include <stdio.h> |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5496 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5497 | int main() { |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5498 | |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 5499 | getaddrinfo(NULL, NULL, NULL, NULL); |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5500 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5501 | ; return 0; } |
| 5502 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5503 | if { (eval echo configure:5504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5504 | rm -rf conftest* |
| 5505 | |
| 5506 | echo "$ac_t""yes" 1>&6 |
| 5507 | echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5508 | echo "configure:5509: checking getaddrinfo bug" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5509 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5510 | echo "$ac_t""buggy" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5511 | buggygetaddrinfo=yes |
| 5512 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5513 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5514 | #line 5515 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5515 | #include "confdefs.h" |
| 5516 | |
| 5517 | #include <sys/types.h> |
| 5518 | #include <netdb.h> |
| 5519 | #include <string.h> |
| 5520 | #include <sys/socket.h> |
| 5521 | #include <netinet/in.h> |
| 5522 | |
| 5523 | main() |
| 5524 | { |
| 5525 | int passive, gaierr, inet4 = 0, inet6 = 0; |
| 5526 | struct addrinfo hints, *ai, *aitop; |
| 5527 | char straddr[INET6_ADDRSTRLEN], strport[16]; |
| 5528 | |
| 5529 | for (passive = 0; passive <= 1; passive++) { |
| 5530 | memset(&hints, 0, sizeof(hints)); |
| 5531 | hints.ai_family = AF_UNSPEC; |
| 5532 | hints.ai_flags = passive ? AI_PASSIVE : 0; |
| 5533 | hints.ai_socktype = SOCK_STREAM; |
| 5534 | if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) { |
| 5535 | (void)gai_strerror(gaierr); |
| 5536 | goto bad; |
| 5537 | } |
| 5538 | for (ai = aitop; ai; ai = ai->ai_next) { |
| 5539 | if (ai->ai_addr == NULL || |
| 5540 | ai->ai_addrlen == 0 || |
| 5541 | getnameinfo(ai->ai_addr, ai->ai_addrlen, |
| 5542 | straddr, sizeof(straddr), strport, sizeof(strport), |
| 5543 | NI_NUMERICHOST|NI_NUMERICSERV) != 0) { |
| 5544 | goto bad; |
| 5545 | } |
| 5546 | switch (ai->ai_family) { |
| 5547 | case AF_INET: |
| 5548 | if (strcmp(strport, "54321") != 0) { |
| 5549 | goto bad; |
| 5550 | } |
| 5551 | if (passive) { |
| 5552 | if (strcmp(straddr, "0.0.0.0") != 0) { |
| 5553 | goto bad; |
| 5554 | } |
| 5555 | } else { |
| 5556 | if (strcmp(straddr, "127.0.0.1") != 0) { |
| 5557 | goto bad; |
| 5558 | } |
| 5559 | } |
| 5560 | inet4++; |
| 5561 | break; |
| 5562 | case AF_INET6: |
| 5563 | if (strcmp(strport, "54321") != 0) { |
| 5564 | goto bad; |
| 5565 | } |
| 5566 | if (passive) { |
| 5567 | if (strcmp(straddr, "::") != 0) { |
| 5568 | goto bad; |
| 5569 | } |
| 5570 | } else { |
| 5571 | if (strcmp(straddr, "::1") != 0) { |
| 5572 | goto bad; |
| 5573 | } |
| 5574 | } |
| 5575 | inet6++; |
| 5576 | break; |
| 5577 | case AF_UNSPEC: |
| 5578 | goto bad; |
| 5579 | break; |
| 5580 | default: |
| 5581 | /* another family support? */ |
| 5582 | break; |
| 5583 | } |
| 5584 | } |
| 5585 | } |
| 5586 | |
| 5587 | if (!(inet4 == 0 || inet4 == 2)) |
| 5588 | goto bad; |
| 5589 | if (!(inet6 == 0 || inet6 == 2)) |
| 5590 | goto bad; |
| 5591 | |
| 5592 | if (aitop) |
| 5593 | freeaddrinfo(aitop); |
| 5594 | exit(0); |
| 5595 | |
| 5596 | bad: |
| 5597 | if (aitop) |
| 5598 | freeaddrinfo(aitop); |
| 5599 | exit(1); |
| 5600 | } |
| 5601 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5602 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5603 | if { (eval echo configure:5604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5604 | then |
| 5605 | echo "$ac_t""good" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5606 | buggygetaddrinfo=no |
| 5607 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5608 | echo "configure: failed program was:" >&5 |
| 5609 | cat conftest.$ac_ext >&5 |
| 5610 | rm -fr conftest* |
| 5611 | echo "$ac_t""buggy" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5612 | buggygetaddrinfo=yes |
| 5613 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5614 | rm -fr conftest* |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5615 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5616 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5617 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5618 | echo "configure: failed program was:" >&5 |
| 5619 | cat conftest.$ac_ext >&5 |
| 5620 | rm -rf conftest* |
| 5621 | |
| 5622 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5623 | buggygetaddrinfo=yes |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5624 | |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 5625 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5626 | rm -f conftest* |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5627 | |
| 5628 | if test "$buggygetaddrinfo" = "yes"; then |
| 5629 | if test "$ipv6" = "yes"; then |
| 5630 | echo 'Fatal: You must get working getaddrinfo() function.' |
| 5631 | echo ' or you can specify "--disable-ipv6"'. |
| 5632 | exit 1 |
| 5633 | fi |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 5634 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5635 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 5636 | #define HAVE_GETADDRINFO 1 |
| 5637 | EOF |
| 5638 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5639 | fi |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5640 | for ac_func in getnameinfo |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5641 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5642 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5643 | echo "configure:5644: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5644 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5645 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5646 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5647 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5648 | #line 5649 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5649 | #include "confdefs.h" |
| 5650 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5651 | which can conflict with char $ac_func(); below. */ |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5652 | #include <assert.h> |
| 5653 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5654 | /* We use char because int might match the return type of a gcc2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5655 | builtin and then its argument prototype would still apply. */ |
| 5656 | char $ac_func(); |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5657 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5658 | int main() { |
| 5659 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5660 | /* The GNU C library defines this for functions which it implements |
| 5661 | to always fail with ENOSYS. Some functions are actually named |
| 5662 | something starting with __ and the normal name is an alias. */ |
| 5663 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5664 | choke me |
| 5665 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5666 | $ac_func(); |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5667 | #endif |
| 5668 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5669 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5670 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5671 | if { (eval echo configure:5672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5672 | rm -rf conftest* |
| 5673 | eval "ac_cv_func_$ac_func=yes" |
| 5674 | else |
| 5675 | echo "configure: failed program was:" >&5 |
| 5676 | cat conftest.$ac_ext >&5 |
| 5677 | rm -rf conftest* |
| 5678 | eval "ac_cv_func_$ac_func=no" |
| 5679 | fi |
| 5680 | rm -f conftest* |
| 5681 | fi |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5682 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5683 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5684 | echo "$ac_t""yes" 1>&6 |
| 5685 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5686 | cat >> confdefs.h <<EOF |
| 5687 | #define $ac_tr_func 1 |
| 5688 | EOF |
| 5689 | |
| 5690 | else |
| 5691 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5692 | fi |
| 5693 | done |
| 5694 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5695 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5696 | # checks for structures |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5697 | echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5698 | echo "configure:5699: checking whether time.h and sys/time.h may both be included" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5699 | if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then |
| 5700 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5701 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5702 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5703 | #line 5704 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5704 | #include "confdefs.h" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5705 | #include <sys/types.h> |
| 5706 | #include <sys/time.h> |
| 5707 | #include <time.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5708 | int main() { |
| 5709 | struct tm *tp; |
| 5710 | ; return 0; } |
| 5711 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5712 | if { (eval echo configure:5713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5713 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5714 | ac_cv_header_time=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5715 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5716 | echo "configure: failed program was:" >&5 |
| 5717 | cat conftest.$ac_ext >&5 |
| 5718 | rm -rf conftest* |
| 5719 | ac_cv_header_time=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5720 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5721 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5722 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5723 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5724 | echo "$ac_t""$ac_cv_header_time" 1>&6 |
| 5725 | if test $ac_cv_header_time = yes; then |
| 5726 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5727 | #define TIME_WITH_SYS_TIME 1 |
| 5728 | EOF |
| 5729 | |
| 5730 | fi |
| 5731 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5732 | echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5733 | echo "configure:5734: checking whether struct tm is in sys/time.h or time.h" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5734 | if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then |
| 5735 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5736 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5737 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5738 | #line 5739 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5739 | #include "confdefs.h" |
| 5740 | #include <sys/types.h> |
| 5741 | #include <time.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5742 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5743 | struct tm *tp; tp->tm_sec; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5744 | ; return 0; } |
| 5745 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5746 | if { (eval echo configure:5747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5747 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5748 | ac_cv_struct_tm=time.h |
| 5749 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5750 | echo "configure: failed program was:" >&5 |
| 5751 | cat conftest.$ac_ext >&5 |
| 5752 | rm -rf conftest* |
| 5753 | ac_cv_struct_tm=sys/time.h |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5754 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5755 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5756 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5757 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5758 | echo "$ac_t""$ac_cv_struct_tm" 1>&6 |
| 5759 | if test $ac_cv_struct_tm = sys/time.h; then |
| 5760 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5761 | #define TM_IN_SYS_TIME 1 |
| 5762 | EOF |
| 5763 | |
| 5764 | fi |
| 5765 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5766 | echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5767 | echo "configure:5768: checking for tm_zone in struct tm" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5768 | if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then |
| 5769 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5770 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5771 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5772 | #line 5773 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5773 | #include "confdefs.h" |
| 5774 | #include <sys/types.h> |
| 5775 | #include <$ac_cv_struct_tm> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5776 | int main() { |
| 5777 | struct tm tm; tm.tm_zone; |
| 5778 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5779 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5780 | if { (eval echo configure:5781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5781 | rm -rf conftest* |
| 5782 | ac_cv_struct_tm_zone=yes |
| 5783 | else |
| 5784 | echo "configure: failed program was:" >&5 |
| 5785 | cat conftest.$ac_ext >&5 |
| 5786 | rm -rf conftest* |
| 5787 | ac_cv_struct_tm_zone=no |
| 5788 | fi |
| 5789 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5790 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5791 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5792 | echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6 |
| 5793 | if test "$ac_cv_struct_tm_zone" = yes; then |
| 5794 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5795 | #define HAVE_TM_ZONE 1 |
| 5796 | EOF |
| 5797 | |
| 5798 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5799 | echo $ac_n "checking for tzname""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5800 | echo "configure:5801: checking for tzname" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5801 | if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then |
| 5802 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5803 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5804 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5805 | #line 5806 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5806 | #include "confdefs.h" |
| 5807 | #include <time.h> |
| 5808 | #ifndef tzname /* For SGI. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5809 | extern char *tzname[]; /* RS6000 and others reject char **tzname. */ |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5810 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5811 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5812 | atoi(*tzname); |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5813 | ; return 0; } |
| 5814 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5815 | if { (eval echo configure:5816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5816 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5817 | ac_cv_var_tzname=yes |
| 5818 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5819 | echo "configure: failed program was:" >&5 |
| 5820 | cat conftest.$ac_ext >&5 |
| 5821 | rm -rf conftest* |
| 5822 | ac_cv_var_tzname=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5823 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5824 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5825 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5826 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5827 | echo "$ac_t""$ac_cv_var_tzname" 1>&6 |
| 5828 | if test $ac_cv_var_tzname = yes; then |
| 5829 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5830 | #define HAVE_TZNAME 1 |
| 5831 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5832 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5833 | fi |
| 5834 | fi |
| 5835 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5836 | echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5837 | echo "configure:5838: checking for st_rdev in struct stat" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5838 | if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then |
| 5839 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5840 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5841 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5842 | #line 5843 "configure" |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5843 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5844 | #include <sys/types.h> |
| 5845 | #include <sys/stat.h> |
| 5846 | int main() { |
| 5847 | struct stat s; s.st_rdev; |
| 5848 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5849 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5850 | if { (eval echo configure:5851: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5851 | rm -rf conftest* |
| 5852 | ac_cv_struct_st_rdev=yes |
| 5853 | else |
| 5854 | echo "configure: failed program was:" >&5 |
| 5855 | cat conftest.$ac_ext >&5 |
| 5856 | rm -rf conftest* |
| 5857 | ac_cv_struct_st_rdev=no |
| 5858 | fi |
| 5859 | rm -f conftest* |
| 5860 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5861 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5862 | echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6 |
| 5863 | if test $ac_cv_struct_st_rdev = yes; then |
| 5864 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5865 | #define HAVE_ST_RDEV 1 |
| 5866 | EOF |
| 5867 | |
| 5868 | fi |
| 5869 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5870 | echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5871 | echo "configure:5872: checking for st_blksize in struct stat" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5872 | if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then |
| 5873 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5874 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5875 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5876 | #line 5877 "configure" |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5877 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5878 | #include <sys/types.h> |
| 5879 | #include <sys/stat.h> |
| 5880 | int main() { |
| 5881 | struct stat s; s.st_blksize; |
| 5882 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5883 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5884 | if { (eval echo configure:5885: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5885 | rm -rf conftest* |
| 5886 | ac_cv_struct_st_blksize=yes |
| 5887 | else |
| 5888 | echo "configure: failed program was:" >&5 |
| 5889 | cat conftest.$ac_ext >&5 |
| 5890 | rm -rf conftest* |
| 5891 | ac_cv_struct_st_blksize=no |
| 5892 | fi |
| 5893 | rm -f conftest* |
| 5894 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5895 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5896 | echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6 |
| 5897 | if test $ac_cv_struct_st_blksize = yes; then |
| 5898 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5899 | #define HAVE_ST_BLKSIZE 1 |
| 5900 | EOF |
| 5901 | |
| 5902 | fi |
| 5903 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5904 | echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5905 | echo "configure:5906: checking for st_blocks in struct stat" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5906 | if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then |
| 5907 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5908 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5909 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5910 | #line 5911 "configure" |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5911 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5912 | #include <sys/types.h> |
| 5913 | #include <sys/stat.h> |
| 5914 | int main() { |
| 5915 | struct stat s; s.st_blocks; |
| 5916 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5917 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5918 | if { (eval echo configure:5919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5919 | rm -rf conftest* |
| 5920 | ac_cv_struct_st_blocks=yes |
| 5921 | else |
| 5922 | echo "configure: failed program was:" >&5 |
| 5923 | cat conftest.$ac_ext >&5 |
| 5924 | rm -rf conftest* |
| 5925 | ac_cv_struct_st_blocks=no |
| 5926 | fi |
| 5927 | rm -f conftest* |
| 5928 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5929 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5930 | echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6 |
| 5931 | if test $ac_cv_struct_st_blocks = yes; then |
| 5932 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5933 | #define HAVE_ST_BLOCKS 1 |
| 5934 | EOF |
| 5935 | |
| 5936 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5937 | LIBOBJS="$LIBOBJS fileblocks.${ac_objext}" |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5938 | fi |
| 5939 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5940 | |
| 5941 | echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5942 | echo "configure:5943: checking for time.h that defines altzone" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5943 | if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then |
| 5944 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5945 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5946 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5947 | #line 5948 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5948 | #include "confdefs.h" |
| 5949 | #include <time.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5950 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5951 | return altzone; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5952 | ; return 0; } |
| 5953 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5954 | if { (eval echo configure:5955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5955 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5956 | ac_cv_header_time_altzone=yes |
| 5957 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5958 | echo "configure: failed program was:" >&5 |
| 5959 | cat conftest.$ac_ext >&5 |
| 5960 | rm -rf conftest* |
| 5961 | ac_cv_header_time_altzone=no |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5962 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5963 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5964 | fi |
| 5965 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5966 | echo "$ac_t""$ac_cv_header_time_altzone" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5967 | if test $ac_cv_header_time_altzone = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5968 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5969 | #define HAVE_ALTZONE 1 |
| 5970 | EOF |
| 5971 | |
| 5972 | fi |
| 5973 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5974 | was_it_defined=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5975 | echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5976 | echo "configure:5977: checking whether sys/select.h and sys/time.h may both be included" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5977 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5978 | #line 5979 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5979 | #include "confdefs.h" |
| 5980 | |
| 5981 | #include <sys/types.h> |
| 5982 | #include <sys/select.h> |
| 5983 | #include <sys/time.h> |
| 5984 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5985 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5986 | ; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5987 | ; return 0; } |
| 5988 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 5989 | if { (eval echo configure:5990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5990 | rm -rf conftest* |
| 5991 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5992 | #define SYS_SELECT_WITH_SYS_TIME 1 |
| 5993 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5994 | was_it_defined=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5995 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5996 | echo "configure: failed program was:" >&5 |
| 5997 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5998 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5999 | rm -f conftest* |
| 6000 | echo "$ac_t""$was_it_defined" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6001 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6002 | echo $ac_n "checking for addrinfo""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6003 | echo "configure:6004: checking for addrinfo" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6004 | if eval "test \"`echo '$''{'ac_cv_struct_addrinfo'+set}'`\" = set"; then |
| 6005 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6006 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6007 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6008 | #line 6009 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6009 | #include "confdefs.h" |
| 6010 | |
| 6011 | # include <netdb.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6012 | int main() { |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6013 | struct addrinfo a |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6014 | ; return 0; } |
| 6015 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6016 | if { (eval echo configure:6017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6017 | rm -rf conftest* |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6018 | ac_cv_struct_addrinfo=yes |
| 6019 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6020 | echo "configure: failed program was:" >&5 |
| 6021 | cat conftest.$ac_ext >&5 |
| 6022 | rm -rf conftest* |
| 6023 | ac_cv_struct_addrinfo=no |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6024 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6025 | rm -f conftest* |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6026 | fi |
| 6027 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6028 | echo "$ac_t""$ac_cv_struct_addrinfo" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6029 | if test $ac_cv_struct_addrinfo = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6030 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6031 | #define HAVE_ADDRINFO 1 |
| 6032 | EOF |
| 6033 | |
| 6034 | fi |
| 6035 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6036 | echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6037 | echo "configure:6038: checking for sockaddr_storage" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6038 | if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then |
| 6039 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6040 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6041 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6042 | #line 6043 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6043 | #include "confdefs.h" |
| 6044 | |
| 6045 | # include <sys/types.h> |
| 6046 | # include <sys/socket.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6047 | int main() { |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6048 | struct sockaddr_storage s |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6049 | ; return 0; } |
| 6050 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6051 | if { (eval echo configure:6052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6052 | rm -rf conftest* |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6053 | ac_cv_struct_sockaddr_storage=yes |
| 6054 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6055 | echo "configure: failed program was:" >&5 |
| 6056 | cat conftest.$ac_ext >&5 |
| 6057 | rm -rf conftest* |
| 6058 | ac_cv_struct_sockaddr_storage=no |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6059 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6060 | rm -f conftest* |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6061 | fi |
| 6062 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6063 | echo "$ac_t""$ac_cv_struct_sockaddr_storage" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6064 | if test $ac_cv_struct_sockaddr_storage = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6065 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6066 | #define HAVE_SOCKADDR_STORAGE 1 |
| 6067 | EOF |
| 6068 | |
| 6069 | fi |
| 6070 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6071 | # checks for compiler characteristics |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6072 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6073 | echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6074 | echo "configure:6075: checking whether char is unsigned" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6075 | if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then |
| 6076 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6077 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6078 | if test "$GCC" = yes; then |
| 6079 | # GCC predefines this symbol on systems where it applies. |
| 6080 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6081 | #line 6082 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6082 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6083 | #ifdef __CHAR_UNSIGNED__ |
| 6084 | yes |
| 6085 | #endif |
| 6086 | |
| 6087 | EOF |
| 6088 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 6089 | egrep "yes" >/dev/null 2>&1; then |
| 6090 | rm -rf conftest* |
| 6091 | ac_cv_c_char_unsigned=yes |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 6092 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6093 | rm -rf conftest* |
| 6094 | ac_cv_c_char_unsigned=no |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6095 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6096 | rm -f conftest* |
| 6097 | |
| 6098 | else |
| 6099 | if test "$cross_compiling" = yes; then |
| 6100 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 6101 | else |
| 6102 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6103 | #line 6104 "configure" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6104 | #include "confdefs.h" |
| 6105 | /* volatile prevents gcc2 from optimizing the test away on sparcs. */ |
| 6106 | #if !defined(__STDC__) || __STDC__ != 1 |
| 6107 | #define volatile |
| 6108 | #endif |
| 6109 | main() { |
| 6110 | volatile char c = 255; exit(c < 0); |
| 6111 | } |
| 6112 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6113 | if { (eval echo configure:6114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6114 | then |
| 6115 | ac_cv_c_char_unsigned=yes |
| 6116 | else |
| 6117 | echo "configure: failed program was:" >&5 |
| 6118 | cat conftest.$ac_ext >&5 |
| 6119 | rm -fr conftest* |
| 6120 | ac_cv_c_char_unsigned=no |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6121 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6122 | rm -fr conftest* |
| 6123 | fi |
| 6124 | |
| 6125 | fi |
| 6126 | fi |
| 6127 | |
| 6128 | echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6129 | if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6130 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6131 | #define __CHAR_UNSIGNED__ 1 |
| 6132 | EOF |
| 6133 | |
| 6134 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6135 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6136 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6137 | echo "configure:6138: checking for working const" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6138 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
| 6139 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6140 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6141 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6142 | #line 6143 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6143 | #include "confdefs.h" |
| 6144 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6145 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6146 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6147 | /* Ultrix mips cc rejects this. */ |
| 6148 | typedef int charset[2]; const charset x; |
| 6149 | /* SunOS 4.1.1 cc rejects this. */ |
| 6150 | char const *const *ccp; |
| 6151 | char **p; |
| 6152 | /* NEC SVR4.0.2 mips cc rejects this. */ |
| 6153 | struct point {int x, y;}; |
| 6154 | static struct point const zero = {0,0}; |
| 6155 | /* AIX XL C 1.02.0.0 rejects this. |
| 6156 | It does not let you subtract one const X* pointer from another in an arm |
| 6157 | of an if-expression whose if-part is not a constant expression */ |
| 6158 | const char *g = "string"; |
| 6159 | ccp = &g + (g ? g-g : 0); |
| 6160 | /* HPUX 7.0 cc rejects these. */ |
| 6161 | ++ccp; |
| 6162 | p = (char**) ccp; |
| 6163 | ccp = (char const *const *) p; |
| 6164 | { /* SCO 3.2v4 cc rejects this. */ |
| 6165 | char *t; |
| 6166 | char const *s = 0 ? (char *) 0 : (char const *) 0; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6167 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6168 | *t++ = 0; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6169 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6170 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ |
| 6171 | int x[] = {25, 17}; |
| 6172 | const int *foo = &x[0]; |
| 6173 | ++foo; |
| 6174 | } |
| 6175 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ |
| 6176 | typedef const int *iptr; |
| 6177 | iptr p = 0; |
| 6178 | ++p; |
| 6179 | } |
| 6180 | { /* AIX XL C 1.02.0.0 rejects this saying |
| 6181 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ |
| 6182 | struct s { int j; const int *ap[3]; }; |
| 6183 | struct s *b; b->j = 5; |
| 6184 | } |
| 6185 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ |
| 6186 | const int foo = 10; |
| 6187 | } |
| 6188 | |
| 6189 | ; return 0; } |
| 6190 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6191 | if { (eval echo configure:6192: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6192 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6193 | ac_cv_c_const=yes |
| 6194 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6195 | echo "configure: failed program was:" >&5 |
| 6196 | cat conftest.$ac_ext >&5 |
| 6197 | rm -rf conftest* |
| 6198 | ac_cv_c_const=no |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6199 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6200 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6201 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6202 | |
| 6203 | echo "$ac_t""$ac_cv_c_const" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6204 | if test $ac_cv_c_const = no; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6205 | cat >> confdefs.h <<\EOF |
| 6206 | #define const |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6207 | EOF |
| 6208 | |
| 6209 | fi |
| 6210 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6211 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6212 | works=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6213 | echo $ac_n "checking for working volatile""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6214 | echo "configure:6215: checking for working volatile" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6215 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6216 | #line 6217 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6217 | #include "confdefs.h" |
| 6218 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6219 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6220 | volatile int x; x = 0; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6221 | ; return 0; } |
| 6222 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6223 | if { (eval echo configure:6224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6224 | rm -rf conftest* |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6225 | works=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6226 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6227 | echo "configure: failed program was:" >&5 |
| 6228 | cat conftest.$ac_ext >&5 |
| 6229 | rm -rf conftest* |
| 6230 | cat >> confdefs.h <<\EOF |
| 6231 | #define volatile |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6232 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6233 | |
| 6234 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6235 | rm -f conftest* |
| 6236 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6237 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6238 | works=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6239 | echo $ac_n "checking for working signed char""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6240 | echo "configure:6241: checking for working signed char" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6241 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6242 | #line 6243 "configure" |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 6243 | #include "confdefs.h" |
| 6244 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6245 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6246 | signed char c; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6247 | ; return 0; } |
| 6248 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6249 | if { (eval echo configure:6250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6250 | rm -rf conftest* |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6251 | works=yes |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 6252 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6253 | echo "configure: failed program was:" >&5 |
| 6254 | cat conftest.$ac_ext >&5 |
| 6255 | rm -rf conftest* |
| 6256 | cat >> confdefs.h <<\EOF |
| 6257 | #define signed |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6258 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6259 | |
| 6260 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6261 | rm -f conftest* |
| 6262 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6263 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6264 | have_prototypes=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6265 | echo $ac_n "checking for prototypes""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6266 | echo "configure:6267: checking for prototypes" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6267 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6268 | #line 6269 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6269 | #include "confdefs.h" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6270 | int foo(int x) { return 0; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6271 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6272 | return foo(10); |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6273 | ; return 0; } |
| 6274 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6275 | if { (eval echo configure:6276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6276 | rm -rf conftest* |
| 6277 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6278 | #define HAVE_PROTOTYPES 1 |
| 6279 | EOF |
| 6280 | have_prototypes=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6281 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6282 | echo "configure: failed program was:" >&5 |
| 6283 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6284 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6285 | rm -f conftest* |
| 6286 | echo "$ac_t""$have_prototypes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6287 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6288 | works=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6289 | echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6290 | echo "configure:6291: checking for variable length prototypes and stdarg.h" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6291 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6292 | #line 6293 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6293 | #include "confdefs.h" |
| 6294 | |
| 6295 | #include <stdarg.h> |
Guido van Rossum | 90eea07 | 1996-08-30 20:58:57 +0000 | [diff] [blame] | 6296 | int foo(int x, ...) { |
| 6297 | va_list va; |
| 6298 | va_start(va, x); |
| 6299 | va_arg(va, int); |
| 6300 | va_arg(va, char *); |
| 6301 | va_arg(va, double); |
| 6302 | return 0; |
| 6303 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6304 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6305 | int main() { |
Guido van Rossum | 90eea07 | 1996-08-30 20:58:57 +0000 | [diff] [blame] | 6306 | return foo(10, "", 3.14); |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6307 | ; return 0; } |
| 6308 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6309 | if { (eval echo configure:6310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6310 | rm -rf conftest* |
| 6311 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6312 | #define HAVE_STDARG_PROTOTYPES 1 |
| 6313 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6314 | works=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6315 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6316 | echo "configure: failed program was:" >&5 |
| 6317 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6318 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6319 | rm -f conftest* |
| 6320 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6321 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6322 | if test "$have_prototypes" = yes; then |
| 6323 | bad_prototypes=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6324 | echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6325 | echo "configure:6326: checking for bad exec* prototypes" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6326 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6327 | #line 6328 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6328 | #include "confdefs.h" |
| 6329 | #include <unistd.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6330 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6331 | char **t;execve("@",t,t); |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6332 | ; return 0; } |
| 6333 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6334 | if { (eval echo configure:6335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6335 | : |
| 6336 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6337 | echo "configure: failed program was:" >&5 |
| 6338 | cat conftest.$ac_ext >&5 |
| 6339 | rm -rf conftest* |
| 6340 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6341 | #define BAD_EXEC_PROTOTYPES 1 |
| 6342 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6343 | bad_prototypes=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6344 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6345 | rm -f conftest* |
| 6346 | echo "$ac_t""$bad_prototypes" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6347 | fi |
| 6348 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6349 | # check if sockaddr has sa_len member |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6350 | echo $ac_n "checking if sockaddr has sa_len member""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6351 | echo "configure:6352: checking if sockaddr has sa_len member" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6352 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6353 | #line 6354 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6354 | #include "confdefs.h" |
| 6355 | #include <sys/types.h> |
| 6356 | #include <sys/socket.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6357 | int main() { |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6358 | struct sockaddr x; |
| 6359 | x.sa_len = 0; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6360 | ; return 0; } |
| 6361 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6362 | if { (eval echo configure:6363: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6363 | rm -rf conftest* |
| 6364 | echo "$ac_t""yes" 1>&6 |
| 6365 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6366 | #define HAVE_SOCKADDR_SA_LEN 1 |
| 6367 | EOF |
| 6368 | |
| 6369 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6370 | echo "configure: failed program was:" >&5 |
| 6371 | cat conftest.$ac_ext >&5 |
| 6372 | rm -rf conftest* |
| 6373 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6374 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6375 | rm -f conftest* |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6376 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6377 | echo $ac_n "checking for bad static forward""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6378 | echo "configure:6379: checking for bad static forward" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6379 | if eval "test \"`echo '$''{'ac_cv_bad_static_forward'+set}'`\" = set"; then |
| 6380 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6381 | else |
| 6382 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 6383 | ac_cv_bad_static_forward=no |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6384 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6385 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6386 | #line 6387 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6387 | #include "confdefs.h" |
| 6388 | |
| 6389 | struct s { int a; int b; }; |
| 6390 | static struct s foo; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6391 | int foobar() { |
| 6392 | static int random; |
| 6393 | random = (int) &foo; |
| 6394 | return random; |
| 6395 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6396 | static struct s foo = { 1, 2 }; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6397 | main() { |
| 6398 | exit(!((int)&foo == foobar())); |
| 6399 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6400 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6401 | if { (eval echo configure:6402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6402 | then |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6403 | ac_cv_bad_static_forward=no |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6404 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6405 | echo "configure: failed program was:" >&5 |
| 6406 | cat conftest.$ac_ext >&5 |
| 6407 | rm -fr conftest* |
| 6408 | ac_cv_bad_static_forward=yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6409 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6410 | rm -fr conftest* |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6411 | fi |
| 6412 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6413 | fi |
| 6414 | |
| 6415 | echo "$ac_t""$ac_cv_bad_static_forward" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6416 | if test "$ac_cv_bad_static_forward" = yes |
| 6417 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6418 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6419 | #define BAD_STATIC_FORWARD 1 |
| 6420 | EOF |
| 6421 | |
| 6422 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6423 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6424 | va_list_is_array=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6425 | echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6426 | echo "configure:6427: checking whether va_list is an array" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6427 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6428 | #line 6429 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6429 | #include "confdefs.h" |
| 6430 | |
| 6431 | #ifdef HAVE_STDARG_PROTOTYPES |
| 6432 | #include <stdarg.h> |
| 6433 | #else |
| 6434 | #include <varargs.h> |
| 6435 | #endif |
| 6436 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6437 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6438 | va_list list1, list2; list1 = list2; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6439 | ; return 0; } |
| 6440 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6441 | if { (eval echo configure:6442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6442 | : |
| 6443 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6444 | echo "configure: failed program was:" >&5 |
| 6445 | cat conftest.$ac_ext >&5 |
| 6446 | rm -rf conftest* |
| 6447 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6448 | #define VA_LIST_IS_ARRAY 1 |
| 6449 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6450 | va_list_is_array=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6451 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6452 | rm -f conftest* |
| 6453 | echo "$ac_t""$va_list_is_array" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6454 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6455 | # sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-( |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6456 | echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6457 | echo "configure:6458: checking for gethostbyname_r" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6458 | if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then |
| 6459 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6460 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6461 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6462 | #line 6463 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6463 | #include "confdefs.h" |
| 6464 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6465 | which can conflict with char gethostbyname_r(); below. */ |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6466 | #include <assert.h> |
| 6467 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6468 | /* We use char because int might match the return type of a gcc2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6469 | builtin and then its argument prototype would still apply. */ |
| 6470 | char gethostbyname_r(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6471 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6472 | int main() { |
| 6473 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6474 | /* The GNU C library defines this for functions which it implements |
| 6475 | to always fail with ENOSYS. Some functions are actually named |
| 6476 | something starting with __ and the normal name is an alias. */ |
| 6477 | #if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r) |
| 6478 | choke me |
| 6479 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6480 | gethostbyname_r(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6481 | #endif |
| 6482 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6483 | ; return 0; } |
| 6484 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6485 | if { (eval echo configure:6486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6486 | rm -rf conftest* |
| 6487 | eval "ac_cv_func_gethostbyname_r=yes" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6488 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6489 | echo "configure: failed program was:" >&5 |
| 6490 | cat conftest.$ac_ext >&5 |
| 6491 | rm -rf conftest* |
| 6492 | eval "ac_cv_func_gethostbyname_r=no" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6493 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6494 | rm -f conftest* |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6495 | fi |
| 6496 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6497 | if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then |
| 6498 | echo "$ac_t""yes" 1>&6 |
| 6499 | |
| 6500 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6501 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6502 | EOF |
| 6503 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6504 | echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6505 | echo "configure:6506: checking gethostbyname_r with 6 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6506 | OLD_CFLAGS=$CFLAGS |
| 6507 | CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6508 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6509 | #line 6510 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6510 | #include "confdefs.h" |
| 6511 | |
| 6512 | # include <netdb.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6513 | |
| 6514 | int main() { |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6515 | |
| 6516 | char *name; |
| 6517 | struct hostent *he, *res; |
| 6518 | char buffer[2048]; |
| 6519 | int buflen = 2048; |
| 6520 | int h_errnop; |
| 6521 | |
| 6522 | (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6523 | |
| 6524 | ; return 0; } |
| 6525 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6526 | if { (eval echo configure:6527: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6527 | rm -rf conftest* |
| 6528 | |
| 6529 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6530 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6531 | EOF |
| 6532 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6533 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6534 | #define HAVE_GETHOSTBYNAME_R_6_ARG 1 |
| 6535 | EOF |
| 6536 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6537 | echo "$ac_t""yes" 1>&6 |
| 6538 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6539 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6540 | echo "configure: failed program was:" >&5 |
| 6541 | cat conftest.$ac_ext >&5 |
| 6542 | rm -rf conftest* |
| 6543 | |
| 6544 | echo "$ac_t""no" 1>&6 |
| 6545 | echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6546 | echo "configure:6547: checking gethostbyname_r with 5 args" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6547 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6548 | #line 6549 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6549 | #include "confdefs.h" |
| 6550 | |
| 6551 | # include <netdb.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6552 | |
| 6553 | int main() { |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6554 | |
| 6555 | char *name; |
| 6556 | struct hostent *he; |
| 6557 | char buffer[2048]; |
| 6558 | int buflen = 2048; |
| 6559 | int h_errnop; |
| 6560 | |
| 6561 | (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6562 | |
| 6563 | ; return 0; } |
| 6564 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6565 | if { (eval echo configure:6566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6566 | rm -rf conftest* |
| 6567 | |
| 6568 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6569 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6570 | EOF |
| 6571 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6572 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6573 | #define HAVE_GETHOSTBYNAME_R_5_ARG 1 |
| 6574 | EOF |
| 6575 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6576 | echo "$ac_t""yes" 1>&6 |
| 6577 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6578 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6579 | echo "configure: failed program was:" >&5 |
| 6580 | cat conftest.$ac_ext >&5 |
| 6581 | rm -rf conftest* |
| 6582 | |
| 6583 | echo "$ac_t""no" 1>&6 |
| 6584 | echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6585 | echo "configure:6586: checking gethostbyname_r with 3 args" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6586 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6587 | #line 6588 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6588 | #include "confdefs.h" |
| 6589 | |
| 6590 | # include <netdb.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6591 | |
| 6592 | int main() { |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6593 | |
| 6594 | char *name; |
| 6595 | struct hostent *he; |
| 6596 | struct hostent_data data; |
| 6597 | |
| 6598 | (void) gethostbyname_r(name, he, &data); |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6599 | |
| 6600 | ; return 0; } |
| 6601 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6602 | if { (eval echo configure:6603: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6603 | rm -rf conftest* |
| 6604 | |
| 6605 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6606 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6607 | EOF |
| 6608 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6609 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6610 | #define HAVE_GETHOSTBYNAME_R_3_ARG 1 |
| 6611 | EOF |
| 6612 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6613 | echo "$ac_t""yes" 1>&6 |
| 6614 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6615 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6616 | echo "configure: failed program was:" >&5 |
| 6617 | cat conftest.$ac_ext >&5 |
| 6618 | rm -rf conftest* |
| 6619 | |
| 6620 | echo "$ac_t""no" 1>&6 |
| 6621 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6622 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6623 | rm -f conftest* |
| 6624 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6625 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6626 | rm -f conftest* |
| 6627 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6628 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6629 | rm -f conftest* |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6630 | CFLAGS=$OLD_CFLAGS |
| 6631 | |
| 6632 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6633 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6634 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6635 | for ac_func in gethostbyname |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6636 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6637 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6638 | echo "configure:6639: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6639 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 6640 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6641 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6642 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6643 | #line 6644 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6644 | #include "confdefs.h" |
| 6645 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6646 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6647 | #include <assert.h> |
| 6648 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6649 | /* We use char because int might match the return type of a gcc2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6650 | builtin and then its argument prototype would still apply. */ |
| 6651 | char $ac_func(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6652 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6653 | int main() { |
| 6654 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6655 | /* The GNU C library defines this for functions which it implements |
| 6656 | to always fail with ENOSYS. Some functions are actually named |
| 6657 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6658 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6659 | choke me |
| 6660 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6661 | $ac_func(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6662 | #endif |
| 6663 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6664 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 6665 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6666 | if { (eval echo configure:6667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6667 | rm -rf conftest* |
| 6668 | eval "ac_cv_func_$ac_func=yes" |
| 6669 | else |
| 6670 | echo "configure: failed program was:" >&5 |
| 6671 | cat conftest.$ac_ext >&5 |
| 6672 | rm -rf conftest* |
| 6673 | eval "ac_cv_func_$ac_func=no" |
| 6674 | fi |
| 6675 | rm -f conftest* |
| 6676 | fi |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6677 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6678 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 6679 | echo "$ac_t""yes" 1>&6 |
| 6680 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 6681 | cat >> confdefs.h <<EOF |
| 6682 | #define $ac_tr_func 1 |
| 6683 | EOF |
| 6684 | |
| 6685 | else |
| 6686 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6687 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6688 | done |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6689 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6690 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6691 | fi |
| 6692 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6693 | |
| 6694 | |
| 6695 | |
| 6696 | |
| 6697 | |
| 6698 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6699 | # checks for system services |
| 6700 | # (none yet) |
| 6701 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6702 | # Linux requires this for correct f.p. operations |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6703 | echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6704 | echo "configure:6705: checking for __fpu_control" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6705 | if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then |
| 6706 | echo $ac_n "(cached) $ac_c" 1>&6 |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6707 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6708 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6709 | #line 6710 "configure" |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6710 | #include "confdefs.h" |
| 6711 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6712 | which can conflict with char __fpu_control(); below. */ |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6713 | #include <assert.h> |
| 6714 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6715 | /* We use char because int might match the return type of a gcc2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6716 | builtin and then its argument prototype would still apply. */ |
| 6717 | char __fpu_control(); |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6718 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6719 | int main() { |
| 6720 | |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6721 | /* The GNU C library defines this for functions which it implements |
| 6722 | to always fail with ENOSYS. Some functions are actually named |
| 6723 | something starting with __ and the normal name is an alias. */ |
| 6724 | #if defined (__stub___fpu_control) || defined (__stub_____fpu_control) |
| 6725 | choke me |
| 6726 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6727 | __fpu_control(); |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6728 | #endif |
| 6729 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6730 | ; return 0; } |
| 6731 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6732 | if { (eval echo configure:6733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6733 | rm -rf conftest* |
| 6734 | eval "ac_cv_func___fpu_control=yes" |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6735 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6736 | echo "configure: failed program was:" >&5 |
| 6737 | cat conftest.$ac_ext >&5 |
| 6738 | rm -rf conftest* |
| 6739 | eval "ac_cv_func___fpu_control=no" |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6740 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6741 | rm -f conftest* |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6742 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6743 | |
| 6744 | if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then |
| 6745 | echo "$ac_t""yes" 1>&6 |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6746 | : |
| 6747 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6748 | echo "$ac_t""no" 1>&6 |
| 6749 | echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6750 | echo "configure:6751: checking for __fpu_control in -lieee" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6751 | ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'` |
| 6752 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 6753 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6754 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6755 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6756 | LIBS="-lieee $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6757 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6758 | #line 6759 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6759 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6760 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6761 | /* We use char because int might match the return type of a gcc2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6762 | builtin and then its argument prototype would still apply. */ |
| 6763 | char __fpu_control(); |
| 6764 | |
| 6765 | int main() { |
| 6766 | __fpu_control() |
| 6767 | ; return 0; } |
| 6768 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6769 | if { (eval echo configure:6770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6770 | rm -rf conftest* |
| 6771 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6772 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6773 | echo "configure: failed program was:" >&5 |
| 6774 | cat conftest.$ac_ext >&5 |
| 6775 | rm -rf conftest* |
| 6776 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6777 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6778 | rm -f conftest* |
| 6779 | LIBS="$ac_save_LIBS" |
| 6780 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6781 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6782 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 6783 | echo "$ac_t""yes" 1>&6 |
| 6784 | ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 6785 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
| 6786 | cat >> confdefs.h <<EOF |
| 6787 | #define $ac_tr_lib 1 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6788 | EOF |
| 6789 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6790 | LIBS="-lieee $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6791 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6792 | else |
| 6793 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6794 | fi |
| 6795 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6796 | |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6797 | fi |
| 6798 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6799 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6800 | # Check for --with-fpectl |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6801 | echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6802 | echo "configure:6803: checking for --with-fpectl" >&5 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6803 | # Check whether --with-fpectl or --without-fpectl was given. |
| 6804 | if test "${with_fpectl+set}" = set; then |
| 6805 | withval="$with_fpectl" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6806 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6807 | if test "$withval" != no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6808 | then cat >> confdefs.h <<\EOF |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6809 | #define WANT_SIGFPE_HANDLER 1 |
| 6810 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6811 | echo "$ac_t""yes" 1>&6 |
| 6812 | else echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6813 | fi |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6814 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6815 | echo "$ac_t""no" 1>&6 |
| 6816 | fi |
| 6817 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6818 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6819 | # check for --with-libm=... |
| 6820 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 6821 | case $ac_sys_system in |
Guido van Rossum | 3dc0a51 | 2000-10-05 18:00:06 +0000 | [diff] [blame] | 6822 | Darwin) ;; |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 6823 | BeOS) ;; |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 6824 | *) LIBM=-lm |
| 6825 | esac |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6826 | echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6827 | echo "configure:6828: checking for --with-libm=STRING" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6828 | # Check whether --with-libm or --without-libm was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6829 | if test "${with_libm+set}" = set; then |
| 6830 | withval="$with_libm" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6831 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6832 | if test "$withval" = no |
| 6833 | then LIBM= |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6834 | echo "$ac_t""force LIBM empty" 1>&6 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6835 | elif test "$withval" != yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6836 | then LIBM=$withval |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6837 | echo "$ac_t""set LIBM=\"$withval\"" 1>&6 |
| 6838 | 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] | 6839 | fi |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6840 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6841 | echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6 |
| 6842 | fi |
| 6843 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6844 | |
| 6845 | # check for --with-libc=... |
| 6846 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6847 | echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6848 | echo "configure:6849: checking for --with-libc=STRING" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6849 | # Check whether --with-libc or --without-libc was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6850 | if test "${with_libc+set}" = set; then |
| 6851 | withval="$with_libc" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6852 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6853 | if test "$withval" = no |
| 6854 | then LIBC= |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6855 | echo "$ac_t""force LIBC empty" 1>&6 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6856 | elif test "$withval" != yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6857 | then LIBC=$withval |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6858 | echo "$ac_t""set LIBC=\"$withval\"" 1>&6 |
| 6859 | 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] | 6860 | fi |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6861 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6862 | echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6 |
| 6863 | fi |
| 6864 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6865 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6866 | # check for hypot() in math library |
| 6867 | LIBS_SAVE=$LIBS |
| 6868 | LIBS="$LIBS $LIBM" |
| 6869 | for ac_func in hypot |
| 6870 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6871 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6872 | echo "configure:6873: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6873 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 6874 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6875 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6876 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6877 | #line 6878 "configure" |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6878 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6879 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6880 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6881 | #include <assert.h> |
| 6882 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6883 | /* We use char because int might match the return type of a gcc2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6884 | builtin and then its argument prototype would still apply. */ |
| 6885 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6886 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6887 | int main() { |
| 6888 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6889 | /* The GNU C library defines this for functions which it implements |
| 6890 | to always fail with ENOSYS. Some functions are actually named |
| 6891 | something starting with __ and the normal name is an alias. */ |
| 6892 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 6893 | choke me |
| 6894 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6895 | $ac_func(); |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6896 | #endif |
| 6897 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6898 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 6899 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6900 | if { (eval echo configure:6901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6901 | rm -rf conftest* |
| 6902 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6903 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6904 | echo "configure: failed program was:" >&5 |
| 6905 | cat conftest.$ac_ext >&5 |
| 6906 | rm -rf conftest* |
| 6907 | eval "ac_cv_func_$ac_func=no" |
| 6908 | fi |
| 6909 | rm -f conftest* |
| 6910 | fi |
| 6911 | |
| 6912 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 6913 | echo "$ac_t""yes" 1>&6 |
| 6914 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 6915 | cat >> confdefs.h <<EOF |
| 6916 | #define $ac_tr_func 1 |
| 6917 | EOF |
| 6918 | |
| 6919 | else |
| 6920 | echo "$ac_t""no" 1>&6 |
| 6921 | LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6922 | fi |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6923 | done |
| 6924 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6925 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6926 | LIBS=$LIBS_SAVE |
| 6927 | |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6928 | # check whether malloc(0) returns NULL or not |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6929 | echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6930 | echo "configure:6931: checking what malloc(0) returns" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6931 | if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then |
| 6932 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6933 | else |
| 6934 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 6935 | ac_cv_malloc_zero=nonnull |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6936 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6937 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6938 | #line 6939 "configure" |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6939 | #include "confdefs.h" |
| 6940 | #include <stdio.h> |
| 6941 | #ifdef HAVE_STDLIB |
| 6942 | #include <stdlib.h> |
| 6943 | #else |
| 6944 | char *malloc(), *realloc(); |
| 6945 | int *free(); |
| 6946 | #endif |
| 6947 | main() { |
| 6948 | char *p; |
| 6949 | p = malloc(0); |
| 6950 | if (p == NULL) exit(1); |
| 6951 | p = realloc(p, 0); |
| 6952 | if (p == NULL) exit(1); |
| 6953 | free(p); |
| 6954 | exit(0); |
| 6955 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6956 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6957 | if { (eval echo configure:6958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6958 | then |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6959 | ac_cv_malloc_zero=nonnull |
| 6960 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6961 | echo "configure: failed program was:" >&5 |
| 6962 | cat conftest.$ac_ext >&5 |
| 6963 | rm -fr conftest* |
| 6964 | ac_cv_malloc_zero=null |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6965 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6966 | rm -fr conftest* |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6967 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6968 | |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6969 | fi |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 6970 | # XXX arm cross-compile? |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6971 | echo "$ac_t""$ac_cv_malloc_zero" 1>&6 |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6972 | if test "$ac_cv_malloc_zero" = null |
| 6973 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6974 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6975 | #define MALLOC_ZERO_RETURNS_NULL 1 |
| 6976 | EOF |
| 6977 | |
| 6978 | fi |
| 6979 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6980 | # check for wchar.h |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6981 | ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'` |
| 6982 | echo $ac_n "checking for wchar.h""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6983 | echo "configure:6984: checking for wchar.h" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6984 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 6985 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6986 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6987 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6988 | #line 6989 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6989 | #include "confdefs.h" |
| 6990 | #include <wchar.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6991 | EOF |
| 6992 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 6993 | { (eval echo configure:6994: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6994 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 6995 | if test -z "$ac_err"; then |
| 6996 | rm -rf conftest* |
| 6997 | eval "ac_cv_header_$ac_safe=yes" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6998 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6999 | echo "$ac_err" >&5 |
| 7000 | echo "configure: failed program was:" >&5 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7001 | cat conftest.$ac_ext >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7002 | rm -rf conftest* |
| 7003 | eval "ac_cv_header_$ac_safe=no" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7004 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7005 | rm -f conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7006 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7007 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 7008 | echo "$ac_t""yes" 1>&6 |
| 7009 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7010 | #define HAVE_WCHAR_H 1 |
| 7011 | EOF |
| 7012 | wchar_h="yes" |
| 7013 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7014 | echo "$ac_t""no" 1>&6 |
| 7015 | wchar_h="no" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7016 | |
| 7017 | fi |
| 7018 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7019 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7020 | # determine wchar_t size |
| 7021 | if test "$wchar_h" = yes |
| 7022 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7023 | echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 7024 | echo "configure:7025: checking size of wchar_t" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7025 | if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then |
| 7026 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7027 | else |
| 7028 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7029 | ac_cv_sizeof_wchar_t=4 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7030 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7031 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 7032 | #line 7033 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7033 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7034 | #include <stdio.h> |
| 7035 | main() |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7036 | { |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7037 | FILE *f=fopen("conftestval", "w"); |
| 7038 | if (!f) exit(1); |
| 7039 | fprintf(f, "%d\n", sizeof(wchar_t)); |
| 7040 | exit(0); |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7041 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7042 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 7043 | if { (eval echo configure:7044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7044 | then |
| 7045 | ac_cv_sizeof_wchar_t=`cat conftestval` |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7046 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7047 | echo "configure: failed program was:" >&5 |
| 7048 | cat conftest.$ac_ext >&5 |
| 7049 | rm -fr conftest* |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7050 | ac_cv_sizeof_wchar_t=0 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7051 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7052 | rm -fr conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7053 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7054 | |
| 7055 | fi |
| 7056 | echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 |
| 7057 | cat >> confdefs.h <<EOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7058 | #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t |
| 7059 | EOF |
| 7060 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7061 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7062 | fi |
| 7063 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7064 | echo $ac_n "checking what type to use for unicode""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 7065 | echo "configure:7066: checking what type to use for unicode" >&5 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7066 | # Check whether --enable-unicode or --disable-unicode was given. |
| 7067 | if test "${enable_unicode+set}" = set; then |
| 7068 | enableval="$enable_unicode" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7069 | : |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7070 | else |
| 7071 | enable_unicode=yes |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7072 | fi |
| 7073 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7074 | |
| 7075 | if test $enable_unicode = yes |
| 7076 | then |
Martin v. Löwis | fd91779 | 2001-06-27 20:22:04 +0000 | [diff] [blame] | 7077 | # Without any arguments, Py_UNICODE defaults to two-byte mode |
| 7078 | enable_unicode="ucs2" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7079 | fi |
| 7080 | |
| 7081 | case "$enable_unicode" in |
| 7082 | ucs2) unicode_size="2" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7083 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7084 | #define Py_UNICODE_SIZE 2 |
| 7085 | EOF |
| 7086 | |
| 7087 | ;; |
| 7088 | ucs4) unicode_size="4" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7089 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7090 | #define Py_UNICODE_SIZE 4 |
| 7091 | EOF |
| 7092 | |
| 7093 | ;; |
| 7094 | esac |
| 7095 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7096 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7097 | if test "$enable_unicode" = "no" |
| 7098 | then |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 7099 | UNICODE_OBJS="" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7100 | echo "$ac_t""not used" 1>&6 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7101 | else |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 7102 | UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7103 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7104 | #define Py_USING_UNICODE 1 |
| 7105 | EOF |
| 7106 | |
| 7107 | if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" |
| 7108 | then |
| 7109 | PY_UNICODE_TYPE="wchar_t" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7110 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7111 | #define HAVE_USABLE_WCHAR_T 1 |
| 7112 | EOF |
| 7113 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7114 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7115 | #define PY_UNICODE_TYPE wchar_t |
| 7116 | EOF |
| 7117 | |
| 7118 | elif test "$ac_cv_sizeof_short" = "$unicode_size" |
| 7119 | then |
| 7120 | PY_UNICODE_TYPE="unsigned short" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7121 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7122 | #define PY_UNICODE_TYPE unsigned short |
| 7123 | EOF |
| 7124 | |
| 7125 | elif test "$ac_cv_sizeof_long" = "$unicode_size" |
| 7126 | then |
| 7127 | PY_UNICODE_TYPE="unsigned long" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7128 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7129 | #define PY_UNICODE_TYPE unsigned long |
| 7130 | EOF |
| 7131 | |
| 7132 | else |
| 7133 | PY_UNICODE_TYPE="no type found" |
| 7134 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7135 | echo "$ac_t""$PY_UNICODE_TYPE" 1>&6 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7136 | fi |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7137 | |
| 7138 | # check for endianness |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7139 | echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 7140 | echo "configure:7141: checking whether byte ordering is bigendian" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7141 | if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then |
| 7142 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7143 | else |
| 7144 | ac_cv_c_bigendian=unknown |
| 7145 | # See if sys/param.h defines the BYTE_ORDER macro. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7146 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 7147 | #line 7148 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7148 | #include "confdefs.h" |
| 7149 | #include <sys/types.h> |
| 7150 | #include <sys/param.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7151 | int main() { |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7152 | |
| 7153 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN |
| 7154 | bogus endian macros |
| 7155 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7156 | ; return 0; } |
| 7157 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 7158 | if { (eval echo configure:7159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7159 | rm -rf conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7160 | # It does; now see whether it defined to BIG_ENDIAN or not. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7161 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 7162 | #line 7163 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7163 | #include "confdefs.h" |
| 7164 | #include <sys/types.h> |
| 7165 | #include <sys/param.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7166 | int main() { |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7167 | |
| 7168 | #if BYTE_ORDER != BIG_ENDIAN |
| 7169 | not big endian |
| 7170 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7171 | ; return 0; } |
| 7172 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 7173 | if { (eval echo configure:7174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7174 | rm -rf conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7175 | ac_cv_c_bigendian=yes |
| 7176 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7177 | echo "configure: failed program was:" >&5 |
| 7178 | cat conftest.$ac_ext >&5 |
| 7179 | rm -rf conftest* |
| 7180 | ac_cv_c_bigendian=no |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7181 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7182 | rm -f conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7183 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7184 | echo "configure: failed program was:" >&5 |
| 7185 | cat conftest.$ac_ext >&5 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7186 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7187 | rm -f conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7188 | if test $ac_cv_c_bigendian = unknown; then |
| 7189 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7190 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7191 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7192 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 7193 | #line 7194 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7194 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7195 | main () { |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7196 | /* Are we little or big endian? From Harbison&Steele. */ |
| 7197 | union |
| 7198 | { |
| 7199 | long l; |
| 7200 | char c[sizeof (long)]; |
| 7201 | } u; |
| 7202 | u.l = 1; |
| 7203 | exit (u.c[sizeof (long) - 1] == 1); |
| 7204 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7205 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 7206 | if { (eval echo configure:7207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7207 | then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7208 | ac_cv_c_bigendian=no |
| 7209 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7210 | echo "configure: failed program was:" >&5 |
| 7211 | cat conftest.$ac_ext >&5 |
| 7212 | rm -fr conftest* |
| 7213 | ac_cv_c_bigendian=yes |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7214 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7215 | rm -fr conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7216 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7217 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7218 | fi |
| 7219 | fi |
| 7220 | |
| 7221 | echo "$ac_t""$ac_cv_c_bigendian" 1>&6 |
| 7222 | if test $ac_cv_c_bigendian = yes; then |
| 7223 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7224 | #define WORDS_BIGENDIAN 1 |
| 7225 | EOF |
| 7226 | |
| 7227 | fi |
| 7228 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7229 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7230 | # Check whether right shifting a negative integer extends the sign bit |
| 7231 | # or fills with zeros (like the Cray J90, according to Tim Peters). |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7232 | echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 7233 | echo "configure:7234: checking whether right shift extends the sign bit" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7234 | if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then |
| 7235 | echo $ac_n "(cached) $ac_c" 1>&6 |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 7236 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7237 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7238 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 7239 | ac_cv_rshift_extends_sign=yes |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7240 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7241 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 7242 | #line 7243 "configure" |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7243 | #include "confdefs.h" |
| 7244 | |
| 7245 | int main() |
| 7246 | { |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 7247 | exit(((-1)>>3 == -1) ? 0 : 1); |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7248 | } |
| 7249 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7250 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 7251 | if { (eval echo configure:7252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7252 | then |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 7253 | ac_cv_rshift_extends_sign=yes |
| 7254 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7255 | echo "configure: failed program was:" >&5 |
| 7256 | cat conftest.$ac_ext >&5 |
| 7257 | rm -fr conftest* |
| 7258 | ac_cv_rshift_extends_sign=no |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 7259 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7260 | rm -fr conftest* |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 7261 | fi |
| 7262 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7263 | fi |
| 7264 | |
| 7265 | echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6 |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 7266 | if test "$ac_cv_rshift_extends_sign" = no |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7267 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7268 | cat >> confdefs.h <<\EOF |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7269 | #define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1 |
| 7270 | EOF |
| 7271 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7272 | fi |
| 7273 | |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7274 | # check for getc_unlocked and related locking functions |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7275 | echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 7276 | echo "configure:7277: checking for getc_unlocked() and friends" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7277 | if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then |
| 7278 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7279 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7280 | |
| 7281 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 7282 | #line 7283 "configure" |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7283 | #include "confdefs.h" |
| 7284 | #include <stdio.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7285 | int main() { |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7286 | |
| 7287 | FILE *f = fopen("/dev/null", "r"); |
| 7288 | flockfile(f); |
| 7289 | getc_unlocked(f); |
| 7290 | funlockfile(f); |
| 7291 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7292 | ; return 0; } |
| 7293 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 7294 | if { (eval echo configure:7295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7295 | rm -rf conftest* |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7296 | ac_cv_have_getc_unlocked=yes |
| 7297 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7298 | echo "configure: failed program was:" >&5 |
| 7299 | cat conftest.$ac_ext >&5 |
| 7300 | rm -rf conftest* |
| 7301 | ac_cv_have_getc_unlocked=no |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7302 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7303 | rm -f conftest* |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7304 | fi |
| 7305 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7306 | echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6 |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7307 | if test "$ac_cv_have_getc_unlocked" = yes |
| 7308 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7309 | cat >> confdefs.h <<\EOF |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7310 | #define HAVE_GETC_UNLOCKED 1 |
| 7311 | EOF |
| 7312 | |
| 7313 | fi |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7314 | |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7315 | # check for readline 4.0 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7316 | echo $ac_n "checking for rl_pre_input_hook in -lreadline""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 7317 | echo "configure:7318: checking for rl_pre_input_hook in -lreadline" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7318 | ac_lib_var=`echo readline'_'rl_pre_input_hook | sed 'y%./+-%__p_%'` |
| 7319 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 7320 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7321 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7322 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7323 | LIBS="-lreadline -ltermcap $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7324 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 7325 | #line 7326 "configure" |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7326 | #include "confdefs.h" |
| 7327 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 7328 | /* We use char because int might match the return type of a gcc2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7329 | builtin and then its argument prototype would still apply. */ |
| 7330 | char rl_pre_input_hook(); |
| 7331 | |
| 7332 | int main() { |
| 7333 | rl_pre_input_hook() |
| 7334 | ; return 0; } |
| 7335 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 7336 | if { (eval echo configure:7337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7337 | rm -rf conftest* |
| 7338 | eval "ac_cv_lib_$ac_lib_var=yes" |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7339 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7340 | echo "configure: failed program was:" >&5 |
| 7341 | cat conftest.$ac_ext >&5 |
| 7342 | rm -rf conftest* |
| 7343 | eval "ac_cv_lib_$ac_lib_var=no" |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7344 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7345 | rm -f conftest* |
| 7346 | LIBS="$ac_save_LIBS" |
| 7347 | |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7348 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7349 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 7350 | echo "$ac_t""yes" 1>&6 |
| 7351 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7352 | #define HAVE_RL_PRE_INPUT_HOOK 1 |
| 7353 | EOF |
| 7354 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7355 | else |
| 7356 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7357 | fi |
| 7358 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7359 | |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7360 | # check for readline 4.2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7361 | echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 7362 | echo "configure:7363: checking for rl_completion_matches in -lreadline" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7363 | ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'` |
| 7364 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 7365 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7366 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7367 | ac_save_LIBS="$LIBS" |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7368 | LIBS="-lreadline -ltermcap $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7369 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 7370 | #line 7371 "configure" |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7371 | #include "confdefs.h" |
| 7372 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 7373 | /* We use char because int might match the return type of a gcc2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7374 | builtin and then its argument prototype would still apply. */ |
| 7375 | char rl_completion_matches(); |
| 7376 | |
| 7377 | int main() { |
| 7378 | rl_completion_matches() |
| 7379 | ; return 0; } |
| 7380 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 7381 | if { (eval echo configure:7382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7382 | rm -rf conftest* |
| 7383 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7384 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7385 | echo "configure: failed program was:" >&5 |
| 7386 | cat conftest.$ac_ext >&5 |
| 7387 | rm -rf conftest* |
| 7388 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7389 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7390 | rm -f conftest* |
| 7391 | LIBS="$ac_save_LIBS" |
| 7392 | |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7393 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7394 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 7395 | echo "$ac_t""yes" 1>&6 |
| 7396 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7397 | #define HAVE_RL_COMPLETION_MATCHES 1 |
| 7398 | EOF |
| 7399 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7400 | else |
| 7401 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7402 | fi |
| 7403 | |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7404 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7405 | echo $ac_n "checking for broken nice()""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 7406 | echo "configure:7407: checking for broken nice()" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7407 | if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then |
| 7408 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 7409 | else |
| 7410 | |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7411 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 7412 | ac_cv_broken_nice=no |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7413 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7414 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 7415 | #line 7416 "configure" |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7416 | #include "confdefs.h" |
| 7417 | |
| 7418 | int main() |
| 7419 | { |
| 7420 | int val1 = nice(1); |
| 7421 | if (val1 != -1 && val1 == nice(2)) |
| 7422 | exit(0); |
| 7423 | exit(1); |
| 7424 | } |
| 7425 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7426 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 7427 | if { (eval echo configure:7428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7428 | then |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7429 | ac_cv_broken_nice=yes |
| 7430 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7431 | echo "configure: failed program was:" >&5 |
| 7432 | cat conftest.$ac_ext >&5 |
| 7433 | rm -fr conftest* |
| 7434 | ac_cv_broken_nice=no |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7435 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7436 | rm -fr conftest* |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7437 | fi |
| 7438 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7439 | fi |
| 7440 | |
| 7441 | echo "$ac_t""$ac_cv_broken_nice" 1>&6 |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7442 | if test "$ac_cv_broken_nice" = yes |
| 7443 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7444 | cat >> confdefs.h <<\EOF |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7445 | #define HAVE_BROKEN_NICE 1 |
| 7446 | EOF |
| 7447 | |
| 7448 | fi |
| 7449 | |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7450 | # On HP/UX 11.0, mvwdelch is a block with a return statement |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7451 | echo $ac_n "checking whether mvwdelch is an expression""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 7452 | echo "configure:7453: checking whether mvwdelch is an expression" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7453 | if eval "test \"`echo '$''{'ac_cv_mvwdelch_is_expression'+set}'`\" = set"; then |
| 7454 | echo $ac_n "(cached) $ac_c" 1>&6 |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7455 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7456 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 7457 | #line 7458 "configure" |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7458 | #include "confdefs.h" |
| 7459 | #include <curses.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7460 | int main() { |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7461 | |
| 7462 | int rtn; |
| 7463 | rtn = mvwdelch(0,0,0); |
| 7464 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7465 | ; return 0; } |
| 7466 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 7467 | if { (eval echo configure:7468: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7468 | rm -rf conftest* |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7469 | ac_cv_mvwdelch_is_expression=yes |
| 7470 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7471 | echo "configure: failed program was:" >&5 |
| 7472 | cat conftest.$ac_ext >&5 |
| 7473 | rm -rf conftest* |
| 7474 | ac_cv_mvwdelch_is_expression=no |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7475 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7476 | rm -f conftest* |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7477 | fi |
| 7478 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7479 | echo "$ac_t""$ac_cv_mvwdelch_is_expression" 1>&6 |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7480 | |
| 7481 | if test "$ac_cv_mvwdelch_is_expression" = yes |
| 7482 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7483 | cat >> confdefs.h <<\EOF |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7484 | #define MVWDELCH_IS_EXPRESSION 1 |
| 7485 | EOF |
| 7486 | |
| 7487 | fi |
| 7488 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7489 | echo $ac_n "checking whether WINDOW has _flags""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 7490 | echo "configure:7491: checking whether WINDOW has _flags" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7491 | if eval "test \"`echo '$''{'ac_cv_window_has_flags'+set}'`\" = set"; then |
| 7492 | echo $ac_n "(cached) $ac_c" 1>&6 |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7493 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7494 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 7495 | #line 7496 "configure" |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7496 | #include "confdefs.h" |
| 7497 | #include <curses.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7498 | int main() { |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7499 | |
| 7500 | WINDOW *w; |
| 7501 | w->_flags = 0; |
| 7502 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7503 | ; return 0; } |
| 7504 | EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 7505 | if { (eval echo configure:7506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7506 | rm -rf conftest* |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7507 | ac_cv_window_has_flags=yes |
| 7508 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7509 | echo "configure: failed program was:" >&5 |
| 7510 | cat conftest.$ac_ext >&5 |
| 7511 | rm -rf conftest* |
| 7512 | ac_cv_window_has_flags=no |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7513 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7514 | rm -f conftest* |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7515 | fi |
| 7516 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7517 | echo "$ac_t""$ac_cv_window_has_flags" 1>&6 |
| 7518 | |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7519 | |
| 7520 | if test "$ac_cv_window_has_flags" = yes |
| 7521 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7522 | cat >> confdefs.h <<\EOF |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7523 | #define WINDOW_HAS_FLAGS 1 |
| 7524 | EOF |
| 7525 | |
| 7526 | fi |
| 7527 | |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7528 | # THIS MUST BE LAST, IT CAN BREAK OTHER TESTS! |
| 7529 | # Add sys/socket.h to confdefs.h |
| 7530 | cat >> confdefs.h <<\EOF |
| 7531 | #ifdef HAVE_SYS_SOCKET_H |
| 7532 | #include <sys/socket.h> |
| 7533 | #endif |
| 7534 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7535 | echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 7536 | echo "configure:7537: checking for socklen_t" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7537 | if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then |
| 7538 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7539 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7540 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 7541 | #line 7542 "configure" |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7542 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7543 | #include <sys/types.h> |
| 7544 | #if STDC_HEADERS |
| 7545 | #include <stdlib.h> |
| 7546 | #include <stddef.h> |
| 7547 | #endif |
| 7548 | EOF |
| 7549 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 7550 | egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
| 7551 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7552 | ac_cv_type_socklen_t=yes |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7553 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7554 | rm -rf conftest* |
| 7555 | ac_cv_type_socklen_t=no |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7556 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7557 | rm -f conftest* |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7558 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7559 | fi |
| 7560 | echo "$ac_t""$ac_cv_type_socklen_t" 1>&6 |
| 7561 | if test $ac_cv_type_socklen_t = no; then |
| 7562 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7563 | #define socklen_t int |
| 7564 | EOF |
| 7565 | |
| 7566 | fi |
| 7567 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7568 | |
Neil Schemenauer | f25cf6c | 2001-03-04 06:39:33 +0000 | [diff] [blame] | 7569 | # Add Python/ prefix to LIBOBJS |
| 7570 | libobjs=$LIBOBJS |
| 7571 | LIBOBJS= |
| 7572 | for obj in $libobjs; do |
| 7573 | LIBOBJS="$LIBOBJS Python/$obj" |
| 7574 | done |
| 7575 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7576 | #AC_MSG_CHECKING(for Modules/Setup) |
| 7577 | #if test ! -f Modules/Setup ; then |
| 7578 | # if test ! -d Modules ; then |
| 7579 | # mkdir Modules |
| 7580 | # fi |
| 7581 | # cp "$srcdir/Modules/Setup.dist" Modules/Setup |
| 7582 | # AC_MSG_RESULT(creating) |
| 7583 | #else |
| 7584 | # AC_MSG_RESULT(already exists) |
| 7585 | #fi |
| 7586 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7587 | |
| 7588 | |
Martin v. Löwis | 06f15bb | 2001-12-02 13:02:32 +0000 | [diff] [blame] | 7589 | for h in `(cd $srcdir;echo Python/thread_*.h)` |
| 7590 | do |
| 7591 | THREADHEADERS="$THREADHEADERS \$(srcdir)/$h" |
| 7592 | done |
| 7593 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7594 | |
Neil Schemenauer | acbf9ef | 2001-02-27 02:15:14 +0000 | [diff] [blame] | 7595 | SRCDIRS="Parser Grammar Objects Python Modules" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7596 | echo $ac_n "checking for build directories""... $ac_c" 1>&6 |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame^] | 7597 | echo "configure:7598: checking for build directories" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7598 | for dir in $SRCDIRS; do |
| 7599 | if test ! -d $dir; then |
| 7600 | mkdir $dir |
Guido van Rossum | 262cf20 | 2000-11-02 19:33:53 +0000 | [diff] [blame] | 7601 | fi |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7602 | done |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7603 | echo "$ac_t""done" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 7604 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7605 | # generate output files |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7606 | trap '' 1 2 15 |
| 7607 | cat > confcache <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7608 | # This file is a shell script that caches the results of configure |
| 7609 | # tests run on this system so they can be shared between configure |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7610 | # scripts and configure runs. It is not useful on other systems. |
| 7611 | # If it contains results you don't want to keep, you may remove or edit it. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7612 | # |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7613 | # By default, configure uses ./config.cache as the cache file, |
| 7614 | # creating it if it does not exist already. You can give configure |
| 7615 | # the --cache-file=FILE option to use a different cache file; that is |
| 7616 | # what configure does when it calls configure scripts in |
| 7617 | # subdirectories, so they share the cache. |
| 7618 | # Giving --cache-file=/dev/null disables caching, for debugging configure. |
| 7619 | # config.status only pays attention to the cache file if you give it the |
| 7620 | # --recheck option to rerun configure. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7621 | # |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7622 | EOF |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7623 | # The following way of writing the cache mishandles newlines in values, |
| 7624 | # but we know of no workaround that is simple, portable, and efficient. |
| 7625 | # So, don't put newlines in cache variables' values. |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7626 | # Ultrix sh set writes to stderr and can't be redirected directly, |
| 7627 | # and sets the high bit in the cache file unless we assign to the vars. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7628 | (set) 2>&1 | |
| 7629 | case `(ac_space=' '; set | grep ac_space) 2>&1` in |
| 7630 | *ac_space=\ *) |
| 7631 | # `set' does not quote correctly, so add quotes (double-quote substitution |
| 7632 | # turns \\\\ into \\, and sed turns \\ into \). |
| 7633 | sed -n \ |
| 7634 | -e "s/'/'\\\\''/g" \ |
| 7635 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" |
| 7636 | ;; |
| 7637 | *) |
| 7638 | # `set' quotes correctly as required by POSIX, so do not add quotes. |
| 7639 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' |
| 7640 | ;; |
| 7641 | esac >> confcache |
| 7642 | if cmp -s $cache_file confcache; then |
| 7643 | : |
| 7644 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7645 | if test -w $cache_file; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7646 | echo "updating cache $cache_file" |
| 7647 | cat confcache > $cache_file |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7648 | else |
| 7649 | echo "not updating unwritable cache $cache_file" |
| 7650 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7651 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7652 | rm -f confcache |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7653 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7654 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 |
| 7655 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7656 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
| 7657 | # Let make expand exec_prefix. |
| 7658 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7659 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7660 | # Any assignment to VPATH causes Sun make to only execute |
| 7661 | # the first set of double-colon rules, so remove it if not needed. |
| 7662 | # If there is a colon in the path, we need to keep it. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7663 | if test "x$srcdir" = x.; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7664 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7665 | fi |
| 7666 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7667 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 |
| 7668 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7669 | DEFS=-DHAVE_CONFIG_H |
| 7670 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7671 | # Without the "./", some shells look in PATH for config.status. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7672 | : ${CONFIG_STATUS=./config.status} |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7673 | |
| 7674 | echo creating $CONFIG_STATUS |
| 7675 | rm -f $CONFIG_STATUS |
| 7676 | cat > $CONFIG_STATUS <<EOF |
| 7677 | #! /bin/sh |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7678 | # Generated automatically by configure. |
| 7679 | # Run this file to recreate the current configuration. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7680 | # This directory was configured as follows, |
| 7681 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: |
| 7682 | # |
| 7683 | # $0 $ac_configure_args |
| 7684 | # |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7685 | # Compiler output produced by configure, useful for debugging |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7686 | # configure, is in ./config.log if it exists. |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7687 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7688 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" |
| 7689 | for ac_option |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7690 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7691 | case "\$ac_option" in |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7692 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7693 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" |
| 7694 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; |
| 7695 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) |
| 7696 | echo "$CONFIG_STATUS generated by autoconf version 2.13" |
| 7697 | exit 0 ;; |
| 7698 | -help | --help | --hel | --he | --h) |
| 7699 | echo "\$ac_cs_usage"; exit 0 ;; |
| 7700 | *) echo "\$ac_cs_usage"; exit 1 ;; |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7701 | esac |
| 7702 | done |
| 7703 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7704 | ac_given_srcdir=$srcdir |
| 7705 | ac_given_INSTALL="$INSTALL" |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7706 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7707 | trap 'rm -fr `echo "Makefile.pre Modules/Setup.config pyconfig.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7708 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7709 | cat >> $CONFIG_STATUS <<EOF |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7710 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7711 | # Protect against being on the right side of a sed subst in config.status. |
| 7712 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; |
| 7713 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF |
| 7714 | $ac_vpsub |
| 7715 | $extrasub |
| 7716 | s%@SHELL@%$SHELL%g |
| 7717 | s%@CFLAGS@%$CFLAGS%g |
| 7718 | s%@CPPFLAGS@%$CPPFLAGS%g |
| 7719 | s%@CXXFLAGS@%$CXXFLAGS%g |
| 7720 | s%@FFLAGS@%$FFLAGS%g |
| 7721 | s%@DEFS@%$DEFS%g |
| 7722 | s%@LDFLAGS@%$LDFLAGS%g |
| 7723 | s%@LIBS@%$LIBS%g |
| 7724 | s%@exec_prefix@%$exec_prefix%g |
| 7725 | s%@prefix@%$prefix%g |
| 7726 | s%@program_transform_name@%$program_transform_name%g |
| 7727 | s%@bindir@%$bindir%g |
| 7728 | s%@sbindir@%$sbindir%g |
| 7729 | s%@libexecdir@%$libexecdir%g |
| 7730 | s%@datadir@%$datadir%g |
| 7731 | s%@sysconfdir@%$sysconfdir%g |
| 7732 | s%@sharedstatedir@%$sharedstatedir%g |
| 7733 | s%@localstatedir@%$localstatedir%g |
| 7734 | s%@libdir@%$libdir%g |
| 7735 | s%@includedir@%$includedir%g |
| 7736 | s%@oldincludedir@%$oldincludedir%g |
| 7737 | s%@infodir@%$infodir%g |
| 7738 | s%@mandir@%$mandir%g |
| 7739 | s%@VERSION@%$VERSION%g |
| 7740 | s%@CONFIG_ARGS@%$CONFIG_ARGS%g |
| 7741 | s%@PYTHONFRAMEWORK@%$PYTHONFRAMEWORK%g |
| 7742 | s%@PYTHONFRAMEWORKDIR@%$PYTHONFRAMEWORKDIR%g |
| 7743 | s%@PYTHONFRAMEWORKPREFIX@%$PYTHONFRAMEWORKPREFIX%g |
| 7744 | s%@PYTHONFRAMEWORKINSTALLDIR@%$PYTHONFRAMEWORKINSTALLDIR%g |
| 7745 | s%@MACHDEP@%$MACHDEP%g |
| 7746 | s%@SGI_ABI@%$SGI_ABI%g |
| 7747 | s%@CXX@%$CXX%g |
| 7748 | s%@MAINOBJ@%$MAINOBJ%g |
| 7749 | s%@CC@%$CC%g |
| 7750 | s%@CPP@%$CPP%g |
| 7751 | s%@EXEEXT@%$EXEEXT%g |
| 7752 | s%@BUILDEXEEXT@%$BUILDEXEEXT%g |
| 7753 | s%@LIBRARY@%$LIBRARY%g |
| 7754 | s%@LDLIBRARY@%$LDLIBRARY%g |
| 7755 | s%@DLLLIBRARY@%$DLLLIBRARY%g |
| 7756 | s%@BLDLIBRARY@%$BLDLIBRARY%g |
| 7757 | s%@LDLIBRARYDIR@%$LDLIBRARYDIR%g |
| 7758 | s%@LINKCC@%$LINKCC%g |
| 7759 | s%@RANLIB@%$RANLIB%g |
| 7760 | s%@AR@%$AR%g |
| 7761 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
| 7762 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g |
| 7763 | s%@INSTALL_DATA@%$INSTALL_DATA%g |
| 7764 | s%@LN@%$LN%g |
| 7765 | s%@OPT@%$OPT%g |
| 7766 | s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g |
| 7767 | s%@SO@%$SO%g |
| 7768 | s%@LDSHARED@%$LDSHARED%g |
| 7769 | s%@BLDSHARED@%$BLDSHARED%g |
| 7770 | s%@CCSHARED@%$CCSHARED%g |
| 7771 | s%@LINKFORSHARED@%$LINKFORSHARED%g |
| 7772 | s%@CFLAGSFORSHARED@%$CFLAGSFORSHARED%g |
| 7773 | s%@USE_SIGNAL_MODULE@%$USE_SIGNAL_MODULE%g |
| 7774 | s%@SIGNAL_OBJS@%$SIGNAL_OBJS%g |
| 7775 | s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g |
| 7776 | s%@LDLAST@%$LDLAST%g |
| 7777 | s%@DLINCLDIR@%$DLINCLDIR%g |
| 7778 | s%@DYNLOADFILE@%$DYNLOADFILE%g |
| 7779 | s%@MACHDEP_OBJS@%$MACHDEP_OBJS%g |
| 7780 | s%@LIBOBJS@%$LIBOBJS%g |
| 7781 | s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g |
| 7782 | s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g |
| 7783 | s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g |
| 7784 | s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g |
| 7785 | s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g |
| 7786 | s%@LIBM@%$LIBM%g |
| 7787 | s%@LIBC@%$LIBC%g |
| 7788 | s%@UNICODE_OBJS@%$UNICODE_OBJS%g |
| 7789 | s%@THREADHEADERS@%$THREADHEADERS%g |
| 7790 | s%@SRCDIRS@%$SRCDIRS%g |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7791 | |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7792 | CEOF |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7793 | EOF |
| 7794 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7795 | cat >> $CONFIG_STATUS <<\EOF |
| 7796 | |
| 7797 | # Split the substitutions into bite-sized pieces for seds with |
| 7798 | # small command number limits, like on Digital OSF/1 and HP-UX. |
| 7799 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. |
| 7800 | ac_file=1 # Number of current file. |
| 7801 | ac_beg=1 # First line for current file. |
| 7802 | ac_end=$ac_max_sed_cmds # Line after last line for current file. |
| 7803 | ac_more_lines=: |
| 7804 | ac_sed_cmds="" |
| 7805 | while $ac_more_lines; do |
| 7806 | if test $ac_beg -gt 1; then |
| 7807 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file |
| 7808 | else |
| 7809 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7810 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7811 | if test ! -s conftest.s$ac_file; then |
| 7812 | ac_more_lines=false |
| 7813 | rm -f conftest.s$ac_file |
| 7814 | else |
| 7815 | if test -z "$ac_sed_cmds"; then |
| 7816 | ac_sed_cmds="sed -f conftest.s$ac_file" |
| 7817 | else |
| 7818 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" |
| 7819 | fi |
| 7820 | ac_file=`expr $ac_file + 1` |
| 7821 | ac_beg=$ac_end |
| 7822 | ac_end=`expr $ac_end + $ac_max_sed_cmds` |
| 7823 | fi |
| 7824 | done |
| 7825 | if test -z "$ac_sed_cmds"; then |
| 7826 | ac_sed_cmds=cat |
| 7827 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7828 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7829 | |
| 7830 | cat >> $CONFIG_STATUS <<EOF |
| 7831 | |
| 7832 | CONFIG_FILES=\${CONFIG_FILES-"Makefile.pre Modules/Setup.config"} |
| 7833 | EOF |
| 7834 | cat >> $CONFIG_STATUS <<\EOF |
| 7835 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7836 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7837 | case "$ac_file" in |
| 7838 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
| 7839 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
| 7840 | *) ac_file_in="${ac_file}.in" ;; |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7841 | esac |
| 7842 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7843 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. |
| 7844 | |
| 7845 | # Remove last slash and all that follows it. Not all systems have dirname. |
| 7846 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7847 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7848 | # The file is in a subdirectory. |
| 7849 | test ! -d "$ac_dir" && mkdir "$ac_dir" |
| 7850 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7851 | # A "../" for each directory in $ac_dir_suffix. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7852 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7853 | else |
| 7854 | ac_dir_suffix= ac_dots= |
| 7855 | fi |
| 7856 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7857 | case "$ac_given_srcdir" in |
| 7858 | .) srcdir=. |
| 7859 | if test -z "$ac_dots"; then top_srcdir=. |
| 7860 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; |
| 7861 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7862 | *) # Relative path. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7863 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" |
| 7864 | top_srcdir="$ac_dots$ac_given_srcdir" ;; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7865 | esac |
| 7866 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7867 | case "$ac_given_INSTALL" in |
| 7868 | [/$]*) INSTALL="$ac_given_INSTALL" ;; |
| 7869 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7870 | esac |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7871 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7872 | echo creating "$ac_file" |
| 7873 | rm -f "$ac_file" |
| 7874 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." |
| 7875 | case "$ac_file" in |
| 7876 | *Makefile*) ac_comsub="1i\\ |
| 7877 | # $configure_input" ;; |
| 7878 | *) ac_comsub= ;; |
| 7879 | esac |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7880 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7881 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
| 7882 | sed -e "$ac_comsub |
| 7883 | s%@configure_input@%$configure_input%g |
| 7884 | s%@srcdir@%$srcdir%g |
| 7885 | s%@top_srcdir@%$top_srcdir%g |
| 7886 | s%@INSTALL@%$INSTALL%g |
| 7887 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file |
| 7888 | fi; done |
| 7889 | rm -f conftest.s* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7890 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7891 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where |
| 7892 | # 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] | 7893 | # |
| 7894 | # ac_d sets the value in "#define NAME VALUE" lines. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7895 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' |
| 7896 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' |
| 7897 | ac_dC='\3' |
| 7898 | ac_dD='%g' |
| 7899 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". |
| 7900 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
| 7901 | ac_uB='\([ ]\)%\1#\2define\3' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7902 | ac_uC=' ' |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7903 | ac_uD='\4%g' |
| 7904 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". |
| 7905 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
| 7906 | ac_eB='$%\1#\2define\3' |
| 7907 | ac_eC=' ' |
| 7908 | ac_eD='%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7909 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7910 | if test "${CONFIG_HEADERS+set}" != set; then |
| 7911 | EOF |
| 7912 | cat >> $CONFIG_STATUS <<EOF |
| 7913 | CONFIG_HEADERS="pyconfig.h" |
| 7914 | EOF |
| 7915 | cat >> $CONFIG_STATUS <<\EOF |
| 7916 | fi |
| 7917 | 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] | 7918 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7919 | case "$ac_file" in |
| 7920 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
| 7921 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
| 7922 | *) ac_file_in="${ac_file}.in" ;; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7923 | esac |
| 7924 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7925 | echo creating $ac_file |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7926 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7927 | rm -f conftest.frag conftest.in conftest.out |
| 7928 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
| 7929 | cat $ac_file_inputs > conftest.in |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7930 | |
| 7931 | EOF |
| 7932 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7933 | # Transform confdefs.h into a sed script conftest.vals that substitutes |
| 7934 | # the proper values into config.h.in to produce config.h. And first: |
| 7935 | # Protect against being on the right side of a sed subst in config.status. |
| 7936 | # Protect against being in an unquoted here document in config.status. |
| 7937 | rm -f conftest.vals |
| 7938 | cat > conftest.hdr <<\EOF |
| 7939 | s/[\\&%]/\\&/g |
| 7940 | s%[\\$`]%\\&%g |
| 7941 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp |
| 7942 | s%ac_d%ac_u%gp |
| 7943 | s%ac_u%ac_e%gp |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7944 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7945 | sed -n -f conftest.hdr confdefs.h > conftest.vals |
| 7946 | rm -f conftest.hdr |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7947 | |
| 7948 | # This sed command replaces #undef with comments. This is necessary, for |
| 7949 | # example, in the case of _POSIX_SOURCE, which is predefined and required |
| 7950 | # on some systems where configure will not decide to define it. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7951 | cat >> conftest.vals <<\EOF |
| 7952 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7953 | EOF |
| 7954 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7955 | # Break up conftest.vals because some shells have a limit on |
| 7956 | # 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] | 7957 | |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7958 | rm -f conftest.tail |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7959 | while : |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7960 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7961 | ac_lines=`grep -c . conftest.vals` |
| 7962 | # grep -c gives empty output for an empty file on some AIX systems. |
| 7963 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi |
| 7964 | # Write a limited-size here document to conftest.frag. |
| 7965 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS |
| 7966 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7967 | echo 'CEOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7968 | sed -f conftest.frag conftest.in > conftest.out |
| 7969 | rm -f conftest.in |
| 7970 | mv conftest.out conftest.in |
| 7971 | ' >> $CONFIG_STATUS |
| 7972 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail |
| 7973 | rm -f conftest.vals |
| 7974 | mv conftest.tail conftest.vals |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7975 | done |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7976 | rm -f conftest.vals |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7977 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7978 | cat >> $CONFIG_STATUS <<\EOF |
| 7979 | rm -f conftest.frag conftest.h |
| 7980 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h |
| 7981 | cat conftest.in >> conftest.h |
| 7982 | rm -f conftest.in |
| 7983 | if cmp -s $ac_file conftest.h 2>/dev/null; then |
| 7984 | echo "$ac_file is unchanged" |
| 7985 | rm -f conftest.h |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7986 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7987 | # Remove last slash and all that follows it. Not all systems have dirname. |
| 7988 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7989 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7990 | # The file is in a subdirectory. |
| 7991 | test ! -d "$ac_dir" && mkdir "$ac_dir" |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7992 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7993 | rm -f $ac_file |
| 7994 | mv conftest.h $ac_file |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7995 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7996 | fi; done |
| 7997 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7998 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7999 | cat >> $CONFIG_STATUS <<EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 8000 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8001 | EOF |
| 8002 | cat >> $CONFIG_STATUS <<\EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 8003 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8004 | exit 0 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 8005 | EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8006 | chmod +x $CONFIG_STATUS |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8007 | rm -fr confdefs* $ac_clean_files |
| 8008 | 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] | 8009 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 8010 | |
| 8011 | echo "creating Setup" |
| 8012 | if test ! -f Modules/Setup |
| 8013 | then |
| 8014 | cp $srcdir/Modules/Setup.dist Modules/Setup |
| 8015 | fi |
| 8016 | |
| 8017 | echo "creating Setup.local" |
| 8018 | if test ! -f Modules/Setup.local |
| 8019 | then |
| 8020 | echo "# Edit this file for local setup changes" >Modules/Setup.local |
| 8021 | fi |
| 8022 | |
| 8023 | echo "creating Makefile" |
| 8024 | $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \ |
| 8025 | -s Modules Modules/Setup.config \ |
Neil Schemenauer | f8b71c5 | 2001-04-21 17:41:16 +0000 | [diff] [blame] | 8026 | Modules/Setup.local Modules/Setup |
Neil Schemenauer | c761fc8 | 2001-02-19 04:50:49 +0000 | [diff] [blame] | 8027 | mv config.c Modules |