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 | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 3 | # From configure.in Revision: 1.302 |
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 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 25 | --enable-shared disable/enable building shared python library" |
| 26 | ac_help="$ac_help |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 27 | --with-pydebug build with Py_DEBUG defined" |
| 28 | ac_help="$ac_help |
| 29 | --enable-toolbox-glue disable/enable MacOSX glue code for extensions" |
| 30 | ac_help="$ac_help |
| 31 | --with-libs='lib1 ...' link against additional libs" |
| 32 | ac_help="$ac_help |
| 33 | --with-signal-module disable/enable signal module" |
| 34 | ac_help="$ac_help |
| 35 | --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries" |
| 36 | ac_help="$ac_help |
| 37 | --with(out)-threads[=DIRECTORY] disable/enable thread support" |
| 38 | ac_help="$ac_help |
| 39 | --with(out)-thread[=DIRECTORY] deprecated; use --with(out)-threads" |
| 40 | ac_help="$ac_help |
| 41 | --with-pth use GNU pth threading libraries" |
| 42 | ac_help="$ac_help |
| 43 | --enable-ipv6 Enable ipv6 (with ipv4) support |
| 44 | --disable-ipv6 Disable ipv6 support" |
| 45 | ac_help="$ac_help |
| 46 | --with(out)-cycle-gc disable/enable garbage collection" |
| 47 | ac_help="$ac_help |
| 48 | --with(out)-pymalloc disable/enable specialized mallocs" |
| 49 | ac_help="$ac_help |
| 50 | --with-wctype-functions use wctype.h functions" |
| 51 | ac_help="$ac_help |
| 52 | --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking" |
| 53 | ac_help="$ac_help |
| 54 | --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking" |
| 55 | ac_help="$ac_help |
| 56 | --with-fpectl enable SIGFPE catching" |
| 57 | ac_help="$ac_help |
| 58 | --with-libm=STRING math library" |
| 59 | ac_help="$ac_help |
| 60 | --with-libc=STRING C library" |
| 61 | ac_help="$ac_help |
| 62 | --enable-unicode[=ucs2,ucs4] Enable Unicode strings (default is yes)" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 63 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 64 | # Initialize some variables set by options. |
| 65 | # The variables have the same names as the options, with |
| 66 | # dashes changed to underlines. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 67 | build=NONE |
| 68 | cache_file=./config.cache |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 69 | exec_prefix=NONE |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 70 | host=NONE |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 71 | no_create= |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 72 | nonopt=NONE |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 73 | no_recursion= |
| 74 | prefix=NONE |
| 75 | program_prefix=NONE |
| 76 | program_suffix=NONE |
| 77 | program_transform_name=s,x,x, |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 78 | silent= |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 79 | site= |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 80 | srcdir= |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 81 | target=NONE |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 82 | verbose= |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 83 | x_includes=NONE |
| 84 | x_libraries=NONE |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 85 | bindir='${exec_prefix}/bin' |
| 86 | sbindir='${exec_prefix}/sbin' |
| 87 | libexecdir='${exec_prefix}/libexec' |
| 88 | datadir='${prefix}/share' |
| 89 | sysconfdir='${prefix}/etc' |
| 90 | sharedstatedir='${prefix}/com' |
| 91 | localstatedir='${prefix}/var' |
| 92 | libdir='${exec_prefix}/lib' |
| 93 | includedir='${prefix}/include' |
| 94 | oldincludedir='/usr/include' |
| 95 | infodir='${prefix}/info' |
| 96 | mandir='${prefix}/man' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 97 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 98 | # Initialize some other variables. |
| 99 | subdirs= |
| 100 | MFLAGS= MAKEFLAGS= |
| 101 | SHELL=${CONFIG_SHELL-/bin/sh} |
| 102 | # Maximum number of lines to put in a shell here document. |
| 103 | ac_max_here_lines=12 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 104 | |
| 105 | ac_prev= |
| 106 | for ac_option |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 107 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 108 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 109 | # If the previous option needs an argument, assign it. |
| 110 | if test -n "$ac_prev"; then |
| 111 | eval "$ac_prev=\$ac_option" |
| 112 | ac_prev= |
| 113 | continue |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 114 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 115 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 116 | case "$ac_option" in |
| 117 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; |
| 118 | *) ac_optarg= ;; |
| 119 | esac |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 120 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 121 | # Accept the important Cygnus configure options, so we can diagnose typos. |
| 122 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 123 | case "$ac_option" in |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 124 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 125 | -bindir | --bindir | --bindi | --bind | --bin | --bi) |
| 126 | ac_prev=bindir ;; |
| 127 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 128 | bindir="$ac_optarg" ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 129 | |
| 130 | -build | --build | --buil | --bui | --bu) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 131 | ac_prev=build ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 132 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 133 | build="$ac_optarg" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 134 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 135 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
| 136 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) |
| 137 | ac_prev=cache_file ;; |
| 138 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ |
| 139 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 140 | cache_file="$ac_optarg" ;; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 141 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 142 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) |
| 143 | ac_prev=datadir ;; |
| 144 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ |
| 145 | | --da=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 146 | datadir="$ac_optarg" ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 147 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 148 | -disable-* | --disable-*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 149 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 150 | # Reject names that are not valid shell variable names. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 151 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then |
| 152 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } |
| 153 | fi |
| 154 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` |
| 155 | eval "enable_${ac_feature}=no" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 156 | |
| 157 | -enable-* | --enable-*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 158 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 159 | # Reject names that are not valid shell variable names. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 160 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then |
| 161 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } |
| 162 | fi |
| 163 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` |
| 164 | case "$ac_option" in |
| 165 | *=*) ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 166 | *) ac_optarg=yes ;; |
| 167 | esac |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 168 | eval "enable_${ac_feature}='$ac_optarg'" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 169 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 170 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ |
| 171 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ |
| 172 | | --exec | --exe | --ex) |
| 173 | ac_prev=exec_prefix ;; |
| 174 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ |
| 175 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ |
| 176 | | --exec=* | --exe=* | --ex=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 177 | exec_prefix="$ac_optarg" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 178 | |
| 179 | -gas | --gas | --ga | --g) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 180 | # Obsolete; use --with-gas. |
| 181 | with_gas=yes ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 182 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 183 | -help | --help | --hel | --he) |
| 184 | # Omit some internal or obsolete options to make the list less imposing. |
| 185 | # This message is too long to be a string in the A/UX 3.1 sh. |
| 186 | cat << EOF |
| 187 | Usage: configure [options] [host] |
| 188 | Options: [defaults in brackets after descriptions] |
| 189 | Configuration: |
| 190 | --cache-file=FILE cache test results in FILE |
| 191 | --help print this message |
| 192 | --no-create do not create output files |
| 193 | --quiet, --silent do not print \`checking...' messages |
| 194 | --version print the version of autoconf that created configure |
| 195 | Directory and file names: |
| 196 | --prefix=PREFIX install architecture-independent files in PREFIX |
| 197 | [$ac_default_prefix] |
| 198 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
| 199 | [same as prefix] |
| 200 | --bindir=DIR user executables in DIR [EPREFIX/bin] |
| 201 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] |
| 202 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] |
| 203 | --datadir=DIR read-only architecture-independent data in DIR |
| 204 | [PREFIX/share] |
| 205 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] |
| 206 | --sharedstatedir=DIR modifiable architecture-independent data in DIR |
| 207 | [PREFIX/com] |
| 208 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] |
| 209 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] |
| 210 | --includedir=DIR C header files in DIR [PREFIX/include] |
| 211 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] |
| 212 | --infodir=DIR info documentation in DIR [PREFIX/info] |
| 213 | --mandir=DIR man documentation in DIR [PREFIX/man] |
| 214 | --srcdir=DIR find the sources in DIR [configure dir or ..] |
| 215 | --program-prefix=PREFIX prepend PREFIX to installed program names |
| 216 | --program-suffix=SUFFIX append SUFFIX to installed program names |
| 217 | --program-transform-name=PROGRAM |
| 218 | run sed PROGRAM on installed program names |
| 219 | EOF |
| 220 | cat << EOF |
| 221 | Host type: |
| 222 | --build=BUILD configure for building on BUILD [BUILD=HOST] |
| 223 | --host=HOST configure for HOST [guessed] |
| 224 | --target=TARGET configure for TARGET [TARGET=HOST] |
| 225 | Features and packages: |
| 226 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) |
| 227 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] |
| 228 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] |
| 229 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) |
| 230 | --x-includes=DIR X include files are in DIR |
| 231 | --x-libraries=DIR X library files are in DIR |
| 232 | EOF |
| 233 | if test -n "$ac_help"; then |
| 234 | echo "--enable and --with options recognized:$ac_help" |
| 235 | fi |
| 236 | exit 0 ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 237 | |
| 238 | -host | --host | --hos | --ho) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 239 | ac_prev=host ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 240 | -host=* | --host=* | --hos=* | --ho=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 241 | host="$ac_optarg" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 242 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 243 | -includedir | --includedir | --includedi | --included | --include \ |
| 244 | | --includ | --inclu | --incl | --inc) |
| 245 | ac_prev=includedir ;; |
| 246 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ |
| 247 | | --includ=* | --inclu=* | --incl=* | --inc=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 248 | includedir="$ac_optarg" ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 249 | |
| 250 | -infodir | --infodir | --infodi | --infod | --info | --inf) |
| 251 | ac_prev=infodir ;; |
| 252 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 253 | infodir="$ac_optarg" ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 254 | |
| 255 | -libdir | --libdir | --libdi | --libd) |
| 256 | ac_prev=libdir ;; |
| 257 | -libdir=* | --libdir=* | --libdi=* | --libd=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 258 | libdir="$ac_optarg" ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 259 | |
| 260 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ |
| 261 | | --libexe | --libex | --libe) |
| 262 | ac_prev=libexecdir ;; |
| 263 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ |
| 264 | | --libexe=* | --libex=* | --libe=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 265 | libexecdir="$ac_optarg" ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 266 | |
| 267 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
| 268 | | --localstate | --localstat | --localsta | --localst \ |
| 269 | | --locals | --local | --loca | --loc | --lo) |
| 270 | ac_prev=localstatedir ;; |
| 271 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ |
| 272 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ |
| 273 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 274 | localstatedir="$ac_optarg" ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 275 | |
| 276 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) |
| 277 | ac_prev=mandir ;; |
| 278 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 279 | mandir="$ac_optarg" ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 280 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 281 | -nfp | --nfp | --nf) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 282 | # Obsolete; use --without-fp. |
| 283 | with_fp=no ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 284 | |
| 285 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ |
| 286 | | --no-cr | --no-c) |
| 287 | no_create=yes ;; |
| 288 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 289 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ |
| 290 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) |
| 291 | no_recursion=yes ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 292 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 293 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ |
| 294 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ |
| 295 | | --oldin | --oldi | --old | --ol | --o) |
| 296 | ac_prev=oldincludedir ;; |
| 297 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ |
| 298 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ |
| 299 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 300 | oldincludedir="$ac_optarg" ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 301 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 302 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
| 303 | ac_prev=prefix ;; |
| 304 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 305 | prefix="$ac_optarg" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 306 | |
| 307 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ |
| 308 | | --program-pre | --program-pr | --program-p) |
| 309 | ac_prev=program_prefix ;; |
| 310 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ |
| 311 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 312 | program_prefix="$ac_optarg" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 313 | |
| 314 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ |
| 315 | | --program-suf | --program-su | --program-s) |
| 316 | ac_prev=program_suffix ;; |
| 317 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ |
| 318 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 319 | program_suffix="$ac_optarg" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 320 | |
| 321 | -program-transform-name | --program-transform-name \ |
| 322 | | --program-transform-nam | --program-transform-na \ |
| 323 | | --program-transform-n | --program-transform- \ |
| 324 | | --program-transform | --program-transfor \ |
| 325 | | --program-transfo | --program-transf \ |
| 326 | | --program-trans | --program-tran \ |
| 327 | | --progr-tra | --program-tr | --program-t) |
| 328 | ac_prev=program_transform_name ;; |
| 329 | -program-transform-name=* | --program-transform-name=* \ |
| 330 | | --program-transform-nam=* | --program-transform-na=* \ |
| 331 | | --program-transform-n=* | --program-transform-=* \ |
| 332 | | --program-transform=* | --program-transfor=* \ |
| 333 | | --program-transfo=* | --program-transf=* \ |
| 334 | | --program-trans=* | --program-tran=* \ |
| 335 | | --progr-tra=* | --program-tr=* | --program-t=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 336 | program_transform_name="$ac_optarg" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 337 | |
| 338 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
| 339 | | -silent | --silent | --silen | --sile | --sil) |
| 340 | silent=yes ;; |
| 341 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 342 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) |
| 343 | ac_prev=sbindir ;; |
| 344 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ |
| 345 | | --sbi=* | --sb=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 346 | sbindir="$ac_optarg" ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 347 | |
| 348 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ |
| 349 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ |
| 350 | | --sharedst | --shareds | --shared | --share | --shar \ |
| 351 | | --sha | --sh) |
| 352 | ac_prev=sharedstatedir ;; |
| 353 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ |
| 354 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ |
| 355 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ |
| 356 | | --sha=* | --sh=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 357 | sharedstatedir="$ac_optarg" ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 358 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 359 | -site | --site | --sit) |
| 360 | ac_prev=site ;; |
| 361 | -site=* | --site=* | --sit=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 362 | site="$ac_optarg" ;; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 363 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 364 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
| 365 | ac_prev=srcdir ;; |
| 366 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 367 | srcdir="$ac_optarg" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 368 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 369 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ |
| 370 | | --syscon | --sysco | --sysc | --sys | --sy) |
| 371 | ac_prev=sysconfdir ;; |
| 372 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ |
| 373 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 374 | sysconfdir="$ac_optarg" ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 375 | |
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 | ac_prev=target ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 378 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 379 | target="$ac_optarg" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 380 | |
| 381 | -v | -verbose | --verbose | --verbos | --verbo | --verb) |
| 382 | verbose=yes ;; |
| 383 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 384 | -version | --version | --versio | --versi | --vers) |
| 385 | echo "configure generated by autoconf version 2.13" |
| 386 | exit 0 ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 387 | |
| 388 | -with-* | --with-*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 389 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 390 | # Reject names that are not valid shell variable names. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 391 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then |
| 392 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } |
| 393 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 394 | ac_package=`echo $ac_package| sed 's/-/_/g'` |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 395 | case "$ac_option" in |
| 396 | *=*) ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 397 | *) ac_optarg=yes ;; |
| 398 | esac |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 399 | eval "with_${ac_package}='$ac_optarg'" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 400 | |
| 401 | -without-* | --without-*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 402 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 403 | # Reject names that are not valid shell variable names. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 404 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then |
| 405 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } |
| 406 | fi |
| 407 | ac_package=`echo $ac_package| sed 's/-/_/g'` |
| 408 | eval "with_${ac_package}=no" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 409 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 410 | --x) |
| 411 | # Obsolete; use --with-x. |
| 412 | with_x=yes ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 413 | |
| 414 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ |
| 415 | | --x-incl | --x-inc | --x-in | --x-i) |
| 416 | ac_prev=x_includes ;; |
| 417 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ |
| 418 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 419 | x_includes="$ac_optarg" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 420 | |
| 421 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ |
| 422 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) |
| 423 | ac_prev=x_libraries ;; |
| 424 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ |
| 425 | | --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] | 426 | x_libraries="$ac_optarg" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 427 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 428 | -*) { 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] | 429 | ;; |
| 430 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 431 | *) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 432 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then |
| 433 | echo "configure: warning: $ac_option: invalid host type" 1>&2 |
| 434 | fi |
| 435 | if test "x$nonopt" != xNONE; then |
| 436 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } |
| 437 | fi |
| 438 | nonopt="$ac_option" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 439 | ;; |
| 440 | |
| 441 | esac |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 442 | done |
| 443 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 444 | if test -n "$ac_prev"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 445 | { 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] | 446 | fi |
| 447 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 448 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 |
| 449 | |
| 450 | # File descriptor usage: |
| 451 | # 0 standard input |
| 452 | # 1 file creation |
| 453 | # 2 errors and warnings |
| 454 | # 3 some systems may open it to /dev/tty |
| 455 | # 4 used on the Kubota Titan |
| 456 | # 6 checking for... messages and results |
| 457 | # 5 compiler messages saved in config.log |
| 458 | if test "$silent" = yes; then |
| 459 | exec 6>/dev/null |
| 460 | else |
| 461 | exec 6>&1 |
| 462 | fi |
| 463 | exec 5>./config.log |
| 464 | |
| 465 | echo "\ |
| 466 | This file contains any messages produced by compilers while |
| 467 | running configure, to aid debugging if configure makes a mistake. |
| 468 | " 1>&5 |
| 469 | |
| 470 | # Strip out --no-create and --no-recursion so they do not pile up. |
| 471 | # Also quote any args containing shell metacharacters. |
| 472 | ac_configure_args= |
| 473 | for ac_arg |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 474 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 475 | case "$ac_arg" in |
| 476 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ |
| 477 | | --no-cr | --no-c) ;; |
| 478 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ |
| 479 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; |
| 480 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) |
| 481 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; |
| 482 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 483 | esac |
| 484 | done |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 485 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 486 | # NLS nuisances. |
| 487 | # Only set these to C if already set. These must not be set unconditionally |
| 488 | # because not all systems understand e.g. LANG=C (notably SCO). |
| 489 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! |
| 490 | # Non-C LC_CTYPE values break the ctype check. |
| 491 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi |
| 492 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi |
| 493 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi |
| 494 | 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] | 495 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 496 | # confdefs.h avoids OS command line length limits that DEFS can exceed. |
| 497 | rm -rf conftest* confdefs.h |
| 498 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. |
| 499 | echo > confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 500 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 501 | # A filename unique to this package, relative to the directory that |
| 502 | # configure is in, which we can look for to find out if srcdir is correct. |
| 503 | ac_unique_file=Include/object.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 504 | |
| 505 | # Find the source files, if location was not specified. |
| 506 | if test -z "$srcdir"; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 507 | ac_srcdir_defaulted=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 508 | # Try the directory containing this script, then its parent. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 509 | ac_prog=$0 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 510 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 511 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. |
| 512 | srcdir=$ac_confdir |
| 513 | if test ! -r $srcdir/$ac_unique_file; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 514 | srcdir=.. |
| 515 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 516 | else |
| 517 | ac_srcdir_defaulted=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 518 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 519 | if test ! -r $srcdir/$ac_unique_file; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 520 | if test "$ac_srcdir_defaulted" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 521 | { 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] | 522 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 523 | { 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] | 524 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 525 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 526 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 527 | |
| 528 | # Prefer explicitly selected file to automatically selected ones. |
| 529 | if test -z "$CONFIG_SITE"; then |
| 530 | if test "x$prefix" != xNONE; then |
| 531 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" |
| 532 | else |
| 533 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" |
| 534 | fi |
| 535 | fi |
| 536 | for ac_site_file in $CONFIG_SITE; do |
| 537 | if test -r "$ac_site_file"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 538 | echo "loading site script $ac_site_file" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 539 | . "$ac_site_file" |
| 540 | fi |
| 541 | done |
| 542 | |
| 543 | if test -r "$cache_file"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 544 | echo "loading cache $cache_file" |
| 545 | . $cache_file |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 546 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 547 | echo "creating cache $cache_file" |
| 548 | > $cache_file |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 549 | fi |
| 550 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 551 | ac_ext=c |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 552 | # 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] | 553 | ac_cpp='$CPP $CPPFLAGS' |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 554 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 555 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 556 | cross_compiling=$ac_cv_prog_cc_cross |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 557 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 558 | ac_exeext= |
| 559 | ac_objext=o |
| 560 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then |
| 561 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. |
| 562 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then |
| 563 | ac_n= ac_c=' |
| 564 | ' ac_t=' ' |
| 565 | else |
| 566 | ac_n=-n ac_c= ac_t= |
| 567 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 568 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 569 | ac_n= ac_c='\c' ac_t= |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 570 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 571 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 572 | |
| 573 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 574 | |
Guido van Rossum | 1fd74a7 | 1997-07-19 19:36:02 +0000 | [diff] [blame] | 575 | # Set VERSION so we only need to edit in one place (i.e., here) |
| 576 | |
Andrew M. Kuchling | f2f219d | 2002-02-11 16:31:10 +0000 | [diff] [blame] | 577 | VERSION=2.3 |
Guido van Rossum | 1fd74a7 | 1997-07-19 19:36:02 +0000 | [diff] [blame] | 578 | |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 579 | |
| 580 | SOVERSION=1.0 |
| 581 | |
Neil Schemenauer | 4edbc2a | 2001-03-22 00:34:03 +0000 | [diff] [blame] | 582 | # Arguments passed to configure. |
| 583 | |
| 584 | CONFIG_ARGS="$ac_configure_args" |
| 585 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 586 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 587 | # Check whether --enable-framework or --disable-framework was given. |
| 588 | if test "${enable_framework+set}" = set; then |
| 589 | enableval="$enable_framework" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 590 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 591 | case $enableval in |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 592 | yes) |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 593 | enableval=/Library/Frameworks |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 594 | esac |
| 595 | case $enableval in |
| 596 | no) |
| 597 | PYTHONFRAMEWORK= |
| 598 | PYTHONFRAMEWORKDIR=no-framework |
| 599 | PYTHONFRAMEWORKPREFIX= |
| 600 | PYTHONFRAMEWORKINSTALLDIR= |
| 601 | enable_framework= |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 602 | ;; |
| 603 | *) |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 604 | PYTHONFRAMEWORK=Python |
| 605 | PYTHONFRAMEWORKDIR=Python.framework |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 606 | PYTHONFRAMEWORKPREFIX=$enableval |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 607 | PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR |
| 608 | prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 609 | esac |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 610 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 611 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 612 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 613 | PYTHONFRAMEWORK= |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 614 | PYTHONFRAMEWORKDIR=no-framework |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 615 | PYTHONFRAMEWORKPREFIX= |
| 616 | PYTHONFRAMEWORKINSTALLDIR= |
| 617 | enable_framework= |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 618 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 619 | fi |
| 620 | |
| 621 | |
| 622 | |
| 623 | |
| 624 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 625 | |
| 626 | ##AC_ARG_WITH(dyld, |
| 627 | ##[ --with-dyld Use (OpenStep|Rhapsody) dynamic linker],,) |
| 628 | ## |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 629 | # Set name for machine-dependent library files |
| 630 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 631 | echo $ac_n "checking MACHDEP""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 632 | echo "configure:633: checking MACHDEP" >&5 |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 633 | if test -z "$MACHDEP" |
| 634 | then |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 635 | ac_sys_system=`uname -s` |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 636 | 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] | 637 | ac_sys_release=`uname -v` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 638 | else |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 639 | ac_sys_release=`uname -r` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 640 | fi |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 641 | ac_md_system=`echo $ac_sys_system | |
| 642 | tr -d '/ ' | tr '[A-Z]' '[a-z]'` |
| 643 | ac_md_release=`echo $ac_sys_release | |
Guido van Rossum | 67b2659 | 2001-10-20 14:21:45 +0000 | [diff] [blame] | 644 | tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'` |
Guido van Rossum | b97ef17 | 1997-09-28 05:44:03 +0000 | [diff] [blame] | 645 | MACHDEP="$ac_md_system$ac_md_release" |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 646 | |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 647 | case $MACHDEP in |
Andrew M. Kuchling | 5a3e4cb | 2001-07-20 19:29:04 +0000 | [diff] [blame] | 648 | cygwin*) MACHDEP="cygwin";; |
Jack Jansen | 8a97f4a | 2001-12-05 23:27:32 +0000 | [diff] [blame] | 649 | darwin*) MACHDEP="darwin";; |
Guido van Rossum | b97ef17 | 1997-09-28 05:44:03 +0000 | [diff] [blame] | 650 | '') MACHDEP="unknown";; |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 651 | esac |
| 652 | fi |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 653 | |
| 654 | # |
| 655 | # SGI compilers allow the specification of the both the ABI and the |
| 656 | # ISA on the command line. Depending on the values of these switches, |
| 657 | # different and often incompatable code will be generated. |
| 658 | # |
| 659 | # The SGI_ABI variable can be used to modify the CC and LDFLAGS and |
| 660 | # thus supply support for various ABI/ISA combinations. The MACHDEP |
| 661 | # variable is also adjusted. |
| 662 | # |
| 663 | |
| 664 | if test ! -z "$SGI_ABI" |
| 665 | then |
| 666 | CC="cc $SGI_ABI" |
| 667 | LDFLAGS="$SGI_ABI $LDFLAGS" |
| 668 | MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'` |
| 669 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 670 | echo "$ac_t""$MACHDEP" 1>&6 |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 671 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 672 | # checks for alternative programs |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 673 | echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 674 | echo "configure:675: checking for --without-gcc" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 675 | # Check whether --with-gcc or --without-gcc was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 676 | if test "${with_gcc+set}" = set; then |
| 677 | withval="$with_gcc" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 678 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 679 | case $withval in |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 680 | no) CC=cc |
| 681 | without_gcc=yes;; |
| 682 | yes) CC=gcc |
| 683 | without_gcc=no;; |
| 684 | *) CC=$withval |
| 685 | without_gcc=$withval;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 686 | esac |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 687 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 688 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 689 | case $ac_sys_system in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 690 | AIX*) CC=cc_r |
| 691 | without_gcc=;; |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 692 | BeOS*) |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 693 | case $BE_HOST_CPU in |
| 694 | ppc) |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 695 | CC=mwcc |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 696 | without_gcc=yes |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 697 | 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] | 698 | CCSHARED="-UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'" |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 699 | LDFLAGS="$LDFLAGS -nodup" |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 700 | ;; |
| 701 | x86) |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 702 | CC=gcc |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 703 | without_gcc=no |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 704 | OPT=-O |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 705 | ;; |
| 706 | *) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 707 | { 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] | 708 | ;; |
| 709 | esac |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 710 | AR="\$(srcdir)/Modules/ar_beos" |
| 711 | RANLIB=: |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 712 | ;; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 713 | Monterey*) |
| 714 | RANLIB=: |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 715 | without_gcc=;; |
| 716 | *) without_gcc=no;; |
Guido van Rossum | e77438c | 1995-09-13 18:59:59 +0000 | [diff] [blame] | 717 | esac |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 718 | fi |
| 719 | |
| 720 | echo "$ac_t""$without_gcc" 1>&6 |
| 721 | |
| 722 | |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 723 | |
Fred Drake | a1a84e7 | 2001-03-06 05:52:16 +0000 | [diff] [blame] | 724 | MAINOBJ=python.o |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 725 | echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 726 | echo "configure:727: checking for --with-cxx=<compiler>" >&5 |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 727 | # Check whether --with-cxx or --without-cxx was given. |
| 728 | if test "${with_cxx+set}" = set; then |
| 729 | withval="$with_cxx" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 730 | |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 731 | check_cxx=no |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 732 | case $withval in |
| 733 | no) CXX= |
| 734 | with_cxx=no;; |
| 735 | *) CXX=$withval |
Fred Drake | a1a84e7 | 2001-03-06 05:52:16 +0000 | [diff] [blame] | 736 | MAINOBJ=ccpython.o |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 737 | with_cxx=$withval;; |
| 738 | esac |
| 739 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 740 | |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 741 | with_cxx=no |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 742 | check_cxx=yes |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 743 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 744 | fi |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 745 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 746 | echo "$ac_t""$with_cxx" 1>&6 |
| 747 | |
| 748 | if test "$with_cxx" = "yes" |
| 749 | then |
| 750 | { echo "configure: error: must supply a compiler when using --with-cxx" 1>&2; exit 1; } |
| 751 | fi |
| 752 | |
| 753 | |
| 754 | |
| 755 | |
| 756 | if test "$check_cxx" = "yes" |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 757 | then |
| 758 | for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl |
| 759 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 760 | # 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] | 761 | set dummy $ac_prog; ac_word=$2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 762 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 763 | echo "configure:764: checking for $ac_word" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 764 | if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then |
| 765 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 766 | else |
| 767 | if test -n "$CXX"; then |
| 768 | ac_cv_prog_CXX="$CXX" # Let the user override the test. |
| 769 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 770 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 771 | ac_dummy="$PATH" |
| 772 | for ac_dir in $ac_dummy; do |
| 773 | test -z "$ac_dir" && ac_dir=. |
| 774 | if test -f $ac_dir/$ac_word; then |
| 775 | ac_cv_prog_CXX="$ac_prog" |
| 776 | break |
| 777 | fi |
| 778 | done |
| 779 | IFS="$ac_save_ifs" |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 780 | fi |
| 781 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 782 | CXX="$ac_cv_prog_CXX" |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 783 | if test -n "$CXX"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 784 | echo "$ac_t""$CXX" 1>&6 |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 785 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 786 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 787 | fi |
| 788 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 789 | test -n "$CXX" && break |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 790 | done |
| 791 | test -n "$CXX" || CXX="notfound" |
| 792 | |
| 793 | if test "$CXX" = "notfound" |
| 794 | then |
| 795 | CXX= |
| 796 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 797 | echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 798 | echo "configure:799: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 799 | |
| 800 | ac_ext=C |
| 801 | # 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] | 802 | ac_cpp='$CXXCPP $CPPFLAGS' |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 803 | ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 804 | ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 805 | cross_compiling=$ac_cv_prog_cxx_cross |
| 806 | |
| 807 | cat > conftest.$ac_ext << EOF |
| 808 | |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 809 | #line 810 "configure" |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 810 | #include "confdefs.h" |
| 811 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 812 | int main(){return(0);} |
| 813 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 814 | if { (eval echo configure:815: \"$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] | 815 | ac_cv_prog_cxx_works=yes |
| 816 | # If we can't run a trivial program, we are probably using a cross compiler. |
| 817 | if (./conftest; exit) 2>/dev/null; then |
| 818 | ac_cv_prog_cxx_cross=no |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 819 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 820 | ac_cv_prog_cxx_cross=yes |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 821 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 822 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 823 | echo "configure: failed program was:" >&5 |
| 824 | cat conftest.$ac_ext >&5 |
| 825 | ac_cv_prog_cxx_works=no |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 826 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 827 | rm -fr conftest* |
| 828 | ac_ext=c |
| 829 | # 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] | 830 | ac_cpp='$CPP $CPPFLAGS' |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 831 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 832 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 833 | cross_compiling=$ac_cv_prog_cc_cross |
| 834 | |
| 835 | echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6 |
| 836 | if test $ac_cv_prog_cxx_works = no; then |
| 837 | { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } |
| 838 | fi |
| 839 | echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 840 | echo "configure:841: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 841 | echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 |
| 842 | cross_compiling=$ac_cv_prog_cxx_cross |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 843 | |
| 844 | fi |
| 845 | fi |
| 846 | |
Guido van Rossum | 8b131c5 | 1995-03-09 14:10:13 +0000 | [diff] [blame] | 847 | # If the user switches compilers, we can't believe the cache |
| 848 | if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC" |
| 849 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 850 | { echo "configure: error: cached CC is different -- throw away $cache_file |
| 851 | (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] | 852 | fi |
| 853 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 854 | # 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] | 855 | set dummy gcc; ac_word=$2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 856 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 857 | echo "configure:858: checking for $ac_word" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 858 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
| 859 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 860 | else |
| 861 | if test -n "$CC"; then |
| 862 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 863 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 864 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 865 | ac_dummy="$PATH" |
| 866 | for ac_dir in $ac_dummy; do |
| 867 | test -z "$ac_dir" && ac_dir=. |
| 868 | if test -f $ac_dir/$ac_word; then |
| 869 | ac_cv_prog_CC="gcc" |
| 870 | break |
| 871 | fi |
| 872 | done |
| 873 | IFS="$ac_save_ifs" |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 874 | fi |
| 875 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 876 | CC="$ac_cv_prog_CC" |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 877 | if test -n "$CC"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 878 | echo "$ac_t""$CC" 1>&6 |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 879 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 880 | echo "$ac_t""no" 1>&6 |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 881 | fi |
| 882 | |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 883 | if test -z "$CC"; then |
| 884 | # Extract the first word of "cc", so it can be a program name with args. |
| 885 | set dummy cc; ac_word=$2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 886 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 887 | echo "configure:888: checking for $ac_word" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 888 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
| 889 | echo $ac_n "(cached) $ac_c" 1>&6 |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 890 | else |
| 891 | if test -n "$CC"; then |
| 892 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 893 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 894 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 895 | ac_prog_rejected=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 896 | ac_dummy="$PATH" |
| 897 | for ac_dir in $ac_dummy; do |
| 898 | test -z "$ac_dir" && ac_dir=. |
| 899 | if test -f $ac_dir/$ac_word; then |
| 900 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then |
| 901 | ac_prog_rejected=yes |
| 902 | continue |
| 903 | fi |
| 904 | ac_cv_prog_CC="cc" |
| 905 | break |
| 906 | fi |
| 907 | done |
| 908 | IFS="$ac_save_ifs" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 909 | if test $ac_prog_rejected = yes; then |
| 910 | # We found a bogon in the path, so make sure we never use it. |
| 911 | set dummy $ac_cv_prog_CC |
| 912 | shift |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 913 | if test $# -gt 0; then |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 914 | # We chose a different compiler from the bogus one. |
| 915 | # However, it has the same basename, so the bogon will be chosen |
| 916 | # first if we set CC to just the basename; use the full file name. |
| 917 | shift |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 918 | set dummy "$ac_dir/$ac_word" "$@" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 919 | shift |
| 920 | ac_cv_prog_CC="$@" |
| 921 | fi |
| 922 | fi |
| 923 | fi |
| 924 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 925 | CC="$ac_cv_prog_CC" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 926 | if test -n "$CC"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 927 | echo "$ac_t""$CC" 1>&6 |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 928 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 929 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 930 | fi |
| 931 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 932 | if test -z "$CC"; then |
| 933 | case "`uname -s`" in |
| 934 | *win32* | *WIN32*) |
| 935 | # Extract the first word of "cl", so it can be a program name with args. |
| 936 | set dummy cl; ac_word=$2 |
| 937 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 938 | echo "configure:939: checking for $ac_word" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 939 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
| 940 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 941 | else |
| 942 | if test -n "$CC"; then |
| 943 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 944 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 945 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 946 | ac_dummy="$PATH" |
| 947 | for ac_dir in $ac_dummy; do |
| 948 | test -z "$ac_dir" && ac_dir=. |
| 949 | if test -f $ac_dir/$ac_word; then |
| 950 | ac_cv_prog_CC="cl" |
| 951 | break |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 952 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 953 | done |
| 954 | IFS="$ac_save_ifs" |
| 955 | fi |
| 956 | fi |
| 957 | CC="$ac_cv_prog_CC" |
| 958 | if test -n "$CC"; then |
| 959 | echo "$ac_t""$CC" 1>&6 |
| 960 | else |
| 961 | echo "$ac_t""no" 1>&6 |
| 962 | fi |
| 963 | ;; |
| 964 | esac |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 965 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 966 | 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] | 967 | fi |
| 968 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 969 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 970 | echo "configure:971: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 971 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 972 | ac_ext=c |
| 973 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 974 | ac_cpp='$CPP $CPPFLAGS' |
| 975 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 976 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 977 | cross_compiling=$ac_cv_prog_cc_cross |
| 978 | |
| 979 | cat > conftest.$ac_ext << EOF |
| 980 | |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 981 | #line 982 "configure" |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 982 | #include "confdefs.h" |
| 983 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 984 | main(){return(0);} |
| 985 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 986 | if { (eval echo configure:987: \"$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] | 987 | ac_cv_prog_cc_works=yes |
| 988 | # If we can't run a trivial program, we are probably using a cross compiler. |
| 989 | if (./conftest; exit) 2>/dev/null; then |
| 990 | ac_cv_prog_cc_cross=no |
| 991 | else |
| 992 | ac_cv_prog_cc_cross=yes |
| 993 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 994 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 995 | echo "configure: failed program was:" >&5 |
| 996 | cat conftest.$ac_ext >&5 |
| 997 | ac_cv_prog_cc_works=no |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 998 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 999 | rm -fr conftest* |
| 1000 | ac_ext=c |
| 1001 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 1002 | ac_cpp='$CPP $CPPFLAGS' |
| 1003 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 1004 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 1005 | cross_compiling=$ac_cv_prog_cc_cross |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 1006 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1007 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 |
| 1008 | if test $ac_cv_prog_cc_works = no; then |
| 1009 | { 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] | 1010 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1011 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1012 | echo "configure:1013: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1013 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
| 1014 | cross_compiling=$ac_cv_prog_cc_cross |
| 1015 | |
| 1016 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1017 | echo "configure:1018: checking whether we are using GNU C" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1018 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
| 1019 | echo $ac_n "(cached) $ac_c" 1>&6 |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 1020 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1021 | cat > conftest.c <<EOF |
| 1022 | #ifdef __GNUC__ |
| 1023 | yes; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1024 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1025 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1026 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1027: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1027 | ac_cv_prog_gcc=yes |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1028 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1029 | ac_cv_prog_gcc=no |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1030 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1031 | fi |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1032 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1033 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 |
| 1034 | |
| 1035 | if test $ac_cv_prog_gcc = yes; then |
| 1036 | GCC=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1037 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1038 | GCC= |
| 1039 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 1040 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1041 | ac_test_CFLAGS="${CFLAGS+set}" |
| 1042 | ac_save_CFLAGS="$CFLAGS" |
| 1043 | CFLAGS= |
| 1044 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1045 | echo "configure:1046: checking whether ${CC-cc} accepts -g" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1046 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
| 1047 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1048 | else |
| 1049 | echo 'void f(){}' > conftest.c |
| 1050 | 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] | 1051 | ac_cv_prog_cc_g=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1052 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1053 | ac_cv_prog_cc_g=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1054 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1055 | rm -f conftest* |
| 1056 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1057 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1058 | |
| 1059 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1060 | if test "$ac_test_CFLAGS" = set; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1061 | CFLAGS="$ac_save_CFLAGS" |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1062 | elif test $ac_cv_prog_cc_g = yes; then |
| 1063 | if test "$GCC" = yes; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1064 | CFLAGS="-g -O2" |
| 1065 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1066 | CFLAGS="-g" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1067 | fi |
| 1068 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1069 | if test "$GCC" = yes; then |
| 1070 | CFLAGS="-O2" |
| 1071 | else |
| 1072 | CFLAGS= |
| 1073 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1074 | fi |
| 1075 | |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1076 | |
| 1077 | # checks for UNIX variants that set C preprocessor variables |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1078 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1079 | echo "configure:1080: checking how to run the C preprocessor" >&5 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1080 | # On Suns, sometimes $CPP names a directory. |
| 1081 | if test -n "$CPP" && test -d "$CPP"; then |
| 1082 | CPP= |
| 1083 | fi |
| 1084 | if test -z "$CPP"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1085 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then |
| 1086 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1087 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1088 | # This must be in double quotes, not single quotes, because CPP may get |
| 1089 | # substituted into the Makefile and "${CC-cc}" will confuse make. |
| 1090 | CPP="${CC-cc} -E" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1091 | # 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] | 1092 | # not just through cpp. |
| 1093 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1094 | #line 1095 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1095 | #include "confdefs.h" |
| 1096 | #include <assert.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1097 | Syntax Error |
| 1098 | EOF |
| 1099 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1100 | { (eval echo configure:1101: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1101 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1102 | if test -z "$ac_err"; then |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1103 | : |
| 1104 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1105 | echo "$ac_err" >&5 |
| 1106 | echo "configure: failed program was:" >&5 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1107 | cat conftest.$ac_ext >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1108 | rm -rf conftest* |
| 1109 | CPP="${CC-cc} -E -traditional-cpp" |
| 1110 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1111 | #line 1112 "configure" |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 1112 | #include "confdefs.h" |
| 1113 | #include <assert.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1114 | Syntax Error |
| 1115 | EOF |
| 1116 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1117 | { (eval echo configure:1118: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1118 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1119 | if test -z "$ac_err"; then |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 1120 | : |
| 1121 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1122 | echo "$ac_err" >&5 |
| 1123 | echo "configure: failed program was:" >&5 |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 1124 | cat conftest.$ac_ext >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1125 | rm -rf conftest* |
| 1126 | CPP="${CC-cc} -nologo -E" |
| 1127 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1128 | #line 1129 "configure" |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 1129 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1130 | #include <assert.h> |
| 1131 | Syntax Error |
| 1132 | EOF |
| 1133 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1134 | { (eval echo configure:1135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1135 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1136 | if test -z "$ac_err"; then |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 1137 | : |
| 1138 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1139 | echo "$ac_err" >&5 |
| 1140 | echo "configure: failed program was:" >&5 |
| 1141 | cat conftest.$ac_ext >&5 |
| 1142 | rm -rf conftest* |
| 1143 | CPP=/lib/cpp |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 1144 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1145 | rm -f conftest* |
| 1146 | fi |
| 1147 | rm -f conftest* |
| 1148 | fi |
| 1149 | rm -f conftest* |
| 1150 | ac_cv_prog_CPP="$CPP" |
| 1151 | fi |
| 1152 | CPP="$ac_cv_prog_CPP" |
| 1153 | else |
| 1154 | ac_cv_prog_CPP="$CPP" |
| 1155 | fi |
| 1156 | echo "$ac_t""$CPP" 1>&6 |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 1157 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1158 | echo $ac_n "checking for AIX""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1159 | echo "configure:1160: checking for AIX" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1160 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1161 | #line 1162 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1162 | #include "confdefs.h" |
| 1163 | #ifdef _AIX |
| 1164 | yes |
| 1165 | #endif |
| 1166 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1167 | EOF |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1168 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1169 | egrep "yes" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1170 | rm -rf conftest* |
| 1171 | echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1172 | #define _ALL_SOURCE 1 |
| 1173 | EOF |
| 1174 | |
| 1175 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1176 | rm -rf conftest* |
| 1177 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1178 | fi |
| 1179 | rm -f conftest* |
| 1180 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1181 | |
| 1182 | ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'` |
| 1183 | echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1184 | echo "configure:1185: checking for minix/config.h" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1185 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 1186 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1187 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1188 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1189 | #line 1190 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1190 | #include "confdefs.h" |
| 1191 | #include <minix/config.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1192 | EOF |
| 1193 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1194 | { (eval echo configure:1195: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1195 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1196 | if test -z "$ac_err"; then |
| 1197 | rm -rf conftest* |
| 1198 | eval "ac_cv_header_$ac_safe=yes" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1199 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1200 | echo "$ac_err" >&5 |
| 1201 | echo "configure: failed program was:" >&5 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1202 | cat conftest.$ac_ext >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1203 | rm -rf conftest* |
| 1204 | eval "ac_cv_header_$ac_safe=no" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1205 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1206 | rm -f conftest* |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1207 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1208 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 1209 | echo "$ac_t""yes" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1210 | MINIX=yes |
| 1211 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1212 | echo "$ac_t""no" 1>&6 |
| 1213 | MINIX= |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1214 | fi |
| 1215 | |
| 1216 | if test "$MINIX" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1217 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1218 | #define _POSIX_SOURCE 1 |
| 1219 | EOF |
| 1220 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1221 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1222 | #define _POSIX_1_SOURCE 2 |
| 1223 | EOF |
| 1224 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1225 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1226 | #define _MINIX 1 |
| 1227 | EOF |
| 1228 | |
| 1229 | fi |
| 1230 | |
| 1231 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1232 | echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1233 | echo "configure:1234: checking for Cygwin environment" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1234 | if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then |
| 1235 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1236 | else |
| 1237 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1238 | #line 1239 "configure" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1239 | #include "confdefs.h" |
| 1240 | |
| 1241 | int main() { |
| 1242 | |
| 1243 | #ifndef __CYGWIN__ |
| 1244 | #define __CYGWIN__ __CYGWIN32__ |
| 1245 | #endif |
| 1246 | return __CYGWIN__; |
| 1247 | ; return 0; } |
| 1248 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1249 | if { (eval echo configure:1250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1250 | rm -rf conftest* |
| 1251 | ac_cv_cygwin=yes |
| 1252 | else |
| 1253 | echo "configure: failed program was:" >&5 |
| 1254 | cat conftest.$ac_ext >&5 |
| 1255 | rm -rf conftest* |
| 1256 | ac_cv_cygwin=no |
| 1257 | fi |
| 1258 | rm -f conftest* |
| 1259 | rm -f conftest* |
| 1260 | fi |
| 1261 | |
| 1262 | echo "$ac_t""$ac_cv_cygwin" 1>&6 |
| 1263 | CYGWIN= |
| 1264 | test "$ac_cv_cygwin" = yes && CYGWIN=yes |
| 1265 | echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1266 | echo "configure:1267: checking for mingw32 environment" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1267 | if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then |
| 1268 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1269 | else |
| 1270 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1271 | #line 1272 "configure" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1272 | #include "confdefs.h" |
| 1273 | |
| 1274 | int main() { |
| 1275 | return __MINGW32__; |
| 1276 | ; return 0; } |
| 1277 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1278 | if { (eval echo configure:1279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1279 | rm -rf conftest* |
| 1280 | ac_cv_mingw32=yes |
| 1281 | else |
| 1282 | echo "configure: failed program was:" >&5 |
| 1283 | cat conftest.$ac_ext >&5 |
| 1284 | rm -rf conftest* |
| 1285 | ac_cv_mingw32=no |
| 1286 | fi |
| 1287 | rm -f conftest* |
| 1288 | rm -f conftest* |
| 1289 | fi |
| 1290 | |
| 1291 | echo "$ac_t""$ac_cv_mingw32" 1>&6 |
| 1292 | MINGW32= |
| 1293 | test "$ac_cv_mingw32" = yes && MINGW32=yes |
| 1294 | |
| 1295 | |
| 1296 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1297 | echo "configure:1298: checking for executable suffix" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1298 | if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then |
| 1299 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1300 | else |
| 1301 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then |
| 1302 | ac_cv_exeext=.exe |
| 1303 | else |
| 1304 | rm -f conftest* |
| 1305 | echo 'int main () { return 0; }' > conftest.$ac_ext |
| 1306 | ac_cv_exeext= |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1307 | if { (eval echo configure:1308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1308 | for file in conftest.*; do |
| 1309 | case $file in |
| 1310 | *.c | *.o | *.obj) ;; |
| 1311 | *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; |
| 1312 | esac |
| 1313 | done |
| 1314 | else |
| 1315 | { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } |
| 1316 | fi |
| 1317 | rm -f conftest* |
| 1318 | test x"${ac_cv_exeext}" = x && ac_cv_exeext=no |
| 1319 | fi |
| 1320 | fi |
| 1321 | |
| 1322 | EXEEXT="" |
| 1323 | test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} |
| 1324 | echo "$ac_t""${ac_cv_exeext}" 1>&6 |
| 1325 | ac_exeext=$EXEEXT |
| 1326 | |
| 1327 | echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1328 | echo "configure:1329: checking for --with-suffix" >&5 |
Neil Schemenauer | dfb38e4 | 2001-01-27 06:57:08 +0000 | [diff] [blame] | 1329 | # Check whether --with-suffix or --without-suffix was given. |
| 1330 | if test "${with_suffix+set}" = set; then |
| 1331 | withval="$with_suffix" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1332 | |
Neil Schemenauer | dfb38e4 | 2001-01-27 06:57:08 +0000 | [diff] [blame] | 1333 | case $withval in |
| 1334 | no) EXEEXT=;; |
| 1335 | yes) EXEEXT=.exe;; |
| 1336 | *) EXEEXT=$withval;; |
| 1337 | esac |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1338 | fi |
| 1339 | |
| 1340 | echo "$ac_t""$EXEEXT" 1>&6 |
Jack Jansen | 1999ef4 | 2001-12-06 21:47:20 +0000 | [diff] [blame] | 1341 | |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1342 | # Test whether we're running on a non-case-sensitive system, in which |
| 1343 | # case we give a warning if no ext is given |
Jack Jansen | 1999ef4 | 2001-12-06 21:47:20 +0000 | [diff] [blame] | 1344 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1345 | echo $ac_n "checking for case-insensitive build directory""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1346 | echo "configure:1347: checking for case-insensitive build directory" >&5 |
Jack Jansen | 1999ef4 | 2001-12-06 21:47:20 +0000 | [diff] [blame] | 1347 | if test -d "python" |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1348 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1349 | echo "$ac_t""yes" 1>&6 |
Jack Jansen | 1999ef4 | 2001-12-06 21:47:20 +0000 | [diff] [blame] | 1350 | BUILDEXEEXT=.exe |
| 1351 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1352 | echo "$ac_t""no" 1>&6 |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 1353 | BUILDEXEEXT=$EXEEXT |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1354 | fi |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1355 | |
Guido van Rossum | dd997f7 | 1998-10-07 19:58:26 +0000 | [diff] [blame] | 1356 | case $MACHDEP in |
| 1357 | bsdos*) |
| 1358 | case $CC in |
| 1359 | gcc) CC="$CC -D_HAVE_BSDI";; |
| 1360 | esac;; |
| 1361 | esac |
| 1362 | |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1363 | case $ac_sys_system in |
| 1364 | hp*|HP*) |
| 1365 | case $CC in |
Guido van Rossum | cd5ff9f | 2000-09-22 16:15:54 +0000 | [diff] [blame] | 1366 | cc|*/cc) CC="$CC -Ae";; |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1367 | esac;; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1368 | Monterey*) |
| 1369 | case $CC in |
| 1370 | cc) CC="$CC -Wl,-Bexport";; |
| 1371 | esac;; |
Martin v. Löwis | a30c100 | 2001-03-06 12:10:20 +0000 | [diff] [blame] | 1372 | SunOS*) |
| 1373 | # 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] | 1374 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | a30c100 | 2001-03-06 12:10:20 +0000 | [diff] [blame] | 1375 | #define __EXTENSIONS__ 1 |
| 1376 | EOF |
| 1377 | |
| 1378 | ;; |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1379 | esac |
| 1380 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1381 | |
| 1382 | |
| 1383 | echo $ac_n "checking LIBRARY""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1384 | echo "configure:1385: checking LIBRARY" >&5 |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1385 | if test -z "$LIBRARY" |
| 1386 | then |
| 1387 | LIBRARY='libpython$(VERSION).a' |
| 1388 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1389 | echo "$ac_t""$LIBRARY" 1>&6 |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1390 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1391 | # 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] | 1392 | # name of the library into which to insert object files). BLDLIBRARY is also |
| 1393 | # the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY |
| 1394 | # is blank as the main program is not linked directly against LDLIBRARY. |
| 1395 | # LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On |
| 1396 | # systems without shared libraries, LDLIBRARY is the same as LIBRARY |
| 1397 | # (defined in the Makefiles). On Cygwin LDLIBRARY is the import library, |
| 1398 | # DLLLIBRARY is the shared (i.e., DLL) library. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1399 | # |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1400 | # RUNSHARED is used to run shared python without installed libraries |
| 1401 | # |
| 1402 | # INSTSONAME is the name of the shared library that will be use to install |
| 1403 | # on the system - some systems like version suffix, others don't |
| 1404 | |
| 1405 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1406 | |
| 1407 | |
| 1408 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1409 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1410 | LDLIBRARY="$LIBRARY" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1411 | BLDLIBRARY='$(LDLIBRARY)' |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1412 | INSTSONMAE='$(LDLIBRARY)' |
Guido van Rossum | ca563f2 | 2001-01-23 01:52:44 +0000 | [diff] [blame] | 1413 | DLLLIBRARY='' |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1414 | LDLIBRARYDIR='' |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1415 | RUNSHARED='' |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1416 | |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1417 | # 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] | 1418 | # If CXX is set, and if it is needed to link a main function that was |
| 1419 | # compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable: |
| 1420 | # python might then depend on the C++ runtime |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1421 | # 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] | 1422 | # linking. |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1423 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1424 | echo $ac_n "checking LINKCC""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1425 | echo "configure:1426: checking LINKCC" >&5 |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1426 | if test -z "$LINKCC" |
| 1427 | then |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1428 | if test -z "$CXX"; then |
| 1429 | LINKCC="\$(PURIFY) \$(CC)" |
| 1430 | else |
| 1431 | echo 'int main(){return 0;}' > conftest.$ac_ext |
| 1432 | $CXX -c conftest.$ac_ext 2>&5 |
| 1433 | if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \ |
| 1434 | && test -s conftest$ac_exeext && ./conftest$ac_exeext |
| 1435 | then |
| 1436 | LINKCC="\$(PURIFY) \$(CC)" |
| 1437 | else |
| 1438 | LINKCC="\$(PURIFY) \$(CXX)" |
| 1439 | fi |
| 1440 | rm -fr conftest* |
| 1441 | fi |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1442 | case $ac_sys_system in |
| 1443 | AIX*) |
Jack Jansen | 524a098 | 2002-03-12 15:25:52 +0000 | [diff] [blame] | 1444 | LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $LINKCC";; |
Guido van Rossum | 3c4bb80 | 1997-12-18 23:55:32 +0000 | [diff] [blame] | 1445 | dgux*) |
Martin v. Löwis | 4e732dc | 2002-03-19 15:15:32 +0000 | [diff] [blame] | 1446 | LINKCC="LD_RUN_PATH=$libdir $LINKCC";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1447 | Monterey64*) |
Martin v. Löwis | 4e732dc | 2002-03-19 15:15:32 +0000 | [diff] [blame] | 1448 | LINKCC="$LINKCC -L/usr/lib/ia64l64";; |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1449 | esac |
| 1450 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1451 | echo "$ac_t""$LINKCC" 1>&6 |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1452 | |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1453 | echo $ac_n "checking for --enable-shared""... $ac_c" 1>&6 |
| 1454 | echo "configure:1455: checking for --enable-shared" >&5 |
| 1455 | # Check whether --enable-shared or --disable-shared was given. |
| 1456 | if test "${enable_shared+set}" = set; then |
| 1457 | enableval="$enable_shared" |
| 1458 | : |
| 1459 | fi |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1460 | |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1461 | |
| 1462 | if test -z "$enable_shared" |
| 1463 | then |
| 1464 | enable_shared="no" |
| 1465 | fi |
| 1466 | echo "$ac_t""$enable_shared" 1>&6 |
| 1467 | |
| 1468 | |
| 1469 | echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6 |
| 1470 | echo "configure:1471: checking LDLIBRARY" >&5 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1471 | |
Guido van Rossum | b855216 | 2001-09-05 14:58:11 +0000 | [diff] [blame] | 1472 | # MacOSX framework builds need more magic. LDLIBRARY is the dynamic |
| 1473 | # library that we build, but we do not want to link against it (we |
| 1474 | # will find it with a -framework option). For this reason there is an |
| 1475 | # extra variable BLDLIBRARY against which Python and the extension |
| 1476 | # modules are linked, BLDLIBRARY. This is normally the same as |
| 1477 | # LDLIBRARY, but empty for MacOSX framework builds. |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1478 | if test "$enable_framework" |
| 1479 | then |
| 1480 | LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' |
| 1481 | LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)' |
| 1482 | BLDLIBRARY='' |
| 1483 | else |
| 1484 | BLDLIBRARY='$(LDLIBRARY)' |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1485 | fi |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1486 | |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1487 | # Other platforms follow |
| 1488 | if test $enable_shared = "yes"; then |
| 1489 | case $ac_sys_system in |
| 1490 | BeOS*) |
| 1491 | LDLIBRARY='libpython$(VERSION).so' |
| 1492 | ;; |
| 1493 | CYGWIN*) |
| 1494 | LDLIBRARY='libpython$(VERSION).dll.a' |
| 1495 | DLLLIBRARY='libpython$(VERSION).dll' |
| 1496 | ;; |
| 1497 | SunOS*) |
| 1498 | LDLIBRARY='libpython$(VERSION).so' |
| 1499 | BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)' |
| 1500 | RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH |
| 1501 | ;; |
| 1502 | Linux*) |
| 1503 | LDLIBRARY='libpython$(VERSION).so' |
| 1504 | BLDLIBRARY='-L. -lpython$(VERSION)' |
| 1505 | RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH |
| 1506 | INSTSONAME="$LDLIBRARY".$SOVERSION |
| 1507 | ;; |
| 1508 | hp*|HP*) |
| 1509 | LDLIBRARY='libpython$(VERSION).sl' |
| 1510 | BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)' |
| 1511 | RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH |
| 1512 | ;; |
| 1513 | OSF*) |
| 1514 | LDLIBRARY='libpython$(VERSION).so' |
| 1515 | BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)' |
| 1516 | RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH |
| 1517 | ;; |
| 1518 | esac |
| 1519 | # DG/UX requires some fancy ld contortions to produce a .so from an .a |
| 1520 | case $MACHDEP in |
| 1521 | dguxR4) |
| 1522 | LDLIBRARY='libpython$(VERSION).so' |
| 1523 | OPT="$OPT -pic" |
| 1524 | ;; |
| 1525 | esac |
| 1526 | fi |
| 1527 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1528 | echo "$ac_t""$LDLIBRARY" 1>&6 |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1529 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1530 | # Extract the first word of "ranlib", so it can be a program name with args. |
| 1531 | set dummy ranlib; ac_word=$2 |
| 1532 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1533 | echo "configure:1534: checking for $ac_word" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1534 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
| 1535 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1536 | else |
| 1537 | if test -n "$RANLIB"; then |
| 1538 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. |
| 1539 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1540 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 1541 | ac_dummy="$PATH" |
| 1542 | for ac_dir in $ac_dummy; do |
| 1543 | test -z "$ac_dir" && ac_dir=. |
| 1544 | if test -f $ac_dir/$ac_word; then |
| 1545 | ac_cv_prog_RANLIB="ranlib" |
| 1546 | break |
| 1547 | fi |
| 1548 | done |
| 1549 | IFS="$ac_save_ifs" |
| 1550 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1551 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1552 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1553 | RANLIB="$ac_cv_prog_RANLIB" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1554 | if test -n "$RANLIB"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1555 | echo "$ac_t""$RANLIB" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1556 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1557 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1558 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1559 | |
| 1560 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1561 | for ac_prog in ar aal |
| 1562 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1563 | # 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] | 1564 | set dummy $ac_prog; ac_word=$2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1565 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1566 | echo "configure:1567: checking for $ac_word" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1567 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
| 1568 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1569 | else |
| 1570 | if test -n "$AR"; then |
| 1571 | ac_cv_prog_AR="$AR" # Let the user override the test. |
| 1572 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1573 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 1574 | ac_dummy="$PATH" |
| 1575 | for ac_dir in $ac_dummy; do |
| 1576 | test -z "$ac_dir" && ac_dir=. |
| 1577 | if test -f $ac_dir/$ac_word; then |
| 1578 | ac_cv_prog_AR="$ac_prog" |
| 1579 | break |
| 1580 | fi |
| 1581 | done |
| 1582 | IFS="$ac_save_ifs" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1583 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1584 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1585 | AR="$ac_cv_prog_AR" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1586 | if test -n "$AR"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1587 | echo "$ac_t""$AR" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1588 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1589 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1590 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1591 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1592 | test -n "$AR" && break |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1593 | done |
| 1594 | test -n "$AR" || AR="ar" |
| 1595 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1596 | |
Neil Schemenauer | a42c827 | 2001-03-31 00:01:55 +0000 | [diff] [blame] | 1597 | case $MACHDEP in |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 1598 | bsdos*|hp*|HP*) |
| 1599 | # install -d does not work on BSDI or HP-UX |
Neil Schemenauer | a42c827 | 2001-03-31 00:01:55 +0000 | [diff] [blame] | 1600 | if test -z "$INSTALL" |
| 1601 | then |
| 1602 | INSTALL="${srcdir}/install-sh -c" |
| 1603 | fi |
| 1604 | esac |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1605 | ac_aux_dir= |
| 1606 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do |
| 1607 | if test -f $ac_dir/install-sh; then |
| 1608 | ac_aux_dir=$ac_dir |
| 1609 | ac_install_sh="$ac_aux_dir/install-sh -c" |
| 1610 | break |
| 1611 | elif test -f $ac_dir/install.sh; then |
| 1612 | ac_aux_dir=$ac_dir |
| 1613 | ac_install_sh="$ac_aux_dir/install.sh -c" |
| 1614 | break |
| 1615 | fi |
| 1616 | done |
| 1617 | if test -z "$ac_aux_dir"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1618 | { 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] | 1619 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1620 | ac_config_guess=$ac_aux_dir/config.guess |
| 1621 | ac_config_sub=$ac_aux_dir/config.sub |
| 1622 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1623 | |
| 1624 | # Find a good install program. We prefer a C program (faster), |
| 1625 | # so one script is as good as another. But avoid the broken or |
| 1626 | # incompatible versions: |
| 1627 | # SysV /etc/install, /usr/sbin/install |
| 1628 | # SunOS /usr/etc/install |
| 1629 | # IRIX /sbin/install |
| 1630 | # AIX /bin/install |
| 1631 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag |
| 1632 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args |
| 1633 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" |
| 1634 | # ./install, which can be erroneously created by make from ./install.sh. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1635 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1636 | echo "configure:1637: checking for a BSD compatible install" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1637 | if test -z "$INSTALL"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1638 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then |
| 1639 | echo $ac_n "(cached) $ac_c" 1>&6 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1640 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1641 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1642 | for ac_dir in $PATH; do |
| 1643 | # Account for people who put trailing slashes in PATH elements. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1644 | case "$ac_dir/" in |
| 1645 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1646 | *) |
| 1647 | # OSF1 and SCO ODT 3.0 have their own names for install. |
| 1648 | # Don't use installbsd from OSF since it installs stuff as root |
| 1649 | # by default. |
| 1650 | for ac_prog in ginstall scoinst install; do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1651 | if test -f $ac_dir/$ac_prog; then |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1652 | if test $ac_prog = install && |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1653 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1654 | # AIX install. It has an incompatible calling convention. |
| 1655 | : |
| 1656 | else |
| 1657 | ac_cv_path_install="$ac_dir/$ac_prog -c" |
| 1658 | break 2 |
| 1659 | fi |
| 1660 | fi |
| 1661 | done |
| 1662 | ;; |
| 1663 | esac |
| 1664 | done |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1665 | IFS="$ac_save_IFS" |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1666 | |
| 1667 | fi |
| 1668 | if test "${ac_cv_path_install+set}" = set; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1669 | INSTALL="$ac_cv_path_install" |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1670 | else |
| 1671 | # As a last resort, use the slow shell script. We don't cache a |
| 1672 | # path for INSTALL within a source directory, because that will |
| 1673 | # break other packages using the cache if that directory is |
| 1674 | # removed, or if the path is relative. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1675 | INSTALL="$ac_install_sh" |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1676 | fi |
| 1677 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1678 | echo "$ac_t""$INSTALL" 1>&6 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1679 | |
| 1680 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. |
| 1681 | # It thinks the first close brace ends the variable substitution. |
| 1682 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' |
| 1683 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1684 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1685 | |
| 1686 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' |
| 1687 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1688 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 1689 | # Not every filesystem supports hard links |
| 1690 | |
| 1691 | if test -z "$LN" ; then |
| 1692 | case $ac_sys_system in |
| 1693 | BeOS*) LN="ln -s";; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1694 | CYGWIN*) LN="ln -s";; |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 1695 | *) LN=ln;; |
| 1696 | esac |
| 1697 | fi |
| 1698 | |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1699 | # Check for --with-pydebug |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1700 | echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1701 | echo "configure:1702: checking for --with-pydebug" >&5 |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1702 | # Check whether --with-pydebug or --without-pydebug was given. |
| 1703 | if test "${with_pydebug+set}" = set; then |
| 1704 | withval="$with_pydebug" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1705 | |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1706 | if test "$withval" != no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1707 | then cat >> confdefs.h <<\EOF |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1708 | #define Py_DEBUG 1 |
| 1709 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1710 | echo "$ac_t""yes" 1>&6; Py_DEBUG='true' |
| 1711 | else echo "$ac_t""no" 1>&6; Py_DEBUG='false' |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1712 | fi |
| 1713 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1714 | echo "$ac_t""no" 1>&6 |
| 1715 | fi |
| 1716 | |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1717 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1718 | # Optimizer/debugger flags |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1719 | |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1720 | if test -z "$OPT" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1721 | then |
Guido van Rossum | edca74a | 1997-07-18 23:29:40 +0000 | [diff] [blame] | 1722 | case $GCC in |
| 1723 | yes) |
| 1724 | case $ac_cv_prog_cc_g in |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1725 | yes) |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1726 | if test "$Py_DEBUG" = 'true' ; then |
| 1727 | # Optimization messes up debuggers, so turn it off for |
| 1728 | # debug builds. |
| 1729 | OPT="-g -Wall -Wstrict-prototypes" |
| 1730 | else |
| 1731 | OPT="-g -O3 -Wall -Wstrict-prototypes" |
| 1732 | fi;; |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1733 | *) |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1734 | OPT="-O3 -Wall -Wstrict-prototypes";; |
| 1735 | esac |
| 1736 | ;; |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1737 | *) |
| 1738 | case $ac_sys_system in |
Martin v. Löwis | 25ae43b | 2001-10-07 08:39:18 +0000 | [diff] [blame] | 1739 | OpenUNIX*|UnixWare*) |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1740 | OPT="-O -K pentium,host,inline,loop_unroll,alloca ";; |
| 1741 | *) |
| 1742 | OPT="-O";; |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1743 | esac |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1744 | esac |
Jack Jansen | ca06bc6 | 2001-08-03 15:32:23 +0000 | [diff] [blame] | 1745 | case $ac_sys_system in |
| 1746 | Darwin*) |
Jack Jansen | 524a098 | 2002-03-12 15:25:52 +0000 | [diff] [blame] | 1747 | OPT="$OPT -Wno-long-double -no-cpp-precomp";; |
Jack Jansen | ca06bc6 | 2001-08-03 15:32:23 +0000 | [diff] [blame] | 1748 | esac |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1749 | fi |
| 1750 | |
Fred Drake | e1ceaa0 | 2001-12-04 20:55:47 +0000 | [diff] [blame] | 1751 | if test "$Py_DEBUG" = 'true'; then |
| 1752 | : |
| 1753 | else |
| 1754 | OPT="-DNDEBUG $OPT" |
| 1755 | fi |
| 1756 | |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1757 | # The current (beta) Monterey compiler dies with optimizations |
| 1758 | case $ac_sys_system in |
| 1759 | Monterey*) OPT="";; |
| 1760 | esac |
| 1761 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 1762 | if test "$ac_arch_flags" |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 1763 | then |
| 1764 | OPT="$OPT $ac_arch_flags" |
| 1765 | fi |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 1766 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1767 | echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1768 | echo "configure:1769: checking whether $CC accepts -OPT:Olimit=0" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1769 | if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then |
| 1770 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1771 | else |
| 1772 | ac_save_cc="$CC" |
| 1773 | CC="$CC -OPT:Olimit=0" |
| 1774 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 1775 | ac_cv_opt_olimit_ok=no |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1776 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1777 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1778 | #line 1779 "configure" |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1779 | #include "confdefs.h" |
| 1780 | int main() { return 0; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1781 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1782 | if { (eval echo configure:1783: \"$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] | 1783 | then |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1784 | ac_cv_opt_olimit_ok=yes |
| 1785 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1786 | echo "configure: failed program was:" >&5 |
| 1787 | cat conftest.$ac_ext >&5 |
| 1788 | rm -fr conftest* |
| 1789 | ac_cv_opt_olimit_ok=no |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1790 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1791 | rm -fr conftest* |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1792 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1793 | |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1794 | CC="$ac_save_cc" |
| 1795 | fi |
| 1796 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1797 | echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6 |
Guido van Rossum | 2efa34b | 1997-10-23 17:43:11 +0000 | [diff] [blame] | 1798 | if test $ac_cv_opt_olimit_ok = yes; then |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 1799 | case $ac_sys_system in |
| 1800 | Darwin*) OPT="$OPT" ;; |
| 1801 | *) OPT="$OPT -OPT:Olimit=0";; |
| 1802 | esac |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1803 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1804 | echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1805 | echo "configure:1806: checking whether $CC accepts -Olimit 1500" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1806 | if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then |
| 1807 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1808 | else |
| 1809 | ac_save_cc="$CC" |
| 1810 | CC="$CC -Olimit 1500" |
| 1811 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 1812 | ac_cv_olimit_ok=no |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1813 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1814 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1815 | #line 1816 "configure" |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1816 | #include "confdefs.h" |
| 1817 | int main() { return 0; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1818 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1819 | if { (eval echo configure:1820: \"$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] | 1820 | then |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1821 | ac_cv_olimit_ok=yes |
| 1822 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1823 | echo "configure: failed program was:" >&5 |
| 1824 | cat conftest.$ac_ext >&5 |
| 1825 | rm -fr conftest* |
| 1826 | ac_cv_olimit_ok=no |
Guido van Rossum | 201afe5 | 1997-05-14 21:14:44 +0000 | [diff] [blame] | 1827 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1828 | rm -fr conftest* |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1829 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1830 | |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1831 | CC="$ac_save_cc" |
| 1832 | fi |
| 1833 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1834 | echo "$ac_t""$ac_cv_olimit_ok" 1>&6 |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1835 | if test $ac_cv_olimit_ok = yes; then |
| 1836 | OPT="$OPT -Olimit 1500" |
| 1837 | fi |
| 1838 | fi |
| 1839 | |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1840 | # On some compilers, pthreads are available without further options |
| 1841 | # (e.g. MacOS X). On some of these systems, the compiler will not |
| 1842 | # complain if unaccepted options are passed (e.g. gcc on Mac OS X). |
| 1843 | # So we have to see first whether pthreads are available without |
| 1844 | # options before we can check whether -Kpthread improves anything. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1845 | echo $ac_n "checking whether pthreads are available without options""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1846 | echo "configure:1847: checking whether pthreads are available without options" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1847 | if eval "test \"`echo '$''{'ac_cv_pthread_is_default'+set}'`\" = set"; then |
| 1848 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1849 | else |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1850 | if test "$cross_compiling" = yes; then |
| 1851 | ac_cv_pthread_is_default=no |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame] | 1852 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1853 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1854 | #line 1855 "configure" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1855 | #include "confdefs.h" |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame] | 1856 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1857 | #include <pthread.h> |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame] | 1858 | |
| 1859 | void* routine(void* p){return NULL;} |
| 1860 | |
| 1861 | int main(){ |
| 1862 | pthread_t p; |
| 1863 | if(pthread_create(&p,NULL,routine,NULL)!=0) |
| 1864 | return 1; |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 1865 | (void)pthread_detach(p); |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame] | 1866 | return 0; |
| 1867 | } |
| 1868 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1869 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1870 | if { (eval echo configure:1871: \"$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] | 1871 | then |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1872 | ac_cv_pthread_is_default=yes |
| 1873 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1874 | echo "configure: failed program was:" >&5 |
| 1875 | cat conftest.$ac_ext >&5 |
| 1876 | rm -fr conftest* |
| 1877 | ac_cv_pthread_is_default=no |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1878 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1879 | rm -fr conftest* |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1880 | fi |
| 1881 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1882 | |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1883 | fi |
| 1884 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1885 | echo "$ac_t""$ac_cv_pthread_is_default" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1886 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1887 | |
| 1888 | if test $ac_cv_pthread_is_default = yes |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1889 | then |
| 1890 | ac_cv_kpthread=no |
| 1891 | else |
| 1892 | # -Kpthread, if available, provides the right #defines |
| 1893 | # and linker options to make pthread_create available |
| 1894 | # Some compilers won't report that they do not support -Kpthread, |
| 1895 | # so we need to run a program to see whether it really made the |
| 1896 | # function available. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1897 | echo $ac_n "checking whether $CC accepts -Kpthread""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1898 | echo "configure:1899: checking whether $CC accepts -Kpthread" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1899 | if eval "test \"`echo '$''{'ac_cv_kpthread'+set}'`\" = set"; then |
| 1900 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1901 | else |
| 1902 | ac_save_cc="$CC" |
| 1903 | CC="$CC -Kpthread" |
| 1904 | if test "$cross_compiling" = yes; then |
| 1905 | ac_cv_kpthread=no |
| 1906 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1907 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1908 | #line 1909 "configure" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1909 | #include "confdefs.h" |
| 1910 | |
| 1911 | #include <pthread.h> |
| 1912 | |
| 1913 | void* routine(void* p){return NULL;} |
| 1914 | |
| 1915 | int main(){ |
| 1916 | pthread_t p; |
| 1917 | if(pthread_create(&p,NULL,routine,NULL)!=0) |
| 1918 | return 1; |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 1919 | (void)pthread_detach(p); |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1920 | return 0; |
| 1921 | } |
| 1922 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1923 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1924 | if { (eval echo configure:1925: \"$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] | 1925 | then |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1926 | ac_cv_kpthread=yes |
| 1927 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1928 | echo "configure: failed program was:" >&5 |
| 1929 | cat conftest.$ac_ext >&5 |
| 1930 | rm -fr conftest* |
| 1931 | ac_cv_kpthread=no |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1932 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1933 | rm -fr conftest* |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame] | 1934 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1935 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1936 | CC="$ac_save_cc" |
| 1937 | fi |
| 1938 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1939 | echo "$ac_t""$ac_cv_kpthread" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1940 | fi |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1941 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1942 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1943 | # checks for header files |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1944 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1945 | echo "configure:1946: checking for ANSI C header files" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1946 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
| 1947 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1948 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1949 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1950 | #line 1951 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1951 | #include "confdefs.h" |
| 1952 | #include <stdlib.h> |
| 1953 | #include <stdarg.h> |
| 1954 | #include <string.h> |
| 1955 | #include <float.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1956 | EOF |
| 1957 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1958 | { (eval echo configure:1959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1959 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1960 | if test -z "$ac_err"; then |
| 1961 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1962 | ac_cv_header_stdc=yes |
| 1963 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1964 | echo "$ac_err" >&5 |
| 1965 | echo "configure: failed program was:" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1966 | cat conftest.$ac_ext >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1967 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1968 | ac_cv_header_stdc=no |
| 1969 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1970 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1971 | |
| 1972 | if test $ac_cv_header_stdc = yes; then |
| 1973 | # 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] | 1974 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1975 | #line 1976 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1976 | #include "confdefs.h" |
| 1977 | #include <string.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1978 | EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1979 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1980 | egrep "memchr" >/dev/null 2>&1; then |
| 1981 | : |
| 1982 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1983 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1984 | ac_cv_header_stdc=no |
| 1985 | fi |
| 1986 | rm -f conftest* |
| 1987 | |
| 1988 | fi |
| 1989 | |
| 1990 | if test $ac_cv_header_stdc = yes; then |
| 1991 | # 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] | 1992 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 1993 | #line 1994 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1994 | #include "confdefs.h" |
| 1995 | #include <stdlib.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1996 | EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1997 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1998 | egrep "free" >/dev/null 2>&1; then |
| 1999 | : |
| 2000 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2001 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2002 | ac_cv_header_stdc=no |
| 2003 | fi |
| 2004 | rm -f conftest* |
| 2005 | |
| 2006 | fi |
| 2007 | |
| 2008 | if test $ac_cv_header_stdc = yes; then |
| 2009 | # /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] | 2010 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2011 | : |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2012 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2013 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2014 | #line 2015 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2015 | #include "confdefs.h" |
| 2016 | #include <ctype.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2017 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') |
| 2018 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 2019 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2020 | int main () { int i; for (i = 0; i < 256; i++) |
| 2021 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); |
| 2022 | exit (0); } |
| 2023 | |
| 2024 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2025 | if { (eval echo configure:2026: \"$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] | 2026 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2027 | : |
| 2028 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2029 | echo "configure: failed program was:" >&5 |
| 2030 | cat conftest.$ac_ext >&5 |
| 2031 | rm -fr conftest* |
| 2032 | ac_cv_header_stdc=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2033 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2034 | rm -fr conftest* |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2035 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 2036 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2037 | fi |
| 2038 | fi |
| 2039 | |
| 2040 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 |
| 2041 | if test $ac_cv_header_stdc = yes; then |
| 2042 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2043 | #define STDC_HEADERS 1 |
| 2044 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2045 | |
| 2046 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2047 | |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2048 | for ac_hdr in dlfcn.h fcntl.h grp.h limits.h langinfo.h \ |
| 2049 | libintl.h locale.h ncurses.h poll.h pthread.h \ |
Eric S. Raymond | d2d75d3 | 2001-01-16 15:26:34 +0000 | [diff] [blame] | 2050 | 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] | 2051 | 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] | 2052 | 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] | 2053 | 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] | 2054 | 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] | 2055 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2056 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
| 2057 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2058 | echo "configure:2059: checking for $ac_hdr" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2059 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 2060 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2061 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2062 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2063 | #line 2064 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2064 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2065 | #include <$ac_hdr> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2066 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2067 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2068 | { (eval echo configure:2069: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2069 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 2070 | if test -z "$ac_err"; then |
| 2071 | rm -rf conftest* |
| 2072 | eval "ac_cv_header_$ac_safe=yes" |
| 2073 | else |
| 2074 | echo "$ac_err" >&5 |
| 2075 | echo "configure: failed program was:" >&5 |
| 2076 | cat conftest.$ac_ext >&5 |
| 2077 | rm -rf conftest* |
| 2078 | eval "ac_cv_header_$ac_safe=no" |
| 2079 | fi |
| 2080 | rm -f conftest* |
| 2081 | fi |
| 2082 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 2083 | echo "$ac_t""yes" 1>&6 |
| 2084 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
| 2085 | cat >> confdefs.h <<EOF |
| 2086 | #define $ac_tr_hdr 1 |
| 2087 | EOF |
| 2088 | |
| 2089 | else |
| 2090 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2091 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2092 | done |
| 2093 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2094 | ac_header_dirent=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2095 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h |
| 2096 | do |
| 2097 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
| 2098 | echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2099 | echo "configure:2100: checking for $ac_hdr that defines DIR" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2100 | if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then |
| 2101 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2102 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2103 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2104 | #line 2105 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2105 | #include "confdefs.h" |
| 2106 | #include <sys/types.h> |
| 2107 | #include <$ac_hdr> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2108 | int main() { |
| 2109 | DIR *dirp = 0; |
| 2110 | ; return 0; } |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2111 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2112 | if { (eval echo configure:2113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2113 | rm -rf conftest* |
| 2114 | eval "ac_cv_header_dirent_$ac_safe=yes" |
| 2115 | else |
| 2116 | echo "configure: failed program was:" >&5 |
| 2117 | cat conftest.$ac_ext >&5 |
| 2118 | rm -rf conftest* |
| 2119 | eval "ac_cv_header_dirent_$ac_safe=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2120 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2121 | rm -f conftest* |
| 2122 | fi |
| 2123 | if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then |
| 2124 | echo "$ac_t""yes" 1>&6 |
| 2125 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
| 2126 | cat >> confdefs.h <<EOF |
| 2127 | #define $ac_tr_hdr 1 |
| 2128 | EOF |
| 2129 | ac_header_dirent=$ac_hdr; break |
| 2130 | else |
| 2131 | echo "$ac_t""no" 1>&6 |
| 2132 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2133 | done |
| 2134 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. |
| 2135 | if test $ac_header_dirent = dirent.h; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2136 | echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2137 | echo "configure:2138: checking for opendir in -ldir" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2138 | ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` |
| 2139 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 2140 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2141 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2142 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2143 | LIBS="-ldir $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2144 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2145 | #line 2146 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2146 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2147 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 2148 | /* 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] | 2149 | builtin and then its argument prototype would still apply. */ |
| 2150 | char opendir(); |
| 2151 | |
| 2152 | int main() { |
| 2153 | opendir() |
| 2154 | ; return 0; } |
| 2155 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2156 | if { (eval echo configure:2157: \"$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] | 2157 | rm -rf conftest* |
| 2158 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2159 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2160 | echo "configure: failed program was:" >&5 |
| 2161 | cat conftest.$ac_ext >&5 |
| 2162 | rm -rf conftest* |
| 2163 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2164 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2165 | rm -f conftest* |
| 2166 | LIBS="$ac_save_LIBS" |
| 2167 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2168 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2169 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 2170 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2171 | LIBS="$LIBS -ldir" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2172 | else |
| 2173 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2174 | fi |
| 2175 | |
| 2176 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2177 | echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2178 | echo "configure:2179: checking for opendir in -lx" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2179 | ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` |
| 2180 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 2181 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2182 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2183 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2184 | LIBS="-lx $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2185 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2186 | #line 2187 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2187 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2188 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 2189 | /* 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] | 2190 | builtin and then its argument prototype would still apply. */ |
| 2191 | char opendir(); |
| 2192 | |
| 2193 | int main() { |
| 2194 | opendir() |
| 2195 | ; return 0; } |
| 2196 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2197 | if { (eval echo configure:2198: \"$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] | 2198 | rm -rf conftest* |
| 2199 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2200 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2201 | echo "configure: failed program was:" >&5 |
| 2202 | cat conftest.$ac_ext >&5 |
| 2203 | rm -rf conftest* |
| 2204 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2205 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2206 | rm -f conftest* |
| 2207 | LIBS="$ac_save_LIBS" |
| 2208 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2209 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2210 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 2211 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2212 | LIBS="$LIBS -lx" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2213 | else |
| 2214 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2215 | fi |
| 2216 | |
| 2217 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2218 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2219 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2220 | # checks for typedefs |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2221 | was_it_defined=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2222 | echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2223 | echo "configure:2224: checking for clock_t in time.h" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2224 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2225 | #line 2226 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2226 | #include "confdefs.h" |
| 2227 | #include <time.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2228 | EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2229 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2230 | egrep "clock_t" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2231 | rm -rf conftest* |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2232 | was_it_defined=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2233 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2234 | rm -rf conftest* |
| 2235 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2236 | #define clock_t long |
| 2237 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2238 | |
| 2239 | fi |
| 2240 | rm -f conftest* |
| 2241 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2242 | echo "$ac_t""$was_it_defined" 1>&6 |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2243 | |
Guido van Rossum | 810cc51 | 2001-09-09 23:51:39 +0000 | [diff] [blame] | 2244 | # Two defines needed to enable largefile support on various platforms |
| 2245 | # These may affect some typedefs |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2246 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 810cc51 | 2001-09-09 23:51:39 +0000 | [diff] [blame] | 2247 | #define _LARGEFILE_SOURCE 1 |
| 2248 | EOF |
| 2249 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2250 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 810cc51 | 2001-09-09 23:51:39 +0000 | [diff] [blame] | 2251 | #define _FILE_OFFSET_BITS 64 |
| 2252 | EOF |
| 2253 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2254 | |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 2255 | # Add some code to confdefs.h so that the test for off_t works on SCO |
| 2256 | cat >> confdefs.h <<\EOF |
| 2257 | #if defined(SCO_DS) |
| 2258 | #undef _OFF_T |
| 2259 | #endif |
| 2260 | EOF |
| 2261 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2262 | # Type availability checks |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2263 | echo $ac_n "checking for mode_t""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2264 | echo "configure:2265: checking for mode_t" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2265 | if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then |
| 2266 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2267 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2268 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2269 | #line 2270 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2270 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2271 | #include <sys/types.h> |
| 2272 | #if STDC_HEADERS |
| 2273 | #include <stdlib.h> |
| 2274 | #include <stddef.h> |
| 2275 | #endif |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 2276 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2277 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2278 | egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
| 2279 | rm -rf conftest* |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 2280 | ac_cv_type_mode_t=yes |
| 2281 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2282 | rm -rf conftest* |
| 2283 | ac_cv_type_mode_t=no |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 2284 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2285 | rm -f conftest* |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 2286 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2287 | fi |
| 2288 | echo "$ac_t""$ac_cv_type_mode_t" 1>&6 |
| 2289 | if test $ac_cv_type_mode_t = no; then |
| 2290 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2291 | #define mode_t int |
| 2292 | EOF |
| 2293 | |
| 2294 | fi |
| 2295 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2296 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2297 | echo "configure:2298: checking for off_t" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2298 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
| 2299 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2300 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2301 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2302 | #line 2303 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2303 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2304 | #include <sys/types.h> |
| 2305 | #if STDC_HEADERS |
| 2306 | #include <stdlib.h> |
| 2307 | #include <stddef.h> |
| 2308 | #endif |
| 2309 | EOF |
| 2310 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2311 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
| 2312 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2313 | ac_cv_type_off_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2314 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2315 | rm -rf conftest* |
| 2316 | ac_cv_type_off_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2317 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2318 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2319 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2320 | fi |
| 2321 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 |
| 2322 | if test $ac_cv_type_off_t = no; then |
| 2323 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2324 | #define off_t long |
| 2325 | EOF |
| 2326 | |
| 2327 | fi |
| 2328 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2329 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2330 | echo "configure:2331: checking for pid_t" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2331 | if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then |
| 2332 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2333 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2334 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2335 | #line 2336 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2336 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2337 | #include <sys/types.h> |
| 2338 | #if STDC_HEADERS |
| 2339 | #include <stdlib.h> |
| 2340 | #include <stddef.h> |
| 2341 | #endif |
| 2342 | EOF |
| 2343 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2344 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
| 2345 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2346 | ac_cv_type_pid_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2347 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2348 | rm -rf conftest* |
| 2349 | ac_cv_type_pid_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2350 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2351 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2352 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2353 | fi |
| 2354 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 |
| 2355 | if test $ac_cv_type_pid_t = no; then |
| 2356 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2357 | #define pid_t int |
| 2358 | EOF |
| 2359 | |
| 2360 | fi |
| 2361 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2362 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2363 | echo "configure:2364: checking return type of signal handlers" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2364 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
| 2365 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2366 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2367 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2368 | #line 2369 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2369 | #include "confdefs.h" |
| 2370 | #include <sys/types.h> |
| 2371 | #include <signal.h> |
| 2372 | #ifdef signal |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2373 | #undef signal |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2374 | #endif |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2375 | #ifdef __cplusplus |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2376 | extern "C" void (*signal (int, void (*)(int)))(int); |
| 2377 | #else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2378 | void (*signal ()) (); |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2379 | #endif |
| 2380 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2381 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2382 | int i; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2383 | ; return 0; } |
| 2384 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2385 | if { (eval echo configure:2386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2386 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2387 | ac_cv_type_signal=void |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2388 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2389 | echo "configure: failed program was:" >&5 |
| 2390 | cat conftest.$ac_ext >&5 |
| 2391 | rm -rf conftest* |
| 2392 | ac_cv_type_signal=int |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2393 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2394 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2395 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2396 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2397 | echo "$ac_t""$ac_cv_type_signal" 1>&6 |
| 2398 | cat >> confdefs.h <<EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2399 | #define RETSIGTYPE $ac_cv_type_signal |
| 2400 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2401 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2402 | |
| 2403 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2404 | echo "configure:2405: checking for size_t" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2405 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
| 2406 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2407 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2408 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2409 | #line 2410 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2410 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2411 | #include <sys/types.h> |
| 2412 | #if STDC_HEADERS |
| 2413 | #include <stdlib.h> |
| 2414 | #include <stddef.h> |
| 2415 | #endif |
| 2416 | EOF |
| 2417 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2418 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
| 2419 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2420 | ac_cv_type_size_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2421 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2422 | rm -rf conftest* |
| 2423 | ac_cv_type_size_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2424 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2425 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2426 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2427 | fi |
| 2428 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 |
| 2429 | if test $ac_cv_type_size_t = no; then |
| 2430 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2431 | #define size_t unsigned |
| 2432 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2433 | |
| 2434 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2435 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2436 | echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2437 | echo "configure:2438: checking for uid_t in sys/types.h" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2438 | if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then |
| 2439 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2440 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2441 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2442 | #line 2443 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2443 | #include "confdefs.h" |
| 2444 | #include <sys/types.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2445 | EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2446 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2447 | egrep "uid_t" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2448 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2449 | ac_cv_type_uid_t=yes |
| 2450 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2451 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2452 | ac_cv_type_uid_t=no |
| 2453 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2454 | rm -f conftest* |
| 2455 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2456 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 2457 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2458 | echo "$ac_t""$ac_cv_type_uid_t" 1>&6 |
| 2459 | if test $ac_cv_type_uid_t = no; then |
| 2460 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2461 | #define uid_t int |
| 2462 | EOF |
| 2463 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2464 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2465 | #define gid_t int |
| 2466 | EOF |
| 2467 | |
| 2468 | fi |
| 2469 | |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 2470 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2471 | # Sizes of various common basic types |
| 2472 | echo $ac_n "checking size of int""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2473 | echo "configure:2474: checking size of int" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2474 | if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then |
| 2475 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2476 | else |
| 2477 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2478 | ac_cv_sizeof_int=4 |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2479 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2480 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2481 | #line 2482 "configure" |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2482 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2483 | #include <stdio.h> |
| 2484 | main() |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2485 | { |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2486 | FILE *f=fopen("conftestval", "w"); |
| 2487 | if (!f) exit(1); |
| 2488 | fprintf(f, "%d\n", sizeof(int)); |
| 2489 | exit(0); |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2490 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2491 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2492 | if { (eval echo configure:2493: \"$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] | 2493 | then |
| 2494 | ac_cv_sizeof_int=`cat conftestval` |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2495 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2496 | echo "configure: failed program was:" >&5 |
| 2497 | cat conftest.$ac_ext >&5 |
| 2498 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2499 | ac_cv_sizeof_int=0 |
| 2500 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2501 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2502 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2503 | |
| 2504 | fi |
| 2505 | echo "$ac_t""$ac_cv_sizeof_int" 1>&6 |
| 2506 | cat >> confdefs.h <<EOF |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2507 | #define SIZEOF_INT $ac_cv_sizeof_int |
| 2508 | EOF |
| 2509 | |
| 2510 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2511 | echo $ac_n "checking size of long""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2512 | echo "configure:2513: checking size of long" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2513 | if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then |
| 2514 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2515 | else |
| 2516 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2517 | ac_cv_sizeof_long=4 |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2518 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2519 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2520 | #line 2521 "configure" |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2521 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2522 | #include <stdio.h> |
| 2523 | main() |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2524 | { |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2525 | FILE *f=fopen("conftestval", "w"); |
| 2526 | if (!f) exit(1); |
| 2527 | fprintf(f, "%d\n", sizeof(long)); |
| 2528 | exit(0); |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2529 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2530 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2531 | if { (eval echo configure:2532: \"$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] | 2532 | then |
| 2533 | ac_cv_sizeof_long=`cat conftestval` |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2534 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2535 | echo "configure: failed program was:" >&5 |
| 2536 | cat conftest.$ac_ext >&5 |
| 2537 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2538 | ac_cv_sizeof_long=0 |
| 2539 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2540 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2541 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2542 | |
| 2543 | fi |
| 2544 | echo "$ac_t""$ac_cv_sizeof_long" 1>&6 |
| 2545 | cat >> confdefs.h <<EOF |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2546 | #define SIZEOF_LONG $ac_cv_sizeof_long |
| 2547 | EOF |
| 2548 | |
| 2549 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2550 | echo $ac_n "checking size of void *""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2551 | echo "configure:2552: checking size of void *" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2552 | if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then |
| 2553 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2554 | else |
| 2555 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2556 | ac_cv_sizeof_void_p=4 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2557 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2558 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2559 | #line 2560 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2560 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2561 | #include <stdio.h> |
| 2562 | main() |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2563 | { |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2564 | FILE *f=fopen("conftestval", "w"); |
| 2565 | if (!f) exit(1); |
| 2566 | fprintf(f, "%d\n", sizeof(void *)); |
| 2567 | exit(0); |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2568 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2569 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2570 | if { (eval echo configure:2571: \"$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] | 2571 | then |
| 2572 | ac_cv_sizeof_void_p=`cat conftestval` |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2573 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2574 | echo "configure: failed program was:" >&5 |
| 2575 | cat conftest.$ac_ext >&5 |
| 2576 | rm -fr conftest* |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2577 | ac_cv_sizeof_void_p=0 |
| 2578 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2579 | rm -fr conftest* |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2580 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2581 | |
| 2582 | fi |
| 2583 | echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6 |
| 2584 | cat >> confdefs.h <<EOF |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2585 | #define SIZEOF_VOID_P $ac_cv_sizeof_void_p |
| 2586 | EOF |
| 2587 | |
| 2588 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2589 | echo $ac_n "checking size of char""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2590 | echo "configure:2591: checking size of char" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2591 | if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then |
| 2592 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2593 | else |
| 2594 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2595 | ac_cv_sizeof_char=1 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2596 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2597 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2598 | #line 2599 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2599 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2600 | #include <stdio.h> |
| 2601 | main() |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2602 | { |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2603 | FILE *f=fopen("conftestval", "w"); |
| 2604 | if (!f) exit(1); |
| 2605 | fprintf(f, "%d\n", sizeof(char)); |
| 2606 | exit(0); |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2607 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2608 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2609 | if { (eval echo configure:2610: \"$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] | 2610 | then |
| 2611 | ac_cv_sizeof_char=`cat conftestval` |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2612 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2613 | echo "configure: failed program was:" >&5 |
| 2614 | cat conftest.$ac_ext >&5 |
| 2615 | rm -fr conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2616 | ac_cv_sizeof_char=0 |
| 2617 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2618 | rm -fr conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2619 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2620 | |
| 2621 | fi |
| 2622 | echo "$ac_t""$ac_cv_sizeof_char" 1>&6 |
| 2623 | cat >> confdefs.h <<EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2624 | #define SIZEOF_CHAR $ac_cv_sizeof_char |
| 2625 | EOF |
| 2626 | |
| 2627 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2628 | echo $ac_n "checking size of short""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2629 | echo "configure:2630: checking size of short" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2630 | if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then |
| 2631 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2632 | else |
| 2633 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2634 | ac_cv_sizeof_short=2 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2635 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2636 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2637 | #line 2638 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2638 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2639 | #include <stdio.h> |
| 2640 | main() |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2641 | { |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2642 | FILE *f=fopen("conftestval", "w"); |
| 2643 | if (!f) exit(1); |
| 2644 | fprintf(f, "%d\n", sizeof(short)); |
| 2645 | exit(0); |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2646 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2647 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2648 | if { (eval echo configure:2649: \"$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] | 2649 | then |
| 2650 | ac_cv_sizeof_short=`cat conftestval` |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2651 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2652 | echo "configure: failed program was:" >&5 |
| 2653 | cat conftest.$ac_ext >&5 |
| 2654 | rm -fr conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2655 | ac_cv_sizeof_short=0 |
| 2656 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2657 | rm -fr conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2658 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2659 | |
| 2660 | fi |
| 2661 | echo "$ac_t""$ac_cv_sizeof_short" 1>&6 |
| 2662 | cat >> confdefs.h <<EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2663 | #define SIZEOF_SHORT $ac_cv_sizeof_short |
| 2664 | EOF |
| 2665 | |
| 2666 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2667 | echo $ac_n "checking size of float""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2668 | echo "configure:2669: checking size of float" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2669 | if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then |
| 2670 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2671 | else |
| 2672 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2673 | ac_cv_sizeof_float=4 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2674 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2675 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2676 | #line 2677 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2677 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2678 | #include <stdio.h> |
| 2679 | main() |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2680 | { |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2681 | FILE *f=fopen("conftestval", "w"); |
| 2682 | if (!f) exit(1); |
| 2683 | fprintf(f, "%d\n", sizeof(float)); |
| 2684 | exit(0); |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2685 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2686 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2687 | if { (eval echo configure:2688: \"$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] | 2688 | then |
| 2689 | ac_cv_sizeof_float=`cat conftestval` |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2690 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2691 | echo "configure: failed program was:" >&5 |
| 2692 | cat conftest.$ac_ext >&5 |
| 2693 | rm -fr conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2694 | ac_cv_sizeof_float=0 |
| 2695 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2696 | rm -fr conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2697 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2698 | |
| 2699 | fi |
| 2700 | echo "$ac_t""$ac_cv_sizeof_float" 1>&6 |
| 2701 | cat >> confdefs.h <<EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2702 | #define SIZEOF_FLOAT $ac_cv_sizeof_float |
| 2703 | EOF |
| 2704 | |
| 2705 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2706 | echo $ac_n "checking size of double""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2707 | echo "configure:2708: checking size of double" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2708 | if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then |
| 2709 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2710 | else |
| 2711 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2712 | ac_cv_sizeof_double=8 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2713 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2714 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2715 | #line 2716 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2716 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2717 | #include <stdio.h> |
| 2718 | main() |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2719 | { |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2720 | FILE *f=fopen("conftestval", "w"); |
| 2721 | if (!f) exit(1); |
| 2722 | fprintf(f, "%d\n", sizeof(double)); |
| 2723 | exit(0); |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2724 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2725 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2726 | if { (eval echo configure:2727: \"$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] | 2727 | then |
| 2728 | ac_cv_sizeof_double=`cat conftestval` |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2729 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2730 | echo "configure: failed program was:" >&5 |
| 2731 | cat conftest.$ac_ext >&5 |
| 2732 | rm -fr conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2733 | ac_cv_sizeof_double=0 |
| 2734 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2735 | rm -fr conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2736 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2737 | |
| 2738 | fi |
| 2739 | echo "$ac_t""$ac_cv_sizeof_double" 1>&6 |
| 2740 | cat >> confdefs.h <<EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2741 | #define SIZEOF_DOUBLE $ac_cv_sizeof_double |
| 2742 | EOF |
| 2743 | |
| 2744 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2745 | echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2746 | echo "configure:2747: checking size of fpos_t" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2747 | if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then |
| 2748 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2749 | else |
| 2750 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2751 | ac_cv_sizeof_fpos_t=4 |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2752 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2753 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2754 | #line 2755 "configure" |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2755 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2756 | #include <stdio.h> |
| 2757 | main() |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2758 | { |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2759 | FILE *f=fopen("conftestval", "w"); |
| 2760 | if (!f) exit(1); |
| 2761 | fprintf(f, "%d\n", sizeof(fpos_t)); |
| 2762 | exit(0); |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2763 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2764 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2765 | if { (eval echo configure:2766: \"$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] | 2766 | then |
| 2767 | ac_cv_sizeof_fpos_t=`cat conftestval` |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2768 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2769 | echo "configure: failed program was:" >&5 |
| 2770 | cat conftest.$ac_ext >&5 |
| 2771 | rm -fr conftest* |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2772 | ac_cv_sizeof_fpos_t=0 |
| 2773 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2774 | rm -fr conftest* |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2775 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2776 | |
| 2777 | fi |
| 2778 | echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6 |
| 2779 | cat >> confdefs.h <<EOF |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2780 | #define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t |
| 2781 | EOF |
| 2782 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2783 | |
| 2784 | |
| 2785 | echo $ac_n "checking for long long support""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2786 | echo "configure:2787: checking for long long support" >&5 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2787 | have_long_long=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2788 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2789 | #line 2790 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2790 | #include "confdefs.h" |
| 2791 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2792 | int main() { |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2793 | long long x; x = (long long)0; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2794 | ; return 0; } |
| 2795 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2796 | if { (eval echo configure:2797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2797 | rm -rf conftest* |
| 2798 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2799 | #define HAVE_LONG_LONG 1 |
| 2800 | EOF |
| 2801 | have_long_long=yes |
| 2802 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2803 | echo "configure: failed program was:" >&5 |
| 2804 | cat conftest.$ac_ext >&5 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2805 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2806 | rm -f conftest* |
| 2807 | echo "$ac_t""$have_long_long" 1>&6 |
Guido van Rossum | 96f2eb9 | 1999-04-10 16:02:18 +0000 | [diff] [blame] | 2808 | if test "$have_long_long" = yes ; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2809 | echo $ac_n "checking size of long long""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2810 | echo "configure:2811: checking size of long long" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2811 | if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then |
| 2812 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2813 | else |
| 2814 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2815 | ac_cv_sizeof_long_long=8 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2816 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2817 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2818 | #line 2819 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2819 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2820 | #include <stdio.h> |
| 2821 | main() |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2822 | { |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2823 | FILE *f=fopen("conftestval", "w"); |
| 2824 | if (!f) exit(1); |
| 2825 | fprintf(f, "%d\n", sizeof(long long)); |
| 2826 | exit(0); |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2827 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2828 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2829 | if { (eval echo configure:2830: \"$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] | 2830 | then |
| 2831 | ac_cv_sizeof_long_long=`cat conftestval` |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2832 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2833 | echo "configure: failed program was:" >&5 |
| 2834 | cat conftest.$ac_ext >&5 |
| 2835 | rm -fr conftest* |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2836 | ac_cv_sizeof_long_long=0 |
| 2837 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2838 | rm -fr conftest* |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2839 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2840 | |
| 2841 | fi |
| 2842 | echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 |
| 2843 | cat >> confdefs.h <<EOF |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2844 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long |
| 2845 | EOF |
| 2846 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2847 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2848 | fi |
| 2849 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2850 | echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2851 | echo "configure:2852: checking for uintptr_t support" >&5 |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2852 | have_uintptr_t=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2853 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2854 | #line 2855 "configure" |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2855 | #include "confdefs.h" |
| 2856 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2857 | int main() { |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2858 | uintptr_t x; x = (uintptr_t)0; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2859 | ; return 0; } |
| 2860 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2861 | if { (eval echo configure:2862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2862 | rm -rf conftest* |
| 2863 | cat >> confdefs.h <<\EOF |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2864 | #define HAVE_UINTPTR_T 1 |
| 2865 | EOF |
| 2866 | have_uintptr_t=yes |
| 2867 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2868 | echo "configure: failed program was:" >&5 |
| 2869 | cat conftest.$ac_ext >&5 |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2870 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2871 | rm -f conftest* |
| 2872 | echo "$ac_t""$have_uintptr_t" 1>&6 |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2873 | if test "$have_uintptr_t" = yes ; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2874 | echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2875 | echo "configure:2876: checking size of uintptr_t" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2876 | if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then |
| 2877 | echo $ac_n "(cached) $ac_c" 1>&6 |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2878 | else |
| 2879 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2880 | ac_cv_sizeof_uintptr_t=4 |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2881 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2882 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2883 | #line 2884 "configure" |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2884 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2885 | #include <stdio.h> |
| 2886 | main() |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2887 | { |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2888 | FILE *f=fopen("conftestval", "w"); |
| 2889 | if (!f) exit(1); |
| 2890 | fprintf(f, "%d\n", sizeof(uintptr_t)); |
| 2891 | exit(0); |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2892 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2893 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2894 | if { (eval echo configure:2895: \"$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] | 2895 | then |
| 2896 | ac_cv_sizeof_uintptr_t=`cat conftestval` |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2897 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2898 | echo "configure: failed program was:" >&5 |
| 2899 | cat conftest.$ac_ext >&5 |
| 2900 | rm -fr conftest* |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2901 | ac_cv_sizeof_uintptr_t=0 |
| 2902 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2903 | rm -fr conftest* |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2904 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2905 | |
| 2906 | fi |
| 2907 | echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6 |
| 2908 | cat >> confdefs.h <<EOF |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2909 | #define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t |
| 2910 | EOF |
| 2911 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2912 | |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2913 | fi |
| 2914 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2915 | # Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2916 | echo $ac_n "checking size of off_t""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2917 | echo "configure:2918: checking size of off_t" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2918 | if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then |
| 2919 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +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_off_t=4 |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +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 | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2925 | #line 2926 "configure" |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2926 | #include "confdefs.h" |
| 2927 | #include <stdio.h> |
| 2928 | #include <sys/types.h> |
| 2929 | main() |
| 2930 | { |
| 2931 | FILE *f=fopen("conftestval", "w"); |
| 2932 | if (!f) exit(1); |
| 2933 | fprintf(f, "%d\n", sizeof(off_t)); |
| 2934 | exit(0); |
| 2935 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2936 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +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 | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2939 | ac_cv_sizeof_off_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_off_t=0 |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +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 | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2947 | fi |
| 2948 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2949 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +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_off_t" 1>&6 |
| 2953 | cat >> confdefs.h <<EOF |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2954 | #define SIZEOF_OFF_T $ac_cv_sizeof_off_t |
| 2955 | EOF |
| 2956 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2957 | |
| 2958 | echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2959 | echo "configure:2960: checking whether to enable large file support" >&5 |
Guido van Rossum | 96f2eb9 | 1999-04-10 16:02:18 +0000 | [diff] [blame] | 2960 | if test "$have_long_long" = yes -a \ |
| 2961 | "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \ |
| 2962 | "$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] | 2963 | cat >> confdefs.h <<\EOF |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2964 | #define HAVE_LARGEFILE_SUPPORT 1 |
| 2965 | EOF |
| 2966 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2967 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2968 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2969 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2970 | fi |
| 2971 | |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2972 | # AC_CHECK_SIZEOF() doesn't include <time.h>. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2973 | echo $ac_n "checking size of time_t""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2974 | echo "configure:2975: checking size of time_t" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2975 | if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then |
| 2976 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2977 | else |
| 2978 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2979 | ac_cv_sizeof_time_t=4 |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2980 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2981 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2982 | #line 2983 "configure" |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2983 | #include "confdefs.h" |
| 2984 | #include <stdio.h> |
| 2985 | #include <time.h> |
| 2986 | main() |
| 2987 | { |
| 2988 | FILE *f=fopen("conftestval", "w"); |
| 2989 | if (!f) exit(1); |
| 2990 | fprintf(f, "%d\n", sizeof(time_t)); |
| 2991 | exit(0); |
| 2992 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2993 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2994 | if { (eval echo configure:2995: \"$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] | 2995 | then |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2996 | ac_cv_sizeof_time_t=`cat conftestval` |
| 2997 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2998 | echo "configure: failed program was:" >&5 |
| 2999 | cat conftest.$ac_ext >&5 |
| 3000 | rm -fr conftest* |
| 3001 | ac_cv_sizeof_time_t=0 |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 3002 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3003 | rm -fr conftest* |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 3004 | fi |
| 3005 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3006 | |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 3007 | fi |
| 3008 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3009 | echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6 |
| 3010 | cat >> confdefs.h <<EOF |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 3011 | #define SIZEOF_TIME_T $ac_cv_sizeof_time_t |
| 3012 | EOF |
| 3013 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3014 | |
| 3015 | |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3016 | # if have pthread_t then define SIZEOF_PTHREAD_T |
Martin v. Löwis | 123cbd2 | 2001-07-19 14:21:10 +0000 | [diff] [blame] | 3017 | ac_save_cc="$CC" |
| 3018 | if test "$ac_cv_kpthread" = "yes" |
| 3019 | then CC="$CC -Kpthread" |
| 3020 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3021 | echo $ac_n "checking for pthread_t""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 3022 | echo "configure:3023: checking for pthread_t" >&5 |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3023 | have_pthread_t=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3024 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 3025 | #line 3026 "configure" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3026 | #include "confdefs.h" |
| 3027 | #include <pthread.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3028 | int main() { |
Guido van Rossum | 1258049 | 2000-09-24 16:47:19 +0000 | [diff] [blame] | 3029 | pthread_t x; x = *(pthread_t*)0; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3030 | ; return 0; } |
| 3031 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 3032 | if { (eval echo configure:3033: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3033 | rm -rf conftest* |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3034 | have_pthread_t=yes |
| 3035 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3036 | echo "configure: failed program was:" >&5 |
| 3037 | cat conftest.$ac_ext >&5 |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3038 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3039 | rm -f conftest* |
| 3040 | echo "$ac_t""$have_pthread_t" 1>&6 |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3041 | if test "$have_pthread_t" = yes ; then |
| 3042 | # AC_CHECK_SIZEOF() doesn't include <pthread.h>. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3043 | echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 3044 | echo "configure:3045: checking size of pthread_t" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3045 | if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then |
| 3046 | echo $ac_n "(cached) $ac_c" 1>&6 |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3047 | else |
| 3048 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 3049 | ac_cv_sizeof_pthread_t=4 |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3050 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3051 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 3052 | #line 3053 "configure" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3053 | #include "confdefs.h" |
| 3054 | #include <stdio.h> |
| 3055 | #include <pthread.h> |
| 3056 | main() |
| 3057 | { |
| 3058 | FILE *f=fopen("conftestval", "w"); |
| 3059 | if (!f) exit(1); |
| 3060 | fprintf(f, "%d\n", sizeof(pthread_t)); |
| 3061 | exit(0); |
| 3062 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3063 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 3064 | if { (eval echo configure:3065: \"$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] | 3065 | then |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3066 | ac_cv_sizeof_pthread_t=`cat conftestval` |
| 3067 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3068 | echo "configure: failed program was:" >&5 |
| 3069 | cat conftest.$ac_ext >&5 |
| 3070 | rm -fr conftest* |
| 3071 | ac_cv_sizeof_pthread_t=0 |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3072 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3073 | rm -fr conftest* |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3074 | fi |
| 3075 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3076 | |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3077 | fi |
| 3078 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3079 | echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6 |
| 3080 | cat >> confdefs.h <<EOF |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3081 | #define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t |
| 3082 | EOF |
| 3083 | |
| 3084 | fi |
Martin v. Löwis | 123cbd2 | 2001-07-19 14:21:10 +0000 | [diff] [blame] | 3085 | CC="$ac_save_cc" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3086 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3087 | echo $ac_n "checking for --enable-toolbox-glue""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 3088 | echo "configure:3089: checking for --enable-toolbox-glue" >&5 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3089 | # Check whether --enable-toolbox-glue or --disable-toolbox-glue was given. |
| 3090 | if test "${enable_toolbox_glue+set}" = set; then |
| 3091 | enableval="$enable_toolbox_glue" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3092 | : |
| 3093 | fi |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3094 | |
| 3095 | |
| 3096 | if test -z "$enable_toolbox_glue" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3097 | then |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3098 | case $ac_sys_system/$ac_sys_release in |
| 3099 | Darwin/*) |
| 3100 | enable_toolbox_glue="yes";; |
| 3101 | *) |
| 3102 | enable_toolbox_glue="no";; |
| 3103 | esac |
| 3104 | fi |
| 3105 | case "$enable_toolbox_glue" in |
| 3106 | yes) |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 3107 | extra_frameworks="-framework CoreServices -framework Foundation" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3108 | extra_machdep_objs="Python/mactoolboxglue.o" |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3109 | extra_undefs="-u __dummy -u _PyMac_Error" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3110 | cat >> confdefs.h <<\EOF |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3111 | #define USE_TOOLBOX_OBJECT_GLUE 1 |
| 3112 | EOF |
| 3113 | |
| 3114 | ;; |
| 3115 | *) |
| 3116 | extra_frameworks="" |
| 3117 | extra_machdep_objs="" |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3118 | extra_undefs="" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3119 | ;; |
| 3120 | esac |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3121 | echo "$ac_t""$enable_toolbox_glue" 1>&6 |
| 3122 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3123 | |
| 3124 | case $ac_sys_system/$ac_sys_release in |
Jack Jansen | 418c3b1 | 2001-11-14 10:59:57 +0000 | [diff] [blame] | 3125 | Darwin/1.3*) |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 3126 | ns_undef_sym='_environ' |
Jack Jansen | 418c3b1 | 2001-11-14 10:59:57 +0000 | [diff] [blame] | 3127 | LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym" |
| 3128 | LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks" |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 3129 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python' |
| 3130 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 3131 | Darwin/*) |
| 3132 | ns_undef_sym='_environ' |
Jack Jansen | 418c3b1 | 2001-11-14 10:59:57 +0000 | [diff] [blame] | 3133 | LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -flat_namespace -U $ns_undef_sym" |
| 3134 | LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3135 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python' |
| 3136 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3137 | esac |
| 3138 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3139 | echo $ac_n "checking for --enable-framework""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 3140 | echo "configure:3141: checking for --enable-framework" >&5 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3141 | if test "$enable_framework" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3142 | then |
Jack Jansen | ca06bc6 | 2001-08-03 15:32:23 +0000 | [diff] [blame] | 3143 | OPT="$OPT -fno-common -dynamic" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3144 | # -U __environ is needed since bundles don't have access |
| 3145 | # to crt0 when built but will always be linked against it |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3146 | # -F. is needed to allow linking to the framework while |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3147 | # in the build location. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3148 | |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 3149 | case $ac_sys_system/$ac_sys_release in |
Jack Jansen | 418c3b1 | 2001-11-14 10:59:57 +0000 | [diff] [blame] | 3150 | Darwin/1.3*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym";; |
| 3151 | Darwin/*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-flat_namespace,-U,$ns_undef_sym";; |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 3152 | esac |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3153 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3154 | #define WITH_NEXT_FRAMEWORK 1 |
| 3155 | EOF |
| 3156 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3157 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3158 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3159 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3160 | fi |
| 3161 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3162 | echo $ac_n "checking for dyld""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 3163 | echo "configure:3164: checking for dyld" >&5 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3164 | case $ac_sys_system/$ac_sys_release in |
| 3165 | Darwin/*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3166 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3167 | #define WITH_DYLD 1 |
| 3168 | EOF |
| 3169 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3170 | echo "$ac_t""always on for Darwin" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3171 | ;; |
| 3172 | *) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3173 | echo "$ac_t""no" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3174 | ;; |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3175 | esac |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3176 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3177 | # Set info about shared libraries. |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3178 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3179 | |
| 3180 | |
| 3181 | |
| 3182 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3183 | # SO is the extension of shared libraries `(including the dot!) |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3184 | # -- usually .so, .sl on HP-UX, .dll on Cygwin |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3185 | echo $ac_n "checking SO""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 3186 | echo "configure:3187: checking SO" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3187 | if test -z "$SO" |
| 3188 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3189 | case $ac_sys_system in |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 3190 | hp*|HP*) SO=.sl;; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3191 | CYGWIN*) SO=.dll;; |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 3192 | *) SO=.so;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3193 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3194 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3195 | echo "$ac_t""$SO" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3196 | # LDSHARED is the ld *command* used to create shared library |
Martin v. Löwis | 5b718fc | 2001-09-10 15:34:42 +0000 | [diff] [blame] | 3197 | # -- "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] | 3198 | # (Shared libraries in this instance are shared modules to be loaded into |
| 3199 | # Python, as opposed to building Python itself as a shared library.) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3200 | echo $ac_n "checking LDSHARED""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 3201 | echo "configure:3202: checking LDSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3202 | if test -z "$LDSHARED" |
| 3203 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3204 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3205 | AIX*) |
| 3206 | BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp" |
Guido van Rossum | ce608b0 | 2001-09-28 15:59:38 +0000 | [diff] [blame] | 3207 | LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp" |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3208 | ;; |
| 3209 | BeOS*) |
| 3210 | BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY" |
Guido van Rossum | ce608b0 | 2001-09-28 15:59:38 +0000 | [diff] [blame] | 3211 | LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY" |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3212 | ;; |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3213 | IRIX/5*) LDSHARED="ld -shared";; |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 3214 | IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3215 | SunOS/4*) LDSHARED="ld";; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3216 | SunOS/5*) |
Greg Ward | 57c9a66 | 2000-05-26 12:22:54 +0000 | [diff] [blame] | 3217 | if test "$GCC" = "yes" |
Neil Schemenauer | 8ba9445 | 2001-02-19 18:18:48 +0000 | [diff] [blame] | 3218 | then LDSHARED='$(CC) -shared' |
Martin v. Löwis | 5b718fc | 2001-09-10 15:34:42 +0000 | [diff] [blame] | 3219 | else LDSHARED="$(CC) -G"; |
Greg Ward | 57c9a66 | 2000-05-26 12:22:54 +0000 | [diff] [blame] | 3220 | fi ;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3221 | hp*|HP*) LDSHARED="ld -b";; |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 3222 | OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";; |
| 3223 | DYNIX/ptx*) LDSHARED="ld -G";; |
Jack Jansen | 418c3b1 | 2001-11-14 10:59:57 +0000 | [diff] [blame] | 3224 | Darwin/1.3*) |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 3225 | LDSHARED='$(CC) $(LDFLAGS) -bundle' |
| 3226 | if test "$enable_framework" ; then |
| 3227 | # Link against the framework. All externals should be defined. |
| 3228 | LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)' |
| 3229 | else |
| 3230 | # No framework. Ignore undefined symbols, assuming they come from Python |
Jack Jansen | 418c3b1 | 2001-11-14 10:59:57 +0000 | [diff] [blame] | 3231 | LDSHARED="$LDSHARED -undefined suppress" |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 3232 | fi ;; |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3233 | Darwin/*) |
| 3234 | LDSHARED='$(CC) $(LDFLAGS) -bundle' |
| 3235 | if test "$enable_framework" ; then |
| 3236 | # Link against the framework. All externals should be defined. |
| 3237 | LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)' |
| 3238 | else |
Michael W. Hudson | 594bc80 | 2002-03-07 09:59:15 +0000 | [diff] [blame] | 3239 | # No framework, use the Python app as bundle-loader |
| 3240 | BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)' |
| 3241 | LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)' |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3242 | fi ;; |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3243 | Linux*|GNU*) LDSHARED="gcc -shared";; |
Guido van Rossum | 3c4bb80 | 1997-12-18 23:55:32 +0000 | [diff] [blame] | 3244 | dgux*) LDSHARED="ld -G";; |
Guido van Rossum | 458e7fa | 1999-09-17 15:40:40 +0000 | [diff] [blame] | 3245 | BSD/OS*/4*) LDSHARED="gcc -shared";; |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame] | 3246 | OpenBSD*|NetBSD*|FreeBSD*) |
Jeremy Hylton | 4bcc7c5 | 2000-08-31 17:45:35 +0000 | [diff] [blame] | 3247 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 3248 | then |
| 3249 | LDSHARED="cc -shared ${LDFLAGS}" |
| 3250 | else |
| 3251 | LDSHARED="ld -Bshareable ${LDFLAGS}" |
| 3252 | fi;; |
Martin v. Löwis | 25ae43b | 2001-10-07 08:39:18 +0000 | [diff] [blame] | 3253 | OpenUNIX*|UnixWare*) |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3254 | if test "$GCC" = "yes" |
| 3255 | then LDSHARED="$(CC) -shared" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3256 | else LDSHARED="$(CC) -G" |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3257 | fi;; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3258 | SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3259 | Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3260 | CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3261 | *) LDSHARED="ld";; |
| 3262 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3263 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3264 | echo "$ac_t""$LDSHARED" 1>&6 |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3265 | BLDSHARED=${BLDSHARED-$LDSHARED} |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3266 | # 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] | 3267 | # library (module) -- this is only needed for a few systems |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3268 | echo $ac_n "checking CCSHARED""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 3269 | echo "configure:3270: checking CCSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3270 | if test -z "$CCSHARED" |
| 3271 | then |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3272 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | c761fc8 | 2001-02-19 04:50:49 +0000 | [diff] [blame] | 3273 | SunOS*) if test "$GCC" = yes; |
| 3274 | then CCSHARED="-fPIC"; |
| 3275 | fi;; |
Guido van Rossum | af07a44 | 1995-02-13 19:45:27 +0000 | [diff] [blame] | 3276 | hp*|HP*) if test "$GCC" = yes; |
Martin v. Löwis | 703ad70 | 2001-09-05 08:36:52 +0000 | [diff] [blame] | 3277 | then CCSHARED="-fPIC"; |
Guido van Rossum | af07a44 | 1995-02-13 19:45:27 +0000 | [diff] [blame] | 3278 | else CCSHARED="+z"; |
| 3279 | fi;; |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3280 | Linux*|GNU*) CCSHARED="-fPIC";; |
Guido van Rossum | f5957ea | 1999-10-05 21:59:33 +0000 | [diff] [blame] | 3281 | BSD/OS*/4*) CCSHARED="-fpic";; |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame] | 3282 | FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";; |
Martin v. Löwis | 25ae43b | 2001-10-07 08:39:18 +0000 | [diff] [blame] | 3283 | OpenUNIX*|UnixWare*) |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3284 | if test "$GCC" = "yes" |
| 3285 | then CCSHARED="-fPIC" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3286 | else CCSHARED="-KPIC" |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3287 | fi;; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3288 | SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3289 | Monterey*) CCSHARED="-G";; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3290 | IRIX*/6*) case $CC in |
| 3291 | *gcc*) CCSHARED="-shared";; |
Guido van Rossum | ee21f41 | 1998-04-20 18:51:54 +0000 | [diff] [blame] | 3292 | *) CCSHARED="";; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3293 | esac;; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3294 | CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3295 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3296 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3297 | echo "$ac_t""$CCSHARED" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3298 | # LINKFORSHARED are the flags passed to the $(CC) command that links |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3299 | # the python executable -- this is only needed for a few systems |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3300 | echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 3301 | echo "configure:3302: checking LINKFORSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3302 | if test -z "$LINKFORSHARED" |
| 3303 | then |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3304 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3305 | AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';; |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 3306 | hp*|HP*) |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 3307 | LINKFORSHARED="-Wl,-E -Wl,+s";; |
| 3308 | # LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";; |
Guido van Rossum | f5957ea | 1999-10-05 21:59:33 +0000 | [diff] [blame] | 3309 | BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";; |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3310 | Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";; |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3311 | # -u libsys_s pulls in all symbols in libsys |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3312 | Darwin/*) |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3313 | # -u __dummy makes the linker aware of the objc runtime |
| 3314 | # in System.framework; otherwise, __objcInit (referenced in |
| 3315 | # crt1.o) gets erroneously defined as common, which breaks dynamic |
| 3316 | # loading of any modules which reference it in System.framework. |
| 3317 | # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is |
| 3318 | # not used by the core itself but which needs to be in the core so |
| 3319 | # that dynamically loaded extension modules have access to it. |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3320 | LINKFORSHARED="$extra_undefs -framework System" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3321 | if test "$enable_framework" |
| 3322 | then |
| 3323 | LINKFORSHARED="$LINKFORSHARED -framework Python" |
| 3324 | fi |
| 3325 | LINKFORSHARED="$LINKFORSHARED $extra_frameworks";; |
Martin v. Löwis | 25ae43b | 2001-10-07 08:39:18 +0000 | [diff] [blame] | 3326 | OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3327 | SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";; |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3328 | ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3329 | FreeBSD*|NetBSD*|OpenBSD*) |
Guido van Rossum | df69365 | 1999-01-07 21:50:41 +0000 | [diff] [blame] | 3330 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
| 3331 | then |
| 3332 | LINKFORSHARED="-Wl,--export-dynamic" |
| 3333 | fi;; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3334 | SunOS/5*) case $CC in |
| 3335 | *gcc*) |
Guido van Rossum | ff48418 | 2000-02-03 13:50:24 +0000 | [diff] [blame] | 3336 | if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null |
Guido van Rossum | 8f4ceb1 | 1997-12-18 23:42:19 +0000 | [diff] [blame] | 3337 | then |
| 3338 | LINKFORSHARED="-Xlinker --export-dynamic" |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3339 | fi;; |
| 3340 | esac;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3341 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3342 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3343 | echo "$ac_t""$LINKFORSHARED" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3344 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3345 | |
| 3346 | echo $ac_n "checking CFLAGSFORSHARED""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 3347 | echo "configure:3348: checking CFLAGSFORSHARED" >&5 |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3348 | if test ! "$LIBRARY" = "$LDLIBRARY" |
| 3349 | then |
Neil Schemenauer | 0c6141f | 2001-01-27 21:40:54 +0000 | [diff] [blame] | 3350 | case $ac_sys_system in |
| 3351 | CYGWIN*) |
| 3352 | # Cygwin needs CCSHARED when building extension DLLs |
| 3353 | # but not when building the interpreter DLL. |
| 3354 | CFLAGSFORSHARED='';; |
| 3355 | *) |
| 3356 | CFLAGSFORSHARED='$(CCSHARED)' |
| 3357 | esac |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3358 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3359 | echo "$ac_t""$CFLAGSFORSHARED" 1>&6 |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3360 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3361 | # checks for libraries |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3362 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 3363 | echo "configure:3364: checking for dlopen in -ldl" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3364 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
| 3365 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 3366 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3367 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3368 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3369 | LIBS="-ldl $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3370 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 3371 | #line 3372 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3372 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3373 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3374 | /* 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] | 3375 | builtin and then its argument prototype would still apply. */ |
| 3376 | char dlopen(); |
| 3377 | |
| 3378 | int main() { |
| 3379 | dlopen() |
| 3380 | ; return 0; } |
| 3381 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 3382 | if { (eval echo configure:3383: \"$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] | 3383 | rm -rf conftest* |
| 3384 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3385 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3386 | echo "configure: failed program was:" >&5 |
| 3387 | cat conftest.$ac_ext >&5 |
| 3388 | rm -rf conftest* |
| 3389 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3390 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3391 | rm -f conftest* |
| 3392 | LIBS="$ac_save_LIBS" |
| 3393 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3394 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3395 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3396 | echo "$ac_t""yes" 1>&6 |
| 3397 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 3398 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
| 3399 | cat >> confdefs.h <<EOF |
| 3400 | #define $ac_tr_lib 1 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3401 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3402 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3403 | LIBS="-ldl $LIBS" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3404 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3405 | else |
| 3406 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3407 | fi |
| 3408 | # Dynamic linking for SunOS/Solaris and SYSV |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3409 | echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 3410 | echo "configure:3411: checking for shl_load in -ldld" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3411 | ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` |
| 3412 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 3413 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3414 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3415 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3416 | LIBS="-ldld $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3417 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 3418 | #line 3419 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3419 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3420 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3421 | /* 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] | 3422 | builtin and then its argument prototype would still apply. */ |
| 3423 | char shl_load(); |
| 3424 | |
| 3425 | int main() { |
| 3426 | shl_load() |
| 3427 | ; return 0; } |
| 3428 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 3429 | if { (eval echo configure:3430: \"$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] | 3430 | rm -rf conftest* |
| 3431 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3432 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3433 | echo "configure: failed program was:" >&5 |
| 3434 | cat conftest.$ac_ext >&5 |
| 3435 | rm -rf conftest* |
| 3436 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3437 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3438 | rm -f conftest* |
| 3439 | LIBS="$ac_save_LIBS" |
| 3440 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3441 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3442 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3443 | echo "$ac_t""yes" 1>&6 |
| 3444 | ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 3445 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
| 3446 | cat >> confdefs.h <<EOF |
| 3447 | #define $ac_tr_lib 1 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3448 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3449 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3450 | LIBS="-ldld $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3451 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3452 | else |
| 3453 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3454 | fi |
| 3455 | # Dynamic linking for HP-UX |
Martin v. Löwis | 41933dd | 2002-03-21 15:10:58 +0000 | [diff] [blame] | 3456 | echo $ac_n "checking for sem_init in -lrt""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 3457 | echo "configure:3458: checking for sem_init in -lrt" >&5 |
Martin v. Löwis | 41933dd | 2002-03-21 15:10:58 +0000 | [diff] [blame] | 3458 | ac_lib_var=`echo rt'_'sem_init | sed 'y%./+-%__p_%'` |
| 3459 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 3460 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3461 | else |
| 3462 | ac_save_LIBS="$LIBS" |
| 3463 | LIBS="-lrt $LIBS" |
| 3464 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 3465 | #line 3466 "configure" |
Martin v. Löwis | 41933dd | 2002-03-21 15:10:58 +0000 | [diff] [blame] | 3466 | #include "confdefs.h" |
| 3467 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3468 | /* We use char because int might match the return type of a gcc2 |
| 3469 | builtin and then its argument prototype would still apply. */ |
| 3470 | char sem_init(); |
| 3471 | |
| 3472 | int main() { |
| 3473 | sem_init() |
| 3474 | ; return 0; } |
| 3475 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 3476 | if { (eval echo configure:3477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Martin v. Löwis | 41933dd | 2002-03-21 15:10:58 +0000 | [diff] [blame] | 3477 | rm -rf conftest* |
| 3478 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3479 | else |
| 3480 | echo "configure: failed program was:" >&5 |
| 3481 | cat conftest.$ac_ext >&5 |
| 3482 | rm -rf conftest* |
| 3483 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3484 | fi |
| 3485 | rm -f conftest* |
| 3486 | LIBS="$ac_save_LIBS" |
| 3487 | |
| 3488 | fi |
| 3489 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3490 | echo "$ac_t""yes" 1>&6 |
| 3491 | ac_tr_lib=HAVE_LIB`echo rt | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 3492 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
| 3493 | cat >> confdefs.h <<EOF |
| 3494 | #define $ac_tr_lib 1 |
| 3495 | EOF |
| 3496 | |
| 3497 | LIBS="-lrt $LIBS" |
| 3498 | |
| 3499 | else |
| 3500 | echo "$ac_t""no" 1>&6 |
| 3501 | fi |
| 3502 | # 'Real Time' functions on Solaris |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3503 | |
| 3504 | # checks for system dependent C++ extensions support |
| 3505 | case "$ac_sys_system" in |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3506 | AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 3507 | echo "configure:3508: checking for genuine AIX C++ extensions support" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3508 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 3509 | #line 3510 "configure" |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3510 | #include "confdefs.h" |
| 3511 | #include "/usr/lpp/xlC/include/load.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3512 | int main() { |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3513 | loadAndInit("", 0, "") |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3514 | ; return 0; } |
| 3515 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 3516 | if { (eval echo configure:3517: \"$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] | 3517 | rm -rf conftest* |
| 3518 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3519 | #define AIX_GENUINE_CPLUSPLUS 1 |
| 3520 | EOF |
| 3521 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3522 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3523 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3524 | echo "configure: failed program was:" >&5 |
| 3525 | cat conftest.$ac_ext >&5 |
| 3526 | rm -rf conftest* |
| 3527 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3528 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3529 | rm -f conftest*;; |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3530 | *) ;; |
| 3531 | esac |
| 3532 | |
Guido van Rossum | 70c7f48 | 1998-03-26 18:44:10 +0000 | [diff] [blame] | 3533 | # Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl. |
| 3534 | # However on SGI IRIX, these exist but are broken. |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3535 | # BeOS' sockets are stashed in libnet. |
| 3536 | case "$ac_sys_system" in |
| 3537 | IRIX*) ;; |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3538 | *) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3539 | echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 3540 | echo "configure:3541: checking for t_open in -lnsl" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3541 | ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'` |
| 3542 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 3543 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3544 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3545 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3546 | LIBS="-lnsl $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3547 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 3548 | #line 3549 "configure" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3549 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3550 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3551 | /* 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] | 3552 | builtin and then its argument prototype would still apply. */ |
| 3553 | char t_open(); |
| 3554 | |
| 3555 | int main() { |
| 3556 | t_open() |
| 3557 | ; return 0; } |
| 3558 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 3559 | if { (eval echo configure:3560: \"$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] | 3560 | rm -rf conftest* |
| 3561 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3562 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3563 | echo "configure: failed program was:" >&5 |
| 3564 | cat conftest.$ac_ext >&5 |
| 3565 | rm -rf conftest* |
| 3566 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3567 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3568 | rm -f conftest* |
| 3569 | LIBS="$ac_save_LIBS" |
| 3570 | |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3571 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3572 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3573 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3574 | LIBS="-lnsl $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3575 | else |
| 3576 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3577 | fi |
Guido van Rossum | 0ddb028 | 1995-01-17 16:46:14 +0000 | [diff] [blame] | 3578 | # SVR4 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3579 | echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 3580 | echo "configure:3581: checking for socket in -lsocket" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3581 | ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` |
| 3582 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 3583 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3584 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3585 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3586 | LIBS="-lsocket $LIBS $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3587 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 3588 | #line 3589 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3589 | #include "confdefs.h" |
| 3590 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3591 | /* 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] | 3592 | builtin and then its argument prototype would still apply. */ |
| 3593 | char socket(); |
| 3594 | |
| 3595 | int main() { |
| 3596 | socket() |
| 3597 | ; return 0; } |
| 3598 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 3599 | if { (eval echo configure:3600: \"$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] | 3600 | rm -rf conftest* |
| 3601 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3602 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3603 | echo "configure: failed program was:" >&5 |
| 3604 | cat conftest.$ac_ext >&5 |
| 3605 | rm -rf conftest* |
| 3606 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3607 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3608 | rm -f conftest* |
| 3609 | LIBS="$ac_save_LIBS" |
| 3610 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3611 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3612 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3613 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3614 | LIBS="-lsocket $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3615 | else |
| 3616 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3617 | fi |
| 3618 | # SVR4 sockets |
Jeremy Hylton | cb25d5e | 2000-07-27 21:23:28 +0000 | [diff] [blame] | 3619 | ;; |
| 3620 | esac |
| 3621 | case "$ac_sys_system" in |
| 3622 | BeOS*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3623 | echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 3624 | echo "configure:3625: checking for socket in -lnet" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3625 | ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'` |
| 3626 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 3627 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3628 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3629 | ac_save_LIBS="$LIBS" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3630 | LIBS="-lnet $LIBS $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3631 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 3632 | #line 3633 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3633 | #include "confdefs.h" |
| 3634 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3635 | /* 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] | 3636 | builtin and then its argument prototype would still apply. */ |
| 3637 | char socket(); |
| 3638 | |
| 3639 | int main() { |
| 3640 | socket() |
| 3641 | ; return 0; } |
| 3642 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 3643 | if { (eval echo configure:3644: \"$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] | 3644 | rm -rf conftest* |
| 3645 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3646 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3647 | echo "configure: failed program was:" >&5 |
| 3648 | cat conftest.$ac_ext >&5 |
| 3649 | rm -rf conftest* |
| 3650 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3651 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3652 | rm -f conftest* |
| 3653 | LIBS="$ac_save_LIBS" |
| 3654 | |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3655 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3656 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3657 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3658 | LIBS="-lnet $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3659 | else |
| 3660 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3661 | fi |
| 3662 | # BeOS |
| 3663 | ;; |
| 3664 | esac |
Guido van Rossum | 70c7f48 | 1998-03-26 18:44:10 +0000 | [diff] [blame] | 3665 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3666 | echo $ac_n "checking for --with-libs""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 3667 | echo "configure:3668: checking for --with-libs" >&5 |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 3668 | # Check whether --with-libs or --without-libs was given. |
| 3669 | if test "${with_libs+set}" = set; then |
| 3670 | withval="$with_libs" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3671 | |
| 3672 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 3673 | LIBS="$withval $LIBS" |
| 3674 | |
| 3675 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3676 | echo "$ac_t""no" 1>&6 |
| 3677 | fi |
| 3678 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3679 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 3680 | # Determine if signalmodule should be used. |
| 3681 | |
| 3682 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3683 | echo $ac_n "checking for --with-signal-module""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 3684 | echo "configure:3685: checking for --with-signal-module" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 3685 | # Check whether --with-signal-module or --without-signal-module was given. |
| 3686 | if test "${with_signal_module+set}" = set; then |
| 3687 | withval="$with_signal_module" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3688 | : |
| 3689 | fi |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 3690 | |
| 3691 | |
| 3692 | if test -z "$with_signal_module" |
| 3693 | then with_signal_module="yes" |
| 3694 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3695 | echo "$ac_t""$with_signal_module" 1>&6 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 3696 | |
| 3697 | if test "${with_signal_module}" = "yes"; then |
| 3698 | USE_SIGNAL_MODULE="" |
| 3699 | SIGNAL_OBJS="" |
| 3700 | else |
| 3701 | USE_SIGNAL_MODULE="#" |
| 3702 | SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o" |
| 3703 | fi |
| 3704 | |
Guido van Rossum | 3d15bd8 | 2001-01-10 18:53:48 +0000 | [diff] [blame] | 3705 | # This is used to generate Setup.config |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 3706 | |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3707 | USE_THREAD_MODULE="" |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 3708 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3709 | echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 3710 | echo "configure:3711: checking for --with-dec-threads" >&5 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3711 | |
| 3712 | # Check whether --with-dec-threads or --without-dec-threads was given. |
| 3713 | if test "${with_dec_threads+set}" = set; then |
| 3714 | withval="$with_dec_threads" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3715 | |
| 3716 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3717 | LDLAST=-threads |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3718 | if test "${with_thread+set}" != set; then |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3719 | with_thread="$withval"; |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3720 | fi |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3721 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3722 | echo "$ac_t""no" 1>&6 |
| 3723 | fi |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3724 | |
| 3725 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3726 | echo $ac_n "checking for --with-threads""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 3727 | echo "configure:3728: checking for --with-threads" >&5 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3728 | # Check whether --with-threads or --without-threads was given. |
| 3729 | if test "${with_threads+set}" = set; then |
| 3730 | withval="$with_threads" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3731 | : |
| 3732 | fi |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3733 | |
| 3734 | |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3735 | # --with-thread is deprecated, but check for it anyway |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3736 | # Check whether --with-thread or --without-thread was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3737 | if test "${with_thread+set}" = set; then |
| 3738 | withval="$with_thread" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3739 | |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 3740 | with_threads=$with_thread |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3741 | fi |
| 3742 | |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3743 | |
| 3744 | if test -z "$with_threads" |
| 3745 | then with_threads="yes" |
| 3746 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3747 | echo "$ac_t""$with_threads" 1>&6 |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3748 | |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 3749 | |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3750 | if test "$with_threads" = "no" |
| 3751 | then |
| 3752 | USE_THREAD_MODULE="#" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3753 | elif test "$ac_cv_pthread_is_default" = yes |
| 3754 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3755 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3756 | #define WITH_THREAD 1 |
| 3757 | EOF |
| 3758 | |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3759 | # Defining _REENTRANT on system with POSIX threads should not hurt. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3760 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3761 | #define _REENTRANT 1 |
| 3762 | EOF |
| 3763 | |
| 3764 | posix_threads=yes |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 3765 | THREADOBJ="Python/thread.o" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3766 | elif test "$ac_cv_kpthread" = "yes" |
| 3767 | then |
| 3768 | CC="$CC -Kpthread" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3769 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 3770 | #define WITH_THREAD 1 |
| 3771 | EOF |
| 3772 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 3773 | posix_threads=yes |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 3774 | THREADOBJ="Python/thread.o" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3775 | else |
| 3776 | if test ! -z "$with_threads" -a -d "$with_threads" |
| 3777 | then LDFLAGS="$LDFLAGS -L$with_threads" |
| 3778 | fi |
| 3779 | if test ! -z "$withval" -a -d "$withval" |
| 3780 | then LDFLAGS="$LDFLAGS -L$withval" |
| 3781 | fi |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3782 | |
| 3783 | # According to the POSIX spec, a pthreads implementation must |
| 3784 | # 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] | 3785 | echo $ac_n "checking for _POSIX_THREADS in unistd.h""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 3786 | echo "configure:3787: checking for _POSIX_THREADS in unistd.h" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3787 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 3788 | #line 3789 "configure" |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3789 | #include "confdefs.h" |
| 3790 | #include <unistd.h> |
| 3791 | #ifdef _POSIX_THREADS |
| 3792 | yes |
| 3793 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3794 | |
| 3795 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3796 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 3797 | egrep "yes" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3798 | rm -rf conftest* |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3799 | unistd_defines_pthreads=yes |
| 3800 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3801 | rm -rf conftest* |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3802 | unistd_defines_pthreads=no |
| 3803 | fi |
| 3804 | rm -f conftest* |
| 3805 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3806 | echo "$ac_t""$unistd_defines_pthreads" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3807 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3808 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9caf77a | 1996-08-01 00:52:26 +0000 | [diff] [blame] | 3809 | #define _REENTRANT 1 |
| 3810 | EOF |
| 3811 | |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3812 | ac_safe=`echo "cthreads.h" | sed 'y%./+-%__p_%'` |
| 3813 | echo $ac_n "checking for cthreads.h""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 3814 | echo "configure:3815: checking for cthreads.h" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3815 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 3816 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3817 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3818 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 3819 | #line 3820 "configure" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3820 | #include "confdefs.h" |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3821 | #include <cthreads.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3822 | EOF |
| 3823 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 3824 | { (eval echo configure:3825: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3825 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 3826 | if test -z "$ac_err"; then |
| 3827 | rm -rf conftest* |
| 3828 | eval "ac_cv_header_$ac_safe=yes" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3829 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3830 | echo "$ac_err" >&5 |
| 3831 | echo "configure: failed program was:" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3832 | cat conftest.$ac_ext >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3833 | rm -rf conftest* |
| 3834 | eval "ac_cv_header_$ac_safe=no" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3835 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3836 | rm -f conftest* |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3837 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3838 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 3839 | echo "$ac_t""yes" 1>&6 |
| 3840 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3841 | #define WITH_THREAD 1 |
| 3842 | EOF |
| 3843 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3844 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3845 | #define C_THREADS 1 |
| 3846 | EOF |
| 3847 | |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3848 | cat >> confdefs.h <<\EOF |
| 3849 | #define HURD_C_THREADS 1 |
| 3850 | EOF |
| 3851 | |
| 3852 | LIBS="$LIBS -lthreads" |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 3853 | THREADOBJ="Python/thread.o" |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3854 | else |
| 3855 | echo "$ac_t""no" 1>&6 |
| 3856 | |
| 3857 | ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'` |
| 3858 | echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 3859 | echo "configure:3860: checking for mach/cthreads.h" >&5 |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3860 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 3861 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3862 | else |
| 3863 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 3864 | #line 3865 "configure" |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3865 | #include "confdefs.h" |
| 3866 | #include <mach/cthreads.h> |
| 3867 | EOF |
| 3868 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 3869 | { (eval echo configure:3870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3870 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 3871 | if test -z "$ac_err"; then |
| 3872 | rm -rf conftest* |
| 3873 | eval "ac_cv_header_$ac_safe=yes" |
| 3874 | else |
| 3875 | echo "$ac_err" >&5 |
| 3876 | echo "configure: failed program was:" >&5 |
| 3877 | cat conftest.$ac_ext >&5 |
| 3878 | rm -rf conftest* |
| 3879 | eval "ac_cv_header_$ac_safe=no" |
| 3880 | fi |
| 3881 | rm -f conftest* |
| 3882 | fi |
| 3883 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 3884 | echo "$ac_t""yes" 1>&6 |
| 3885 | cat >> confdefs.h <<\EOF |
| 3886 | #define WITH_THREAD 1 |
| 3887 | EOF |
| 3888 | |
| 3889 | cat >> confdefs.h <<\EOF |
| 3890 | #define C_THREADS 1 |
| 3891 | EOF |
| 3892 | |
| 3893 | cat >> confdefs.h <<\EOF |
| 3894 | #define MACH_C_THREADS 1 |
| 3895 | EOF |
| 3896 | |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 3897 | THREADOBJ="Python/thread.o" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +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 | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3900 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3901 | echo $ac_n "checking for --with-pth""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 3902 | echo "configure:3903: checking for --with-pth" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3903 | # Check whether --with-pth or --without-pth was given. |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3904 | if test "${with_pth+set}" = set; then |
| 3905 | withval="$with_pth" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3906 | |
| 3907 | echo "$ac_t""$withval" 1>&6 |
| 3908 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3909 | #define WITH_THREAD 1 |
| 3910 | EOF |
| 3911 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3912 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3913 | #define HAVE_PTH 1 |
| 3914 | EOF |
| 3915 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3916 | LIBS="-lpth $LIBS" |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 3917 | THREADOBJ="Python/thread.o" |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3918 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3919 | |
| 3920 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3921 | |
| 3922 | # Just looking for pthread_create in libpthread is not enough: |
| 3923 | # on HP/UX, pthread.h renames pthread_create to a different symbol name. |
| 3924 | # So we really have to include pthread.h, and then link. |
| 3925 | _libs=$LIBS |
| 3926 | LIBS="$LIBS -lpthread" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3927 | echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 3928 | echo "configure:3929: checking for pthread_create in -lpthread" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3929 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 3930 | #line 3931 "configure" |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3931 | #include "confdefs.h" |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3932 | #include <pthread.h> |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3933 | |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3934 | void * start_routine (void *arg) { exit (0); } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3935 | int main() { |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3936 | |
| 3937 | pthread_create (NULL, NULL, start_routine, NULL) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3938 | ; return 0; } |
| 3939 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 3940 | if { (eval echo configure:3941: \"$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] | 3941 | rm -rf conftest* |
| 3942 | |
| 3943 | echo "$ac_t""yes" 1>&6 |
| 3944 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3945 | #define WITH_THREAD 1 |
| 3946 | EOF |
| 3947 | |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3948 | posix_threads=yes |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 3949 | THREADOBJ="Python/thread.o" |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3950 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3951 | echo "configure: failed program was:" >&5 |
| 3952 | cat conftest.$ac_ext >&5 |
| 3953 | rm -rf conftest* |
| 3954 | |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3955 | LIBS=$_libs |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3956 | echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 3957 | echo "configure:3958: checking for pthread_detach" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3958 | if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then |
| 3959 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3960 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3961 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 3962 | #line 3963 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3963 | #include "confdefs.h" |
| 3964 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3965 | which can conflict with char pthread_detach(); below. */ |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3966 | #include <assert.h> |
| 3967 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3968 | /* 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] | 3969 | builtin and then its argument prototype would still apply. */ |
| 3970 | char pthread_detach(); |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3971 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3972 | int main() { |
| 3973 | |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3974 | /* The GNU C library defines this for functions which it implements |
| 3975 | to always fail with ENOSYS. Some functions are actually named |
| 3976 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3977 | #if defined (__stub_pthread_detach) || defined (__stub___pthread_detach) |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3978 | choke me |
| 3979 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3980 | pthread_detach(); |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3981 | #endif |
| 3982 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3983 | ; return 0; } |
| 3984 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 3985 | if { (eval echo configure:3986: \"$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] | 3986 | rm -rf conftest* |
| 3987 | eval "ac_cv_func_pthread_detach=yes" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3988 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3989 | echo "configure: failed program was:" >&5 |
| 3990 | cat conftest.$ac_ext >&5 |
| 3991 | rm -rf conftest* |
| 3992 | eval "ac_cv_func_pthread_detach=no" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3993 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3994 | rm -f conftest* |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3995 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3996 | |
| 3997 | if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then |
| 3998 | echo "$ac_t""yes" 1>&6 |
| 3999 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 4000 | #define WITH_THREAD 1 |
| 4001 | EOF |
| 4002 | |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4003 | posix_threads=yes |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4004 | THREADOBJ="Python/thread.o" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 4005 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4006 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 4007 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4008 | ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'` |
| 4009 | echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4010 | echo "configure:4011: checking for kernel/OS.h" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4011 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 4012 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 4013 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4014 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4015 | #line 4016 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 4016 | #include "confdefs.h" |
| 4017 | #include <kernel/OS.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4018 | EOF |
| 4019 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4020 | { (eval echo configure:4021: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4021 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 4022 | if test -z "$ac_err"; then |
| 4023 | rm -rf conftest* |
| 4024 | eval "ac_cv_header_$ac_safe=yes" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 4025 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4026 | echo "$ac_err" >&5 |
| 4027 | echo "configure: failed program was:" >&5 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 4028 | cat conftest.$ac_ext >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4029 | rm -rf conftest* |
| 4030 | eval "ac_cv_header_$ac_safe=no" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 4031 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4032 | rm -f conftest* |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 4033 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4034 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 4035 | echo "$ac_t""yes" 1>&6 |
| 4036 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 4037 | #define WITH_THREAD 1 |
| 4038 | EOF |
| 4039 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4040 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 4041 | #define BEOS_THREADS 1 |
| 4042 | EOF |
| 4043 | |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4044 | THREADOBJ="Python/thread.o" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 4045 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4046 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 4047 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4048 | echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4049 | echo "configure:4050: checking for pthread_create in -lpthreads" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4050 | ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'` |
| 4051 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 4052 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4053 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4054 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4055 | LIBS="-lpthreads $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4056 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4057 | #line 4058 "configure" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4058 | #include "confdefs.h" |
| 4059 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4060 | /* 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] | 4061 | builtin and then its argument prototype would still apply. */ |
| 4062 | char pthread_create(); |
| 4063 | |
| 4064 | int main() { |
| 4065 | pthread_create() |
| 4066 | ; return 0; } |
| 4067 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4068 | if { (eval echo configure:4069: \"$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] | 4069 | rm -rf conftest* |
| 4070 | eval "ac_cv_lib_$ac_lib_var=yes" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4071 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4072 | echo "configure: failed program was:" >&5 |
| 4073 | cat conftest.$ac_ext >&5 |
| 4074 | rm -rf conftest* |
| 4075 | eval "ac_cv_lib_$ac_lib_var=no" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4076 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4077 | rm -f conftest* |
| 4078 | LIBS="$ac_save_LIBS" |
| 4079 | |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4080 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4081 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4082 | echo "$ac_t""yes" 1>&6 |
| 4083 | cat >> confdefs.h <<\EOF |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4084 | #define WITH_THREAD 1 |
| 4085 | EOF |
| 4086 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4087 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4088 | LIBS="$LIBS -lpthreads" |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4089 | THREADOBJ="Python/thread.o" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4090 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4091 | echo "$ac_t""no" 1>&6 |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4092 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4093 | echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4094 | echo "configure:4095: checking for pthread_create in -lc_r" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4095 | ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` |
| 4096 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 4097 | echo $ac_n "(cached) $ac_c" 1>&6 |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4098 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4099 | ac_save_LIBS="$LIBS" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4100 | LIBS="-lc_r $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4101 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4102 | #line 4103 "configure" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4103 | #include "confdefs.h" |
| 4104 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4105 | /* 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] | 4106 | builtin and then its argument prototype would still apply. */ |
| 4107 | char pthread_create(); |
| 4108 | |
| 4109 | int main() { |
| 4110 | pthread_create() |
| 4111 | ; return 0; } |
| 4112 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4113 | if { (eval echo configure:4114: \"$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] | 4114 | rm -rf conftest* |
| 4115 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4116 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4117 | echo "configure: failed program was:" >&5 |
| 4118 | cat conftest.$ac_ext >&5 |
| 4119 | rm -rf conftest* |
| 4120 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4121 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4122 | rm -f conftest* |
| 4123 | LIBS="$ac_save_LIBS" |
| 4124 | |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4125 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4126 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4127 | echo "$ac_t""yes" 1>&6 |
| 4128 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4129 | #define WITH_THREAD 1 |
| 4130 | EOF |
| 4131 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4132 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4133 | LIBS="$LIBS -lc_r" |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4134 | THREADOBJ="Python/thread.o" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4135 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4136 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4137 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4138 | echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4139 | echo "configure:4140: checking for __d6_pthread_create in -lthread" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4140 | ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'` |
| 4141 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 4142 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4143 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4144 | ac_save_LIBS="$LIBS" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4145 | LIBS="-lthread $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4146 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4147 | #line 4148 "configure" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4148 | #include "confdefs.h" |
| 4149 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4150 | /* 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] | 4151 | builtin and then its argument prototype would still apply. */ |
| 4152 | char __d6_pthread_create(); |
| 4153 | |
| 4154 | int main() { |
| 4155 | __d6_pthread_create() |
| 4156 | ; return 0; } |
| 4157 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4158 | if { (eval echo configure:4159: \"$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] | 4159 | rm -rf conftest* |
| 4160 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4161 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4162 | echo "configure: failed program was:" >&5 |
| 4163 | cat conftest.$ac_ext >&5 |
| 4164 | rm -rf conftest* |
| 4165 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4166 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4167 | rm -f conftest* |
| 4168 | LIBS="$ac_save_LIBS" |
| 4169 | |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4170 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4171 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4172 | echo "$ac_t""yes" 1>&6 |
| 4173 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4174 | #define WITH_THREAD 1 |
| 4175 | EOF |
| 4176 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4177 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4178 | LIBS="$LIBS -lthread" |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4179 | THREADOBJ="Python/thread.o" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4180 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4181 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4182 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4183 | echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4184 | echo "configure:4185: checking for __pthread_create_system in -lpthread" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4185 | ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'` |
| 4186 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 4187 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4188 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4189 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4190 | LIBS="-lpthread $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4191 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4192 | #line 4193 "configure" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4193 | #include "confdefs.h" |
| 4194 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4195 | /* 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] | 4196 | builtin and then its argument prototype would still apply. */ |
| 4197 | char __pthread_create_system(); |
| 4198 | |
| 4199 | int main() { |
| 4200 | __pthread_create_system() |
| 4201 | ; return 0; } |
| 4202 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4203 | if { (eval echo configure:4204: \"$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] | 4204 | rm -rf conftest* |
| 4205 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4206 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4207 | echo "configure: failed program was:" >&5 |
| 4208 | cat conftest.$ac_ext >&5 |
| 4209 | rm -rf conftest* |
| 4210 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4211 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4212 | rm -f conftest* |
| 4213 | LIBS="$ac_save_LIBS" |
| 4214 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4215 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4216 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4217 | echo "$ac_t""yes" 1>&6 |
| 4218 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4219 | #define WITH_THREAD 1 |
| 4220 | EOF |
| 4221 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4222 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4223 | LIBS="$LIBS -lpthread" |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4224 | THREADOBJ="Python/thread.o" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4225 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4226 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4227 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4228 | echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4229 | echo "configure:4230: checking for pthread_create in -lcma" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4230 | ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'` |
| 4231 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 4232 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4233 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4234 | ac_save_LIBS="$LIBS" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4235 | LIBS="-lcma $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4236 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4237 | #line 4238 "configure" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4238 | #include "confdefs.h" |
| 4239 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4240 | /* 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] | 4241 | builtin and then its argument prototype would still apply. */ |
| 4242 | char pthread_create(); |
| 4243 | |
| 4244 | int main() { |
| 4245 | pthread_create() |
| 4246 | ; return 0; } |
| 4247 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4248 | if { (eval echo configure:4249: \"$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] | 4249 | rm -rf conftest* |
| 4250 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4251 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4252 | echo "configure: failed program was:" >&5 |
| 4253 | cat conftest.$ac_ext >&5 |
| 4254 | rm -rf conftest* |
| 4255 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4256 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4257 | rm -f conftest* |
| 4258 | LIBS="$ac_save_LIBS" |
| 4259 | |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4260 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4261 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4262 | echo "$ac_t""yes" 1>&6 |
| 4263 | cat >> confdefs.h <<\EOF |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4264 | #define WITH_THREAD 1 |
| 4265 | EOF |
| 4266 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4267 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4268 | LIBS="$LIBS -lcma" |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4269 | THREADOBJ="Python/thread.o" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4270 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4271 | echo "$ac_t""no" 1>&6 |
Thomas Wouters | 0db2b2b | 2000-08-26 11:33:43 +0000 | [diff] [blame] | 4272 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4273 | USE_THREAD_MODULE="#" |
Guido van Rossum | 2d38f91 | 1996-06-26 19:47:01 +0000 | [diff] [blame] | 4274 | fi |
| 4275 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4276 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4277 | fi |
| 4278 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 4279 | fi |
| 4280 | |
Guido van Rossum | 0be3e49 | 1997-05-22 20:33:33 +0000 | [diff] [blame] | 4281 | fi |
| 4282 | |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4283 | fi |
| 4284 | |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4285 | fi |
| 4286 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 4287 | fi |
| 4288 | |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 4289 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4290 | rm -f conftest* |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4291 | fi |
| 4292 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4293 | fi |
| 4294 | |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 4295 | fi |
| 4296 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4297 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4298 | if test "$posix_threads" = "yes"; then |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4299 | if test "$unistd_defines_pthreads" = "no"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4300 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4301 | #define _POSIX_THREADS 1 |
| 4302 | EOF |
| 4303 | |
| 4304 | fi |
| 4305 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4306 | echo $ac_n "checking if PTHREAD_SCOPE_SYSTEM is supported""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4307 | echo "configure:4308: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4308 | if eval "test \"`echo '$''{'ac_cv_pthread_system_supported'+set}'`\" = set"; then |
| 4309 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4310 | else |
| 4311 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 4312 | ac_cv_pthread_system_supported=no |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4313 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4314 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4315 | #line 4316 "configure" |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4316 | #include "confdefs.h" |
| 4317 | #include <pthread.h> |
| 4318 | void *foo(void *parm) { |
| 4319 | return NULL; |
| 4320 | } |
| 4321 | main() { |
| 4322 | pthread_attr_t attr; |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame] | 4323 | pthread_t id; |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4324 | if (pthread_attr_init(&attr)) exit(-1); |
| 4325 | if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1); |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame] | 4326 | if (pthread_create(&id, &attr, foo, NULL)) exit(-1); |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4327 | exit(0); |
| 4328 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4329 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4330 | if { (eval echo configure:4331: \"$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] | 4331 | then |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4332 | ac_cv_pthread_system_supported=yes |
| 4333 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4334 | echo "configure: failed program was:" >&5 |
| 4335 | cat conftest.$ac_ext >&5 |
| 4336 | rm -fr conftest* |
| 4337 | ac_cv_pthread_system_supported=no |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4338 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4339 | rm -fr conftest* |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4340 | fi |
| 4341 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4342 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4343 | fi |
| 4344 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4345 | echo "$ac_t""$ac_cv_pthread_system_supported" 1>&6 |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4346 | if test "$ac_cv_pthread_system_supported" = "yes"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4347 | cat >> confdefs.h <<\EOF |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4348 | #define PTHREAD_SYSTEM_SCHED_SUPPORTED 1 |
| 4349 | EOF |
| 4350 | |
| 4351 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4352 | for ac_func in pthread_sigmask |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4353 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4354 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4355 | echo "configure:4356: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4356 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 4357 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4358 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4359 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4360 | #line 4361 "configure" |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4361 | #include "confdefs.h" |
| 4362 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4363 | which can conflict with char $ac_func(); below. */ |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4364 | #include <assert.h> |
| 4365 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4366 | /* 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] | 4367 | builtin and then its argument prototype would still apply. */ |
| 4368 | char $ac_func(); |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4369 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4370 | int main() { |
| 4371 | |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4372 | /* The GNU C library defines this for functions which it implements |
| 4373 | to always fail with ENOSYS. Some functions are actually named |
| 4374 | something starting with __ and the normal name is an alias. */ |
| 4375 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 4376 | choke me |
| 4377 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4378 | $ac_func(); |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4379 | #endif |
| 4380 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4381 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 4382 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4383 | if { (eval echo configure:4384: \"$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] | 4384 | rm -rf conftest* |
| 4385 | eval "ac_cv_func_$ac_func=yes" |
| 4386 | else |
| 4387 | echo "configure: failed program was:" >&5 |
| 4388 | cat conftest.$ac_ext >&5 |
| 4389 | rm -rf conftest* |
| 4390 | eval "ac_cv_func_$ac_func=no" |
| 4391 | fi |
| 4392 | rm -f conftest* |
| 4393 | fi |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4394 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4395 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4396 | echo "$ac_t""yes" 1>&6 |
| 4397 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4398 | cat >> confdefs.h <<EOF |
| 4399 | #define $ac_tr_func 1 |
| 4400 | EOF |
| 4401 | |
| 4402 | else |
| 4403 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4404 | fi |
| 4405 | done |
| 4406 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4407 | fi |
| 4408 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4409 | echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4410 | echo "configure:4411: checking for usconfig in -lmpc" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4411 | ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'` |
| 4412 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 4413 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4414 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4415 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4416 | LIBS="-lmpc $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4417 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4418 | #line 4419 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4419 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4420 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4421 | /* 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] | 4422 | builtin and then its argument prototype would still apply. */ |
| 4423 | char usconfig(); |
| 4424 | |
| 4425 | int main() { |
| 4426 | usconfig() |
| 4427 | ; return 0; } |
| 4428 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4429 | if { (eval echo configure:4430: \"$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] | 4430 | rm -rf conftest* |
| 4431 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4432 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4433 | echo "configure: failed program was:" >&5 |
| 4434 | cat conftest.$ac_ext >&5 |
| 4435 | rm -rf conftest* |
| 4436 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4437 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4438 | rm -f conftest* |
| 4439 | LIBS="$ac_save_LIBS" |
| 4440 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4441 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4442 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4443 | echo "$ac_t""yes" 1>&6 |
| 4444 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4445 | #define WITH_THREAD 1 |
| 4446 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4447 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4448 | LIBS="$LIBS -lmpc" |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4449 | THREADOBJ="Python/thread.o" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4450 | USE_THREAD_MODULE="" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4451 | else |
| 4452 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4453 | fi |
| 4454 | |
Martin v. Löwis | 3d2b549 | 2002-03-15 13:48:21 +0000 | [diff] [blame] | 4455 | |
| 4456 | if test $posix_threads != "yes"; then |
| 4457 | echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4458 | echo "configure:4459: checking for thr_create in -lthread" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4459 | ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'` |
| 4460 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 4461 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4462 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4463 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4464 | LIBS="-lthread $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4465 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4466 | #line 4467 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4467 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4468 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4469 | /* 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] | 4470 | builtin and then its argument prototype would still apply. */ |
| 4471 | char thr_create(); |
| 4472 | |
| 4473 | int main() { |
| 4474 | thr_create() |
| 4475 | ; return 0; } |
| 4476 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4477 | if { (eval echo configure:4478: \"$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] | 4478 | rm -rf conftest* |
| 4479 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4480 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4481 | echo "configure: failed program was:" >&5 |
| 4482 | cat conftest.$ac_ext >&5 |
| 4483 | rm -rf conftest* |
| 4484 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4485 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4486 | rm -f conftest* |
| 4487 | LIBS="$ac_save_LIBS" |
| 4488 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4489 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4490 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4491 | echo "$ac_t""yes" 1>&6 |
| 4492 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4493 | #define WITH_THREAD 1 |
| 4494 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4495 | |
Martin v. Löwis | 3d2b549 | 2002-03-15 13:48:21 +0000 | [diff] [blame] | 4496 | LIBS="$LIBS -lthread" |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4497 | THREADOBJ="Python/thread.o" |
Martin v. Löwis | 3d2b549 | 2002-03-15 13:48:21 +0000 | [diff] [blame] | 4498 | USE_THREAD_MODULE="" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4499 | else |
| 4500 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4501 | fi |
| 4502 | |
Martin v. Löwis | 3d2b549 | 2002-03-15 13:48:21 +0000 | [diff] [blame] | 4503 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4504 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4505 | if test "$USE_THREAD_MODULE" != "#" |
| 4506 | then |
| 4507 | # If the above checks didn't disable threads, (at least) OSF1 |
| 4508 | # needs this '-threads' argument during linking. |
| 4509 | case $ac_sys_system in |
| 4510 | OSF1) LDLAST=-threads;; |
| 4511 | esac |
Jeremy Hylton | 1a2ca86 | 2000-10-16 16:59:12 +0000 | [diff] [blame] | 4512 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4513 | fi |
| 4514 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4515 | # Check for enable-ipv6 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4516 | echo $ac_n "checking if --enable-ipv6 is specified""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4517 | echo "configure:4518: checking if --enable-ipv6 is specified" >&5 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4518 | # Check whether --enable-ipv6 or --disable-ipv6 was given. |
| 4519 | if test "${enable_ipv6+set}" = set; then |
| 4520 | enableval="$enable_ipv6" |
| 4521 | case "$enableval" in |
| 4522 | no) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4523 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4524 | ipv6=no |
| 4525 | ;; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4526 | *) echo "$ac_t""yes" 1>&6 |
| 4527 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4528 | #define ENABLE_IPV6 1 |
| 4529 | EOF |
| 4530 | |
| 4531 | ipv6=yes |
| 4532 | ;; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4533 | esac |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4534 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4535 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4536 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4537 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4538 | ipv6=no |
| 4539 | |
| 4540 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4541 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4542 | #line 4543 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4543 | #include "confdefs.h" |
| 4544 | /* AF_INET6 available check */ |
| 4545 | #include <sys/types.h> |
| 4546 | #include <sys/socket.h> |
| 4547 | main() |
| 4548 | { |
| 4549 | if (socket(AF_INET6, SOCK_STREAM, 0) < 0) |
| 4550 | exit(1); |
| 4551 | else |
| 4552 | exit(0); |
| 4553 | } |
| 4554 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4555 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4556 | if { (eval echo configure:4557: \"$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] | 4557 | then |
| 4558 | echo "$ac_t""yes" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4559 | ipv6=yes |
| 4560 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4561 | echo "configure: failed program was:" >&5 |
| 4562 | cat conftest.$ac_ext >&5 |
| 4563 | rm -fr conftest* |
| 4564 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4565 | ipv6=no |
| 4566 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4567 | rm -fr conftest* |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4568 | fi |
| 4569 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4570 | |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4571 | if test "$ipv6" = "yes"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4572 | echo $ac_n "checking if RFC2553 API is available""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4573 | echo "configure:4574: checking if RFC2553 API is available" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4574 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4575 | #line 4576 "configure" |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4576 | #include "confdefs.h" |
| 4577 | #include <sys/types.h> |
| 4578 | #include <netinet/in.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4579 | int main() { |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4580 | struct sockaddr_in6 x; |
| 4581 | x.sin6_scope_id; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4582 | ; return 0; } |
| 4583 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4584 | if { (eval echo configure:4585: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4585 | rm -rf conftest* |
| 4586 | echo "$ac_t""yes" 1>&6 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4587 | ipv6=yes |
| 4588 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4589 | echo "configure: failed program was:" >&5 |
| 4590 | cat conftest.$ac_ext >&5 |
| 4591 | rm -rf conftest* |
| 4592 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4593 | ipv6=no |
| 4594 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4595 | rm -f conftest* |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4596 | fi |
| 4597 | |
| 4598 | if test "$ipv6" = "yes"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4599 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4600 | #define ENABLE_IPV6 1 |
| 4601 | EOF |
| 4602 | |
| 4603 | fi |
| 4604 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4605 | fi |
| 4606 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4607 | |
| 4608 | ipv6type=unknown |
| 4609 | ipv6lib=none |
| 4610 | ipv6trylibc=no |
| 4611 | |
| 4612 | if test "$ipv6" = "yes"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4613 | echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4614 | echo "configure:4615: checking ipv6 stack type" >&5 |
Guido van Rossum | b855216 | 2001-09-05 14:58:11 +0000 | [diff] [blame] | 4615 | for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta; |
| 4616 | do |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4617 | case $i in |
| 4618 | inria) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4619 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4620 | #line 4621 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4621 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4622 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4623 | #include <netinet/in.h> |
| 4624 | #ifdef IPV6_INRIA_VERSION |
| 4625 | yes |
| 4626 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4627 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4628 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4629 | egrep "yes" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4630 | rm -rf conftest* |
Martin v. Löwis | 44ddbde | 2001-12-02 10:15:37 +0000 | [diff] [blame] | 4631 | ipv6type=$i |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4632 | fi |
| 4633 | rm -f conftest* |
| 4634 | |
| 4635 | ;; |
| 4636 | kame) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4637 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4638 | #line 4639 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4639 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4640 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4641 | #include <netinet/in.h> |
| 4642 | #ifdef __KAME__ |
| 4643 | yes |
| 4644 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4645 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4646 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4647 | egrep "yes" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4648 | rm -rf conftest* |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4649 | ipv6type=$i; |
| 4650 | ipv6lib=inet6 |
| 4651 | ipv6libdir=/usr/local/v6/lib |
| 4652 | ipv6trylibc=yes |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4653 | fi |
| 4654 | rm -f conftest* |
| 4655 | |
| 4656 | ;; |
| 4657 | linux-glibc) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4658 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4659 | #line 4660 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4660 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4661 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4662 | #include <features.h> |
| 4663 | #if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)) |
| 4664 | yes |
| 4665 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4666 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4667 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4668 | egrep "yes" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4669 | rm -rf conftest* |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4670 | ipv6type=$i; |
| 4671 | ipv6trylibc=yes |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4672 | fi |
| 4673 | rm -f conftest* |
| 4674 | |
| 4675 | ;; |
| 4676 | linux-inet6) |
| 4677 | if test -d /usr/inet6; then |
| 4678 | ipv6type=$i |
| 4679 | ipv6lib=inet6 |
| 4680 | ipv6libdir=/usr/inet6/lib |
Martin v. Löwis | 44ddbde | 2001-12-02 10:15:37 +0000 | [diff] [blame] | 4681 | OPT="-I/usr/inet6/include $OPT" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4682 | fi |
| 4683 | ;; |
| 4684 | solaris) |
| 4685 | if test -f /etc/netconfig; then |
| 4686 | if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then |
| 4687 | ipv6type=$i |
| 4688 | ipv6trylibc=yes |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4689 | fi |
| 4690 | fi |
| 4691 | ;; |
| 4692 | toshiba) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4693 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4694 | #line 4695 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4695 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4696 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4697 | #include <sys/param.h> |
| 4698 | #ifdef _TOSHIBA_INET6 |
| 4699 | yes |
| 4700 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4701 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4702 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4703 | egrep "yes" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4704 | rm -rf conftest* |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4705 | ipv6type=$i; |
| 4706 | ipv6lib=inet6; |
Martin v. Löwis | 44ddbde | 2001-12-02 10:15:37 +0000 | [diff] [blame] | 4707 | ipv6libdir=/usr/local/v6/lib |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4708 | fi |
| 4709 | rm -f conftest* |
| 4710 | |
| 4711 | ;; |
| 4712 | v6d) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4713 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4714 | #line 4715 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4715 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4716 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4717 | #include </usr/local/v6/include/sys/v6config.h> |
| 4718 | #ifdef __V6D__ |
| 4719 | yes |
| 4720 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4721 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4722 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4723 | egrep "yes" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4724 | rm -rf conftest* |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4725 | ipv6type=$i; |
| 4726 | ipv6lib=v6; |
| 4727 | ipv6libdir=/usr/local/v6/lib; |
| 4728 | OPT="-I/usr/local/v6/include $OPT" |
| 4729 | fi |
| 4730 | rm -f conftest* |
| 4731 | |
| 4732 | ;; |
| 4733 | zeta) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4734 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4735 | #line 4736 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4736 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4737 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4738 | #include <sys/param.h> |
| 4739 | #ifdef _ZETA_MINAMI_INET6 |
| 4740 | yes |
| 4741 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4742 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4743 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4744 | egrep "yes" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4745 | rm -rf conftest* |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4746 | ipv6type=$i; |
| 4747 | ipv6lib=inet6; |
Martin v. Löwis | 44ddbde | 2001-12-02 10:15:37 +0000 | [diff] [blame] | 4748 | ipv6libdir=/usr/local/v6/lib |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4749 | fi |
| 4750 | rm -f conftest* |
| 4751 | |
| 4752 | ;; |
| 4753 | esac |
| 4754 | if test "$ipv6type" != "unknown"; then |
| 4755 | break |
| 4756 | fi |
| 4757 | done |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4758 | echo "$ac_t""$ipv6type" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4759 | fi |
| 4760 | |
| 4761 | if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then |
| 4762 | if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then |
| 4763 | LIBS="-L$ipv6libdir -l$ipv6lib $LIBS" |
| 4764 | echo "using lib$ipv6lib" |
| 4765 | else |
| 4766 | if test $ipv6trylibc = "yes"; then |
| 4767 | echo "using libc" |
| 4768 | else |
| 4769 | echo 'Fatal: no $ipv6lib library found. cannot continue.' |
| 4770 | echo "You need to fetch lib$ipv6lib.a from appropriate" |
| 4771 | echo 'ipv6 kit and compile beforehand.' |
| 4772 | exit 1 |
| 4773 | fi |
| 4774 | fi |
| 4775 | fi |
| 4776 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4777 | # Check for GC support |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4778 | echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4779 | echo "configure:4780: checking for --with-cycle-gc" >&5 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4780 | # Check whether --with-cycle-gc or --without-cycle-gc was given. |
| 4781 | if test "${with_cycle_gc+set}" = set; then |
| 4782 | withval="$with_cycle_gc" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4783 | : |
| 4784 | fi |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4785 | |
| 4786 | |
| 4787 | if test -z "$with_cycle_gc" |
| 4788 | then with_cycle_gc="yes" |
| 4789 | fi |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame] | 4790 | if test "$with_cycle_gc" != "no" |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4791 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4792 | cat >> confdefs.h <<\EOF |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4793 | #define WITH_CYCLE_GC 1 |
| 4794 | EOF |
| 4795 | |
| 4796 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4797 | echo "$ac_t""$with_cycle_gc" 1>&6 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4798 | |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 4799 | # Check for Python-specific malloc support |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4800 | echo $ac_n "checking for --with-pymalloc""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4801 | echo "configure:4802: checking for --with-pymalloc" >&5 |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 4802 | # Check whether --with-pymalloc or --without-pymalloc was given. |
| 4803 | if test "${with_pymalloc+set}" = set; then |
| 4804 | withval="$with_pymalloc" |
Neil Schemenauer | 16c2297 | 2002-03-22 15:34:49 +0000 | [diff] [blame] | 4805 | : |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4806 | fi |
| 4807 | |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 4808 | |
Neil Schemenauer | 16c2297 | 2002-03-22 15:34:49 +0000 | [diff] [blame] | 4809 | if test -z "$with_pymalloc" |
| 4810 | then with_pymalloc="yes" |
| 4811 | fi |
| 4812 | if test "$with_pymalloc" != "no" |
| 4813 | then |
| 4814 | cat >> confdefs.h <<\EOF |
| 4815 | #define WITH_PYMALLOC 1 |
| 4816 | EOF |
| 4817 | |
| 4818 | fi |
| 4819 | echo "$ac_t""$with_pymalloc" 1>&6 |
| 4820 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4821 | # Check for --with-wctype-functions |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4822 | echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4823 | echo "configure:4824: checking for --with-wctype-functions" >&5 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4824 | # Check whether --with-wctype-functions or --without-wctype-functions was given. |
| 4825 | if test "${with_wctype_functions+set}" = set; then |
| 4826 | withval="$with_wctype_functions" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4827 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4828 | if test "$withval" != no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4829 | then cat >> confdefs.h <<\EOF |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4830 | #define WANT_WCTYPE_FUNCTIONS 1 |
| 4831 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4832 | echo "$ac_t""yes" 1>&6 |
| 4833 | else echo "$ac_t""no" 1>&6 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4834 | fi |
| 4835 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4836 | echo "$ac_t""no" 1>&6 |
| 4837 | fi |
| 4838 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4839 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4840 | # -I${DLINCLDIR} is added to the compile rule for importdl.o |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4841 | |
Guido van Rossum | 98935bf | 2001-09-05 19:13:16 +0000 | [diff] [blame] | 4842 | DLINCLDIR=. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4843 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4844 | echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4845 | echo "configure:4846: checking for --with-sgi-dl" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4846 | # Check whether --with-sgi-dl or --without-sgi-dl was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4847 | if test "${with_sgi_dl+set}" = set; then |
| 4848 | withval="$with_sgi_dl" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4849 | |
| 4850 | echo "$ac_t""$withval" 1>&6 |
| 4851 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4852 | #define WITH_SGI_DL 1 |
| 4853 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4854 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4855 | DYNLOADFILE="dynload_dl.o" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4856 | dldir=$withval |
Guido van Rossum | 4095101 | 2000-10-07 16:21:27 +0000 | [diff] [blame] | 4857 | if test ! -z "$dldir" -a -d "$dldir" |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 4858 | then LDFLAGS="$LDFLAGS -L$dldir" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4859 | 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] | 4860 | fi |
| 4861 | DLINCLDIR=${dldir} |
| 4862 | LIBS="$LIBS -ldl -lmld" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4863 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4864 | echo "$ac_t""no" 1>&6 |
| 4865 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4866 | |
| 4867 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4868 | echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4869 | echo "configure:4870: checking for --with-dl-dld" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4870 | # Check whether --with-dl-dld or --without-dl-dld was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4871 | if test "${with_dl_dld+set}" = set; then |
| 4872 | withval="$with_dl_dld" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4873 | |
| 4874 | echo "$ac_t""$withval" 1>&6 |
| 4875 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4876 | #define WITH_DL_DLD 1 |
| 4877 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4878 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4879 | DYNLOADFILE="dynload_dl.o" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4880 | dldir=`echo "$withval" | sed 's/,.*//'` |
| 4881 | dlddir=`echo "$withval" | sed 's/.*,//'` |
Barry Warsaw | 7d1219d | 2000-10-05 18:45:53 +0000 | [diff] [blame] | 4882 | 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] | 4883 | then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4884 | 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] | 4885 | fi |
| 4886 | DLINCLDIR=${dldir} |
| 4887 | LIBS="$LIBS -ldl -ldld" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4888 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4889 | echo "$ac_t""no" 1>&6 |
| 4890 | fi |
| 4891 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4892 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4893 | # the dlopen() function means we might want to use dynload_shlib.o. some |
| 4894 | # 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] | 4895 | for ac_func in dlopen |
| 4896 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4897 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4898 | echo "configure:4899: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4899 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 4900 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4901 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4902 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4903 | #line 4904 "configure" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4904 | #include "confdefs.h" |
| 4905 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4906 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4907 | #include <assert.h> |
| 4908 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4909 | /* We use char because int might match the return type of a gcc2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4910 | builtin and then its argument prototype would still apply. */ |
| 4911 | char $ac_func(); |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4912 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4913 | int main() { |
| 4914 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4915 | /* The GNU C library defines this for functions which it implements |
| 4916 | to always fail with ENOSYS. Some functions are actually named |
| 4917 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4918 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4919 | choke me |
| 4920 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4921 | $ac_func(); |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4922 | #endif |
| 4923 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4924 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 4925 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4926 | if { (eval echo configure:4927: \"$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] | 4927 | rm -rf conftest* |
| 4928 | eval "ac_cv_func_$ac_func=yes" |
| 4929 | else |
| 4930 | echo "configure: failed program was:" >&5 |
| 4931 | cat conftest.$ac_ext >&5 |
| 4932 | rm -rf conftest* |
| 4933 | eval "ac_cv_func_$ac_func=no" |
| 4934 | fi |
| 4935 | rm -f conftest* |
| 4936 | fi |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4937 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4938 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4939 | echo "$ac_t""yes" 1>&6 |
| 4940 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4941 | cat >> confdefs.h <<EOF |
| 4942 | #define $ac_tr_func 1 |
| 4943 | EOF |
| 4944 | |
| 4945 | else |
| 4946 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4947 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4948 | done |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4949 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4950 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4951 | # DYNLOADFILE specifies which dynload_*.o file we will use for dynamic |
| 4952 | # loading of modules. |
| 4953 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4954 | echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4955 | echo "configure:4956: checking DYNLOADFILE" >&5 |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4956 | if test -z "$DYNLOADFILE" |
| 4957 | then |
| 4958 | case $ac_sys_system/$ac_sys_release in |
| 4959 | AIX*) DYNLOADFILE="dynload_aix.o";; |
| 4960 | BeOS*) DYNLOADFILE="dynload_beos.o";; |
| 4961 | hp*|HP*) DYNLOADFILE="dynload_hpux.o";; |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 4962 | Darwin/*) DYNLOADFILE="dynload_next.o";; |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4963 | *) |
| 4964 | # use dynload_shlib.c and dlopen() if we have it; otherwise stub |
| 4965 | # out any dynamic loading |
| 4966 | if test "$ac_cv_func_dlopen" = yes |
| 4967 | then DYNLOADFILE="dynload_shlib.o" |
| 4968 | else DYNLOADFILE="dynload_stub.o" |
| 4969 | fi |
| 4970 | ;; |
| 4971 | esac |
| 4972 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4973 | echo "$ac_t""$DYNLOADFILE" 1>&6 |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4974 | if test "$DYNLOADFILE" != "dynload_stub.o" |
| 4975 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4976 | cat >> confdefs.h <<\EOF |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4977 | #define HAVE_DYNAMIC_LOADING 1 |
| 4978 | EOF |
| 4979 | |
| 4980 | fi |
| 4981 | |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4982 | # MACHDEP_OBJS can be set to platform-specific object files needed by Python |
| 4983 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4984 | |
| 4985 | echo $ac_n "checking MACHDEP_OBJS""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4986 | echo "configure:4987: checking MACHDEP_OBJS" >&5 |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4987 | if test -z "$MACHDEP_OBJS" |
| 4988 | then |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 4989 | MACHDEP_OBJS=$extra_machdep_objs |
| 4990 | else |
| 4991 | MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs" |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4992 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4993 | echo "$ac_t""MACHDEP_OBJS" 1>&6 |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4994 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4995 | # checks for library functions |
Martin v. Löwis | 244edc8 | 2001-10-04 22:44:26 +0000 | [diff] [blame] | 4996 | 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] | 4997 | flock fork fsync fdatasync fpathconf ftime ftruncate \ |
Martin v. Löwis | f95dd0a | 2001-08-15 17:14:33 +0000 | [diff] [blame] | 4998 | gai_strerror getgroups getlogin getpeername getpid getpwent getwd \ |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 4999 | hstrerror inet_pton kill killpg link lstat mkfifo mktime mremap \ |
Andrew M. Kuchling | 5821b77 | 2000-08-25 01:14:08 +0000 | [diff] [blame] | 5000 | nice pathconf pause plock poll pthread_init \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 5001 | putenv readlink \ |
Martin v. Löwis | 61c5edf | 2001-10-18 04:06:00 +0000 | [diff] [blame] | 5002 | select setegid seteuid setgid setgroups \ |
Martin v. Löwis | 791bfda | 2001-07-24 06:33:08 +0000 | [diff] [blame] | 5003 | setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 5004 | sigaction siginterrupt sigrelse strftime strptime symlink sysconf \ |
Fred Drake | 89143df | 1999-12-09 22:03:25 +0000 | [diff] [blame] | 5005 | tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ |
Guido van Rossum | c524d95 | 2001-10-19 01:31:59 +0000 | [diff] [blame] | 5006 | truncate uname unsetenv waitpid _getpty getpriority |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5007 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5008 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5009 | echo "configure:5010: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5010 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5011 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5012 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5013 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5014 | #line 5015 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5015 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5016 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5017 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5018 | #include <assert.h> |
| 5019 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5020 | /* 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] | 5021 | builtin and then its argument prototype would still apply. */ |
| 5022 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5023 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5024 | int main() { |
| 5025 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5026 | /* The GNU C library defines this for functions which it implements |
| 5027 | to always fail with ENOSYS. Some functions are actually named |
| 5028 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5029 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5030 | choke me |
| 5031 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5032 | $ac_func(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5033 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5034 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5035 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5036 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5037 | if { (eval echo configure:5038: \"$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] | 5038 | rm -rf conftest* |
| 5039 | eval "ac_cv_func_$ac_func=yes" |
| 5040 | else |
| 5041 | echo "configure: failed program was:" >&5 |
| 5042 | cat conftest.$ac_ext >&5 |
| 5043 | rm -rf conftest* |
| 5044 | eval "ac_cv_func_$ac_func=no" |
| 5045 | fi |
| 5046 | rm -f conftest* |
| 5047 | fi |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5048 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5049 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5050 | echo "$ac_t""yes" 1>&6 |
| 5051 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5052 | cat >> confdefs.h <<EOF |
| 5053 | #define $ac_tr_func 1 |
| 5054 | EOF |
| 5055 | |
| 5056 | else |
| 5057 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 5058 | fi |
| 5059 | done |
| 5060 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5061 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 5062 | # check for openpty and forkpty |
| 5063 | |
| 5064 | for ac_func in openpty |
| 5065 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5066 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5067 | echo "configure:5068: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5068 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5069 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 5070 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5071 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5072 | #line 5073 "configure" |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 5073 | #include "confdefs.h" |
| 5074 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5075 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 5076 | #include <assert.h> |
| 5077 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5078 | /* 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] | 5079 | builtin and then its argument prototype would still apply. */ |
| 5080 | char $ac_func(); |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 5081 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5082 | int main() { |
| 5083 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 5084 | /* The GNU C library defines this for functions which it implements |
| 5085 | to always fail with ENOSYS. Some functions are actually named |
| 5086 | something starting with __ and the normal name is an alias. */ |
| 5087 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5088 | choke me |
| 5089 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5090 | $ac_func(); |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 5091 | #endif |
| 5092 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5093 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5094 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5095 | if { (eval echo configure:5096: \"$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] | 5096 | rm -rf conftest* |
| 5097 | eval "ac_cv_func_$ac_func=yes" |
| 5098 | else |
| 5099 | echo "configure: failed program was:" >&5 |
| 5100 | cat conftest.$ac_ext >&5 |
| 5101 | rm -rf conftest* |
| 5102 | eval "ac_cv_func_$ac_func=no" |
| 5103 | fi |
| 5104 | rm -f conftest* |
| 5105 | fi |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 5106 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5107 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5108 | echo "$ac_t""yes" 1>&6 |
| 5109 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5110 | cat >> confdefs.h <<EOF |
| 5111 | #define $ac_tr_func 1 |
| 5112 | EOF |
| 5113 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 5114 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5115 | echo "$ac_t""no" 1>&6 |
| 5116 | echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5117 | echo "configure:5118: checking for openpty in -lutil" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5118 | ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'` |
| 5119 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 5120 | echo $ac_n "(cached) $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5121 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5122 | ac_save_LIBS="$LIBS" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5123 | LIBS="-lutil $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5124 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5125 | #line 5126 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5126 | #include "confdefs.h" |
| 5127 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5128 | /* 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] | 5129 | builtin and then its argument prototype would still apply. */ |
| 5130 | char openpty(); |
| 5131 | |
| 5132 | int main() { |
| 5133 | openpty() |
| 5134 | ; return 0; } |
| 5135 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5136 | if { (eval echo configure:5137: \"$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] | 5137 | rm -rf conftest* |
| 5138 | eval "ac_cv_lib_$ac_lib_var=yes" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5139 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5140 | echo "configure: failed program was:" >&5 |
| 5141 | cat conftest.$ac_ext >&5 |
| 5142 | rm -rf conftest* |
| 5143 | eval "ac_cv_lib_$ac_lib_var=no" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5144 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5145 | rm -f conftest* |
| 5146 | LIBS="$ac_save_LIBS" |
| 5147 | |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5148 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5149 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 5150 | echo "$ac_t""yes" 1>&6 |
| 5151 | cat >> confdefs.h <<\EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5152 | #define HAVE_OPENPTY 1 |
| 5153 | EOF |
| 5154 | LIBS="$LIBS -lutil" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5155 | else |
| 5156 | echo "$ac_t""no" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5157 | fi |
| 5158 | |
| 5159 | fi |
| 5160 | done |
| 5161 | |
| 5162 | for ac_func in forkpty |
| 5163 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5164 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5165 | echo "configure:5166: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5166 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5167 | echo $ac_n "(cached) $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5168 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5169 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5170 | #line 5171 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5171 | #include "confdefs.h" |
| 5172 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5173 | which can conflict with char $ac_func(); below. */ |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5174 | #include <assert.h> |
| 5175 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5176 | /* 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] | 5177 | builtin and then its argument prototype would still apply. */ |
| 5178 | char $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5179 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5180 | int main() { |
| 5181 | |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5182 | /* The GNU C library defines this for functions which it implements |
| 5183 | to always fail with ENOSYS. Some functions are actually named |
| 5184 | something starting with __ and the normal name is an alias. */ |
| 5185 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5186 | choke me |
| 5187 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5188 | $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5189 | #endif |
| 5190 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5191 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5192 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5193 | if { (eval echo configure:5194: \"$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] | 5194 | rm -rf conftest* |
| 5195 | eval "ac_cv_func_$ac_func=yes" |
| 5196 | else |
| 5197 | echo "configure: failed program was:" >&5 |
| 5198 | cat conftest.$ac_ext >&5 |
| 5199 | rm -rf conftest* |
| 5200 | eval "ac_cv_func_$ac_func=no" |
| 5201 | fi |
| 5202 | rm -f conftest* |
| 5203 | fi |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5204 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5205 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5206 | echo "$ac_t""yes" 1>&6 |
| 5207 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5208 | cat >> confdefs.h <<EOF |
| 5209 | #define $ac_tr_func 1 |
| 5210 | EOF |
| 5211 | |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5212 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5213 | echo "$ac_t""no" 1>&6 |
| 5214 | echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5215 | echo "configure:5216: checking for forkpty in -lutil" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5216 | ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'` |
| 5217 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 5218 | echo $ac_n "(cached) $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5219 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5220 | ac_save_LIBS="$LIBS" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5221 | LIBS="-lutil $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5222 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5223 | #line 5224 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5224 | #include "confdefs.h" |
| 5225 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5226 | /* 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] | 5227 | builtin and then its argument prototype would still apply. */ |
| 5228 | char forkpty(); |
| 5229 | |
| 5230 | int main() { |
| 5231 | forkpty() |
| 5232 | ; return 0; } |
| 5233 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5234 | if { (eval echo configure:5235: \"$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] | 5235 | rm -rf conftest* |
| 5236 | eval "ac_cv_lib_$ac_lib_var=yes" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5237 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5238 | echo "configure: failed program was:" >&5 |
| 5239 | cat conftest.$ac_ext >&5 |
| 5240 | rm -rf conftest* |
| 5241 | eval "ac_cv_lib_$ac_lib_var=no" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5242 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5243 | rm -f conftest* |
| 5244 | LIBS="$ac_save_LIBS" |
| 5245 | |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5246 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5247 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 5248 | echo "$ac_t""yes" 1>&6 |
| 5249 | cat >> confdefs.h <<\EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5250 | #define HAVE_FORKPTY 1 |
| 5251 | EOF |
| 5252 | LIBS="$LIBS -lutil" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5253 | else |
| 5254 | echo "$ac_t""no" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5255 | fi |
| 5256 | |
| 5257 | fi |
| 5258 | done |
| 5259 | |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5260 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5261 | # check for long file support functions |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5262 | for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs |
| 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 | 2d7e264 | 2002-04-05 16:50:53 +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 | f98e2a7 | 1999-01-06 18:53:34 +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 | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5270 | #line 5271 "configure" |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5271 | #include "confdefs.h" |
| 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 | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5274 | #include <assert.h> |
| 5275 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 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 | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5279 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5280 | int main() { |
| 5281 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +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. */ |
| 5285 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5286 | choke me |
| 5287 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5288 | $ac_func(); |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5289 | #endif |
| 5290 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5291 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5292 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +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" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5296 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 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 | |
| 5312 | else |
| 5313 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5314 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5315 | done |
| 5316 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5317 | |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 5318 | for ac_func in dup2 getcwd strdup strerror memmove |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5319 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5320 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5321 | echo "configure:5322: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5322 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5323 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5324 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5325 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5326 | #line 5327 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5327 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5328 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5329 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5330 | #include <assert.h> |
| 5331 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5332 | /* 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] | 5333 | builtin and then its argument prototype would still apply. */ |
| 5334 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5335 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5336 | int main() { |
| 5337 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5338 | /* The GNU C library defines this for functions which it implements |
| 5339 | to always fail with ENOSYS. Some functions are actually named |
| 5340 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5341 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5342 | choke me |
| 5343 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5344 | $ac_func(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5345 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5346 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5347 | ; return 0; } |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5348 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5349 | if { (eval echo configure:5350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 5350 | rm -rf conftest* |
| 5351 | eval "ac_cv_func_$ac_func=yes" |
| 5352 | else |
| 5353 | echo "configure: failed program was:" >&5 |
| 5354 | cat conftest.$ac_ext >&5 |
| 5355 | rm -rf conftest* |
| 5356 | eval "ac_cv_func_$ac_func=no" |
| 5357 | fi |
| 5358 | rm -f conftest* |
| 5359 | fi |
| 5360 | |
| 5361 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5362 | echo "$ac_t""yes" 1>&6 |
| 5363 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5364 | cat >> confdefs.h <<EOF |
| 5365 | #define $ac_tr_func 1 |
| 5366 | EOF |
| 5367 | |
| 5368 | else |
| 5369 | echo "$ac_t""no" 1>&6 |
| 5370 | LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" |
| 5371 | fi |
| 5372 | done |
| 5373 | |
| 5374 | |
| 5375 | for ac_func in getpgrp |
| 5376 | do |
| 5377 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5378 | echo "configure:5379: checking for $ac_func" >&5 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 5379 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5380 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5381 | else |
| 5382 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5383 | #line 5384 "configure" |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 5384 | #include "confdefs.h" |
| 5385 | /* System header to define __stub macros and hopefully few prototypes, |
| 5386 | which can conflict with char $ac_func(); below. */ |
| 5387 | #include <assert.h> |
| 5388 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5389 | /* We use char because int might match the return type of a gcc2 |
| 5390 | builtin and then its argument prototype would still apply. */ |
| 5391 | char $ac_func(); |
| 5392 | |
| 5393 | int main() { |
| 5394 | |
| 5395 | /* The GNU C library defines this for functions which it implements |
| 5396 | to always fail with ENOSYS. Some functions are actually named |
| 5397 | something starting with __ and the normal name is an alias. */ |
| 5398 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5399 | choke me |
| 5400 | #else |
| 5401 | $ac_func(); |
| 5402 | #endif |
| 5403 | |
| 5404 | ; return 0; } |
| 5405 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5406 | if { (eval echo configure:5407: \"$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] | 5407 | rm -rf conftest* |
| 5408 | eval "ac_cv_func_$ac_func=yes" |
| 5409 | else |
| 5410 | echo "configure: failed program was:" >&5 |
| 5411 | cat conftest.$ac_ext >&5 |
| 5412 | rm -rf conftest* |
| 5413 | eval "ac_cv_func_$ac_func=no" |
| 5414 | fi |
| 5415 | rm -f conftest* |
| 5416 | fi |
| 5417 | |
| 5418 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5419 | echo "$ac_t""yes" 1>&6 |
| 5420 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5421 | cat >> confdefs.h <<EOF |
| 5422 | #define $ac_tr_func 1 |
| 5423 | EOF |
| 5424 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5425 | #line 5426 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5426 | #include "confdefs.h" |
| 5427 | #include <unistd.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5428 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5429 | getpgrp(0); |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5430 | ; return 0; } |
| 5431 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5432 | if { (eval echo configure:5433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5433 | rm -rf conftest* |
| 5434 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5435 | #define GETPGRP_HAVE_ARG 1 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5436 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5437 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5438 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5439 | echo "configure: failed program was:" >&5 |
| 5440 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5441 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5442 | rm -f conftest* |
| 5443 | else |
| 5444 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5445 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5446 | done |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5447 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5448 | for ac_func in setpgrp |
| 5449 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5450 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5451 | echo "configure:5452: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5452 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5453 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5454 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5455 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5456 | #line 5457 "configure" |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5457 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5458 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5459 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5460 | #include <assert.h> |
| 5461 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5462 | /* 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] | 5463 | builtin and then its argument prototype would still apply. */ |
| 5464 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5465 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5466 | int main() { |
| 5467 | |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5468 | /* The GNU C library defines this for functions which it implements |
| 5469 | to always fail with ENOSYS. Some functions are actually named |
| 5470 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5471 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5472 | choke me |
| 5473 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5474 | $ac_func(); |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5475 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5476 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5477 | ; return 0; } |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5478 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5479 | if { (eval echo configure:5480: \"$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] | 5480 | rm -rf conftest* |
| 5481 | eval "ac_cv_func_$ac_func=yes" |
| 5482 | else |
| 5483 | echo "configure: failed program was:" >&5 |
| 5484 | cat conftest.$ac_ext >&5 |
| 5485 | rm -rf conftest* |
| 5486 | eval "ac_cv_func_$ac_func=no" |
| 5487 | fi |
| 5488 | rm -f conftest* |
| 5489 | fi |
| 5490 | |
| 5491 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5492 | echo "$ac_t""yes" 1>&6 |
| 5493 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5494 | cat >> confdefs.h <<EOF |
| 5495 | #define $ac_tr_func 1 |
| 5496 | EOF |
| 5497 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5498 | #line 5499 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5499 | #include "confdefs.h" |
| 5500 | #include <unistd.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5501 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5502 | setpgrp(0,0); |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5503 | ; return 0; } |
| 5504 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5505 | if { (eval echo configure:5506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5506 | rm -rf conftest* |
| 5507 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5508 | #define SETPGRP_HAVE_ARG 1 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5509 | EOF |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5510 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5511 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5512 | echo "configure: failed program was:" >&5 |
| 5513 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5514 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5515 | rm -f conftest* |
| 5516 | else |
| 5517 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5518 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5519 | done |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5520 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5521 | for ac_func in gettimeofday |
| 5522 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5523 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5524 | echo "configure:5525: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5525 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5526 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5527 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5528 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5529 | #line 5530 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5530 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5531 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5532 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5533 | #include <assert.h> |
| 5534 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5535 | /* 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] | 5536 | builtin and then its argument prototype would still apply. */ |
| 5537 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5538 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5539 | int main() { |
| 5540 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5541 | /* The GNU C library defines this for functions which it implements |
| 5542 | to always fail with ENOSYS. Some functions are actually named |
| 5543 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5544 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5545 | choke me |
| 5546 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5547 | $ac_func(); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5548 | #endif |
| 5549 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5550 | ; return 0; } |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5551 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5552 | if { (eval echo configure:5553: \"$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] | 5553 | rm -rf conftest* |
| 5554 | eval "ac_cv_func_$ac_func=yes" |
| 5555 | else |
| 5556 | echo "configure: failed program was:" >&5 |
| 5557 | cat conftest.$ac_ext >&5 |
| 5558 | rm -rf conftest* |
| 5559 | eval "ac_cv_func_$ac_func=no" |
| 5560 | fi |
| 5561 | rm -f conftest* |
| 5562 | fi |
| 5563 | |
| 5564 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5565 | echo "$ac_t""yes" 1>&6 |
| 5566 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5567 | cat >> confdefs.h <<EOF |
| 5568 | #define $ac_tr_func 1 |
| 5569 | EOF |
| 5570 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5571 | #line 5572 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5572 | #include "confdefs.h" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5573 | #include <sys/time.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5574 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5575 | gettimeofday((struct timeval*)0,(struct timezone*)0); |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5576 | ; return 0; } |
| 5577 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5578 | if { (eval echo configure:5579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5579 | : |
| 5580 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5581 | echo "configure: failed program was:" >&5 |
| 5582 | cat conftest.$ac_ext >&5 |
| 5583 | rm -rf conftest* |
| 5584 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5585 | #define GETTIMEOFDAY_NO_TZ 1 |
| 5586 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5587 | |
| 5588 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5589 | rm -f conftest* |
| 5590 | else |
| 5591 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5592 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5593 | done |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5594 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5595 | |
| 5596 | |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 5597 | # On OSF/1 V5.1, getaddrinfo is available, but a define |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5598 | # for [no]getaddrinfo in netdb.h. |
| 5599 | echo $ac_n "checking for getaddrinfo""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5600 | echo "configure:5601: checking for getaddrinfo" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5601 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5602 | #line 5603 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5603 | #include "confdefs.h" |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 5604 | |
Martin v. Löwis | c010b6d | 2001-11-09 17:50:52 +0000 | [diff] [blame] | 5605 | #include <sys/types.h> |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 5606 | #include <sys/socket.h> |
| 5607 | #include <netdb.h> |
Martin v. Löwis | c010b6d | 2001-11-09 17:50:52 +0000 | [diff] [blame] | 5608 | #include <stdio.h> |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5609 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5610 | int main() { |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5611 | |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 5612 | getaddrinfo(NULL, NULL, NULL, NULL); |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5613 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5614 | ; return 0; } |
| 5615 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5616 | if { (eval echo configure:5617: \"$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] | 5617 | rm -rf conftest* |
| 5618 | |
| 5619 | echo "$ac_t""yes" 1>&6 |
| 5620 | echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5621 | echo "configure:5622: checking getaddrinfo bug" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5622 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5623 | echo "$ac_t""buggy" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5624 | buggygetaddrinfo=yes |
| 5625 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5626 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5627 | #line 5628 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5628 | #include "confdefs.h" |
| 5629 | |
| 5630 | #include <sys/types.h> |
| 5631 | #include <netdb.h> |
| 5632 | #include <string.h> |
| 5633 | #include <sys/socket.h> |
| 5634 | #include <netinet/in.h> |
| 5635 | |
| 5636 | main() |
| 5637 | { |
| 5638 | int passive, gaierr, inet4 = 0, inet6 = 0; |
| 5639 | struct addrinfo hints, *ai, *aitop; |
| 5640 | char straddr[INET6_ADDRSTRLEN], strport[16]; |
| 5641 | |
| 5642 | for (passive = 0; passive <= 1; passive++) { |
| 5643 | memset(&hints, 0, sizeof(hints)); |
| 5644 | hints.ai_family = AF_UNSPEC; |
| 5645 | hints.ai_flags = passive ? AI_PASSIVE : 0; |
| 5646 | hints.ai_socktype = SOCK_STREAM; |
| 5647 | if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) { |
| 5648 | (void)gai_strerror(gaierr); |
| 5649 | goto bad; |
| 5650 | } |
| 5651 | for (ai = aitop; ai; ai = ai->ai_next) { |
| 5652 | if (ai->ai_addr == NULL || |
| 5653 | ai->ai_addrlen == 0 || |
| 5654 | getnameinfo(ai->ai_addr, ai->ai_addrlen, |
| 5655 | straddr, sizeof(straddr), strport, sizeof(strport), |
| 5656 | NI_NUMERICHOST|NI_NUMERICSERV) != 0) { |
| 5657 | goto bad; |
| 5658 | } |
| 5659 | switch (ai->ai_family) { |
| 5660 | case AF_INET: |
| 5661 | if (strcmp(strport, "54321") != 0) { |
| 5662 | goto bad; |
| 5663 | } |
| 5664 | if (passive) { |
| 5665 | if (strcmp(straddr, "0.0.0.0") != 0) { |
| 5666 | goto bad; |
| 5667 | } |
| 5668 | } else { |
| 5669 | if (strcmp(straddr, "127.0.0.1") != 0) { |
| 5670 | goto bad; |
| 5671 | } |
| 5672 | } |
| 5673 | inet4++; |
| 5674 | break; |
| 5675 | case AF_INET6: |
| 5676 | if (strcmp(strport, "54321") != 0) { |
| 5677 | goto bad; |
| 5678 | } |
| 5679 | if (passive) { |
| 5680 | if (strcmp(straddr, "::") != 0) { |
| 5681 | goto bad; |
| 5682 | } |
| 5683 | } else { |
| 5684 | if (strcmp(straddr, "::1") != 0) { |
| 5685 | goto bad; |
| 5686 | } |
| 5687 | } |
| 5688 | inet6++; |
| 5689 | break; |
| 5690 | case AF_UNSPEC: |
| 5691 | goto bad; |
| 5692 | break; |
| 5693 | default: |
| 5694 | /* another family support? */ |
| 5695 | break; |
| 5696 | } |
| 5697 | } |
| 5698 | } |
| 5699 | |
| 5700 | if (!(inet4 == 0 || inet4 == 2)) |
| 5701 | goto bad; |
| 5702 | if (!(inet6 == 0 || inet6 == 2)) |
| 5703 | goto bad; |
| 5704 | |
| 5705 | if (aitop) |
| 5706 | freeaddrinfo(aitop); |
| 5707 | exit(0); |
| 5708 | |
| 5709 | bad: |
| 5710 | if (aitop) |
| 5711 | freeaddrinfo(aitop); |
| 5712 | exit(1); |
| 5713 | } |
| 5714 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5715 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5716 | if { (eval echo configure:5717: \"$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] | 5717 | then |
| 5718 | echo "$ac_t""good" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5719 | buggygetaddrinfo=no |
| 5720 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5721 | echo "configure: failed program was:" >&5 |
| 5722 | cat conftest.$ac_ext >&5 |
| 5723 | rm -fr conftest* |
| 5724 | echo "$ac_t""buggy" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5725 | buggygetaddrinfo=yes |
| 5726 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5727 | rm -fr conftest* |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5728 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5729 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5730 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5731 | echo "configure: failed program was:" >&5 |
| 5732 | cat conftest.$ac_ext >&5 |
| 5733 | rm -rf conftest* |
| 5734 | |
| 5735 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5736 | buggygetaddrinfo=yes |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5737 | |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 5738 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5739 | rm -f conftest* |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5740 | |
| 5741 | if test "$buggygetaddrinfo" = "yes"; then |
| 5742 | if test "$ipv6" = "yes"; then |
| 5743 | echo 'Fatal: You must get working getaddrinfo() function.' |
| 5744 | echo ' or you can specify "--disable-ipv6"'. |
| 5745 | exit 1 |
| 5746 | fi |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 5747 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5748 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 5749 | #define HAVE_GETADDRINFO 1 |
| 5750 | EOF |
| 5751 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5752 | fi |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5753 | for ac_func in getnameinfo |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5754 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5755 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5756 | echo "configure:5757: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5757 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5758 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5759 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5760 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5761 | #line 5762 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5762 | #include "confdefs.h" |
| 5763 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5764 | which can conflict with char $ac_func(); below. */ |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5765 | #include <assert.h> |
| 5766 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5767 | /* 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] | 5768 | builtin and then its argument prototype would still apply. */ |
| 5769 | char $ac_func(); |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5770 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5771 | int main() { |
| 5772 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5773 | /* The GNU C library defines this for functions which it implements |
| 5774 | to always fail with ENOSYS. Some functions are actually named |
| 5775 | something starting with __ and the normal name is an alias. */ |
| 5776 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5777 | choke me |
| 5778 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5779 | $ac_func(); |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5780 | #endif |
| 5781 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5782 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5783 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5784 | if { (eval echo configure:5785: \"$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] | 5785 | rm -rf conftest* |
| 5786 | eval "ac_cv_func_$ac_func=yes" |
| 5787 | else |
| 5788 | echo "configure: failed program was:" >&5 |
| 5789 | cat conftest.$ac_ext >&5 |
| 5790 | rm -rf conftest* |
| 5791 | eval "ac_cv_func_$ac_func=no" |
| 5792 | fi |
| 5793 | rm -f conftest* |
| 5794 | fi |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5795 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5796 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5797 | echo "$ac_t""yes" 1>&6 |
| 5798 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5799 | cat >> confdefs.h <<EOF |
| 5800 | #define $ac_tr_func 1 |
| 5801 | EOF |
| 5802 | |
| 5803 | else |
| 5804 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5805 | fi |
| 5806 | done |
| 5807 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5808 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5809 | # checks for structures |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5810 | echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5811 | echo "configure:5812: 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] | 5812 | if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then |
| 5813 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5814 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5815 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5816 | #line 5817 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5817 | #include "confdefs.h" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5818 | #include <sys/types.h> |
| 5819 | #include <sys/time.h> |
| 5820 | #include <time.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5821 | int main() { |
| 5822 | struct tm *tp; |
| 5823 | ; return 0; } |
| 5824 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5825 | if { (eval echo configure:5826: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5826 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5827 | ac_cv_header_time=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5828 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5829 | echo "configure: failed program was:" >&5 |
| 5830 | cat conftest.$ac_ext >&5 |
| 5831 | rm -rf conftest* |
| 5832 | ac_cv_header_time=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5833 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5834 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5835 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5836 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5837 | echo "$ac_t""$ac_cv_header_time" 1>&6 |
| 5838 | if test $ac_cv_header_time = yes; then |
| 5839 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5840 | #define TIME_WITH_SYS_TIME 1 |
| 5841 | EOF |
| 5842 | |
| 5843 | fi |
| 5844 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5845 | echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5846 | echo "configure:5847: 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] | 5847 | if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then |
| 5848 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5849 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5850 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5851 | #line 5852 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5852 | #include "confdefs.h" |
| 5853 | #include <sys/types.h> |
| 5854 | #include <time.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5855 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5856 | struct tm *tp; tp->tm_sec; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5857 | ; return 0; } |
| 5858 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5859 | if { (eval echo configure:5860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5860 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5861 | ac_cv_struct_tm=time.h |
| 5862 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5863 | echo "configure: failed program was:" >&5 |
| 5864 | cat conftest.$ac_ext >&5 |
| 5865 | rm -rf conftest* |
| 5866 | ac_cv_struct_tm=sys/time.h |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5867 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5868 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5869 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5870 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5871 | echo "$ac_t""$ac_cv_struct_tm" 1>&6 |
| 5872 | if test $ac_cv_struct_tm = sys/time.h; then |
| 5873 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5874 | #define TM_IN_SYS_TIME 1 |
| 5875 | EOF |
| 5876 | |
| 5877 | fi |
| 5878 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5879 | echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5880 | echo "configure:5881: checking for tm_zone in struct tm" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5881 | if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then |
| 5882 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5883 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5884 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5885 | #line 5886 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5886 | #include "confdefs.h" |
| 5887 | #include <sys/types.h> |
| 5888 | #include <$ac_cv_struct_tm> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5889 | int main() { |
| 5890 | struct tm tm; tm.tm_zone; |
| 5891 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5892 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5893 | if { (eval echo configure:5894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5894 | rm -rf conftest* |
| 5895 | ac_cv_struct_tm_zone=yes |
| 5896 | else |
| 5897 | echo "configure: failed program was:" >&5 |
| 5898 | cat conftest.$ac_ext >&5 |
| 5899 | rm -rf conftest* |
| 5900 | ac_cv_struct_tm_zone=no |
| 5901 | fi |
| 5902 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5903 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5904 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5905 | echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6 |
| 5906 | if test "$ac_cv_struct_tm_zone" = yes; then |
| 5907 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5908 | #define HAVE_TM_ZONE 1 |
| 5909 | EOF |
| 5910 | |
| 5911 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5912 | echo $ac_n "checking for tzname""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5913 | echo "configure:5914: checking for tzname" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5914 | if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then |
| 5915 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5916 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5917 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5918 | #line 5919 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5919 | #include "confdefs.h" |
| 5920 | #include <time.h> |
| 5921 | #ifndef tzname /* For SGI. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5922 | extern char *tzname[]; /* RS6000 and others reject char **tzname. */ |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5923 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5924 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5925 | atoi(*tzname); |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5926 | ; return 0; } |
| 5927 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5928 | if { (eval echo configure:5929: \"$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] | 5929 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5930 | ac_cv_var_tzname=yes |
| 5931 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5932 | echo "configure: failed program was:" >&5 |
| 5933 | cat conftest.$ac_ext >&5 |
| 5934 | rm -rf conftest* |
| 5935 | ac_cv_var_tzname=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5936 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5937 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5938 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5939 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5940 | echo "$ac_t""$ac_cv_var_tzname" 1>&6 |
| 5941 | if test $ac_cv_var_tzname = yes; then |
| 5942 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5943 | #define HAVE_TZNAME 1 |
| 5944 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5945 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5946 | fi |
| 5947 | fi |
| 5948 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5949 | echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5950 | echo "configure:5951: checking for st_rdev in struct stat" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5951 | if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then |
| 5952 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5953 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5954 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5955 | #line 5956 "configure" |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5956 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5957 | #include <sys/types.h> |
| 5958 | #include <sys/stat.h> |
| 5959 | int main() { |
| 5960 | struct stat s; s.st_rdev; |
| 5961 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5962 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5963 | if { (eval echo configure:5964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5964 | rm -rf conftest* |
| 5965 | ac_cv_struct_st_rdev=yes |
| 5966 | else |
| 5967 | echo "configure: failed program was:" >&5 |
| 5968 | cat conftest.$ac_ext >&5 |
| 5969 | rm -rf conftest* |
| 5970 | ac_cv_struct_st_rdev=no |
| 5971 | fi |
| 5972 | rm -f conftest* |
| 5973 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5974 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5975 | echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6 |
| 5976 | if test $ac_cv_struct_st_rdev = yes; then |
| 5977 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5978 | #define HAVE_ST_RDEV 1 |
| 5979 | EOF |
| 5980 | |
| 5981 | fi |
| 5982 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5983 | echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5984 | echo "configure:5985: checking for st_blksize in struct stat" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5985 | if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then |
| 5986 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5987 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5988 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5989 | #line 5990 "configure" |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5990 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5991 | #include <sys/types.h> |
| 5992 | #include <sys/stat.h> |
| 5993 | int main() { |
| 5994 | struct stat s; s.st_blksize; |
| 5995 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5996 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 5997 | if { (eval echo configure:5998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5998 | rm -rf conftest* |
| 5999 | ac_cv_struct_st_blksize=yes |
| 6000 | else |
| 6001 | echo "configure: failed program was:" >&5 |
| 6002 | cat conftest.$ac_ext >&5 |
| 6003 | rm -rf conftest* |
| 6004 | ac_cv_struct_st_blksize=no |
| 6005 | fi |
| 6006 | rm -f conftest* |
| 6007 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 6008 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6009 | echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6 |
| 6010 | if test $ac_cv_struct_st_blksize = yes; then |
| 6011 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6012 | #define HAVE_ST_BLKSIZE 1 |
| 6013 | EOF |
| 6014 | |
| 6015 | fi |
| 6016 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6017 | echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6018 | echo "configure:6019: checking for st_blocks in struct stat" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6019 | if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then |
| 6020 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6021 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6022 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6023 | #line 6024 "configure" |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6024 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6025 | #include <sys/types.h> |
| 6026 | #include <sys/stat.h> |
| 6027 | int main() { |
| 6028 | struct stat s; s.st_blocks; |
| 6029 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 6030 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6031 | if { (eval echo configure:6032: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6032 | rm -rf conftest* |
| 6033 | ac_cv_struct_st_blocks=yes |
| 6034 | else |
| 6035 | echo "configure: failed program was:" >&5 |
| 6036 | cat conftest.$ac_ext >&5 |
| 6037 | rm -rf conftest* |
| 6038 | ac_cv_struct_st_blocks=no |
| 6039 | fi |
| 6040 | rm -f conftest* |
| 6041 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 6042 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6043 | echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6 |
| 6044 | if test $ac_cv_struct_st_blocks = yes; then |
| 6045 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6046 | #define HAVE_ST_BLOCKS 1 |
| 6047 | EOF |
| 6048 | |
| 6049 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6050 | LIBOBJS="$LIBOBJS fileblocks.${ac_objext}" |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6051 | fi |
| 6052 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6053 | |
| 6054 | echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6055 | echo "configure:6056: checking for time.h that defines altzone" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6056 | if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then |
| 6057 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6058 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6059 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6060 | #line 6061 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6061 | #include "confdefs.h" |
| 6062 | #include <time.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6063 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6064 | return altzone; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6065 | ; return 0; } |
| 6066 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6067 | if { (eval echo configure:6068: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6068 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6069 | ac_cv_header_time_altzone=yes |
| 6070 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6071 | echo "configure: failed program was:" >&5 |
| 6072 | cat conftest.$ac_ext >&5 |
| 6073 | rm -rf conftest* |
| 6074 | ac_cv_header_time_altzone=no |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6075 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6076 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6077 | fi |
| 6078 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6079 | echo "$ac_t""$ac_cv_header_time_altzone" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6080 | if test $ac_cv_header_time_altzone = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6081 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6082 | #define HAVE_ALTZONE 1 |
| 6083 | EOF |
| 6084 | |
| 6085 | fi |
| 6086 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6087 | was_it_defined=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6088 | echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6089 | echo "configure:6090: 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] | 6090 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6091 | #line 6092 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6092 | #include "confdefs.h" |
| 6093 | |
| 6094 | #include <sys/types.h> |
| 6095 | #include <sys/select.h> |
| 6096 | #include <sys/time.h> |
| 6097 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6098 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6099 | ; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6100 | ; return 0; } |
| 6101 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6102 | if { (eval echo configure:6103: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6103 | rm -rf conftest* |
| 6104 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6105 | #define SYS_SELECT_WITH_SYS_TIME 1 |
| 6106 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6107 | was_it_defined=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6108 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6109 | echo "configure: failed program was:" >&5 |
| 6110 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6111 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6112 | rm -f conftest* |
| 6113 | echo "$ac_t""$was_it_defined" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6114 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6115 | echo $ac_n "checking for addrinfo""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6116 | echo "configure:6117: checking for addrinfo" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6117 | if eval "test \"`echo '$''{'ac_cv_struct_addrinfo'+set}'`\" = set"; then |
| 6118 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6119 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6120 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6121 | #line 6122 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6122 | #include "confdefs.h" |
| 6123 | |
| 6124 | # include <netdb.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6125 | int main() { |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6126 | struct addrinfo a |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6127 | ; return 0; } |
| 6128 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6129 | if { (eval echo configure:6130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6130 | rm -rf conftest* |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6131 | ac_cv_struct_addrinfo=yes |
| 6132 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6133 | echo "configure: failed program was:" >&5 |
| 6134 | cat conftest.$ac_ext >&5 |
| 6135 | rm -rf conftest* |
| 6136 | ac_cv_struct_addrinfo=no |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6137 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6138 | rm -f conftest* |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6139 | fi |
| 6140 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6141 | echo "$ac_t""$ac_cv_struct_addrinfo" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6142 | if test $ac_cv_struct_addrinfo = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6143 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6144 | #define HAVE_ADDRINFO 1 |
| 6145 | EOF |
| 6146 | |
| 6147 | fi |
| 6148 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6149 | echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6150 | echo "configure:6151: checking for sockaddr_storage" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6151 | if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then |
| 6152 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6153 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6154 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6155 | #line 6156 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6156 | #include "confdefs.h" |
| 6157 | |
| 6158 | # include <sys/types.h> |
| 6159 | # include <sys/socket.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6160 | int main() { |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6161 | struct sockaddr_storage s |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6162 | ; return 0; } |
| 6163 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6164 | if { (eval echo configure:6165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6165 | rm -rf conftest* |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6166 | ac_cv_struct_sockaddr_storage=yes |
| 6167 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6168 | echo "configure: failed program was:" >&5 |
| 6169 | cat conftest.$ac_ext >&5 |
| 6170 | rm -rf conftest* |
| 6171 | ac_cv_struct_sockaddr_storage=no |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6172 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6173 | rm -f conftest* |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6174 | fi |
| 6175 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6176 | echo "$ac_t""$ac_cv_struct_sockaddr_storage" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6177 | if test $ac_cv_struct_sockaddr_storage = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6178 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6179 | #define HAVE_SOCKADDR_STORAGE 1 |
| 6180 | EOF |
| 6181 | |
| 6182 | fi |
| 6183 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6184 | # checks for compiler characteristics |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6185 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6186 | echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6187 | echo "configure:6188: checking whether char is unsigned" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6188 | if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then |
| 6189 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6190 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6191 | if test "$GCC" = yes; then |
| 6192 | # GCC predefines this symbol on systems where it applies. |
| 6193 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6194 | #line 6195 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6195 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6196 | #ifdef __CHAR_UNSIGNED__ |
| 6197 | yes |
| 6198 | #endif |
| 6199 | |
| 6200 | EOF |
| 6201 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 6202 | egrep "yes" >/dev/null 2>&1; then |
| 6203 | rm -rf conftest* |
| 6204 | ac_cv_c_char_unsigned=yes |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 6205 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6206 | rm -rf conftest* |
| 6207 | ac_cv_c_char_unsigned=no |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6208 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6209 | rm -f conftest* |
| 6210 | |
| 6211 | else |
| 6212 | if test "$cross_compiling" = yes; then |
| 6213 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 6214 | else |
| 6215 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6216 | #line 6217 "configure" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6217 | #include "confdefs.h" |
| 6218 | /* volatile prevents gcc2 from optimizing the test away on sparcs. */ |
| 6219 | #if !defined(__STDC__) || __STDC__ != 1 |
| 6220 | #define volatile |
| 6221 | #endif |
| 6222 | main() { |
| 6223 | volatile char c = 255; exit(c < 0); |
| 6224 | } |
| 6225 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6226 | if { (eval echo configure:6227: \"$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] | 6227 | then |
| 6228 | ac_cv_c_char_unsigned=yes |
| 6229 | else |
| 6230 | echo "configure: failed program was:" >&5 |
| 6231 | cat conftest.$ac_ext >&5 |
| 6232 | rm -fr conftest* |
| 6233 | ac_cv_c_char_unsigned=no |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6234 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6235 | rm -fr conftest* |
| 6236 | fi |
| 6237 | |
| 6238 | fi |
| 6239 | fi |
| 6240 | |
| 6241 | echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6242 | 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] | 6243 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6244 | #define __CHAR_UNSIGNED__ 1 |
| 6245 | EOF |
| 6246 | |
| 6247 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6248 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6249 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6250 | echo "configure:6251: checking for working const" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6251 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
| 6252 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6253 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6254 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6255 | #line 6256 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6256 | #include "confdefs.h" |
| 6257 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6258 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6259 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6260 | /* Ultrix mips cc rejects this. */ |
| 6261 | typedef int charset[2]; const charset x; |
| 6262 | /* SunOS 4.1.1 cc rejects this. */ |
| 6263 | char const *const *ccp; |
| 6264 | char **p; |
| 6265 | /* NEC SVR4.0.2 mips cc rejects this. */ |
| 6266 | struct point {int x, y;}; |
| 6267 | static struct point const zero = {0,0}; |
| 6268 | /* AIX XL C 1.02.0.0 rejects this. |
| 6269 | It does not let you subtract one const X* pointer from another in an arm |
| 6270 | of an if-expression whose if-part is not a constant expression */ |
| 6271 | const char *g = "string"; |
| 6272 | ccp = &g + (g ? g-g : 0); |
| 6273 | /* HPUX 7.0 cc rejects these. */ |
| 6274 | ++ccp; |
| 6275 | p = (char**) ccp; |
| 6276 | ccp = (char const *const *) p; |
| 6277 | { /* SCO 3.2v4 cc rejects this. */ |
| 6278 | char *t; |
| 6279 | char const *s = 0 ? (char *) 0 : (char const *) 0; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6280 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6281 | *t++ = 0; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6282 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6283 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ |
| 6284 | int x[] = {25, 17}; |
| 6285 | const int *foo = &x[0]; |
| 6286 | ++foo; |
| 6287 | } |
| 6288 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ |
| 6289 | typedef const int *iptr; |
| 6290 | iptr p = 0; |
| 6291 | ++p; |
| 6292 | } |
| 6293 | { /* AIX XL C 1.02.0.0 rejects this saying |
| 6294 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ |
| 6295 | struct s { int j; const int *ap[3]; }; |
| 6296 | struct s *b; b->j = 5; |
| 6297 | } |
| 6298 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ |
| 6299 | const int foo = 10; |
| 6300 | } |
| 6301 | |
| 6302 | ; return 0; } |
| 6303 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6304 | if { (eval echo configure:6305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6305 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6306 | ac_cv_c_const=yes |
| 6307 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6308 | echo "configure: failed program was:" >&5 |
| 6309 | cat conftest.$ac_ext >&5 |
| 6310 | rm -rf conftest* |
| 6311 | ac_cv_c_const=no |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6312 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6313 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6314 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6315 | |
| 6316 | echo "$ac_t""$ac_cv_c_const" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6317 | if test $ac_cv_c_const = no; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6318 | cat >> confdefs.h <<\EOF |
| 6319 | #define const |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6320 | EOF |
| 6321 | |
| 6322 | fi |
| 6323 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6324 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6325 | works=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6326 | echo $ac_n "checking for working volatile""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6327 | echo "configure:6328: checking for working volatile" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6328 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6329 | #line 6330 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6330 | #include "confdefs.h" |
| 6331 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6332 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6333 | volatile int x; x = 0; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6334 | ; return 0; } |
| 6335 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6336 | if { (eval echo configure:6337: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6337 | rm -rf conftest* |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6338 | works=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6339 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6340 | echo "configure: failed program was:" >&5 |
| 6341 | cat conftest.$ac_ext >&5 |
| 6342 | rm -rf conftest* |
| 6343 | cat >> confdefs.h <<\EOF |
| 6344 | #define volatile |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6345 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6346 | |
| 6347 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6348 | rm -f conftest* |
| 6349 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6350 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6351 | works=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6352 | echo $ac_n "checking for working signed char""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6353 | echo "configure:6354: checking for working signed char" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6354 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6355 | #line 6356 "configure" |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 6356 | #include "confdefs.h" |
| 6357 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6358 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6359 | signed char c; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6360 | ; return 0; } |
| 6361 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +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* |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6364 | works=yes |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 6365 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6366 | echo "configure: failed program was:" >&5 |
| 6367 | cat conftest.$ac_ext >&5 |
| 6368 | rm -rf conftest* |
| 6369 | cat >> confdefs.h <<\EOF |
| 6370 | #define signed |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6371 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6372 | |
| 6373 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6374 | rm -f conftest* |
| 6375 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6376 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6377 | have_prototypes=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6378 | echo $ac_n "checking for prototypes""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6379 | echo "configure:6380: checking for prototypes" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6380 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6381 | #line 6382 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6382 | #include "confdefs.h" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6383 | int foo(int x) { return 0; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6384 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6385 | return foo(10); |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6386 | ; return 0; } |
| 6387 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6388 | if { (eval echo configure:6389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6389 | rm -rf conftest* |
| 6390 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6391 | #define HAVE_PROTOTYPES 1 |
| 6392 | EOF |
| 6393 | have_prototypes=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6394 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6395 | echo "configure: failed program was:" >&5 |
| 6396 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6397 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6398 | rm -f conftest* |
| 6399 | echo "$ac_t""$have_prototypes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6400 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6401 | works=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6402 | echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6403 | echo "configure:6404: checking for variable length prototypes and stdarg.h" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6404 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6405 | #line 6406 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6406 | #include "confdefs.h" |
| 6407 | |
| 6408 | #include <stdarg.h> |
Guido van Rossum | 90eea07 | 1996-08-30 20:58:57 +0000 | [diff] [blame] | 6409 | int foo(int x, ...) { |
| 6410 | va_list va; |
| 6411 | va_start(va, x); |
| 6412 | va_arg(va, int); |
| 6413 | va_arg(va, char *); |
| 6414 | va_arg(va, double); |
| 6415 | return 0; |
| 6416 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6417 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6418 | int main() { |
Guido van Rossum | 90eea07 | 1996-08-30 20:58:57 +0000 | [diff] [blame] | 6419 | return foo(10, "", 3.14); |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6420 | ; return 0; } |
| 6421 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6422 | if { (eval echo configure:6423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6423 | rm -rf conftest* |
| 6424 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6425 | #define HAVE_STDARG_PROTOTYPES 1 |
| 6426 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6427 | works=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6428 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6429 | echo "configure: failed program was:" >&5 |
| 6430 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6431 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6432 | rm -f conftest* |
| 6433 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6434 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6435 | if test "$have_prototypes" = yes; then |
| 6436 | bad_prototypes=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6437 | echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6438 | echo "configure:6439: checking for bad exec* prototypes" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6439 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6440 | #line 6441 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6441 | #include "confdefs.h" |
| 6442 | #include <unistd.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6443 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6444 | char **t;execve("@",t,t); |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6445 | ; return 0; } |
| 6446 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6447 | if { (eval echo configure:6448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6448 | : |
| 6449 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6450 | echo "configure: failed program was:" >&5 |
| 6451 | cat conftest.$ac_ext >&5 |
| 6452 | rm -rf conftest* |
| 6453 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6454 | #define BAD_EXEC_PROTOTYPES 1 |
| 6455 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6456 | bad_prototypes=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6457 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6458 | rm -f conftest* |
| 6459 | echo "$ac_t""$bad_prototypes" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6460 | fi |
| 6461 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6462 | # check if sockaddr has sa_len member |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6463 | echo $ac_n "checking if sockaddr has sa_len member""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6464 | echo "configure:6465: checking if sockaddr has sa_len member" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6465 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6466 | #line 6467 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6467 | #include "confdefs.h" |
| 6468 | #include <sys/types.h> |
| 6469 | #include <sys/socket.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6470 | int main() { |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6471 | struct sockaddr x; |
| 6472 | x.sa_len = 0; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6473 | ; return 0; } |
| 6474 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6475 | if { (eval echo configure:6476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6476 | rm -rf conftest* |
| 6477 | echo "$ac_t""yes" 1>&6 |
| 6478 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6479 | #define HAVE_SOCKADDR_SA_LEN 1 |
| 6480 | EOF |
| 6481 | |
| 6482 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6483 | echo "configure: failed program was:" >&5 |
| 6484 | cat conftest.$ac_ext >&5 |
| 6485 | rm -rf conftest* |
| 6486 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6487 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6488 | rm -f conftest* |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6489 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6490 | echo $ac_n "checking for bad static forward""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6491 | echo "configure:6492: checking for bad static forward" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6492 | if eval "test \"`echo '$''{'ac_cv_bad_static_forward'+set}'`\" = set"; then |
| 6493 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6494 | else |
| 6495 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 6496 | ac_cv_bad_static_forward=no |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6497 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6498 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6499 | #line 6500 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6500 | #include "confdefs.h" |
| 6501 | |
| 6502 | struct s { int a; int b; }; |
| 6503 | static struct s foo; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6504 | int foobar() { |
| 6505 | static int random; |
| 6506 | random = (int) &foo; |
| 6507 | return random; |
| 6508 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6509 | static struct s foo = { 1, 2 }; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6510 | main() { |
| 6511 | exit(!((int)&foo == foobar())); |
| 6512 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6513 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6514 | if { (eval echo configure:6515: \"$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] | 6515 | then |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6516 | ac_cv_bad_static_forward=no |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6517 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6518 | echo "configure: failed program was:" >&5 |
| 6519 | cat conftest.$ac_ext >&5 |
| 6520 | rm -fr conftest* |
| 6521 | ac_cv_bad_static_forward=yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6522 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6523 | rm -fr conftest* |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6524 | fi |
| 6525 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6526 | fi |
| 6527 | |
| 6528 | echo "$ac_t""$ac_cv_bad_static_forward" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6529 | if test "$ac_cv_bad_static_forward" = yes |
| 6530 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6531 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6532 | #define BAD_STATIC_FORWARD 1 |
| 6533 | EOF |
| 6534 | |
| 6535 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6536 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6537 | va_list_is_array=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6538 | echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6539 | echo "configure:6540: checking whether va_list is an array" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6540 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6541 | #line 6542 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6542 | #include "confdefs.h" |
| 6543 | |
| 6544 | #ifdef HAVE_STDARG_PROTOTYPES |
| 6545 | #include <stdarg.h> |
| 6546 | #else |
| 6547 | #include <varargs.h> |
| 6548 | #endif |
| 6549 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6550 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6551 | va_list list1, list2; list1 = list2; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6552 | ; return 0; } |
| 6553 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6554 | if { (eval echo configure:6555: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6555 | : |
| 6556 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6557 | echo "configure: failed program was:" >&5 |
| 6558 | cat conftest.$ac_ext >&5 |
| 6559 | rm -rf conftest* |
| 6560 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6561 | #define VA_LIST_IS_ARRAY 1 |
| 6562 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6563 | va_list_is_array=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6564 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6565 | rm -f conftest* |
| 6566 | echo "$ac_t""$va_list_is_array" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6567 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6568 | # 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] | 6569 | echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6570 | echo "configure:6571: checking for gethostbyname_r" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6571 | if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then |
| 6572 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6573 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6574 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6575 | #line 6576 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6576 | #include "confdefs.h" |
| 6577 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6578 | which can conflict with char gethostbyname_r(); below. */ |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6579 | #include <assert.h> |
| 6580 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6581 | /* 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] | 6582 | builtin and then its argument prototype would still apply. */ |
| 6583 | char gethostbyname_r(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6584 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6585 | int main() { |
| 6586 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6587 | /* The GNU C library defines this for functions which it implements |
| 6588 | to always fail with ENOSYS. Some functions are actually named |
| 6589 | something starting with __ and the normal name is an alias. */ |
| 6590 | #if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r) |
| 6591 | choke me |
| 6592 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6593 | gethostbyname_r(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6594 | #endif |
| 6595 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6596 | ; return 0; } |
| 6597 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6598 | if { (eval echo configure:6599: \"$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] | 6599 | rm -rf conftest* |
| 6600 | eval "ac_cv_func_gethostbyname_r=yes" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6601 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6602 | echo "configure: failed program was:" >&5 |
| 6603 | cat conftest.$ac_ext >&5 |
| 6604 | rm -rf conftest* |
| 6605 | eval "ac_cv_func_gethostbyname_r=no" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6606 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6607 | rm -f conftest* |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6608 | fi |
| 6609 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6610 | if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then |
| 6611 | echo "$ac_t""yes" 1>&6 |
| 6612 | |
| 6613 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6614 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6615 | EOF |
| 6616 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6617 | echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6618 | echo "configure:6619: checking gethostbyname_r with 6 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6619 | OLD_CFLAGS=$CFLAGS |
| 6620 | CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6621 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6622 | #line 6623 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6623 | #include "confdefs.h" |
| 6624 | |
| 6625 | # include <netdb.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6626 | |
| 6627 | int main() { |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6628 | |
| 6629 | char *name; |
| 6630 | struct hostent *he, *res; |
| 6631 | char buffer[2048]; |
| 6632 | int buflen = 2048; |
| 6633 | int h_errnop; |
| 6634 | |
| 6635 | (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6636 | |
| 6637 | ; return 0; } |
| 6638 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6639 | if { (eval echo configure:6640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6640 | rm -rf conftest* |
| 6641 | |
| 6642 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6643 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6644 | EOF |
| 6645 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6646 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6647 | #define HAVE_GETHOSTBYNAME_R_6_ARG 1 |
| 6648 | EOF |
| 6649 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6650 | echo "$ac_t""yes" 1>&6 |
| 6651 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6652 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6653 | echo "configure: failed program was:" >&5 |
| 6654 | cat conftest.$ac_ext >&5 |
| 6655 | rm -rf conftest* |
| 6656 | |
| 6657 | echo "$ac_t""no" 1>&6 |
| 6658 | echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6659 | echo "configure:6660: checking gethostbyname_r with 5 args" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6660 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6661 | #line 6662 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6662 | #include "confdefs.h" |
| 6663 | |
| 6664 | # include <netdb.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6665 | |
| 6666 | int main() { |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6667 | |
| 6668 | char *name; |
| 6669 | struct hostent *he; |
| 6670 | char buffer[2048]; |
| 6671 | int buflen = 2048; |
| 6672 | int h_errnop; |
| 6673 | |
| 6674 | (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6675 | |
| 6676 | ; return 0; } |
| 6677 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6678 | if { (eval echo configure:6679: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6679 | rm -rf conftest* |
| 6680 | |
| 6681 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6682 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6683 | EOF |
| 6684 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6685 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6686 | #define HAVE_GETHOSTBYNAME_R_5_ARG 1 |
| 6687 | EOF |
| 6688 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6689 | echo "$ac_t""yes" 1>&6 |
| 6690 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6691 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6692 | echo "configure: failed program was:" >&5 |
| 6693 | cat conftest.$ac_ext >&5 |
| 6694 | rm -rf conftest* |
| 6695 | |
| 6696 | echo "$ac_t""no" 1>&6 |
| 6697 | echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6698 | echo "configure:6699: checking gethostbyname_r with 3 args" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6699 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6700 | #line 6701 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6701 | #include "confdefs.h" |
| 6702 | |
| 6703 | # include <netdb.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6704 | |
| 6705 | int main() { |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6706 | |
| 6707 | char *name; |
| 6708 | struct hostent *he; |
| 6709 | struct hostent_data data; |
| 6710 | |
| 6711 | (void) gethostbyname_r(name, he, &data); |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6712 | |
| 6713 | ; return 0; } |
| 6714 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6715 | if { (eval echo configure:6716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6716 | rm -rf conftest* |
| 6717 | |
| 6718 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6719 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6720 | EOF |
| 6721 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6722 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6723 | #define HAVE_GETHOSTBYNAME_R_3_ARG 1 |
| 6724 | EOF |
| 6725 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6726 | echo "$ac_t""yes" 1>&6 |
| 6727 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6728 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6729 | echo "configure: failed program was:" >&5 |
| 6730 | cat conftest.$ac_ext >&5 |
| 6731 | rm -rf conftest* |
| 6732 | |
| 6733 | echo "$ac_t""no" 1>&6 |
| 6734 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6735 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6736 | rm -f conftest* |
| 6737 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6738 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6739 | rm -f conftest* |
| 6740 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6741 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6742 | rm -f conftest* |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6743 | CFLAGS=$OLD_CFLAGS |
| 6744 | |
| 6745 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6746 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6747 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6748 | for ac_func in gethostbyname |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6749 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6750 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6751 | echo "configure:6752: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6752 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 6753 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6754 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6755 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6756 | #line 6757 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6757 | #include "confdefs.h" |
| 6758 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6759 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6760 | #include <assert.h> |
| 6761 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6762 | /* 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] | 6763 | builtin and then its argument prototype would still apply. */ |
| 6764 | char $ac_func(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6765 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6766 | int main() { |
| 6767 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6768 | /* The GNU C library defines this for functions which it implements |
| 6769 | to always fail with ENOSYS. Some functions are actually named |
| 6770 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6771 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6772 | choke me |
| 6773 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6774 | $ac_func(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6775 | #endif |
| 6776 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6777 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 6778 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6779 | if { (eval echo configure:6780: \"$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] | 6780 | rm -rf conftest* |
| 6781 | eval "ac_cv_func_$ac_func=yes" |
| 6782 | else |
| 6783 | echo "configure: failed program was:" >&5 |
| 6784 | cat conftest.$ac_ext >&5 |
| 6785 | rm -rf conftest* |
| 6786 | eval "ac_cv_func_$ac_func=no" |
| 6787 | fi |
| 6788 | rm -f conftest* |
| 6789 | fi |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6790 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6791 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 6792 | echo "$ac_t""yes" 1>&6 |
| 6793 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 6794 | cat >> confdefs.h <<EOF |
| 6795 | #define $ac_tr_func 1 |
| 6796 | EOF |
| 6797 | |
| 6798 | else |
| 6799 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6800 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6801 | done |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6802 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6803 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6804 | fi |
| 6805 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6806 | |
| 6807 | |
| 6808 | |
| 6809 | |
| 6810 | |
| 6811 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6812 | # checks for system services |
| 6813 | # (none yet) |
| 6814 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6815 | # Linux requires this for correct f.p. operations |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6816 | echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6817 | echo "configure:6818: checking for __fpu_control" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6818 | if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then |
| 6819 | echo $ac_n "(cached) $ac_c" 1>&6 |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6820 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6821 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6822 | #line 6823 "configure" |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6823 | #include "confdefs.h" |
| 6824 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6825 | which can conflict with char __fpu_control(); below. */ |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6826 | #include <assert.h> |
| 6827 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6828 | /* 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] | 6829 | builtin and then its argument prototype would still apply. */ |
| 6830 | char __fpu_control(); |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6831 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6832 | int main() { |
| 6833 | |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6834 | /* The GNU C library defines this for functions which it implements |
| 6835 | to always fail with ENOSYS. Some functions are actually named |
| 6836 | something starting with __ and the normal name is an alias. */ |
| 6837 | #if defined (__stub___fpu_control) || defined (__stub_____fpu_control) |
| 6838 | choke me |
| 6839 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6840 | __fpu_control(); |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6841 | #endif |
| 6842 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6843 | ; return 0; } |
| 6844 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6845 | if { (eval echo configure:6846: \"$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] | 6846 | rm -rf conftest* |
| 6847 | eval "ac_cv_func___fpu_control=yes" |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6848 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6849 | echo "configure: failed program was:" >&5 |
| 6850 | cat conftest.$ac_ext >&5 |
| 6851 | rm -rf conftest* |
| 6852 | eval "ac_cv_func___fpu_control=no" |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6853 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6854 | rm -f conftest* |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6855 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6856 | |
| 6857 | if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then |
| 6858 | echo "$ac_t""yes" 1>&6 |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6859 | : |
| 6860 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6861 | echo "$ac_t""no" 1>&6 |
| 6862 | echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6863 | echo "configure:6864: checking for __fpu_control in -lieee" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6864 | ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'` |
| 6865 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 6866 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6867 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6868 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6869 | LIBS="-lieee $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6870 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6871 | #line 6872 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6872 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6873 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6874 | /* 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] | 6875 | builtin and then its argument prototype would still apply. */ |
| 6876 | char __fpu_control(); |
| 6877 | |
| 6878 | int main() { |
| 6879 | __fpu_control() |
| 6880 | ; return 0; } |
| 6881 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6882 | if { (eval echo configure:6883: \"$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] | 6883 | rm -rf conftest* |
| 6884 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6885 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6886 | echo "configure: failed program was:" >&5 |
| 6887 | cat conftest.$ac_ext >&5 |
| 6888 | rm -rf conftest* |
| 6889 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6890 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6891 | rm -f conftest* |
| 6892 | LIBS="$ac_save_LIBS" |
| 6893 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6894 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6895 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 6896 | echo "$ac_t""yes" 1>&6 |
| 6897 | ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 6898 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
| 6899 | cat >> confdefs.h <<EOF |
| 6900 | #define $ac_tr_lib 1 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6901 | EOF |
| 6902 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6903 | LIBS="-lieee $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6904 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6905 | else |
| 6906 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6907 | fi |
| 6908 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6909 | |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6910 | fi |
| 6911 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6912 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6913 | # Check for --with-fpectl |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6914 | echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6915 | echo "configure:6916: checking for --with-fpectl" >&5 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6916 | # Check whether --with-fpectl or --without-fpectl was given. |
| 6917 | if test "${with_fpectl+set}" = set; then |
| 6918 | withval="$with_fpectl" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6919 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6920 | if test "$withval" != no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6921 | then cat >> confdefs.h <<\EOF |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6922 | #define WANT_SIGFPE_HANDLER 1 |
| 6923 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6924 | echo "$ac_t""yes" 1>&6 |
| 6925 | else echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6926 | fi |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6927 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6928 | echo "$ac_t""no" 1>&6 |
| 6929 | fi |
| 6930 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6931 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6932 | # check for --with-libm=... |
| 6933 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 6934 | case $ac_sys_system in |
Guido van Rossum | 3dc0a51 | 2000-10-05 18:00:06 +0000 | [diff] [blame] | 6935 | Darwin) ;; |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 6936 | BeOS) ;; |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 6937 | *) LIBM=-lm |
| 6938 | esac |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6939 | echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6940 | echo "configure:6941: checking for --with-libm=STRING" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6941 | # Check whether --with-libm or --without-libm was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6942 | if test "${with_libm+set}" = set; then |
| 6943 | withval="$with_libm" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6944 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6945 | if test "$withval" = no |
| 6946 | then LIBM= |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6947 | echo "$ac_t""force LIBM empty" 1>&6 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6948 | elif test "$withval" != yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6949 | then LIBM=$withval |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6950 | echo "$ac_t""set LIBM=\"$withval\"" 1>&6 |
| 6951 | 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] | 6952 | fi |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6953 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6954 | echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6 |
| 6955 | fi |
| 6956 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6957 | |
| 6958 | # check for --with-libc=... |
| 6959 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6960 | echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6961 | echo "configure:6962: checking for --with-libc=STRING" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6962 | # Check whether --with-libc or --without-libc was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6963 | if test "${with_libc+set}" = set; then |
| 6964 | withval="$with_libc" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6965 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6966 | if test "$withval" = no |
| 6967 | then LIBC= |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6968 | echo "$ac_t""force LIBC empty" 1>&6 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6969 | elif test "$withval" != yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6970 | then LIBC=$withval |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6971 | echo "$ac_t""set LIBC=\"$withval\"" 1>&6 |
| 6972 | 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] | 6973 | fi |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6974 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6975 | echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6 |
| 6976 | fi |
| 6977 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6978 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6979 | # check for hypot() in math library |
| 6980 | LIBS_SAVE=$LIBS |
| 6981 | LIBS="$LIBS $LIBM" |
| 6982 | for ac_func in hypot |
| 6983 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6984 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6985 | echo "configure:6986: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6986 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 6987 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6988 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6989 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 6990 | #line 6991 "configure" |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6991 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6992 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6993 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6994 | #include <assert.h> |
| 6995 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6996 | /* 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] | 6997 | builtin and then its argument prototype would still apply. */ |
| 6998 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6999 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7000 | int main() { |
| 7001 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 7002 | /* The GNU C library defines this for functions which it implements |
| 7003 | to always fail with ENOSYS. Some functions are actually named |
| 7004 | something starting with __ and the normal name is an alias. */ |
| 7005 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 7006 | choke me |
| 7007 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7008 | $ac_func(); |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 7009 | #endif |
| 7010 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7011 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7012 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7013 | if { (eval echo configure:7014: \"$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] | 7014 | rm -rf conftest* |
| 7015 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 7016 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7017 | echo "configure: failed program was:" >&5 |
| 7018 | cat conftest.$ac_ext >&5 |
| 7019 | rm -rf conftest* |
| 7020 | eval "ac_cv_func_$ac_func=no" |
| 7021 | fi |
| 7022 | rm -f conftest* |
| 7023 | fi |
| 7024 | |
| 7025 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 7026 | echo "$ac_t""yes" 1>&6 |
| 7027 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 7028 | cat >> confdefs.h <<EOF |
| 7029 | #define $ac_tr_func 1 |
| 7030 | EOF |
| 7031 | |
| 7032 | else |
| 7033 | echo "$ac_t""no" 1>&6 |
| 7034 | LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 7035 | fi |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 7036 | done |
| 7037 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7038 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 7039 | LIBS=$LIBS_SAVE |
| 7040 | |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 7041 | # check whether malloc(0) returns NULL or not |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7042 | echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7043 | echo "configure:7044: checking what malloc(0) returns" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7044 | if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then |
| 7045 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 7046 | else |
| 7047 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 7048 | ac_cv_malloc_zero=nonnull |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 7049 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7050 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7051 | #line 7052 "configure" |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 7052 | #include "confdefs.h" |
| 7053 | #include <stdio.h> |
| 7054 | #ifdef HAVE_STDLIB |
| 7055 | #include <stdlib.h> |
| 7056 | #else |
| 7057 | char *malloc(), *realloc(); |
| 7058 | int *free(); |
| 7059 | #endif |
| 7060 | main() { |
| 7061 | char *p; |
| 7062 | p = malloc(0); |
| 7063 | if (p == NULL) exit(1); |
| 7064 | p = realloc(p, 0); |
| 7065 | if (p == NULL) exit(1); |
| 7066 | free(p); |
| 7067 | exit(0); |
| 7068 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7069 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7070 | if { (eval echo configure:7071: \"$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] | 7071 | then |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 7072 | ac_cv_malloc_zero=nonnull |
| 7073 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7074 | echo "configure: failed program was:" >&5 |
| 7075 | cat conftest.$ac_ext >&5 |
| 7076 | rm -fr conftest* |
| 7077 | ac_cv_malloc_zero=null |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 7078 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7079 | rm -fr conftest* |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 7080 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7081 | |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 7082 | fi |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 7083 | # XXX arm cross-compile? |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7084 | echo "$ac_t""$ac_cv_malloc_zero" 1>&6 |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 7085 | if test "$ac_cv_malloc_zero" = null |
| 7086 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7087 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 7088 | #define MALLOC_ZERO_RETURNS_NULL 1 |
| 7089 | EOF |
| 7090 | |
| 7091 | fi |
| 7092 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7093 | # check for wchar.h |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7094 | ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'` |
| 7095 | echo $ac_n "checking for wchar.h""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7096 | echo "configure:7097: checking for wchar.h" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7097 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 7098 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7099 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7100 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7101 | #line 7102 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7102 | #include "confdefs.h" |
| 7103 | #include <wchar.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7104 | EOF |
| 7105 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7106 | { (eval echo configure:7107: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7107 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 7108 | if test -z "$ac_err"; then |
| 7109 | rm -rf conftest* |
| 7110 | eval "ac_cv_header_$ac_safe=yes" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7111 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7112 | echo "$ac_err" >&5 |
| 7113 | echo "configure: failed program was:" >&5 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7114 | cat conftest.$ac_ext >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7115 | rm -rf conftest* |
| 7116 | eval "ac_cv_header_$ac_safe=no" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7117 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7118 | rm -f conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7119 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7120 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 7121 | echo "$ac_t""yes" 1>&6 |
| 7122 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7123 | #define HAVE_WCHAR_H 1 |
| 7124 | EOF |
| 7125 | wchar_h="yes" |
| 7126 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7127 | echo "$ac_t""no" 1>&6 |
| 7128 | wchar_h="no" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7129 | |
| 7130 | fi |
| 7131 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7132 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7133 | # determine wchar_t size |
| 7134 | if test "$wchar_h" = yes |
| 7135 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7136 | echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7137 | echo "configure:7138: checking size of wchar_t" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7138 | if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then |
| 7139 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7140 | else |
| 7141 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7142 | ac_cv_sizeof_wchar_t=4 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7143 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7144 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7145 | #line 7146 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7146 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7147 | #include <stdio.h> |
| 7148 | main() |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7149 | { |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7150 | FILE *f=fopen("conftestval", "w"); |
| 7151 | if (!f) exit(1); |
| 7152 | fprintf(f, "%d\n", sizeof(wchar_t)); |
| 7153 | exit(0); |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7154 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7155 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7156 | if { (eval echo configure:7157: \"$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] | 7157 | then |
| 7158 | ac_cv_sizeof_wchar_t=`cat conftestval` |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7159 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7160 | echo "configure: failed program was:" >&5 |
| 7161 | cat conftest.$ac_ext >&5 |
| 7162 | rm -fr conftest* |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7163 | ac_cv_sizeof_wchar_t=0 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7164 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7165 | rm -fr conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7166 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7167 | |
| 7168 | fi |
| 7169 | echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 |
| 7170 | cat >> confdefs.h <<EOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7171 | #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t |
| 7172 | EOF |
| 7173 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7174 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7175 | fi |
| 7176 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7177 | echo $ac_n "checking what type to use for unicode""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7178 | echo "configure:7179: checking what type to use for unicode" >&5 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7179 | # Check whether --enable-unicode or --disable-unicode was given. |
| 7180 | if test "${enable_unicode+set}" = set; then |
| 7181 | enableval="$enable_unicode" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7182 | : |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7183 | else |
| 7184 | enable_unicode=yes |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7185 | fi |
| 7186 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7187 | |
| 7188 | if test $enable_unicode = yes |
| 7189 | then |
Martin v. Löwis | fd91779 | 2001-06-27 20:22:04 +0000 | [diff] [blame] | 7190 | # Without any arguments, Py_UNICODE defaults to two-byte mode |
| 7191 | enable_unicode="ucs2" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7192 | fi |
| 7193 | |
| 7194 | case "$enable_unicode" in |
| 7195 | ucs2) unicode_size="2" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7196 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7197 | #define Py_UNICODE_SIZE 2 |
| 7198 | EOF |
| 7199 | |
| 7200 | ;; |
| 7201 | ucs4) unicode_size="4" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7202 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7203 | #define Py_UNICODE_SIZE 4 |
| 7204 | EOF |
| 7205 | |
| 7206 | ;; |
| 7207 | esac |
| 7208 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7209 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7210 | if test "$enable_unicode" = "no" |
| 7211 | then |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 7212 | UNICODE_OBJS="" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7213 | echo "$ac_t""not used" 1>&6 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7214 | else |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 7215 | UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7216 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7217 | #define Py_USING_UNICODE 1 |
| 7218 | EOF |
| 7219 | |
| 7220 | if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" |
| 7221 | then |
| 7222 | PY_UNICODE_TYPE="wchar_t" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7223 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7224 | #define HAVE_USABLE_WCHAR_T 1 |
| 7225 | EOF |
| 7226 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7227 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7228 | #define PY_UNICODE_TYPE wchar_t |
| 7229 | EOF |
| 7230 | |
| 7231 | elif test "$ac_cv_sizeof_short" = "$unicode_size" |
| 7232 | then |
| 7233 | PY_UNICODE_TYPE="unsigned short" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7234 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7235 | #define PY_UNICODE_TYPE unsigned short |
| 7236 | EOF |
| 7237 | |
| 7238 | elif test "$ac_cv_sizeof_long" = "$unicode_size" |
| 7239 | then |
| 7240 | PY_UNICODE_TYPE="unsigned long" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7241 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7242 | #define PY_UNICODE_TYPE unsigned long |
| 7243 | EOF |
| 7244 | |
| 7245 | else |
| 7246 | PY_UNICODE_TYPE="no type found" |
| 7247 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7248 | echo "$ac_t""$PY_UNICODE_TYPE" 1>&6 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7249 | fi |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7250 | |
| 7251 | # check for endianness |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7252 | echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7253 | echo "configure:7254: checking whether byte ordering is bigendian" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7254 | if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then |
| 7255 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7256 | else |
| 7257 | ac_cv_c_bigendian=unknown |
| 7258 | # See if sys/param.h defines the BYTE_ORDER macro. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7259 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7260 | #line 7261 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7261 | #include "confdefs.h" |
| 7262 | #include <sys/types.h> |
| 7263 | #include <sys/param.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7264 | int main() { |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7265 | |
| 7266 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN |
| 7267 | bogus endian macros |
| 7268 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7269 | ; return 0; } |
| 7270 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7271 | if { (eval echo configure:7272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7272 | rm -rf conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7273 | # 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] | 7274 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7275 | #line 7276 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7276 | #include "confdefs.h" |
| 7277 | #include <sys/types.h> |
| 7278 | #include <sys/param.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7279 | int main() { |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7280 | |
| 7281 | #if BYTE_ORDER != BIG_ENDIAN |
| 7282 | not big endian |
| 7283 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7284 | ; return 0; } |
| 7285 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7286 | if { (eval echo configure:7287: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7287 | rm -rf conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7288 | ac_cv_c_bigendian=yes |
| 7289 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7290 | echo "configure: failed program was:" >&5 |
| 7291 | cat conftest.$ac_ext >&5 |
| 7292 | rm -rf conftest* |
| 7293 | ac_cv_c_bigendian=no |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7294 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7295 | rm -f conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7296 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7297 | echo "configure: failed program was:" >&5 |
| 7298 | cat conftest.$ac_ext >&5 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7299 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7300 | rm -f conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7301 | if test $ac_cv_c_bigendian = unknown; then |
| 7302 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7303 | { 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] | 7304 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7305 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7306 | #line 7307 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7307 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7308 | main () { |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7309 | /* Are we little or big endian? From Harbison&Steele. */ |
| 7310 | union |
| 7311 | { |
| 7312 | long l; |
| 7313 | char c[sizeof (long)]; |
| 7314 | } u; |
| 7315 | u.l = 1; |
| 7316 | exit (u.c[sizeof (long) - 1] == 1); |
| 7317 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7318 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7319 | if { (eval echo configure:7320: \"$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] | 7320 | then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7321 | ac_cv_c_bigendian=no |
| 7322 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7323 | echo "configure: failed program was:" >&5 |
| 7324 | cat conftest.$ac_ext >&5 |
| 7325 | rm -fr conftest* |
| 7326 | ac_cv_c_bigendian=yes |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7327 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7328 | rm -fr conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7329 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7330 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7331 | fi |
| 7332 | fi |
| 7333 | |
| 7334 | echo "$ac_t""$ac_cv_c_bigendian" 1>&6 |
| 7335 | if test $ac_cv_c_bigendian = yes; then |
| 7336 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7337 | #define WORDS_BIGENDIAN 1 |
| 7338 | EOF |
| 7339 | |
| 7340 | fi |
| 7341 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7342 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7343 | # Check whether right shifting a negative integer extends the sign bit |
| 7344 | # 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] | 7345 | echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7346 | echo "configure:7347: checking whether right shift extends the sign bit" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7347 | if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then |
| 7348 | echo $ac_n "(cached) $ac_c" 1>&6 |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 7349 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7350 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7351 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 7352 | ac_cv_rshift_extends_sign=yes |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7353 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7354 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7355 | #line 7356 "configure" |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7356 | #include "confdefs.h" |
| 7357 | |
| 7358 | int main() |
| 7359 | { |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 7360 | exit(((-1)>>3 == -1) ? 0 : 1); |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7361 | } |
| 7362 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7363 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7364 | if { (eval echo configure:7365: \"$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] | 7365 | then |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 7366 | ac_cv_rshift_extends_sign=yes |
| 7367 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7368 | echo "configure: failed program was:" >&5 |
| 7369 | cat conftest.$ac_ext >&5 |
| 7370 | rm -fr conftest* |
| 7371 | ac_cv_rshift_extends_sign=no |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 7372 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7373 | rm -fr conftest* |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 7374 | fi |
| 7375 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7376 | fi |
| 7377 | |
| 7378 | echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6 |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 7379 | if test "$ac_cv_rshift_extends_sign" = no |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7380 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7381 | cat >> confdefs.h <<\EOF |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7382 | #define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1 |
| 7383 | EOF |
| 7384 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7385 | fi |
| 7386 | |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7387 | # check for getc_unlocked and related locking functions |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7388 | echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7389 | echo "configure:7390: checking for getc_unlocked() and friends" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7390 | if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then |
| 7391 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7392 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7393 | |
| 7394 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7395 | #line 7396 "configure" |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7396 | #include "confdefs.h" |
| 7397 | #include <stdio.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7398 | int main() { |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7399 | |
| 7400 | FILE *f = fopen("/dev/null", "r"); |
| 7401 | flockfile(f); |
| 7402 | getc_unlocked(f); |
| 7403 | funlockfile(f); |
| 7404 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7405 | ; return 0; } |
| 7406 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7407 | if { (eval echo configure:7408: \"$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] | 7408 | rm -rf conftest* |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7409 | ac_cv_have_getc_unlocked=yes |
| 7410 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7411 | echo "configure: failed program was:" >&5 |
| 7412 | cat conftest.$ac_ext >&5 |
| 7413 | rm -rf conftest* |
| 7414 | ac_cv_have_getc_unlocked=no |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7415 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7416 | rm -f conftest* |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7417 | fi |
| 7418 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7419 | echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6 |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7420 | if test "$ac_cv_have_getc_unlocked" = yes |
| 7421 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7422 | cat >> confdefs.h <<\EOF |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7423 | #define HAVE_GETC_UNLOCKED 1 |
| 7424 | EOF |
| 7425 | |
| 7426 | fi |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7427 | |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7428 | # check for readline 4.0 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7429 | echo $ac_n "checking for rl_pre_input_hook in -lreadline""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7430 | echo "configure:7431: checking for rl_pre_input_hook in -lreadline" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7431 | ac_lib_var=`echo readline'_'rl_pre_input_hook | sed 'y%./+-%__p_%'` |
| 7432 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 7433 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7434 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7435 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7436 | LIBS="-lreadline -ltermcap $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7437 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7438 | #line 7439 "configure" |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7439 | #include "confdefs.h" |
| 7440 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 7441 | /* 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] | 7442 | builtin and then its argument prototype would still apply. */ |
| 7443 | char rl_pre_input_hook(); |
| 7444 | |
| 7445 | int main() { |
| 7446 | rl_pre_input_hook() |
| 7447 | ; return 0; } |
| 7448 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7449 | if { (eval echo configure:7450: \"$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] | 7450 | rm -rf conftest* |
| 7451 | eval "ac_cv_lib_$ac_lib_var=yes" |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7452 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7453 | echo "configure: failed program was:" >&5 |
| 7454 | cat conftest.$ac_ext >&5 |
| 7455 | rm -rf conftest* |
| 7456 | eval "ac_cv_lib_$ac_lib_var=no" |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7457 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7458 | rm -f conftest* |
| 7459 | LIBS="$ac_save_LIBS" |
| 7460 | |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7461 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7462 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 7463 | echo "$ac_t""yes" 1>&6 |
| 7464 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7465 | #define HAVE_RL_PRE_INPUT_HOOK 1 |
| 7466 | EOF |
| 7467 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7468 | else |
| 7469 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7470 | fi |
| 7471 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7472 | |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7473 | # check for readline 4.2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7474 | echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7475 | echo "configure:7476: checking for rl_completion_matches in -lreadline" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7476 | ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'` |
| 7477 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 7478 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7479 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7480 | ac_save_LIBS="$LIBS" |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7481 | LIBS="-lreadline -ltermcap $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7482 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7483 | #line 7484 "configure" |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7484 | #include "confdefs.h" |
| 7485 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 7486 | /* 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] | 7487 | builtin and then its argument prototype would still apply. */ |
| 7488 | char rl_completion_matches(); |
| 7489 | |
| 7490 | int main() { |
| 7491 | rl_completion_matches() |
| 7492 | ; return 0; } |
| 7493 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7494 | if { (eval echo configure:7495: \"$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] | 7495 | rm -rf conftest* |
| 7496 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7497 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7498 | echo "configure: failed program was:" >&5 |
| 7499 | cat conftest.$ac_ext >&5 |
| 7500 | rm -rf conftest* |
| 7501 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7502 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7503 | rm -f conftest* |
| 7504 | LIBS="$ac_save_LIBS" |
| 7505 | |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7506 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7507 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 7508 | echo "$ac_t""yes" 1>&6 |
| 7509 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7510 | #define HAVE_RL_COMPLETION_MATCHES 1 |
| 7511 | EOF |
| 7512 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7513 | else |
| 7514 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7515 | fi |
| 7516 | |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7517 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7518 | echo $ac_n "checking for broken nice()""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7519 | echo "configure:7520: checking for broken nice()" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7520 | if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then |
| 7521 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 7522 | else |
| 7523 | |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7524 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 7525 | ac_cv_broken_nice=no |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7526 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7527 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7528 | #line 7529 "configure" |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7529 | #include "confdefs.h" |
| 7530 | |
| 7531 | int main() |
| 7532 | { |
| 7533 | int val1 = nice(1); |
| 7534 | if (val1 != -1 && val1 == nice(2)) |
| 7535 | exit(0); |
| 7536 | exit(1); |
| 7537 | } |
| 7538 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7539 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7540 | if { (eval echo configure:7541: \"$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] | 7541 | then |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7542 | ac_cv_broken_nice=yes |
| 7543 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7544 | echo "configure: failed program was:" >&5 |
| 7545 | cat conftest.$ac_ext >&5 |
| 7546 | rm -fr conftest* |
| 7547 | ac_cv_broken_nice=no |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7548 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7549 | rm -fr conftest* |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7550 | fi |
| 7551 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7552 | fi |
| 7553 | |
| 7554 | echo "$ac_t""$ac_cv_broken_nice" 1>&6 |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7555 | if test "$ac_cv_broken_nice" = yes |
| 7556 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7557 | cat >> confdefs.h <<\EOF |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7558 | #define HAVE_BROKEN_NICE 1 |
| 7559 | EOF |
| 7560 | |
| 7561 | fi |
| 7562 | |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7563 | # 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] | 7564 | echo $ac_n "checking whether mvwdelch is an expression""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7565 | echo "configure:7566: checking whether mvwdelch is an expression" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7566 | if eval "test \"`echo '$''{'ac_cv_mvwdelch_is_expression'+set}'`\" = set"; then |
| 7567 | echo $ac_n "(cached) $ac_c" 1>&6 |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7568 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7569 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7570 | #line 7571 "configure" |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7571 | #include "confdefs.h" |
| 7572 | #include <curses.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7573 | int main() { |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7574 | |
| 7575 | int rtn; |
| 7576 | rtn = mvwdelch(0,0,0); |
| 7577 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7578 | ; return 0; } |
| 7579 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7580 | if { (eval echo configure:7581: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7581 | rm -rf conftest* |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7582 | ac_cv_mvwdelch_is_expression=yes |
| 7583 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7584 | echo "configure: failed program was:" >&5 |
| 7585 | cat conftest.$ac_ext >&5 |
| 7586 | rm -rf conftest* |
| 7587 | ac_cv_mvwdelch_is_expression=no |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7588 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7589 | rm -f conftest* |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7590 | fi |
| 7591 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7592 | echo "$ac_t""$ac_cv_mvwdelch_is_expression" 1>&6 |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7593 | |
| 7594 | if test "$ac_cv_mvwdelch_is_expression" = yes |
| 7595 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7596 | cat >> confdefs.h <<\EOF |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7597 | #define MVWDELCH_IS_EXPRESSION 1 |
| 7598 | EOF |
| 7599 | |
| 7600 | fi |
| 7601 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7602 | echo $ac_n "checking whether WINDOW has _flags""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7603 | echo "configure:7604: checking whether WINDOW has _flags" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7604 | if eval "test \"`echo '$''{'ac_cv_window_has_flags'+set}'`\" = set"; then |
| 7605 | echo $ac_n "(cached) $ac_c" 1>&6 |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7606 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7607 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7608 | #line 7609 "configure" |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7609 | #include "confdefs.h" |
| 7610 | #include <curses.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7611 | int main() { |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7612 | |
| 7613 | WINDOW *w; |
| 7614 | w->_flags = 0; |
| 7615 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7616 | ; return 0; } |
| 7617 | EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7618 | if { (eval echo configure:7619: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7619 | rm -rf conftest* |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7620 | ac_cv_window_has_flags=yes |
| 7621 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7622 | echo "configure: failed program was:" >&5 |
| 7623 | cat conftest.$ac_ext >&5 |
| 7624 | rm -rf conftest* |
| 7625 | ac_cv_window_has_flags=no |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7626 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7627 | rm -f conftest* |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7628 | fi |
| 7629 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7630 | echo "$ac_t""$ac_cv_window_has_flags" 1>&6 |
| 7631 | |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7632 | |
| 7633 | if test "$ac_cv_window_has_flags" = yes |
| 7634 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7635 | cat >> confdefs.h <<\EOF |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7636 | #define WINDOW_HAS_FLAGS 1 |
| 7637 | EOF |
| 7638 | |
| 7639 | fi |
| 7640 | |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7641 | # THIS MUST BE LAST, IT CAN BREAK OTHER TESTS! |
| 7642 | # Add sys/socket.h to confdefs.h |
| 7643 | cat >> confdefs.h <<\EOF |
| 7644 | #ifdef HAVE_SYS_SOCKET_H |
| 7645 | #include <sys/socket.h> |
| 7646 | #endif |
| 7647 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7648 | echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7649 | echo "configure:7650: checking for socklen_t" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7650 | if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then |
| 7651 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7652 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7653 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7654 | #line 7655 "configure" |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7655 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7656 | #include <sys/types.h> |
| 7657 | #if STDC_HEADERS |
| 7658 | #include <stdlib.h> |
| 7659 | #include <stddef.h> |
| 7660 | #endif |
| 7661 | EOF |
| 7662 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 7663 | egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
| 7664 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7665 | ac_cv_type_socklen_t=yes |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7666 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7667 | rm -rf conftest* |
| 7668 | ac_cv_type_socklen_t=no |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7669 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7670 | rm -f conftest* |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7671 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7672 | fi |
| 7673 | echo "$ac_t""$ac_cv_type_socklen_t" 1>&6 |
| 7674 | if test $ac_cv_type_socklen_t = no; then |
| 7675 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7676 | #define socklen_t int |
| 7677 | EOF |
| 7678 | |
| 7679 | fi |
| 7680 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7681 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7682 | #AC_MSG_CHECKING(for Modules/Setup) |
| 7683 | #if test ! -f Modules/Setup ; then |
| 7684 | # if test ! -d Modules ; then |
| 7685 | # mkdir Modules |
| 7686 | # fi |
| 7687 | # cp "$srcdir/Modules/Setup.dist" Modules/Setup |
| 7688 | # AC_MSG_RESULT(creating) |
| 7689 | #else |
| 7690 | # AC_MSG_RESULT(already exists) |
| 7691 | #fi |
| 7692 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7693 | |
| 7694 | |
Martin v. Löwis | 06f15bb | 2001-12-02 13:02:32 +0000 | [diff] [blame] | 7695 | for h in `(cd $srcdir;echo Python/thread_*.h)` |
| 7696 | do |
| 7697 | THREADHEADERS="$THREADHEADERS \$(srcdir)/$h" |
| 7698 | done |
| 7699 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7700 | |
Neil Schemenauer | acbf9ef | 2001-02-27 02:15:14 +0000 | [diff] [blame] | 7701 | SRCDIRS="Parser Grammar Objects Python Modules" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7702 | echo $ac_n "checking for build directories""... $ac_c" 1>&6 |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7703 | echo "configure:7704: checking for build directories" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7704 | for dir in $SRCDIRS; do |
| 7705 | if test ! -d $dir; then |
| 7706 | mkdir $dir |
Guido van Rossum | 262cf20 | 2000-11-02 19:33:53 +0000 | [diff] [blame] | 7707 | fi |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7708 | done |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7709 | echo "$ac_t""done" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 7710 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7711 | # generate output files |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7712 | trap '' 1 2 15 |
| 7713 | cat > confcache <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7714 | # This file is a shell script that caches the results of configure |
| 7715 | # 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] | 7716 | # scripts and configure runs. It is not useful on other systems. |
| 7717 | # 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] | 7718 | # |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7719 | # By default, configure uses ./config.cache as the cache file, |
| 7720 | # creating it if it does not exist already. You can give configure |
| 7721 | # the --cache-file=FILE option to use a different cache file; that is |
| 7722 | # what configure does when it calls configure scripts in |
| 7723 | # subdirectories, so they share the cache. |
| 7724 | # Giving --cache-file=/dev/null disables caching, for debugging configure. |
| 7725 | # config.status only pays attention to the cache file if you give it the |
| 7726 | # --recheck option to rerun configure. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7727 | # |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7728 | EOF |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7729 | # The following way of writing the cache mishandles newlines in values, |
| 7730 | # but we know of no workaround that is simple, portable, and efficient. |
| 7731 | # So, don't put newlines in cache variables' values. |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7732 | # Ultrix sh set writes to stderr and can't be redirected directly, |
| 7733 | # 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] | 7734 | (set) 2>&1 | |
| 7735 | case `(ac_space=' '; set | grep ac_space) 2>&1` in |
| 7736 | *ac_space=\ *) |
| 7737 | # `set' does not quote correctly, so add quotes (double-quote substitution |
| 7738 | # turns \\\\ into \\, and sed turns \\ into \). |
| 7739 | sed -n \ |
| 7740 | -e "s/'/'\\\\''/g" \ |
| 7741 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" |
| 7742 | ;; |
| 7743 | *) |
| 7744 | # `set' quotes correctly as required by POSIX, so do not add quotes. |
| 7745 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' |
| 7746 | ;; |
| 7747 | esac >> confcache |
| 7748 | if cmp -s $cache_file confcache; then |
| 7749 | : |
| 7750 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7751 | if test -w $cache_file; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7752 | echo "updating cache $cache_file" |
| 7753 | cat confcache > $cache_file |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7754 | else |
| 7755 | echo "not updating unwritable cache $cache_file" |
| 7756 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7757 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7758 | rm -f confcache |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7759 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7760 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 |
| 7761 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7762 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
| 7763 | # Let make expand exec_prefix. |
| 7764 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7765 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7766 | # Any assignment to VPATH causes Sun make to only execute |
| 7767 | # the first set of double-colon rules, so remove it if not needed. |
| 7768 | # 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] | 7769 | if test "x$srcdir" = x.; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7770 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7771 | fi |
| 7772 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7773 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 |
| 7774 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7775 | DEFS=-DHAVE_CONFIG_H |
| 7776 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7777 | # Without the "./", some shells look in PATH for config.status. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7778 | : ${CONFIG_STATUS=./config.status} |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7779 | |
| 7780 | echo creating $CONFIG_STATUS |
| 7781 | rm -f $CONFIG_STATUS |
| 7782 | cat > $CONFIG_STATUS <<EOF |
| 7783 | #! /bin/sh |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7784 | # Generated automatically by configure. |
| 7785 | # Run this file to recreate the current configuration. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7786 | # This directory was configured as follows, |
| 7787 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: |
| 7788 | # |
| 7789 | # $0 $ac_configure_args |
| 7790 | # |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7791 | # Compiler output produced by configure, useful for debugging |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7792 | # configure, is in ./config.log if it exists. |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7793 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7794 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" |
| 7795 | for ac_option |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7796 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7797 | case "\$ac_option" in |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7798 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7799 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" |
| 7800 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; |
| 7801 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) |
| 7802 | echo "$CONFIG_STATUS generated by autoconf version 2.13" |
| 7803 | exit 0 ;; |
| 7804 | -help | --help | --hel | --he | --h) |
| 7805 | echo "\$ac_cs_usage"; exit 0 ;; |
| 7806 | *) echo "\$ac_cs_usage"; exit 1 ;; |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7807 | esac |
| 7808 | done |
| 7809 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7810 | ac_given_srcdir=$srcdir |
| 7811 | ac_given_INSTALL="$INSTALL" |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7812 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7813 | 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] | 7814 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7815 | cat >> $CONFIG_STATUS <<EOF |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7816 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7817 | # Protect against being on the right side of a sed subst in config.status. |
| 7818 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; |
| 7819 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF |
| 7820 | $ac_vpsub |
| 7821 | $extrasub |
| 7822 | s%@SHELL@%$SHELL%g |
| 7823 | s%@CFLAGS@%$CFLAGS%g |
| 7824 | s%@CPPFLAGS@%$CPPFLAGS%g |
| 7825 | s%@CXXFLAGS@%$CXXFLAGS%g |
| 7826 | s%@FFLAGS@%$FFLAGS%g |
| 7827 | s%@DEFS@%$DEFS%g |
| 7828 | s%@LDFLAGS@%$LDFLAGS%g |
| 7829 | s%@LIBS@%$LIBS%g |
| 7830 | s%@exec_prefix@%$exec_prefix%g |
| 7831 | s%@prefix@%$prefix%g |
| 7832 | s%@program_transform_name@%$program_transform_name%g |
| 7833 | s%@bindir@%$bindir%g |
| 7834 | s%@sbindir@%$sbindir%g |
| 7835 | s%@libexecdir@%$libexecdir%g |
| 7836 | s%@datadir@%$datadir%g |
| 7837 | s%@sysconfdir@%$sysconfdir%g |
| 7838 | s%@sharedstatedir@%$sharedstatedir%g |
| 7839 | s%@localstatedir@%$localstatedir%g |
| 7840 | s%@libdir@%$libdir%g |
| 7841 | s%@includedir@%$includedir%g |
| 7842 | s%@oldincludedir@%$oldincludedir%g |
| 7843 | s%@infodir@%$infodir%g |
| 7844 | s%@mandir@%$mandir%g |
| 7845 | s%@VERSION@%$VERSION%g |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 7846 | s%@SOVERSION@%$SOVERSION%g |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7847 | s%@CONFIG_ARGS@%$CONFIG_ARGS%g |
| 7848 | s%@PYTHONFRAMEWORK@%$PYTHONFRAMEWORK%g |
| 7849 | s%@PYTHONFRAMEWORKDIR@%$PYTHONFRAMEWORKDIR%g |
| 7850 | s%@PYTHONFRAMEWORKPREFIX@%$PYTHONFRAMEWORKPREFIX%g |
| 7851 | s%@PYTHONFRAMEWORKINSTALLDIR@%$PYTHONFRAMEWORKINSTALLDIR%g |
| 7852 | s%@MACHDEP@%$MACHDEP%g |
| 7853 | s%@SGI_ABI@%$SGI_ABI%g |
| 7854 | s%@CXX@%$CXX%g |
| 7855 | s%@MAINOBJ@%$MAINOBJ%g |
| 7856 | s%@CC@%$CC%g |
| 7857 | s%@CPP@%$CPP%g |
| 7858 | s%@EXEEXT@%$EXEEXT%g |
| 7859 | s%@BUILDEXEEXT@%$BUILDEXEEXT%g |
| 7860 | s%@LIBRARY@%$LIBRARY%g |
| 7861 | s%@LDLIBRARY@%$LDLIBRARY%g |
| 7862 | s%@DLLLIBRARY@%$DLLLIBRARY%g |
| 7863 | s%@BLDLIBRARY@%$BLDLIBRARY%g |
| 7864 | s%@LDLIBRARYDIR@%$LDLIBRARYDIR%g |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 7865 | s%@INSTSONAME@%$INSTSONAME%g |
| 7866 | s%@RUNSHARED@%$RUNSHARED%g |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7867 | s%@LINKCC@%$LINKCC%g |
| 7868 | s%@RANLIB@%$RANLIB%g |
| 7869 | s%@AR@%$AR%g |
| 7870 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
| 7871 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g |
| 7872 | s%@INSTALL_DATA@%$INSTALL_DATA%g |
| 7873 | s%@LN@%$LN%g |
| 7874 | s%@OPT@%$OPT%g |
| 7875 | s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g |
| 7876 | s%@SO@%$SO%g |
| 7877 | s%@LDSHARED@%$LDSHARED%g |
| 7878 | s%@BLDSHARED@%$BLDSHARED%g |
| 7879 | s%@CCSHARED@%$CCSHARED%g |
| 7880 | s%@LINKFORSHARED@%$LINKFORSHARED%g |
| 7881 | s%@CFLAGSFORSHARED@%$CFLAGSFORSHARED%g |
| 7882 | s%@USE_SIGNAL_MODULE@%$USE_SIGNAL_MODULE%g |
| 7883 | s%@SIGNAL_OBJS@%$SIGNAL_OBJS%g |
| 7884 | s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g |
| 7885 | s%@LDLAST@%$LDLAST%g |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7886 | s%@THREADOBJ@%$THREADOBJ%g |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7887 | s%@DLINCLDIR@%$DLINCLDIR%g |
| 7888 | s%@DYNLOADFILE@%$DYNLOADFILE%g |
| 7889 | s%@MACHDEP_OBJS@%$MACHDEP_OBJS%g |
| 7890 | s%@LIBOBJS@%$LIBOBJS%g |
| 7891 | s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g |
| 7892 | s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g |
| 7893 | s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g |
| 7894 | s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g |
| 7895 | s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g |
| 7896 | s%@LIBM@%$LIBM%g |
| 7897 | s%@LIBC@%$LIBC%g |
| 7898 | s%@UNICODE_OBJS@%$UNICODE_OBJS%g |
| 7899 | s%@THREADHEADERS@%$THREADHEADERS%g |
| 7900 | s%@SRCDIRS@%$SRCDIRS%g |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7901 | |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7902 | CEOF |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7903 | EOF |
| 7904 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7905 | cat >> $CONFIG_STATUS <<\EOF |
| 7906 | |
| 7907 | # Split the substitutions into bite-sized pieces for seds with |
| 7908 | # small command number limits, like on Digital OSF/1 and HP-UX. |
| 7909 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. |
| 7910 | ac_file=1 # Number of current file. |
| 7911 | ac_beg=1 # First line for current file. |
| 7912 | ac_end=$ac_max_sed_cmds # Line after last line for current file. |
| 7913 | ac_more_lines=: |
| 7914 | ac_sed_cmds="" |
| 7915 | while $ac_more_lines; do |
| 7916 | if test $ac_beg -gt 1; then |
| 7917 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file |
| 7918 | else |
| 7919 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7920 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7921 | if test ! -s conftest.s$ac_file; then |
| 7922 | ac_more_lines=false |
| 7923 | rm -f conftest.s$ac_file |
| 7924 | else |
| 7925 | if test -z "$ac_sed_cmds"; then |
| 7926 | ac_sed_cmds="sed -f conftest.s$ac_file" |
| 7927 | else |
| 7928 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" |
| 7929 | fi |
| 7930 | ac_file=`expr $ac_file + 1` |
| 7931 | ac_beg=$ac_end |
| 7932 | ac_end=`expr $ac_end + $ac_max_sed_cmds` |
| 7933 | fi |
| 7934 | done |
| 7935 | if test -z "$ac_sed_cmds"; then |
| 7936 | ac_sed_cmds=cat |
| 7937 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7938 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7939 | |
| 7940 | cat >> $CONFIG_STATUS <<EOF |
| 7941 | |
| 7942 | CONFIG_FILES=\${CONFIG_FILES-"Makefile.pre Modules/Setup.config"} |
| 7943 | EOF |
| 7944 | cat >> $CONFIG_STATUS <<\EOF |
| 7945 | 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] | 7946 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7947 | case "$ac_file" in |
| 7948 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
| 7949 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
| 7950 | *) ac_file_in="${ac_file}.in" ;; |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7951 | esac |
| 7952 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7953 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. |
| 7954 | |
| 7955 | # Remove last slash and all that follows it. Not all systems have dirname. |
| 7956 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7957 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7958 | # The file is in a subdirectory. |
| 7959 | test ! -d "$ac_dir" && mkdir "$ac_dir" |
| 7960 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7961 | # A "../" for each directory in $ac_dir_suffix. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7962 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7963 | else |
| 7964 | ac_dir_suffix= ac_dots= |
| 7965 | fi |
| 7966 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7967 | case "$ac_given_srcdir" in |
| 7968 | .) srcdir=. |
| 7969 | if test -z "$ac_dots"; then top_srcdir=. |
| 7970 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; |
| 7971 | /*) 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] | 7972 | *) # Relative path. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7973 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" |
| 7974 | top_srcdir="$ac_dots$ac_given_srcdir" ;; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7975 | esac |
| 7976 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7977 | case "$ac_given_INSTALL" in |
| 7978 | [/$]*) INSTALL="$ac_given_INSTALL" ;; |
| 7979 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7980 | esac |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7981 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7982 | echo creating "$ac_file" |
| 7983 | rm -f "$ac_file" |
| 7984 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." |
| 7985 | case "$ac_file" in |
| 7986 | *Makefile*) ac_comsub="1i\\ |
| 7987 | # $configure_input" ;; |
| 7988 | *) ac_comsub= ;; |
| 7989 | esac |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7990 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7991 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
| 7992 | sed -e "$ac_comsub |
| 7993 | s%@configure_input@%$configure_input%g |
| 7994 | s%@srcdir@%$srcdir%g |
| 7995 | s%@top_srcdir@%$top_srcdir%g |
| 7996 | s%@INSTALL@%$INSTALL%g |
| 7997 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file |
| 7998 | fi; done |
| 7999 | rm -f conftest.s* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 8000 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8001 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where |
| 8002 | # 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] | 8003 | # |
| 8004 | # ac_d sets the value in "#define NAME VALUE" lines. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8005 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' |
| 8006 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' |
| 8007 | ac_dC='\3' |
| 8008 | ac_dD='%g' |
| 8009 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". |
| 8010 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
| 8011 | ac_uB='\([ ]\)%\1#\2define\3' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 8012 | ac_uC=' ' |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8013 | ac_uD='\4%g' |
| 8014 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". |
| 8015 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
| 8016 | ac_eB='$%\1#\2define\3' |
| 8017 | ac_eC=' ' |
| 8018 | ac_eD='%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 8019 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8020 | if test "${CONFIG_HEADERS+set}" != set; then |
| 8021 | EOF |
| 8022 | cat >> $CONFIG_STATUS <<EOF |
| 8023 | CONFIG_HEADERS="pyconfig.h" |
| 8024 | EOF |
| 8025 | cat >> $CONFIG_STATUS <<\EOF |
| 8026 | fi |
| 8027 | 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] | 8028 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8029 | case "$ac_file" in |
| 8030 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
| 8031 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
| 8032 | *) ac_file_in="${ac_file}.in" ;; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8033 | esac |
| 8034 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8035 | echo creating $ac_file |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 8036 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8037 | rm -f conftest.frag conftest.in conftest.out |
| 8038 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
| 8039 | cat $ac_file_inputs > conftest.in |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8040 | |
| 8041 | EOF |
| 8042 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8043 | # Transform confdefs.h into a sed script conftest.vals that substitutes |
| 8044 | # the proper values into config.h.in to produce config.h. And first: |
| 8045 | # Protect against being on the right side of a sed subst in config.status. |
| 8046 | # Protect against being in an unquoted here document in config.status. |
| 8047 | rm -f conftest.vals |
| 8048 | cat > conftest.hdr <<\EOF |
| 8049 | s/[\\&%]/\\&/g |
| 8050 | s%[\\$`]%\\&%g |
| 8051 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp |
| 8052 | s%ac_d%ac_u%gp |
| 8053 | s%ac_u%ac_e%gp |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8054 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8055 | sed -n -f conftest.hdr confdefs.h > conftest.vals |
| 8056 | rm -f conftest.hdr |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8057 | |
| 8058 | # This sed command replaces #undef with comments. This is necessary, for |
| 8059 | # example, in the case of _POSIX_SOURCE, which is predefined and required |
| 8060 | # on some systems where configure will not decide to define it. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8061 | cat >> conftest.vals <<\EOF |
| 8062 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8063 | EOF |
| 8064 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8065 | # Break up conftest.vals because some shells have a limit on |
| 8066 | # 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] | 8067 | |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 8068 | rm -f conftest.tail |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8069 | while : |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 8070 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8071 | ac_lines=`grep -c . conftest.vals` |
| 8072 | # grep -c gives empty output for an empty file on some AIX systems. |
| 8073 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi |
| 8074 | # Write a limited-size here document to conftest.frag. |
| 8075 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS |
| 8076 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 8077 | echo 'CEOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8078 | sed -f conftest.frag conftest.in > conftest.out |
| 8079 | rm -f conftest.in |
| 8080 | mv conftest.out conftest.in |
| 8081 | ' >> $CONFIG_STATUS |
| 8082 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail |
| 8083 | rm -f conftest.vals |
| 8084 | mv conftest.tail conftest.vals |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 8085 | done |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8086 | rm -f conftest.vals |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 8087 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8088 | cat >> $CONFIG_STATUS <<\EOF |
| 8089 | rm -f conftest.frag conftest.h |
| 8090 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h |
| 8091 | cat conftest.in >> conftest.h |
| 8092 | rm -f conftest.in |
| 8093 | if cmp -s $ac_file conftest.h 2>/dev/null; then |
| 8094 | echo "$ac_file is unchanged" |
| 8095 | rm -f conftest.h |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 8096 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8097 | # Remove last slash and all that follows it. Not all systems have dirname. |
| 8098 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 8099 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8100 | # The file is in a subdirectory. |
| 8101 | test ! -d "$ac_dir" && mkdir "$ac_dir" |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 8102 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8103 | rm -f $ac_file |
| 8104 | mv conftest.h $ac_file |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 8105 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8106 | fi; done |
| 8107 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 8108 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8109 | cat >> $CONFIG_STATUS <<EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 8110 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8111 | EOF |
| 8112 | cat >> $CONFIG_STATUS <<\EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 8113 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8114 | exit 0 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 8115 | EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8116 | chmod +x $CONFIG_STATUS |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8117 | rm -fr confdefs* $ac_clean_files |
| 8118 | 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] | 8119 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 8120 | |
| 8121 | echo "creating Setup" |
| 8122 | if test ! -f Modules/Setup |
| 8123 | then |
| 8124 | cp $srcdir/Modules/Setup.dist Modules/Setup |
| 8125 | fi |
| 8126 | |
| 8127 | echo "creating Setup.local" |
| 8128 | if test ! -f Modules/Setup.local |
| 8129 | then |
| 8130 | echo "# Edit this file for local setup changes" >Modules/Setup.local |
| 8131 | fi |
| 8132 | |
| 8133 | echo "creating Makefile" |
| 8134 | $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \ |
| 8135 | -s Modules Modules/Setup.config \ |
Neil Schemenauer | f8b71c5 | 2001-04-21 17:41:16 +0000 | [diff] [blame] | 8136 | Modules/Setup.local Modules/Setup |
Neil Schemenauer | c761fc8 | 2001-02-19 04:50:49 +0000 | [diff] [blame] | 8137 | mv config.c Modules |