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 | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 3 | # From configure.in Revision: 1.301 |
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 | 57c9a663 | 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 | 57c9a663 | 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 | c0d24d8b | 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 | c0d24d8b | 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 | c0d24d8b | 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 | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3748 | |
| 3749 | if test "$with_threads" = "no" |
| 3750 | then |
| 3751 | USE_THREAD_MODULE="#" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3752 | elif test "$ac_cv_pthread_is_default" = yes |
| 3753 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3754 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3755 | #define WITH_THREAD 1 |
| 3756 | EOF |
| 3757 | |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3758 | # Defining _REENTRANT on system with POSIX threads should not hurt. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3759 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3760 | #define _REENTRANT 1 |
| 3761 | EOF |
| 3762 | |
| 3763 | posix_threads=yes |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3764 | LIBOBJS="$LIBOBJS thread.o" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3765 | elif test "$ac_cv_kpthread" = "yes" |
| 3766 | then |
| 3767 | CC="$CC -Kpthread" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3768 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 3769 | #define WITH_THREAD 1 |
| 3770 | EOF |
| 3771 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 3772 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3773 | LIBOBJS="$LIBOBJS thread.o" |
| 3774 | else |
| 3775 | if test ! -z "$with_threads" -a -d "$with_threads" |
| 3776 | then LDFLAGS="$LDFLAGS -L$with_threads" |
| 3777 | fi |
| 3778 | if test ! -z "$withval" -a -d "$withval" |
| 3779 | then LDFLAGS="$LDFLAGS -L$withval" |
| 3780 | fi |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3781 | |
| 3782 | # According to the POSIX spec, a pthreads implementation must |
| 3783 | # 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] | 3784 | echo $ac_n "checking for _POSIX_THREADS in unistd.h""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 3785 | echo "configure:3786: checking for _POSIX_THREADS in unistd.h" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3786 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 3787 | #line 3788 "configure" |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3788 | #include "confdefs.h" |
| 3789 | #include <unistd.h> |
| 3790 | #ifdef _POSIX_THREADS |
| 3791 | yes |
| 3792 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3793 | |
| 3794 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3795 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 3796 | egrep "yes" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3797 | rm -rf conftest* |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3798 | unistd_defines_pthreads=yes |
| 3799 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3800 | rm -rf conftest* |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3801 | unistd_defines_pthreads=no |
| 3802 | fi |
| 3803 | rm -f conftest* |
| 3804 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3805 | echo "$ac_t""$unistd_defines_pthreads" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3806 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3807 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9caf77a | 1996-08-01 00:52:26 +0000 | [diff] [blame] | 3808 | #define _REENTRANT 1 |
| 3809 | EOF |
| 3810 | |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3811 | ac_safe=`echo "cthreads.h" | sed 'y%./+-%__p_%'` |
| 3812 | echo $ac_n "checking for cthreads.h""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 3813 | echo "configure:3814: checking for cthreads.h" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3814 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 3815 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3816 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3817 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 3818 | #line 3819 "configure" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3819 | #include "confdefs.h" |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3820 | #include <cthreads.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3821 | EOF |
| 3822 | 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^] | 3823 | { (eval echo configure:3824: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3824 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 3825 | if test -z "$ac_err"; then |
| 3826 | rm -rf conftest* |
| 3827 | eval "ac_cv_header_$ac_safe=yes" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3828 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3829 | echo "$ac_err" >&5 |
| 3830 | echo "configure: failed program was:" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3831 | cat conftest.$ac_ext >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3832 | rm -rf conftest* |
| 3833 | eval "ac_cv_header_$ac_safe=no" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3834 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3835 | rm -f conftest* |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3836 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3837 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 3838 | echo "$ac_t""yes" 1>&6 |
| 3839 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3840 | #define WITH_THREAD 1 |
| 3841 | EOF |
| 3842 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3843 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3844 | #define C_THREADS 1 |
| 3845 | EOF |
| 3846 | |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3847 | cat >> confdefs.h <<\EOF |
| 3848 | #define HURD_C_THREADS 1 |
| 3849 | EOF |
| 3850 | |
| 3851 | LIBS="$LIBS -lthreads" |
| 3852 | LIBOBJS="$LIBOBJS thread.o" |
| 3853 | else |
| 3854 | echo "$ac_t""no" 1>&6 |
| 3855 | |
| 3856 | ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'` |
| 3857 | echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 3858 | echo "configure:3859: checking for mach/cthreads.h" >&5 |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3859 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 3860 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3861 | else |
| 3862 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 3863 | #line 3864 "configure" |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3864 | #include "confdefs.h" |
| 3865 | #include <mach/cthreads.h> |
| 3866 | EOF |
| 3867 | 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^] | 3868 | { (eval echo configure:3869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3869 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 3870 | if test -z "$ac_err"; then |
| 3871 | rm -rf conftest* |
| 3872 | eval "ac_cv_header_$ac_safe=yes" |
| 3873 | else |
| 3874 | echo "$ac_err" >&5 |
| 3875 | echo "configure: failed program was:" >&5 |
| 3876 | cat conftest.$ac_ext >&5 |
| 3877 | rm -rf conftest* |
| 3878 | eval "ac_cv_header_$ac_safe=no" |
| 3879 | fi |
| 3880 | rm -f conftest* |
| 3881 | fi |
| 3882 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 3883 | echo "$ac_t""yes" 1>&6 |
| 3884 | cat >> confdefs.h <<\EOF |
| 3885 | #define WITH_THREAD 1 |
| 3886 | EOF |
| 3887 | |
| 3888 | cat >> confdefs.h <<\EOF |
| 3889 | #define C_THREADS 1 |
| 3890 | EOF |
| 3891 | |
| 3892 | cat >> confdefs.h <<\EOF |
| 3893 | #define MACH_C_THREADS 1 |
| 3894 | EOF |
| 3895 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3896 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3897 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3898 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3899 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3900 | echo $ac_n "checking for --with-pth""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 3901 | echo "configure:3902: checking for --with-pth" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3902 | # Check whether --with-pth or --without-pth was given. |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3903 | if test "${with_pth+set}" = set; then |
| 3904 | withval="$with_pth" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3905 | |
| 3906 | echo "$ac_t""$withval" 1>&6 |
| 3907 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3908 | #define WITH_THREAD 1 |
| 3909 | EOF |
| 3910 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3911 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3912 | #define HAVE_PTH 1 |
| 3913 | EOF |
| 3914 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3915 | LIBS="-lpth $LIBS" |
| 3916 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3917 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3918 | |
| 3919 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3920 | |
| 3921 | # Just looking for pthread_create in libpthread is not enough: |
| 3922 | # on HP/UX, pthread.h renames pthread_create to a different symbol name. |
| 3923 | # So we really have to include pthread.h, and then link. |
| 3924 | _libs=$LIBS |
| 3925 | LIBS="$LIBS -lpthread" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3926 | echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 3927 | echo "configure:3928: checking for pthread_create in -lpthread" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3928 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 3929 | #line 3930 "configure" |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3930 | #include "confdefs.h" |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3931 | #include <pthread.h> |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3932 | |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3933 | void * start_routine (void *arg) { exit (0); } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3934 | int main() { |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3935 | |
| 3936 | pthread_create (NULL, NULL, start_routine, NULL) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3937 | ; return 0; } |
| 3938 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 3939 | if { (eval echo configure:3940: \"$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] | 3940 | rm -rf conftest* |
| 3941 | |
| 3942 | echo "$ac_t""yes" 1>&6 |
| 3943 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3944 | #define WITH_THREAD 1 |
| 3945 | EOF |
| 3946 | |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3947 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3948 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3949 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3950 | echo "configure: failed program was:" >&5 |
| 3951 | cat conftest.$ac_ext >&5 |
| 3952 | rm -rf conftest* |
| 3953 | |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3954 | LIBS=$_libs |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3955 | echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 3956 | echo "configure:3957: checking for pthread_detach" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3957 | if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then |
| 3958 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3959 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3960 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 3961 | #line 3962 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3962 | #include "confdefs.h" |
| 3963 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3964 | which can conflict with char pthread_detach(); below. */ |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3965 | #include <assert.h> |
| 3966 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3967 | /* 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] | 3968 | builtin and then its argument prototype would still apply. */ |
| 3969 | char pthread_detach(); |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3970 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3971 | int main() { |
| 3972 | |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3973 | /* The GNU C library defines this for functions which it implements |
| 3974 | to always fail with ENOSYS. Some functions are actually named |
| 3975 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3976 | #if defined (__stub_pthread_detach) || defined (__stub___pthread_detach) |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3977 | choke me |
| 3978 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3979 | pthread_detach(); |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3980 | #endif |
| 3981 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3982 | ; return 0; } |
| 3983 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 3984 | if { (eval echo configure:3985: \"$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] | 3985 | rm -rf conftest* |
| 3986 | eval "ac_cv_func_pthread_detach=yes" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3987 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3988 | echo "configure: failed program was:" >&5 |
| 3989 | cat conftest.$ac_ext >&5 |
| 3990 | rm -rf conftest* |
| 3991 | eval "ac_cv_func_pthread_detach=no" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3992 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3993 | rm -f conftest* |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3994 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3995 | |
| 3996 | if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then |
| 3997 | echo "$ac_t""yes" 1>&6 |
| 3998 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3999 | #define WITH_THREAD 1 |
| 4000 | EOF |
| 4001 | |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4002 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4003 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 4004 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4005 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 4006 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4007 | ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'` |
| 4008 | echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4009 | echo "configure:4010: checking for kernel/OS.h" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4010 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 4011 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 4012 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4013 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4014 | #line 4015 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 4015 | #include "confdefs.h" |
| 4016 | #include <kernel/OS.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4017 | EOF |
| 4018 | 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^] | 4019 | { (eval echo configure:4020: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4020 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 4021 | if test -z "$ac_err"; then |
| 4022 | rm -rf conftest* |
| 4023 | eval "ac_cv_header_$ac_safe=yes" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 4024 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4025 | echo "$ac_err" >&5 |
| 4026 | echo "configure: failed program was:" >&5 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 4027 | cat conftest.$ac_ext >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4028 | rm -rf conftest* |
| 4029 | eval "ac_cv_header_$ac_safe=no" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 4030 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4031 | rm -f conftest* |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 4032 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4033 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 4034 | echo "$ac_t""yes" 1>&6 |
| 4035 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 4036 | #define WITH_THREAD 1 |
| 4037 | EOF |
| 4038 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4039 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 4040 | #define BEOS_THREADS 1 |
| 4041 | EOF |
| 4042 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4043 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 4044 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4045 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 4046 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4047 | echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4048 | echo "configure:4049: checking for pthread_create in -lpthreads" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4049 | ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'` |
| 4050 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 4051 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4052 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4053 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4054 | LIBS="-lpthreads $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4055 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4056 | #line 4057 "configure" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4057 | #include "confdefs.h" |
| 4058 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4059 | /* 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] | 4060 | builtin and then its argument prototype would still apply. */ |
| 4061 | char pthread_create(); |
| 4062 | |
| 4063 | int main() { |
| 4064 | pthread_create() |
| 4065 | ; return 0; } |
| 4066 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4067 | if { (eval echo configure:4068: \"$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] | 4068 | rm -rf conftest* |
| 4069 | eval "ac_cv_lib_$ac_lib_var=yes" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4070 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4071 | echo "configure: failed program was:" >&5 |
| 4072 | cat conftest.$ac_ext >&5 |
| 4073 | rm -rf conftest* |
| 4074 | eval "ac_cv_lib_$ac_lib_var=no" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4075 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4076 | rm -f conftest* |
| 4077 | LIBS="$ac_save_LIBS" |
| 4078 | |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4079 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4080 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4081 | echo "$ac_t""yes" 1>&6 |
| 4082 | cat >> confdefs.h <<\EOF |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4083 | #define WITH_THREAD 1 |
| 4084 | EOF |
| 4085 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4086 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4087 | LIBS="$LIBS -lpthreads" |
| 4088 | LIBOBJS="$LIBOBJS thread.o" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4089 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4090 | echo "$ac_t""no" 1>&6 |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4091 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4092 | echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4093 | echo "configure:4094: checking for pthread_create in -lc_r" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4094 | ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` |
| 4095 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 4096 | echo $ac_n "(cached) $ac_c" 1>&6 |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4097 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4098 | ac_save_LIBS="$LIBS" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4099 | LIBS="-lc_r $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4100 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4101 | #line 4102 "configure" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4102 | #include "confdefs.h" |
| 4103 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4104 | /* 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] | 4105 | builtin and then its argument prototype would still apply. */ |
| 4106 | char pthread_create(); |
| 4107 | |
| 4108 | int main() { |
| 4109 | pthread_create() |
| 4110 | ; return 0; } |
| 4111 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4112 | if { (eval echo configure:4113: \"$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] | 4113 | rm -rf conftest* |
| 4114 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4115 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4116 | echo "configure: failed program was:" >&5 |
| 4117 | cat conftest.$ac_ext >&5 |
| 4118 | rm -rf conftest* |
| 4119 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4120 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4121 | rm -f conftest* |
| 4122 | LIBS="$ac_save_LIBS" |
| 4123 | |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4124 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4125 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4126 | echo "$ac_t""yes" 1>&6 |
| 4127 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4128 | #define WITH_THREAD 1 |
| 4129 | EOF |
| 4130 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4131 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4132 | LIBS="$LIBS -lc_r" |
| 4133 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4134 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4135 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4136 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4137 | echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4138 | echo "configure:4139: checking for __d6_pthread_create in -lthread" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4139 | ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'` |
| 4140 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 4141 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4142 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4143 | ac_save_LIBS="$LIBS" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4144 | LIBS="-lthread $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4145 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4146 | #line 4147 "configure" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4147 | #include "confdefs.h" |
| 4148 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4149 | /* 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] | 4150 | builtin and then its argument prototype would still apply. */ |
| 4151 | char __d6_pthread_create(); |
| 4152 | |
| 4153 | int main() { |
| 4154 | __d6_pthread_create() |
| 4155 | ; return 0; } |
| 4156 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4157 | if { (eval echo configure:4158: \"$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] | 4158 | rm -rf conftest* |
| 4159 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4160 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4161 | echo "configure: failed program was:" >&5 |
| 4162 | cat conftest.$ac_ext >&5 |
| 4163 | rm -rf conftest* |
| 4164 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4165 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4166 | rm -f conftest* |
| 4167 | LIBS="$ac_save_LIBS" |
| 4168 | |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4169 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4170 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4171 | echo "$ac_t""yes" 1>&6 |
| 4172 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4173 | #define WITH_THREAD 1 |
| 4174 | EOF |
| 4175 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4176 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4177 | LIBS="$LIBS -lthread" |
| 4178 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4179 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4180 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4181 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4182 | echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4183 | echo "configure:4184: checking for __pthread_create_system in -lpthread" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4184 | ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'` |
| 4185 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 4186 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4187 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4188 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4189 | LIBS="-lpthread $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4190 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4191 | #line 4192 "configure" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4192 | #include "confdefs.h" |
| 4193 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4194 | /* 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] | 4195 | builtin and then its argument prototype would still apply. */ |
| 4196 | char __pthread_create_system(); |
| 4197 | |
| 4198 | int main() { |
| 4199 | __pthread_create_system() |
| 4200 | ; return 0; } |
| 4201 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4202 | if { (eval echo configure:4203: \"$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] | 4203 | rm -rf conftest* |
| 4204 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4205 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4206 | echo "configure: failed program was:" >&5 |
| 4207 | cat conftest.$ac_ext >&5 |
| 4208 | rm -rf conftest* |
| 4209 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4210 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4211 | rm -f conftest* |
| 4212 | LIBS="$ac_save_LIBS" |
| 4213 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4214 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4215 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4216 | echo "$ac_t""yes" 1>&6 |
| 4217 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4218 | #define WITH_THREAD 1 |
| 4219 | EOF |
| 4220 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4221 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4222 | LIBS="$LIBS -lpthread" |
| 4223 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4224 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4225 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4226 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4227 | echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4228 | echo "configure:4229: checking for pthread_create in -lcma" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4229 | ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'` |
| 4230 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 4231 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4232 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4233 | ac_save_LIBS="$LIBS" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4234 | LIBS="-lcma $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4235 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4236 | #line 4237 "configure" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4237 | #include "confdefs.h" |
| 4238 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4239 | /* 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] | 4240 | builtin and then its argument prototype would still apply. */ |
| 4241 | char pthread_create(); |
| 4242 | |
| 4243 | int main() { |
| 4244 | pthread_create() |
| 4245 | ; return 0; } |
| 4246 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4247 | if { (eval echo configure:4248: \"$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] | 4248 | rm -rf conftest* |
| 4249 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4250 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4251 | echo "configure: failed program was:" >&5 |
| 4252 | cat conftest.$ac_ext >&5 |
| 4253 | rm -rf conftest* |
| 4254 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4255 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4256 | rm -f conftest* |
| 4257 | LIBS="$ac_save_LIBS" |
| 4258 | |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4259 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4260 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4261 | echo "$ac_t""yes" 1>&6 |
| 4262 | cat >> confdefs.h <<\EOF |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4263 | #define WITH_THREAD 1 |
| 4264 | EOF |
| 4265 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4266 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4267 | LIBS="$LIBS -lcma" |
| 4268 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4269 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4270 | echo "$ac_t""no" 1>&6 |
Thomas Wouters | 0db2b2b | 2000-08-26 11:33:43 +0000 | [diff] [blame] | 4271 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4272 | USE_THREAD_MODULE="#" |
Guido van Rossum | 2d38f91 | 1996-06-26 19:47:01 +0000 | [diff] [blame] | 4273 | fi |
| 4274 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4275 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4276 | fi |
| 4277 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 4278 | fi |
| 4279 | |
Guido van Rossum | 0be3e49 | 1997-05-22 20:33:33 +0000 | [diff] [blame] | 4280 | fi |
| 4281 | |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4282 | fi |
| 4283 | |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4284 | fi |
| 4285 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 4286 | fi |
| 4287 | |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 4288 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4289 | rm -f conftest* |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4290 | fi |
| 4291 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4292 | fi |
| 4293 | |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 4294 | fi |
| 4295 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4296 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4297 | if test "$posix_threads" = "yes"; then |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4298 | if test "$unistd_defines_pthreads" = "no"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4299 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4300 | #define _POSIX_THREADS 1 |
| 4301 | EOF |
| 4302 | |
| 4303 | fi |
| 4304 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4305 | echo $ac_n "checking if PTHREAD_SCOPE_SYSTEM is supported""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4306 | echo "configure:4307: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4307 | if eval "test \"`echo '$''{'ac_cv_pthread_system_supported'+set}'`\" = set"; then |
| 4308 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4309 | else |
| 4310 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 4311 | ac_cv_pthread_system_supported=no |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4312 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4313 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4314 | #line 4315 "configure" |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4315 | #include "confdefs.h" |
| 4316 | #include <pthread.h> |
| 4317 | void *foo(void *parm) { |
| 4318 | return NULL; |
| 4319 | } |
| 4320 | main() { |
| 4321 | pthread_attr_t attr; |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame] | 4322 | pthread_t id; |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4323 | if (pthread_attr_init(&attr)) exit(-1); |
| 4324 | if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1); |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame] | 4325 | if (pthread_create(&id, &attr, foo, NULL)) exit(-1); |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4326 | exit(0); |
| 4327 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4328 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4329 | if { (eval echo configure:4330: \"$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] | 4330 | then |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4331 | ac_cv_pthread_system_supported=yes |
| 4332 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4333 | echo "configure: failed program was:" >&5 |
| 4334 | cat conftest.$ac_ext >&5 |
| 4335 | rm -fr conftest* |
| 4336 | ac_cv_pthread_system_supported=no |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4337 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4338 | rm -fr conftest* |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4339 | fi |
| 4340 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4341 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4342 | fi |
| 4343 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4344 | echo "$ac_t""$ac_cv_pthread_system_supported" 1>&6 |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4345 | if test "$ac_cv_pthread_system_supported" = "yes"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4346 | cat >> confdefs.h <<\EOF |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4347 | #define PTHREAD_SYSTEM_SCHED_SUPPORTED 1 |
| 4348 | EOF |
| 4349 | |
| 4350 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4351 | for ac_func in pthread_sigmask |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4352 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4353 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4354 | echo "configure:4355: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4355 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 4356 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4357 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4358 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4359 | #line 4360 "configure" |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4360 | #include "confdefs.h" |
| 4361 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4362 | which can conflict with char $ac_func(); below. */ |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4363 | #include <assert.h> |
| 4364 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4365 | /* 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] | 4366 | builtin and then its argument prototype would still apply. */ |
| 4367 | char $ac_func(); |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4368 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4369 | int main() { |
| 4370 | |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4371 | /* The GNU C library defines this for functions which it implements |
| 4372 | to always fail with ENOSYS. Some functions are actually named |
| 4373 | something starting with __ and the normal name is an alias. */ |
| 4374 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 4375 | choke me |
| 4376 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4377 | $ac_func(); |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4378 | #endif |
| 4379 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4380 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 4381 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4382 | if { (eval echo configure:4383: \"$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] | 4383 | rm -rf conftest* |
| 4384 | eval "ac_cv_func_$ac_func=yes" |
| 4385 | else |
| 4386 | echo "configure: failed program was:" >&5 |
| 4387 | cat conftest.$ac_ext >&5 |
| 4388 | rm -rf conftest* |
| 4389 | eval "ac_cv_func_$ac_func=no" |
| 4390 | fi |
| 4391 | rm -f conftest* |
| 4392 | fi |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4393 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4394 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4395 | echo "$ac_t""yes" 1>&6 |
| 4396 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4397 | cat >> confdefs.h <<EOF |
| 4398 | #define $ac_tr_func 1 |
| 4399 | EOF |
| 4400 | |
| 4401 | else |
| 4402 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4403 | fi |
| 4404 | done |
| 4405 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4406 | fi |
| 4407 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4408 | echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4409 | echo "configure:4410: checking for usconfig in -lmpc" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4410 | ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'` |
| 4411 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 4412 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4413 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4414 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4415 | LIBS="-lmpc $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4416 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4417 | #line 4418 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4418 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4419 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4420 | /* 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] | 4421 | builtin and then its argument prototype would still apply. */ |
| 4422 | char usconfig(); |
| 4423 | |
| 4424 | int main() { |
| 4425 | usconfig() |
| 4426 | ; return 0; } |
| 4427 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4428 | if { (eval echo configure:4429: \"$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] | 4429 | rm -rf conftest* |
| 4430 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4431 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4432 | echo "configure: failed program was:" >&5 |
| 4433 | cat conftest.$ac_ext >&5 |
| 4434 | rm -rf conftest* |
| 4435 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4436 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4437 | rm -f conftest* |
| 4438 | LIBS="$ac_save_LIBS" |
| 4439 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4440 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4441 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4442 | echo "$ac_t""yes" 1>&6 |
| 4443 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4444 | #define WITH_THREAD 1 |
| 4445 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4446 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4447 | LIBS="$LIBS -lmpc" |
| 4448 | LIBOBJS="$LIBOBJS thread.o" |
| 4449 | USE_THREAD_MODULE="" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4450 | else |
| 4451 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4452 | fi |
| 4453 | |
Martin v. Löwis | 3d2b549 | 2002-03-15 13:48:21 +0000 | [diff] [blame] | 4454 | |
| 4455 | if test $posix_threads != "yes"; then |
| 4456 | echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4457 | echo "configure:4458: checking for thr_create in -lthread" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4458 | ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'` |
| 4459 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 4460 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4461 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4462 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4463 | LIBS="-lthread $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4464 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4465 | #line 4466 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4466 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4467 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4468 | /* 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] | 4469 | builtin and then its argument prototype would still apply. */ |
| 4470 | char thr_create(); |
| 4471 | |
| 4472 | int main() { |
| 4473 | thr_create() |
| 4474 | ; return 0; } |
| 4475 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4476 | if { (eval echo configure:4477: \"$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] | 4477 | rm -rf conftest* |
| 4478 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4479 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4480 | echo "configure: failed program was:" >&5 |
| 4481 | cat conftest.$ac_ext >&5 |
| 4482 | rm -rf conftest* |
| 4483 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4484 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4485 | rm -f conftest* |
| 4486 | LIBS="$ac_save_LIBS" |
| 4487 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4488 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4489 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4490 | echo "$ac_t""yes" 1>&6 |
| 4491 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4492 | #define WITH_THREAD 1 |
| 4493 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4494 | |
Martin v. Löwis | 3d2b549 | 2002-03-15 13:48:21 +0000 | [diff] [blame] | 4495 | LIBS="$LIBS -lthread" |
| 4496 | LIBOBJS="$LIBOBJS thread.o" |
| 4497 | USE_THREAD_MODULE="" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4498 | else |
| 4499 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4500 | fi |
| 4501 | |
Martin v. Löwis | 3d2b549 | 2002-03-15 13:48:21 +0000 | [diff] [blame] | 4502 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4503 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4504 | if test "$USE_THREAD_MODULE" != "#" |
| 4505 | then |
| 4506 | # If the above checks didn't disable threads, (at least) OSF1 |
| 4507 | # needs this '-threads' argument during linking. |
| 4508 | case $ac_sys_system in |
| 4509 | OSF1) LDLAST=-threads;; |
| 4510 | esac |
Jeremy Hylton | 1a2ca86 | 2000-10-16 16:59:12 +0000 | [diff] [blame] | 4511 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4512 | fi |
| 4513 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4514 | # Check for enable-ipv6 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4515 | echo $ac_n "checking if --enable-ipv6 is specified""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4516 | echo "configure:4517: checking if --enable-ipv6 is specified" >&5 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4517 | # Check whether --enable-ipv6 or --disable-ipv6 was given. |
| 4518 | if test "${enable_ipv6+set}" = set; then |
| 4519 | enableval="$enable_ipv6" |
| 4520 | case "$enableval" in |
| 4521 | no) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4522 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4523 | ipv6=no |
| 4524 | ;; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4525 | *) echo "$ac_t""yes" 1>&6 |
| 4526 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4527 | #define ENABLE_IPV6 1 |
| 4528 | EOF |
| 4529 | |
| 4530 | ipv6=yes |
| 4531 | ;; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4532 | esac |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4533 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4534 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4535 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4536 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4537 | ipv6=no |
| 4538 | |
| 4539 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4540 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4541 | #line 4542 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4542 | #include "confdefs.h" |
| 4543 | /* AF_INET6 available check */ |
| 4544 | #include <sys/types.h> |
| 4545 | #include <sys/socket.h> |
| 4546 | main() |
| 4547 | { |
| 4548 | if (socket(AF_INET6, SOCK_STREAM, 0) < 0) |
| 4549 | exit(1); |
| 4550 | else |
| 4551 | exit(0); |
| 4552 | } |
| 4553 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4554 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4555 | if { (eval echo configure:4556: \"$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] | 4556 | then |
| 4557 | echo "$ac_t""yes" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4558 | ipv6=yes |
| 4559 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4560 | echo "configure: failed program was:" >&5 |
| 4561 | cat conftest.$ac_ext >&5 |
| 4562 | rm -fr conftest* |
| 4563 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4564 | ipv6=no |
| 4565 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4566 | rm -fr conftest* |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4567 | fi |
| 4568 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4569 | |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4570 | if test "$ipv6" = "yes"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4571 | echo $ac_n "checking if RFC2553 API is available""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4572 | echo "configure:4573: checking if RFC2553 API is available" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4573 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4574 | #line 4575 "configure" |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4575 | #include "confdefs.h" |
| 4576 | #include <sys/types.h> |
| 4577 | #include <netinet/in.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4578 | int main() { |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4579 | struct sockaddr_in6 x; |
| 4580 | x.sin6_scope_id; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4581 | ; return 0; } |
| 4582 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4583 | if { (eval echo configure:4584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4584 | rm -rf conftest* |
| 4585 | echo "$ac_t""yes" 1>&6 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4586 | ipv6=yes |
| 4587 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4588 | echo "configure: failed program was:" >&5 |
| 4589 | cat conftest.$ac_ext >&5 |
| 4590 | rm -rf conftest* |
| 4591 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4592 | ipv6=no |
| 4593 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4594 | rm -f conftest* |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4595 | fi |
| 4596 | |
| 4597 | if test "$ipv6" = "yes"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4598 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4599 | #define ENABLE_IPV6 1 |
| 4600 | EOF |
| 4601 | |
| 4602 | fi |
| 4603 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4604 | fi |
| 4605 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4606 | |
| 4607 | ipv6type=unknown |
| 4608 | ipv6lib=none |
| 4609 | ipv6trylibc=no |
| 4610 | |
| 4611 | if test "$ipv6" = "yes"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4612 | echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4613 | echo "configure:4614: checking ipv6 stack type" >&5 |
Guido van Rossum | b855216 | 2001-09-05 14:58:11 +0000 | [diff] [blame] | 4614 | for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta; |
| 4615 | do |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4616 | case $i in |
| 4617 | inria) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4618 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4619 | #line 4620 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4620 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4621 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4622 | #include <netinet/in.h> |
| 4623 | #ifdef IPV6_INRIA_VERSION |
| 4624 | yes |
| 4625 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4626 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4627 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4628 | egrep "yes" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4629 | rm -rf conftest* |
Martin v. Löwis | 44ddbde | 2001-12-02 10:15:37 +0000 | [diff] [blame] | 4630 | ipv6type=$i |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4631 | fi |
| 4632 | rm -f conftest* |
| 4633 | |
| 4634 | ;; |
| 4635 | kame) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4636 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4637 | #line 4638 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4638 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4639 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4640 | #include <netinet/in.h> |
| 4641 | #ifdef __KAME__ |
| 4642 | yes |
| 4643 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4644 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4645 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4646 | egrep "yes" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4647 | rm -rf conftest* |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4648 | ipv6type=$i; |
| 4649 | ipv6lib=inet6 |
| 4650 | ipv6libdir=/usr/local/v6/lib |
| 4651 | ipv6trylibc=yes |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4652 | fi |
| 4653 | rm -f conftest* |
| 4654 | |
| 4655 | ;; |
| 4656 | linux-glibc) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4657 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4658 | #line 4659 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4659 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4660 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4661 | #include <features.h> |
| 4662 | #if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)) |
| 4663 | yes |
| 4664 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4665 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4666 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4667 | egrep "yes" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4668 | rm -rf conftest* |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4669 | ipv6type=$i; |
| 4670 | ipv6trylibc=yes |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4671 | fi |
| 4672 | rm -f conftest* |
| 4673 | |
| 4674 | ;; |
| 4675 | linux-inet6) |
| 4676 | if test -d /usr/inet6; then |
| 4677 | ipv6type=$i |
| 4678 | ipv6lib=inet6 |
| 4679 | ipv6libdir=/usr/inet6/lib |
Martin v. Löwis | 44ddbde | 2001-12-02 10:15:37 +0000 | [diff] [blame] | 4680 | OPT="-I/usr/inet6/include $OPT" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4681 | fi |
| 4682 | ;; |
| 4683 | solaris) |
| 4684 | if test -f /etc/netconfig; then |
| 4685 | if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then |
| 4686 | ipv6type=$i |
| 4687 | ipv6trylibc=yes |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4688 | fi |
| 4689 | fi |
| 4690 | ;; |
| 4691 | toshiba) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4692 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4693 | #line 4694 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4694 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4695 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4696 | #include <sys/param.h> |
| 4697 | #ifdef _TOSHIBA_INET6 |
| 4698 | yes |
| 4699 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4700 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4701 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4702 | egrep "yes" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4703 | rm -rf conftest* |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4704 | ipv6type=$i; |
| 4705 | ipv6lib=inet6; |
Martin v. Löwis | 44ddbde | 2001-12-02 10:15:37 +0000 | [diff] [blame] | 4706 | ipv6libdir=/usr/local/v6/lib |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4707 | fi |
| 4708 | rm -f conftest* |
| 4709 | |
| 4710 | ;; |
| 4711 | v6d) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4712 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4713 | #line 4714 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4714 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4715 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4716 | #include </usr/local/v6/include/sys/v6config.h> |
| 4717 | #ifdef __V6D__ |
| 4718 | yes |
| 4719 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4720 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4721 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4722 | egrep "yes" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4723 | rm -rf conftest* |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4724 | ipv6type=$i; |
| 4725 | ipv6lib=v6; |
| 4726 | ipv6libdir=/usr/local/v6/lib; |
| 4727 | OPT="-I/usr/local/v6/include $OPT" |
| 4728 | fi |
| 4729 | rm -f conftest* |
| 4730 | |
| 4731 | ;; |
| 4732 | zeta) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4733 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4734 | #line 4735 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4735 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4736 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4737 | #include <sys/param.h> |
| 4738 | #ifdef _ZETA_MINAMI_INET6 |
| 4739 | yes |
| 4740 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4741 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4742 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4743 | egrep "yes" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4744 | rm -rf conftest* |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4745 | ipv6type=$i; |
| 4746 | ipv6lib=inet6; |
Martin v. Löwis | 44ddbde | 2001-12-02 10:15:37 +0000 | [diff] [blame] | 4747 | ipv6libdir=/usr/local/v6/lib |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4748 | fi |
| 4749 | rm -f conftest* |
| 4750 | |
| 4751 | ;; |
| 4752 | esac |
| 4753 | if test "$ipv6type" != "unknown"; then |
| 4754 | break |
| 4755 | fi |
| 4756 | done |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4757 | echo "$ac_t""$ipv6type" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4758 | fi |
| 4759 | |
| 4760 | if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then |
| 4761 | if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then |
| 4762 | LIBS="-L$ipv6libdir -l$ipv6lib $LIBS" |
| 4763 | echo "using lib$ipv6lib" |
| 4764 | else |
| 4765 | if test $ipv6trylibc = "yes"; then |
| 4766 | echo "using libc" |
| 4767 | else |
| 4768 | echo 'Fatal: no $ipv6lib library found. cannot continue.' |
| 4769 | echo "You need to fetch lib$ipv6lib.a from appropriate" |
| 4770 | echo 'ipv6 kit and compile beforehand.' |
| 4771 | exit 1 |
| 4772 | fi |
| 4773 | fi |
| 4774 | fi |
| 4775 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4776 | # Check for GC support |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4777 | echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4778 | echo "configure:4779: checking for --with-cycle-gc" >&5 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4779 | # Check whether --with-cycle-gc or --without-cycle-gc was given. |
| 4780 | if test "${with_cycle_gc+set}" = set; then |
| 4781 | withval="$with_cycle_gc" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4782 | : |
| 4783 | fi |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4784 | |
| 4785 | |
| 4786 | if test -z "$with_cycle_gc" |
| 4787 | then with_cycle_gc="yes" |
| 4788 | fi |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame] | 4789 | if test "$with_cycle_gc" != "no" |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4790 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4791 | cat >> confdefs.h <<\EOF |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4792 | #define WITH_CYCLE_GC 1 |
| 4793 | EOF |
| 4794 | |
| 4795 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4796 | echo "$ac_t""$with_cycle_gc" 1>&6 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4797 | |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 4798 | # Check for Python-specific malloc support |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4799 | echo $ac_n "checking for --with-pymalloc""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4800 | echo "configure:4801: checking for --with-pymalloc" >&5 |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 4801 | # Check whether --with-pymalloc or --without-pymalloc was given. |
| 4802 | if test "${with_pymalloc+set}" = set; then |
| 4803 | withval="$with_pymalloc" |
Neil Schemenauer | 16c2297 | 2002-03-22 15:34:49 +0000 | [diff] [blame] | 4804 | : |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4805 | fi |
| 4806 | |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 4807 | |
Neil Schemenauer | 16c2297 | 2002-03-22 15:34:49 +0000 | [diff] [blame] | 4808 | if test -z "$with_pymalloc" |
| 4809 | then with_pymalloc="yes" |
| 4810 | fi |
| 4811 | if test "$with_pymalloc" != "no" |
| 4812 | then |
| 4813 | cat >> confdefs.h <<\EOF |
| 4814 | #define WITH_PYMALLOC 1 |
| 4815 | EOF |
| 4816 | |
| 4817 | fi |
| 4818 | echo "$ac_t""$with_pymalloc" 1>&6 |
| 4819 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4820 | # Check for --with-wctype-functions |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4821 | echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4822 | echo "configure:4823: checking for --with-wctype-functions" >&5 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4823 | # Check whether --with-wctype-functions or --without-wctype-functions was given. |
| 4824 | if test "${with_wctype_functions+set}" = set; then |
| 4825 | withval="$with_wctype_functions" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4826 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4827 | if test "$withval" != no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4828 | then cat >> confdefs.h <<\EOF |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4829 | #define WANT_WCTYPE_FUNCTIONS 1 |
| 4830 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4831 | echo "$ac_t""yes" 1>&6 |
| 4832 | else echo "$ac_t""no" 1>&6 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4833 | fi |
| 4834 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4835 | echo "$ac_t""no" 1>&6 |
| 4836 | fi |
| 4837 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4838 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4839 | # -I${DLINCLDIR} is added to the compile rule for importdl.o |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4840 | |
Guido van Rossum | 98935bf | 2001-09-05 19:13:16 +0000 | [diff] [blame] | 4841 | DLINCLDIR=. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4842 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4843 | echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4844 | echo "configure:4845: checking for --with-sgi-dl" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4845 | # Check whether --with-sgi-dl or --without-sgi-dl was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4846 | if test "${with_sgi_dl+set}" = set; then |
| 4847 | withval="$with_sgi_dl" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4848 | |
| 4849 | echo "$ac_t""$withval" 1>&6 |
| 4850 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4851 | #define WITH_SGI_DL 1 |
| 4852 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4853 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4854 | DYNLOADFILE="dynload_dl.o" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4855 | dldir=$withval |
Guido van Rossum | 4095101 | 2000-10-07 16:21:27 +0000 | [diff] [blame] | 4856 | if test ! -z "$dldir" -a -d "$dldir" |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 4857 | then LDFLAGS="$LDFLAGS -L$dldir" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4858 | 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] | 4859 | fi |
| 4860 | DLINCLDIR=${dldir} |
| 4861 | LIBS="$LIBS -ldl -lmld" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4862 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4863 | echo "$ac_t""no" 1>&6 |
| 4864 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4865 | |
| 4866 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4867 | echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4868 | echo "configure:4869: checking for --with-dl-dld" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4869 | # Check whether --with-dl-dld or --without-dl-dld was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4870 | if test "${with_dl_dld+set}" = set; then |
| 4871 | withval="$with_dl_dld" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4872 | |
| 4873 | echo "$ac_t""$withval" 1>&6 |
| 4874 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4875 | #define WITH_DL_DLD 1 |
| 4876 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4877 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4878 | DYNLOADFILE="dynload_dl.o" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4879 | dldir=`echo "$withval" | sed 's/,.*//'` |
| 4880 | dlddir=`echo "$withval" | sed 's/.*,//'` |
Barry Warsaw | 7d1219d | 2000-10-05 18:45:53 +0000 | [diff] [blame] | 4881 | 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] | 4882 | then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4883 | 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] | 4884 | fi |
| 4885 | DLINCLDIR=${dldir} |
| 4886 | LIBS="$LIBS -ldl -ldld" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4887 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4888 | echo "$ac_t""no" 1>&6 |
| 4889 | fi |
| 4890 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4891 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4892 | # the dlopen() function means we might want to use dynload_shlib.o. some |
| 4893 | # 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] | 4894 | for ac_func in dlopen |
| 4895 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4896 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4897 | echo "configure:4898: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4898 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 4899 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4900 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4901 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4902 | #line 4903 "configure" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4903 | #include "confdefs.h" |
| 4904 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4905 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4906 | #include <assert.h> |
| 4907 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4908 | /* 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] | 4909 | builtin and then its argument prototype would still apply. */ |
| 4910 | char $ac_func(); |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4911 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4912 | int main() { |
| 4913 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4914 | /* The GNU C library defines this for functions which it implements |
| 4915 | to always fail with ENOSYS. Some functions are actually named |
| 4916 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4917 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4918 | choke me |
| 4919 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4920 | $ac_func(); |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4921 | #endif |
| 4922 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4923 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 4924 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4925 | if { (eval echo configure:4926: \"$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] | 4926 | rm -rf conftest* |
| 4927 | eval "ac_cv_func_$ac_func=yes" |
| 4928 | else |
| 4929 | echo "configure: failed program was:" >&5 |
| 4930 | cat conftest.$ac_ext >&5 |
| 4931 | rm -rf conftest* |
| 4932 | eval "ac_cv_func_$ac_func=no" |
| 4933 | fi |
| 4934 | rm -f conftest* |
| 4935 | fi |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4936 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4937 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4938 | echo "$ac_t""yes" 1>&6 |
| 4939 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4940 | cat >> confdefs.h <<EOF |
| 4941 | #define $ac_tr_func 1 |
| 4942 | EOF |
| 4943 | |
| 4944 | else |
| 4945 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4946 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4947 | done |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4948 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4949 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4950 | # DYNLOADFILE specifies which dynload_*.o file we will use for dynamic |
| 4951 | # loading of modules. |
| 4952 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4953 | echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4954 | echo "configure:4955: checking DYNLOADFILE" >&5 |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4955 | if test -z "$DYNLOADFILE" |
| 4956 | then |
| 4957 | case $ac_sys_system/$ac_sys_release in |
| 4958 | AIX*) DYNLOADFILE="dynload_aix.o";; |
| 4959 | BeOS*) DYNLOADFILE="dynload_beos.o";; |
| 4960 | hp*|HP*) DYNLOADFILE="dynload_hpux.o";; |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 4961 | Darwin/*) DYNLOADFILE="dynload_next.o";; |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4962 | *) |
| 4963 | # use dynload_shlib.c and dlopen() if we have it; otherwise stub |
| 4964 | # out any dynamic loading |
| 4965 | if test "$ac_cv_func_dlopen" = yes |
| 4966 | then DYNLOADFILE="dynload_shlib.o" |
| 4967 | else DYNLOADFILE="dynload_stub.o" |
| 4968 | fi |
| 4969 | ;; |
| 4970 | esac |
| 4971 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4972 | echo "$ac_t""$DYNLOADFILE" 1>&6 |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4973 | if test "$DYNLOADFILE" != "dynload_stub.o" |
| 4974 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4975 | cat >> confdefs.h <<\EOF |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4976 | #define HAVE_DYNAMIC_LOADING 1 |
| 4977 | EOF |
| 4978 | |
| 4979 | fi |
| 4980 | |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4981 | # MACHDEP_OBJS can be set to platform-specific object files needed by Python |
| 4982 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4983 | |
| 4984 | echo $ac_n "checking MACHDEP_OBJS""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 4985 | echo "configure:4986: checking MACHDEP_OBJS" >&5 |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4986 | if test -z "$MACHDEP_OBJS" |
| 4987 | then |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 4988 | MACHDEP_OBJS=$extra_machdep_objs |
| 4989 | else |
| 4990 | MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs" |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4991 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4992 | echo "$ac_t""MACHDEP_OBJS" 1>&6 |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4993 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4994 | # checks for library functions |
Martin v. Löwis | 244edc8 | 2001-10-04 22:44:26 +0000 | [diff] [blame] | 4995 | 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] | 4996 | flock fork fsync fdatasync fpathconf ftime ftruncate \ |
Martin v. Löwis | f95dd0a | 2001-08-15 17:14:33 +0000 | [diff] [blame] | 4997 | gai_strerror getgroups getlogin getpeername getpid getpwent getwd \ |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 4998 | hstrerror inet_pton kill killpg link lstat mkfifo mktime mremap \ |
Andrew M. Kuchling | 5821b77 | 2000-08-25 01:14:08 +0000 | [diff] [blame] | 4999 | nice pathconf pause plock poll pthread_init \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 5000 | putenv readlink \ |
Martin v. Löwis | 61c5edf | 2001-10-18 04:06:00 +0000 | [diff] [blame] | 5001 | select setegid seteuid setgid setgroups \ |
Martin v. Löwis | 791bfda | 2001-07-24 06:33:08 +0000 | [diff] [blame] | 5002 | setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 5003 | sigaction siginterrupt sigrelse strftime strptime symlink sysconf \ |
Fred Drake | 89143df | 1999-12-09 22:03:25 +0000 | [diff] [blame] | 5004 | tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ |
Guido van Rossum | c524d95 | 2001-10-19 01:31:59 +0000 | [diff] [blame] | 5005 | truncate uname unsetenv waitpid _getpty getpriority |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5006 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5007 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5008 | echo "configure:5009: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5009 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5010 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5011 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5012 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5013 | #line 5014 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5014 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5015 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5016 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5017 | #include <assert.h> |
| 5018 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5019 | /* 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] | 5020 | builtin and then its argument prototype would still apply. */ |
| 5021 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5022 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5023 | int main() { |
| 5024 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5025 | /* The GNU C library defines this for functions which it implements |
| 5026 | to always fail with ENOSYS. Some functions are actually named |
| 5027 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5028 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5029 | choke me |
| 5030 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5031 | $ac_func(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5032 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5033 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5034 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5035 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5036 | if { (eval echo configure:5037: \"$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] | 5037 | rm -rf conftest* |
| 5038 | eval "ac_cv_func_$ac_func=yes" |
| 5039 | else |
| 5040 | echo "configure: failed program was:" >&5 |
| 5041 | cat conftest.$ac_ext >&5 |
| 5042 | rm -rf conftest* |
| 5043 | eval "ac_cv_func_$ac_func=no" |
| 5044 | fi |
| 5045 | rm -f conftest* |
| 5046 | fi |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5047 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5048 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5049 | echo "$ac_t""yes" 1>&6 |
| 5050 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5051 | cat >> confdefs.h <<EOF |
| 5052 | #define $ac_tr_func 1 |
| 5053 | EOF |
| 5054 | |
| 5055 | else |
| 5056 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 5057 | fi |
| 5058 | done |
| 5059 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5060 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 5061 | # check for openpty and forkpty |
| 5062 | |
| 5063 | for ac_func in openpty |
| 5064 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5065 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5066 | echo "configure:5067: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5067 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5068 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 5069 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5070 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5071 | #line 5072 "configure" |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 5072 | #include "confdefs.h" |
| 5073 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5074 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 5075 | #include <assert.h> |
| 5076 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5077 | /* 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] | 5078 | builtin and then its argument prototype would still apply. */ |
| 5079 | char $ac_func(); |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 5080 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5081 | int main() { |
| 5082 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 5083 | /* The GNU C library defines this for functions which it implements |
| 5084 | to always fail with ENOSYS. Some functions are actually named |
| 5085 | something starting with __ and the normal name is an alias. */ |
| 5086 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5087 | choke me |
| 5088 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5089 | $ac_func(); |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 5090 | #endif |
| 5091 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5092 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5093 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5094 | if { (eval echo configure:5095: \"$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] | 5095 | rm -rf conftest* |
| 5096 | eval "ac_cv_func_$ac_func=yes" |
| 5097 | else |
| 5098 | echo "configure: failed program was:" >&5 |
| 5099 | cat conftest.$ac_ext >&5 |
| 5100 | rm -rf conftest* |
| 5101 | eval "ac_cv_func_$ac_func=no" |
| 5102 | fi |
| 5103 | rm -f conftest* |
| 5104 | fi |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 5105 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5106 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5107 | echo "$ac_t""yes" 1>&6 |
| 5108 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5109 | cat >> confdefs.h <<EOF |
| 5110 | #define $ac_tr_func 1 |
| 5111 | EOF |
| 5112 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 5113 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5114 | echo "$ac_t""no" 1>&6 |
| 5115 | echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5116 | echo "configure:5117: checking for openpty in -lutil" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5117 | ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'` |
| 5118 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 5119 | echo $ac_n "(cached) $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5120 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5121 | ac_save_LIBS="$LIBS" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5122 | LIBS="-lutil $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5123 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5124 | #line 5125 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5125 | #include "confdefs.h" |
| 5126 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5127 | /* 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] | 5128 | builtin and then its argument prototype would still apply. */ |
| 5129 | char openpty(); |
| 5130 | |
| 5131 | int main() { |
| 5132 | openpty() |
| 5133 | ; return 0; } |
| 5134 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5135 | if { (eval echo configure:5136: \"$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] | 5136 | rm -rf conftest* |
| 5137 | eval "ac_cv_lib_$ac_lib_var=yes" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5138 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5139 | echo "configure: failed program was:" >&5 |
| 5140 | cat conftest.$ac_ext >&5 |
| 5141 | rm -rf conftest* |
| 5142 | eval "ac_cv_lib_$ac_lib_var=no" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5143 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5144 | rm -f conftest* |
| 5145 | LIBS="$ac_save_LIBS" |
| 5146 | |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5147 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5148 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 5149 | echo "$ac_t""yes" 1>&6 |
| 5150 | cat >> confdefs.h <<\EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5151 | #define HAVE_OPENPTY 1 |
| 5152 | EOF |
| 5153 | LIBS="$LIBS -lutil" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5154 | else |
| 5155 | echo "$ac_t""no" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5156 | fi |
| 5157 | |
| 5158 | fi |
| 5159 | done |
| 5160 | |
| 5161 | for ac_func in forkpty |
| 5162 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5163 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5164 | echo "configure:5165: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5165 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5166 | echo $ac_n "(cached) $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5167 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5168 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5169 | #line 5170 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5170 | #include "confdefs.h" |
| 5171 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5172 | which can conflict with char $ac_func(); below. */ |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5173 | #include <assert.h> |
| 5174 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5175 | /* 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] | 5176 | builtin and then its argument prototype would still apply. */ |
| 5177 | char $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5178 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5179 | int main() { |
| 5180 | |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5181 | /* The GNU C library defines this for functions which it implements |
| 5182 | to always fail with ENOSYS. Some functions are actually named |
| 5183 | something starting with __ and the normal name is an alias. */ |
| 5184 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5185 | choke me |
| 5186 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5187 | $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5188 | #endif |
| 5189 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5190 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5191 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5192 | if { (eval echo configure:5193: \"$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] | 5193 | rm -rf conftest* |
| 5194 | eval "ac_cv_func_$ac_func=yes" |
| 5195 | else |
| 5196 | echo "configure: failed program was:" >&5 |
| 5197 | cat conftest.$ac_ext >&5 |
| 5198 | rm -rf conftest* |
| 5199 | eval "ac_cv_func_$ac_func=no" |
| 5200 | fi |
| 5201 | rm -f conftest* |
| 5202 | fi |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5203 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5204 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5205 | echo "$ac_t""yes" 1>&6 |
| 5206 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5207 | cat >> confdefs.h <<EOF |
| 5208 | #define $ac_tr_func 1 |
| 5209 | EOF |
| 5210 | |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5211 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5212 | echo "$ac_t""no" 1>&6 |
| 5213 | echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5214 | echo "configure:5215: checking for forkpty in -lutil" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5215 | ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'` |
| 5216 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 5217 | echo $ac_n "(cached) $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5218 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5219 | ac_save_LIBS="$LIBS" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5220 | LIBS="-lutil $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5221 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5222 | #line 5223 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5223 | #include "confdefs.h" |
| 5224 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5225 | /* 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] | 5226 | builtin and then its argument prototype would still apply. */ |
| 5227 | char forkpty(); |
| 5228 | |
| 5229 | int main() { |
| 5230 | forkpty() |
| 5231 | ; return 0; } |
| 5232 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5233 | if { (eval echo configure:5234: \"$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] | 5234 | rm -rf conftest* |
| 5235 | eval "ac_cv_lib_$ac_lib_var=yes" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5236 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5237 | echo "configure: failed program was:" >&5 |
| 5238 | cat conftest.$ac_ext >&5 |
| 5239 | rm -rf conftest* |
| 5240 | eval "ac_cv_lib_$ac_lib_var=no" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5241 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5242 | rm -f conftest* |
| 5243 | LIBS="$ac_save_LIBS" |
| 5244 | |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5245 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5246 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 5247 | echo "$ac_t""yes" 1>&6 |
| 5248 | cat >> confdefs.h <<\EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5249 | #define HAVE_FORKPTY 1 |
| 5250 | EOF |
| 5251 | LIBS="$LIBS -lutil" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5252 | else |
| 5253 | echo "$ac_t""no" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5254 | fi |
| 5255 | |
| 5256 | fi |
| 5257 | done |
| 5258 | |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5259 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5260 | # check for long file support functions |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5261 | for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs |
| 5262 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5263 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5264 | echo "configure:5265: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5265 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5266 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5267 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5268 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5269 | #line 5270 "configure" |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5270 | #include "confdefs.h" |
| 5271 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5272 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5273 | #include <assert.h> |
| 5274 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5275 | /* 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] | 5276 | builtin and then its argument prototype would still apply. */ |
| 5277 | char $ac_func(); |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5278 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5279 | int main() { |
| 5280 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5281 | /* The GNU C library defines this for functions which it implements |
| 5282 | to always fail with ENOSYS. Some functions are actually named |
| 5283 | something starting with __ and the normal name is an alias. */ |
| 5284 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5285 | choke me |
| 5286 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5287 | $ac_func(); |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5288 | #endif |
| 5289 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5290 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5291 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5292 | if { (eval echo configure:5293: \"$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] | 5293 | rm -rf conftest* |
| 5294 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5295 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5296 | echo "configure: failed program was:" >&5 |
| 5297 | cat conftest.$ac_ext >&5 |
| 5298 | rm -rf conftest* |
| 5299 | eval "ac_cv_func_$ac_func=no" |
| 5300 | fi |
| 5301 | rm -f conftest* |
| 5302 | fi |
| 5303 | |
| 5304 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5305 | echo "$ac_t""yes" 1>&6 |
| 5306 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5307 | cat >> confdefs.h <<EOF |
| 5308 | #define $ac_tr_func 1 |
| 5309 | EOF |
| 5310 | |
| 5311 | else |
| 5312 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5313 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5314 | done |
| 5315 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5316 | |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5317 | for ac_func in dup2 getcwd strdup strerror memmove |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5318 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5319 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5320 | echo "configure:5321: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5321 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5322 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5323 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5324 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5325 | #line 5326 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5326 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5327 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5328 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5329 | #include <assert.h> |
| 5330 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5331 | /* 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] | 5332 | builtin and then its argument prototype would still apply. */ |
| 5333 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5334 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5335 | int main() { |
| 5336 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5337 | /* The GNU C library defines this for functions which it implements |
| 5338 | to always fail with ENOSYS. Some functions are actually named |
| 5339 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5340 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5341 | choke me |
| 5342 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5343 | $ac_func(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5344 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5345 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5346 | ; return 0; } |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5347 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5348 | if { (eval echo configure:5349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| 5349 | rm -rf conftest* |
| 5350 | eval "ac_cv_func_$ac_func=yes" |
| 5351 | else |
| 5352 | echo "configure: failed program was:" >&5 |
| 5353 | cat conftest.$ac_ext >&5 |
| 5354 | rm -rf conftest* |
| 5355 | eval "ac_cv_func_$ac_func=no" |
| 5356 | fi |
| 5357 | rm -f conftest* |
| 5358 | fi |
| 5359 | |
| 5360 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5361 | echo "$ac_t""yes" 1>&6 |
| 5362 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5363 | cat >> confdefs.h <<EOF |
| 5364 | #define $ac_tr_func 1 |
| 5365 | EOF |
| 5366 | |
| 5367 | else |
| 5368 | echo "$ac_t""no" 1>&6 |
| 5369 | LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" |
| 5370 | fi |
| 5371 | done |
| 5372 | |
| 5373 | |
| 5374 | for ac_func in getpgrp |
| 5375 | do |
| 5376 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
| 5377 | echo "configure:5378: checking for $ac_func" >&5 |
| 5378 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5379 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5380 | else |
| 5381 | cat > conftest.$ac_ext <<EOF |
| 5382 | #line 5383 "configure" |
| 5383 | #include "confdefs.h" |
| 5384 | /* System header to define __stub macros and hopefully few prototypes, |
| 5385 | which can conflict with char $ac_func(); below. */ |
| 5386 | #include <assert.h> |
| 5387 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5388 | /* We use char because int might match the return type of a gcc2 |
| 5389 | builtin and then its argument prototype would still apply. */ |
| 5390 | char $ac_func(); |
| 5391 | |
| 5392 | int main() { |
| 5393 | |
| 5394 | /* The GNU C library defines this for functions which it implements |
| 5395 | to always fail with ENOSYS. Some functions are actually named |
| 5396 | something starting with __ and the normal name is an alias. */ |
| 5397 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5398 | choke me |
| 5399 | #else |
| 5400 | $ac_func(); |
| 5401 | #endif |
| 5402 | |
| 5403 | ; return 0; } |
| 5404 | EOF |
| 5405 | if { (eval echo configure:5406: \"$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] | 5406 | rm -rf conftest* |
| 5407 | eval "ac_cv_func_$ac_func=yes" |
| 5408 | else |
| 5409 | echo "configure: failed program was:" >&5 |
| 5410 | cat conftest.$ac_ext >&5 |
| 5411 | rm -rf conftest* |
| 5412 | eval "ac_cv_func_$ac_func=no" |
| 5413 | fi |
| 5414 | rm -f conftest* |
| 5415 | fi |
| 5416 | |
| 5417 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5418 | echo "$ac_t""yes" 1>&6 |
| 5419 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5420 | cat >> confdefs.h <<EOF |
| 5421 | #define $ac_tr_func 1 |
| 5422 | EOF |
| 5423 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5424 | #line 5425 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5425 | #include "confdefs.h" |
| 5426 | #include <unistd.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5427 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5428 | getpgrp(0); |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5429 | ; return 0; } |
| 5430 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5431 | if { (eval echo configure:5432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5432 | rm -rf conftest* |
| 5433 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5434 | #define GETPGRP_HAVE_ARG 1 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5435 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5436 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5437 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5438 | echo "configure: failed program was:" >&5 |
| 5439 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5440 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5441 | rm -f conftest* |
| 5442 | else |
| 5443 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5444 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5445 | done |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5446 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5447 | for ac_func in setpgrp |
| 5448 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5449 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5450 | echo "configure:5451: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5451 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5452 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5453 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5454 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5455 | #line 5456 "configure" |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5456 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5457 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5458 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5459 | #include <assert.h> |
| 5460 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5461 | /* 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] | 5462 | builtin and then its argument prototype would still apply. */ |
| 5463 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5464 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5465 | int main() { |
| 5466 | |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5467 | /* The GNU C library defines this for functions which it implements |
| 5468 | to always fail with ENOSYS. Some functions are actually named |
| 5469 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5470 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5471 | choke me |
| 5472 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5473 | $ac_func(); |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5474 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5475 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5476 | ; return 0; } |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5477 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5478 | if { (eval echo configure:5479: \"$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] | 5479 | rm -rf conftest* |
| 5480 | eval "ac_cv_func_$ac_func=yes" |
| 5481 | else |
| 5482 | echo "configure: failed program was:" >&5 |
| 5483 | cat conftest.$ac_ext >&5 |
| 5484 | rm -rf conftest* |
| 5485 | eval "ac_cv_func_$ac_func=no" |
| 5486 | fi |
| 5487 | rm -f conftest* |
| 5488 | fi |
| 5489 | |
| 5490 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5491 | echo "$ac_t""yes" 1>&6 |
| 5492 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5493 | cat >> confdefs.h <<EOF |
| 5494 | #define $ac_tr_func 1 |
| 5495 | EOF |
| 5496 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5497 | #line 5498 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5498 | #include "confdefs.h" |
| 5499 | #include <unistd.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5500 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5501 | setpgrp(0,0); |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5502 | ; return 0; } |
| 5503 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5504 | if { (eval echo configure:5505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5505 | rm -rf conftest* |
| 5506 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5507 | #define SETPGRP_HAVE_ARG 1 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5508 | EOF |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5509 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5510 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5511 | echo "configure: failed program was:" >&5 |
| 5512 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5513 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5514 | rm -f conftest* |
| 5515 | else |
| 5516 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5517 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5518 | done |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5519 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5520 | for ac_func in gettimeofday |
| 5521 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5522 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5523 | echo "configure:5524: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5524 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5525 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5526 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5527 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5528 | #line 5529 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5529 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5530 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5531 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5532 | #include <assert.h> |
| 5533 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5534 | /* 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] | 5535 | builtin and then its argument prototype would still apply. */ |
| 5536 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5537 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5538 | int main() { |
| 5539 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5540 | /* The GNU C library defines this for functions which it implements |
| 5541 | to always fail with ENOSYS. Some functions are actually named |
| 5542 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5543 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5544 | choke me |
| 5545 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5546 | $ac_func(); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5547 | #endif |
| 5548 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5549 | ; return 0; } |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5550 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5551 | if { (eval echo configure:5552: \"$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] | 5552 | rm -rf conftest* |
| 5553 | eval "ac_cv_func_$ac_func=yes" |
| 5554 | else |
| 5555 | echo "configure: failed program was:" >&5 |
| 5556 | cat conftest.$ac_ext >&5 |
| 5557 | rm -rf conftest* |
| 5558 | eval "ac_cv_func_$ac_func=no" |
| 5559 | fi |
| 5560 | rm -f conftest* |
| 5561 | fi |
| 5562 | |
| 5563 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5564 | echo "$ac_t""yes" 1>&6 |
| 5565 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5566 | cat >> confdefs.h <<EOF |
| 5567 | #define $ac_tr_func 1 |
| 5568 | EOF |
| 5569 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5570 | #line 5571 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5571 | #include "confdefs.h" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5572 | #include <sys/time.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5573 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5574 | gettimeofday((struct timeval*)0,(struct timezone*)0); |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5575 | ; return 0; } |
| 5576 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5577 | if { (eval echo configure:5578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5578 | : |
| 5579 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5580 | echo "configure: failed program was:" >&5 |
| 5581 | cat conftest.$ac_ext >&5 |
| 5582 | rm -rf conftest* |
| 5583 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5584 | #define GETTIMEOFDAY_NO_TZ 1 |
| 5585 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5586 | |
| 5587 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5588 | rm -f conftest* |
| 5589 | else |
| 5590 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5591 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5592 | done |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5593 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5594 | |
| 5595 | |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 5596 | # On OSF/1 V5.1, getaddrinfo is available, but a define |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5597 | # for [no]getaddrinfo in netdb.h. |
| 5598 | echo $ac_n "checking for getaddrinfo""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5599 | echo "configure:5600: checking for getaddrinfo" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5600 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5601 | #line 5602 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5602 | #include "confdefs.h" |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 5603 | |
Martin v. Löwis | c010b6d | 2001-11-09 17:50:52 +0000 | [diff] [blame] | 5604 | #include <sys/types.h> |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 5605 | #include <sys/socket.h> |
| 5606 | #include <netdb.h> |
Martin v. Löwis | c010b6d | 2001-11-09 17:50:52 +0000 | [diff] [blame] | 5607 | #include <stdio.h> |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5608 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5609 | int main() { |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5610 | |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 5611 | getaddrinfo(NULL, NULL, NULL, NULL); |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5612 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5613 | ; return 0; } |
| 5614 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5615 | if { (eval echo configure:5616: \"$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] | 5616 | rm -rf conftest* |
| 5617 | |
| 5618 | echo "$ac_t""yes" 1>&6 |
| 5619 | echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5620 | echo "configure:5621: checking getaddrinfo bug" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5621 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5622 | echo "$ac_t""buggy" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5623 | buggygetaddrinfo=yes |
| 5624 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5625 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5626 | #line 5627 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5627 | #include "confdefs.h" |
| 5628 | |
| 5629 | #include <sys/types.h> |
| 5630 | #include <netdb.h> |
| 5631 | #include <string.h> |
| 5632 | #include <sys/socket.h> |
| 5633 | #include <netinet/in.h> |
| 5634 | |
| 5635 | main() |
| 5636 | { |
| 5637 | int passive, gaierr, inet4 = 0, inet6 = 0; |
| 5638 | struct addrinfo hints, *ai, *aitop; |
| 5639 | char straddr[INET6_ADDRSTRLEN], strport[16]; |
| 5640 | |
| 5641 | for (passive = 0; passive <= 1; passive++) { |
| 5642 | memset(&hints, 0, sizeof(hints)); |
| 5643 | hints.ai_family = AF_UNSPEC; |
| 5644 | hints.ai_flags = passive ? AI_PASSIVE : 0; |
| 5645 | hints.ai_socktype = SOCK_STREAM; |
| 5646 | if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) { |
| 5647 | (void)gai_strerror(gaierr); |
| 5648 | goto bad; |
| 5649 | } |
| 5650 | for (ai = aitop; ai; ai = ai->ai_next) { |
| 5651 | if (ai->ai_addr == NULL || |
| 5652 | ai->ai_addrlen == 0 || |
| 5653 | getnameinfo(ai->ai_addr, ai->ai_addrlen, |
| 5654 | straddr, sizeof(straddr), strport, sizeof(strport), |
| 5655 | NI_NUMERICHOST|NI_NUMERICSERV) != 0) { |
| 5656 | goto bad; |
| 5657 | } |
| 5658 | switch (ai->ai_family) { |
| 5659 | case AF_INET: |
| 5660 | if (strcmp(strport, "54321") != 0) { |
| 5661 | goto bad; |
| 5662 | } |
| 5663 | if (passive) { |
| 5664 | if (strcmp(straddr, "0.0.0.0") != 0) { |
| 5665 | goto bad; |
| 5666 | } |
| 5667 | } else { |
| 5668 | if (strcmp(straddr, "127.0.0.1") != 0) { |
| 5669 | goto bad; |
| 5670 | } |
| 5671 | } |
| 5672 | inet4++; |
| 5673 | break; |
| 5674 | case AF_INET6: |
| 5675 | if (strcmp(strport, "54321") != 0) { |
| 5676 | goto bad; |
| 5677 | } |
| 5678 | if (passive) { |
| 5679 | if (strcmp(straddr, "::") != 0) { |
| 5680 | goto bad; |
| 5681 | } |
| 5682 | } else { |
| 5683 | if (strcmp(straddr, "::1") != 0) { |
| 5684 | goto bad; |
| 5685 | } |
| 5686 | } |
| 5687 | inet6++; |
| 5688 | break; |
| 5689 | case AF_UNSPEC: |
| 5690 | goto bad; |
| 5691 | break; |
| 5692 | default: |
| 5693 | /* another family support? */ |
| 5694 | break; |
| 5695 | } |
| 5696 | } |
| 5697 | } |
| 5698 | |
| 5699 | if (!(inet4 == 0 || inet4 == 2)) |
| 5700 | goto bad; |
| 5701 | if (!(inet6 == 0 || inet6 == 2)) |
| 5702 | goto bad; |
| 5703 | |
| 5704 | if (aitop) |
| 5705 | freeaddrinfo(aitop); |
| 5706 | exit(0); |
| 5707 | |
| 5708 | bad: |
| 5709 | if (aitop) |
| 5710 | freeaddrinfo(aitop); |
| 5711 | exit(1); |
| 5712 | } |
| 5713 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5714 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5715 | if { (eval echo configure:5716: \"$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] | 5716 | then |
| 5717 | echo "$ac_t""good" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5718 | buggygetaddrinfo=no |
| 5719 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5720 | echo "configure: failed program was:" >&5 |
| 5721 | cat conftest.$ac_ext >&5 |
| 5722 | rm -fr conftest* |
| 5723 | echo "$ac_t""buggy" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5724 | buggygetaddrinfo=yes |
| 5725 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5726 | rm -fr conftest* |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5727 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5728 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5729 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5730 | echo "configure: failed program was:" >&5 |
| 5731 | cat conftest.$ac_ext >&5 |
| 5732 | rm -rf conftest* |
| 5733 | |
| 5734 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5735 | buggygetaddrinfo=yes |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5736 | |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 5737 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5738 | rm -f conftest* |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5739 | |
| 5740 | if test "$buggygetaddrinfo" = "yes"; then |
| 5741 | if test "$ipv6" = "yes"; then |
| 5742 | echo 'Fatal: You must get working getaddrinfo() function.' |
| 5743 | echo ' or you can specify "--disable-ipv6"'. |
| 5744 | exit 1 |
| 5745 | fi |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 5746 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5747 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 5748 | #define HAVE_GETADDRINFO 1 |
| 5749 | EOF |
| 5750 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5751 | fi |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5752 | for ac_func in getnameinfo |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5753 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5754 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5755 | echo "configure:5756: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5756 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5757 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5758 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5759 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5760 | #line 5761 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5761 | #include "confdefs.h" |
| 5762 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5763 | which can conflict with char $ac_func(); below. */ |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5764 | #include <assert.h> |
| 5765 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5766 | /* 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] | 5767 | builtin and then its argument prototype would still apply. */ |
| 5768 | char $ac_func(); |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5769 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5770 | int main() { |
| 5771 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5772 | /* The GNU C library defines this for functions which it implements |
| 5773 | to always fail with ENOSYS. Some functions are actually named |
| 5774 | something starting with __ and the normal name is an alias. */ |
| 5775 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5776 | choke me |
| 5777 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5778 | $ac_func(); |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5779 | #endif |
| 5780 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5781 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5782 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5783 | if { (eval echo configure:5784: \"$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] | 5784 | rm -rf conftest* |
| 5785 | eval "ac_cv_func_$ac_func=yes" |
| 5786 | else |
| 5787 | echo "configure: failed program was:" >&5 |
| 5788 | cat conftest.$ac_ext >&5 |
| 5789 | rm -rf conftest* |
| 5790 | eval "ac_cv_func_$ac_func=no" |
| 5791 | fi |
| 5792 | rm -f conftest* |
| 5793 | fi |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5794 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5795 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5796 | echo "$ac_t""yes" 1>&6 |
| 5797 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5798 | cat >> confdefs.h <<EOF |
| 5799 | #define $ac_tr_func 1 |
| 5800 | EOF |
| 5801 | |
| 5802 | else |
| 5803 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5804 | fi |
| 5805 | done |
| 5806 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5807 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5808 | # checks for structures |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5809 | echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5810 | echo "configure:5811: 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] | 5811 | if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then |
| 5812 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5813 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5814 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5815 | #line 5816 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5816 | #include "confdefs.h" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5817 | #include <sys/types.h> |
| 5818 | #include <sys/time.h> |
| 5819 | #include <time.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5820 | int main() { |
| 5821 | struct tm *tp; |
| 5822 | ; return 0; } |
| 5823 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5824 | if { (eval echo configure:5825: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5825 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5826 | ac_cv_header_time=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5827 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5828 | echo "configure: failed program was:" >&5 |
| 5829 | cat conftest.$ac_ext >&5 |
| 5830 | rm -rf conftest* |
| 5831 | ac_cv_header_time=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5832 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5833 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5834 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5835 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5836 | echo "$ac_t""$ac_cv_header_time" 1>&6 |
| 5837 | if test $ac_cv_header_time = yes; then |
| 5838 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5839 | #define TIME_WITH_SYS_TIME 1 |
| 5840 | EOF |
| 5841 | |
| 5842 | fi |
| 5843 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5844 | echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5845 | echo "configure:5846: 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] | 5846 | if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then |
| 5847 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5848 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5849 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5850 | #line 5851 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5851 | #include "confdefs.h" |
| 5852 | #include <sys/types.h> |
| 5853 | #include <time.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5854 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5855 | struct tm *tp; tp->tm_sec; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5856 | ; return 0; } |
| 5857 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5858 | if { (eval echo configure:5859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5859 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5860 | ac_cv_struct_tm=time.h |
| 5861 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5862 | echo "configure: failed program was:" >&5 |
| 5863 | cat conftest.$ac_ext >&5 |
| 5864 | rm -rf conftest* |
| 5865 | ac_cv_struct_tm=sys/time.h |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5866 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5867 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5868 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5869 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5870 | echo "$ac_t""$ac_cv_struct_tm" 1>&6 |
| 5871 | if test $ac_cv_struct_tm = sys/time.h; then |
| 5872 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5873 | #define TM_IN_SYS_TIME 1 |
| 5874 | EOF |
| 5875 | |
| 5876 | fi |
| 5877 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5878 | echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5879 | echo "configure:5880: checking for tm_zone in struct tm" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5880 | if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then |
| 5881 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5882 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5883 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5884 | #line 5885 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5885 | #include "confdefs.h" |
| 5886 | #include <sys/types.h> |
| 5887 | #include <$ac_cv_struct_tm> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5888 | int main() { |
| 5889 | struct tm tm; tm.tm_zone; |
| 5890 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5891 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5892 | if { (eval echo configure:5893: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5893 | rm -rf conftest* |
| 5894 | ac_cv_struct_tm_zone=yes |
| 5895 | else |
| 5896 | echo "configure: failed program was:" >&5 |
| 5897 | cat conftest.$ac_ext >&5 |
| 5898 | rm -rf conftest* |
| 5899 | ac_cv_struct_tm_zone=no |
| 5900 | fi |
| 5901 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5902 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5903 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5904 | echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6 |
| 5905 | if test "$ac_cv_struct_tm_zone" = yes; then |
| 5906 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5907 | #define HAVE_TM_ZONE 1 |
| 5908 | EOF |
| 5909 | |
| 5910 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5911 | echo $ac_n "checking for tzname""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5912 | echo "configure:5913: checking for tzname" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5913 | if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then |
| 5914 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5915 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5916 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5917 | #line 5918 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5918 | #include "confdefs.h" |
| 5919 | #include <time.h> |
| 5920 | #ifndef tzname /* For SGI. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5921 | extern char *tzname[]; /* RS6000 and others reject char **tzname. */ |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5922 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5923 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5924 | atoi(*tzname); |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5925 | ; return 0; } |
| 5926 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5927 | if { (eval echo configure:5928: \"$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] | 5928 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5929 | ac_cv_var_tzname=yes |
| 5930 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5931 | echo "configure: failed program was:" >&5 |
| 5932 | cat conftest.$ac_ext >&5 |
| 5933 | rm -rf conftest* |
| 5934 | ac_cv_var_tzname=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5935 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5936 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5937 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5938 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5939 | echo "$ac_t""$ac_cv_var_tzname" 1>&6 |
| 5940 | if test $ac_cv_var_tzname = yes; then |
| 5941 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5942 | #define HAVE_TZNAME 1 |
| 5943 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5944 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5945 | fi |
| 5946 | fi |
| 5947 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5948 | echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5949 | echo "configure:5950: checking for st_rdev in struct stat" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5950 | if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then |
| 5951 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5952 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5953 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5954 | #line 5955 "configure" |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5955 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5956 | #include <sys/types.h> |
| 5957 | #include <sys/stat.h> |
| 5958 | int main() { |
| 5959 | struct stat s; s.st_rdev; |
| 5960 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5961 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5962 | if { (eval echo configure:5963: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5963 | rm -rf conftest* |
| 5964 | ac_cv_struct_st_rdev=yes |
| 5965 | else |
| 5966 | echo "configure: failed program was:" >&5 |
| 5967 | cat conftest.$ac_ext >&5 |
| 5968 | rm -rf conftest* |
| 5969 | ac_cv_struct_st_rdev=no |
| 5970 | fi |
| 5971 | rm -f conftest* |
| 5972 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5973 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5974 | echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6 |
| 5975 | if test $ac_cv_struct_st_rdev = yes; then |
| 5976 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5977 | #define HAVE_ST_RDEV 1 |
| 5978 | EOF |
| 5979 | |
| 5980 | fi |
| 5981 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5982 | echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5983 | echo "configure:5984: checking for st_blksize in struct stat" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5984 | if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then |
| 5985 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5986 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5987 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5988 | #line 5989 "configure" |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5989 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5990 | #include <sys/types.h> |
| 5991 | #include <sys/stat.h> |
| 5992 | int main() { |
| 5993 | struct stat s; s.st_blksize; |
| 5994 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5995 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 5996 | if { (eval echo configure:5997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5997 | rm -rf conftest* |
| 5998 | ac_cv_struct_st_blksize=yes |
| 5999 | else |
| 6000 | echo "configure: failed program was:" >&5 |
| 6001 | cat conftest.$ac_ext >&5 |
| 6002 | rm -rf conftest* |
| 6003 | ac_cv_struct_st_blksize=no |
| 6004 | fi |
| 6005 | rm -f conftest* |
| 6006 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 6007 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6008 | echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6 |
| 6009 | if test $ac_cv_struct_st_blksize = yes; then |
| 6010 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6011 | #define HAVE_ST_BLKSIZE 1 |
| 6012 | EOF |
| 6013 | |
| 6014 | fi |
| 6015 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6016 | echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6017 | echo "configure:6018: checking for st_blocks in struct stat" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6018 | if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then |
| 6019 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6020 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6021 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6022 | #line 6023 "configure" |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6023 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6024 | #include <sys/types.h> |
| 6025 | #include <sys/stat.h> |
| 6026 | int main() { |
| 6027 | struct stat s; s.st_blocks; |
| 6028 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 6029 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6030 | if { (eval echo configure:6031: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6031 | rm -rf conftest* |
| 6032 | ac_cv_struct_st_blocks=yes |
| 6033 | else |
| 6034 | echo "configure: failed program was:" >&5 |
| 6035 | cat conftest.$ac_ext >&5 |
| 6036 | rm -rf conftest* |
| 6037 | ac_cv_struct_st_blocks=no |
| 6038 | fi |
| 6039 | rm -f conftest* |
| 6040 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 6041 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6042 | echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6 |
| 6043 | if test $ac_cv_struct_st_blocks = yes; then |
| 6044 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6045 | #define HAVE_ST_BLOCKS 1 |
| 6046 | EOF |
| 6047 | |
| 6048 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6049 | LIBOBJS="$LIBOBJS fileblocks.${ac_objext}" |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6050 | fi |
| 6051 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6052 | |
| 6053 | echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6054 | echo "configure:6055: checking for time.h that defines altzone" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6055 | if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then |
| 6056 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6057 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6058 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6059 | #line 6060 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6060 | #include "confdefs.h" |
| 6061 | #include <time.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6062 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6063 | return altzone; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6064 | ; return 0; } |
| 6065 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6066 | if { (eval echo configure:6067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6067 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6068 | ac_cv_header_time_altzone=yes |
| 6069 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6070 | echo "configure: failed program was:" >&5 |
| 6071 | cat conftest.$ac_ext >&5 |
| 6072 | rm -rf conftest* |
| 6073 | ac_cv_header_time_altzone=no |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6074 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6075 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6076 | fi |
| 6077 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6078 | echo "$ac_t""$ac_cv_header_time_altzone" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6079 | if test $ac_cv_header_time_altzone = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6080 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6081 | #define HAVE_ALTZONE 1 |
| 6082 | EOF |
| 6083 | |
| 6084 | fi |
| 6085 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6086 | was_it_defined=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6087 | echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6088 | echo "configure:6089: 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] | 6089 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6090 | #line 6091 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6091 | #include "confdefs.h" |
| 6092 | |
| 6093 | #include <sys/types.h> |
| 6094 | #include <sys/select.h> |
| 6095 | #include <sys/time.h> |
| 6096 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6097 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6098 | ; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6099 | ; return 0; } |
| 6100 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6101 | if { (eval echo configure:6102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6102 | rm -rf conftest* |
| 6103 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6104 | #define SYS_SELECT_WITH_SYS_TIME 1 |
| 6105 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6106 | was_it_defined=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6107 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6108 | echo "configure: failed program was:" >&5 |
| 6109 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6110 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6111 | rm -f conftest* |
| 6112 | echo "$ac_t""$was_it_defined" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6113 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6114 | echo $ac_n "checking for addrinfo""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6115 | echo "configure:6116: checking for addrinfo" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6116 | if eval "test \"`echo '$''{'ac_cv_struct_addrinfo'+set}'`\" = set"; then |
| 6117 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6118 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6119 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6120 | #line 6121 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6121 | #include "confdefs.h" |
| 6122 | |
| 6123 | # include <netdb.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6124 | int main() { |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6125 | struct addrinfo a |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6126 | ; return 0; } |
| 6127 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6128 | if { (eval echo configure:6129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6129 | rm -rf conftest* |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6130 | ac_cv_struct_addrinfo=yes |
| 6131 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6132 | echo "configure: failed program was:" >&5 |
| 6133 | cat conftest.$ac_ext >&5 |
| 6134 | rm -rf conftest* |
| 6135 | ac_cv_struct_addrinfo=no |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6136 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6137 | rm -f conftest* |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6138 | fi |
| 6139 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6140 | echo "$ac_t""$ac_cv_struct_addrinfo" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6141 | if test $ac_cv_struct_addrinfo = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6142 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6143 | #define HAVE_ADDRINFO 1 |
| 6144 | EOF |
| 6145 | |
| 6146 | fi |
| 6147 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6148 | echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6149 | echo "configure:6150: checking for sockaddr_storage" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6150 | if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then |
| 6151 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6152 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6153 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6154 | #line 6155 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6155 | #include "confdefs.h" |
| 6156 | |
| 6157 | # include <sys/types.h> |
| 6158 | # include <sys/socket.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6159 | int main() { |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6160 | struct sockaddr_storage s |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6161 | ; return 0; } |
| 6162 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6163 | if { (eval echo configure:6164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6164 | rm -rf conftest* |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6165 | ac_cv_struct_sockaddr_storage=yes |
| 6166 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6167 | echo "configure: failed program was:" >&5 |
| 6168 | cat conftest.$ac_ext >&5 |
| 6169 | rm -rf conftest* |
| 6170 | ac_cv_struct_sockaddr_storage=no |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6171 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6172 | rm -f conftest* |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6173 | fi |
| 6174 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6175 | echo "$ac_t""$ac_cv_struct_sockaddr_storage" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6176 | if test $ac_cv_struct_sockaddr_storage = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6177 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6178 | #define HAVE_SOCKADDR_STORAGE 1 |
| 6179 | EOF |
| 6180 | |
| 6181 | fi |
| 6182 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6183 | # checks for compiler characteristics |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6184 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6185 | echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6186 | echo "configure:6187: checking whether char is unsigned" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6187 | if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then |
| 6188 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6189 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6190 | if test "$GCC" = yes; then |
| 6191 | # GCC predefines this symbol on systems where it applies. |
| 6192 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6193 | #line 6194 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6194 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6195 | #ifdef __CHAR_UNSIGNED__ |
| 6196 | yes |
| 6197 | #endif |
| 6198 | |
| 6199 | EOF |
| 6200 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 6201 | egrep "yes" >/dev/null 2>&1; then |
| 6202 | rm -rf conftest* |
| 6203 | ac_cv_c_char_unsigned=yes |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 6204 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6205 | rm -rf conftest* |
| 6206 | ac_cv_c_char_unsigned=no |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6207 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6208 | rm -f conftest* |
| 6209 | |
| 6210 | else |
| 6211 | if test "$cross_compiling" = yes; then |
| 6212 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 6213 | else |
| 6214 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6215 | #line 6216 "configure" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6216 | #include "confdefs.h" |
| 6217 | /* volatile prevents gcc2 from optimizing the test away on sparcs. */ |
| 6218 | #if !defined(__STDC__) || __STDC__ != 1 |
| 6219 | #define volatile |
| 6220 | #endif |
| 6221 | main() { |
| 6222 | volatile char c = 255; exit(c < 0); |
| 6223 | } |
| 6224 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6225 | if { (eval echo configure:6226: \"$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] | 6226 | then |
| 6227 | ac_cv_c_char_unsigned=yes |
| 6228 | else |
| 6229 | echo "configure: failed program was:" >&5 |
| 6230 | cat conftest.$ac_ext >&5 |
| 6231 | rm -fr conftest* |
| 6232 | ac_cv_c_char_unsigned=no |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6233 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6234 | rm -fr conftest* |
| 6235 | fi |
| 6236 | |
| 6237 | fi |
| 6238 | fi |
| 6239 | |
| 6240 | echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6241 | 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] | 6242 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6243 | #define __CHAR_UNSIGNED__ 1 |
| 6244 | EOF |
| 6245 | |
| 6246 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6247 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6248 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6249 | echo "configure:6250: checking for working const" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6250 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
| 6251 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6252 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6253 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6254 | #line 6255 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6255 | #include "confdefs.h" |
| 6256 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6257 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6258 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6259 | /* Ultrix mips cc rejects this. */ |
| 6260 | typedef int charset[2]; const charset x; |
| 6261 | /* SunOS 4.1.1 cc rejects this. */ |
| 6262 | char const *const *ccp; |
| 6263 | char **p; |
| 6264 | /* NEC SVR4.0.2 mips cc rejects this. */ |
| 6265 | struct point {int x, y;}; |
| 6266 | static struct point const zero = {0,0}; |
| 6267 | /* AIX XL C 1.02.0.0 rejects this. |
| 6268 | It does not let you subtract one const X* pointer from another in an arm |
| 6269 | of an if-expression whose if-part is not a constant expression */ |
| 6270 | const char *g = "string"; |
| 6271 | ccp = &g + (g ? g-g : 0); |
| 6272 | /* HPUX 7.0 cc rejects these. */ |
| 6273 | ++ccp; |
| 6274 | p = (char**) ccp; |
| 6275 | ccp = (char const *const *) p; |
| 6276 | { /* SCO 3.2v4 cc rejects this. */ |
| 6277 | char *t; |
| 6278 | char const *s = 0 ? (char *) 0 : (char const *) 0; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6279 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6280 | *t++ = 0; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6281 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6282 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ |
| 6283 | int x[] = {25, 17}; |
| 6284 | const int *foo = &x[0]; |
| 6285 | ++foo; |
| 6286 | } |
| 6287 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ |
| 6288 | typedef const int *iptr; |
| 6289 | iptr p = 0; |
| 6290 | ++p; |
| 6291 | } |
| 6292 | { /* AIX XL C 1.02.0.0 rejects this saying |
| 6293 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ |
| 6294 | struct s { int j; const int *ap[3]; }; |
| 6295 | struct s *b; b->j = 5; |
| 6296 | } |
| 6297 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ |
| 6298 | const int foo = 10; |
| 6299 | } |
| 6300 | |
| 6301 | ; return 0; } |
| 6302 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6303 | if { (eval echo configure:6304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6304 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6305 | ac_cv_c_const=yes |
| 6306 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6307 | echo "configure: failed program was:" >&5 |
| 6308 | cat conftest.$ac_ext >&5 |
| 6309 | rm -rf conftest* |
| 6310 | ac_cv_c_const=no |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6311 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6312 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6313 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6314 | |
| 6315 | echo "$ac_t""$ac_cv_c_const" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6316 | if test $ac_cv_c_const = no; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6317 | cat >> confdefs.h <<\EOF |
| 6318 | #define const |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6319 | EOF |
| 6320 | |
| 6321 | fi |
| 6322 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6323 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6324 | works=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6325 | echo $ac_n "checking for working volatile""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6326 | echo "configure:6327: checking for working volatile" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6327 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6328 | #line 6329 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6329 | #include "confdefs.h" |
| 6330 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6331 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6332 | volatile int x; x = 0; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6333 | ; return 0; } |
| 6334 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6335 | if { (eval echo configure:6336: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6336 | rm -rf conftest* |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6337 | works=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6338 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6339 | echo "configure: failed program was:" >&5 |
| 6340 | cat conftest.$ac_ext >&5 |
| 6341 | rm -rf conftest* |
| 6342 | cat >> confdefs.h <<\EOF |
| 6343 | #define volatile |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6344 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6345 | |
| 6346 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6347 | rm -f conftest* |
| 6348 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6349 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6350 | works=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6351 | echo $ac_n "checking for working signed char""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6352 | echo "configure:6353: checking for working signed char" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6353 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6354 | #line 6355 "configure" |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 6355 | #include "confdefs.h" |
| 6356 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6357 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6358 | signed char c; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6359 | ; return 0; } |
| 6360 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6361 | if { (eval echo configure:6362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6362 | rm -rf conftest* |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6363 | works=yes |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 6364 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6365 | echo "configure: failed program was:" >&5 |
| 6366 | cat conftest.$ac_ext >&5 |
| 6367 | rm -rf conftest* |
| 6368 | cat >> confdefs.h <<\EOF |
| 6369 | #define signed |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6370 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6371 | |
| 6372 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6373 | rm -f conftest* |
| 6374 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6375 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6376 | have_prototypes=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6377 | echo $ac_n "checking for prototypes""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6378 | echo "configure:6379: checking for prototypes" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6379 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6380 | #line 6381 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6381 | #include "confdefs.h" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6382 | int foo(int x) { return 0; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6383 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6384 | return foo(10); |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6385 | ; return 0; } |
| 6386 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6387 | if { (eval echo configure:6388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6388 | rm -rf conftest* |
| 6389 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6390 | #define HAVE_PROTOTYPES 1 |
| 6391 | EOF |
| 6392 | have_prototypes=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6393 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6394 | echo "configure: failed program was:" >&5 |
| 6395 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6396 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6397 | rm -f conftest* |
| 6398 | echo "$ac_t""$have_prototypes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6399 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6400 | works=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6401 | echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6402 | echo "configure:6403: checking for variable length prototypes and stdarg.h" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6403 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6404 | #line 6405 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6405 | #include "confdefs.h" |
| 6406 | |
| 6407 | #include <stdarg.h> |
Guido van Rossum | 90eea07 | 1996-08-30 20:58:57 +0000 | [diff] [blame] | 6408 | int foo(int x, ...) { |
| 6409 | va_list va; |
| 6410 | va_start(va, x); |
| 6411 | va_arg(va, int); |
| 6412 | va_arg(va, char *); |
| 6413 | va_arg(va, double); |
| 6414 | return 0; |
| 6415 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6416 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6417 | int main() { |
Guido van Rossum | 90eea07 | 1996-08-30 20:58:57 +0000 | [diff] [blame] | 6418 | return foo(10, "", 3.14); |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6419 | ; return 0; } |
| 6420 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6421 | if { (eval echo configure:6422: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6422 | rm -rf conftest* |
| 6423 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6424 | #define HAVE_STDARG_PROTOTYPES 1 |
| 6425 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6426 | works=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6427 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6428 | echo "configure: failed program was:" >&5 |
| 6429 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6430 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6431 | rm -f conftest* |
| 6432 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6433 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6434 | if test "$have_prototypes" = yes; then |
| 6435 | bad_prototypes=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6436 | echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6437 | echo "configure:6438: checking for bad exec* prototypes" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6438 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6439 | #line 6440 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6440 | #include "confdefs.h" |
| 6441 | #include <unistd.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6442 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6443 | char **t;execve("@",t,t); |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6444 | ; return 0; } |
| 6445 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6446 | if { (eval echo configure:6447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6447 | : |
| 6448 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6449 | echo "configure: failed program was:" >&5 |
| 6450 | cat conftest.$ac_ext >&5 |
| 6451 | rm -rf conftest* |
| 6452 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6453 | #define BAD_EXEC_PROTOTYPES 1 |
| 6454 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6455 | bad_prototypes=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6456 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6457 | rm -f conftest* |
| 6458 | echo "$ac_t""$bad_prototypes" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6459 | fi |
| 6460 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6461 | # check if sockaddr has sa_len member |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6462 | echo $ac_n "checking if sockaddr has sa_len member""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6463 | echo "configure:6464: checking if sockaddr has sa_len member" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6464 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6465 | #line 6466 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6466 | #include "confdefs.h" |
| 6467 | #include <sys/types.h> |
| 6468 | #include <sys/socket.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6469 | int main() { |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6470 | struct sockaddr x; |
| 6471 | x.sa_len = 0; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6472 | ; return 0; } |
| 6473 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6474 | if { (eval echo configure:6475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6475 | rm -rf conftest* |
| 6476 | echo "$ac_t""yes" 1>&6 |
| 6477 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6478 | #define HAVE_SOCKADDR_SA_LEN 1 |
| 6479 | EOF |
| 6480 | |
| 6481 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6482 | echo "configure: failed program was:" >&5 |
| 6483 | cat conftest.$ac_ext >&5 |
| 6484 | rm -rf conftest* |
| 6485 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6486 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6487 | rm -f conftest* |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6488 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6489 | echo $ac_n "checking for bad static forward""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6490 | echo "configure:6491: checking for bad static forward" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6491 | if eval "test \"`echo '$''{'ac_cv_bad_static_forward'+set}'`\" = set"; then |
| 6492 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6493 | else |
| 6494 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 6495 | ac_cv_bad_static_forward=no |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6496 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6497 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6498 | #line 6499 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6499 | #include "confdefs.h" |
| 6500 | |
| 6501 | struct s { int a; int b; }; |
| 6502 | static struct s foo; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6503 | int foobar() { |
| 6504 | static int random; |
| 6505 | random = (int) &foo; |
| 6506 | return random; |
| 6507 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6508 | static struct s foo = { 1, 2 }; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6509 | main() { |
| 6510 | exit(!((int)&foo == foobar())); |
| 6511 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6512 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6513 | if { (eval echo configure:6514: \"$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] | 6514 | then |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6515 | ac_cv_bad_static_forward=no |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6516 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6517 | echo "configure: failed program was:" >&5 |
| 6518 | cat conftest.$ac_ext >&5 |
| 6519 | rm -fr conftest* |
| 6520 | ac_cv_bad_static_forward=yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6521 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6522 | rm -fr conftest* |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6523 | fi |
| 6524 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6525 | fi |
| 6526 | |
| 6527 | echo "$ac_t""$ac_cv_bad_static_forward" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6528 | if test "$ac_cv_bad_static_forward" = yes |
| 6529 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6530 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6531 | #define BAD_STATIC_FORWARD 1 |
| 6532 | EOF |
| 6533 | |
| 6534 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6535 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6536 | va_list_is_array=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6537 | echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6538 | echo "configure:6539: checking whether va_list is an array" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6539 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6540 | #line 6541 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6541 | #include "confdefs.h" |
| 6542 | |
| 6543 | #ifdef HAVE_STDARG_PROTOTYPES |
| 6544 | #include <stdarg.h> |
| 6545 | #else |
| 6546 | #include <varargs.h> |
| 6547 | #endif |
| 6548 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6549 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6550 | va_list list1, list2; list1 = list2; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6551 | ; return 0; } |
| 6552 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6553 | if { (eval echo configure:6554: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6554 | : |
| 6555 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6556 | echo "configure: failed program was:" >&5 |
| 6557 | cat conftest.$ac_ext >&5 |
| 6558 | rm -rf conftest* |
| 6559 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6560 | #define VA_LIST_IS_ARRAY 1 |
| 6561 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6562 | va_list_is_array=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6563 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6564 | rm -f conftest* |
| 6565 | echo "$ac_t""$va_list_is_array" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6566 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6567 | # 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] | 6568 | echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6569 | echo "configure:6570: checking for gethostbyname_r" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6570 | if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then |
| 6571 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6572 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6573 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6574 | #line 6575 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6575 | #include "confdefs.h" |
| 6576 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6577 | which can conflict with char gethostbyname_r(); below. */ |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6578 | #include <assert.h> |
| 6579 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6580 | /* 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] | 6581 | builtin and then its argument prototype would still apply. */ |
| 6582 | char gethostbyname_r(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6583 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6584 | int main() { |
| 6585 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6586 | /* The GNU C library defines this for functions which it implements |
| 6587 | to always fail with ENOSYS. Some functions are actually named |
| 6588 | something starting with __ and the normal name is an alias. */ |
| 6589 | #if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r) |
| 6590 | choke me |
| 6591 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6592 | gethostbyname_r(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6593 | #endif |
| 6594 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6595 | ; return 0; } |
| 6596 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6597 | if { (eval echo configure:6598: \"$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] | 6598 | rm -rf conftest* |
| 6599 | eval "ac_cv_func_gethostbyname_r=yes" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6600 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6601 | echo "configure: failed program was:" >&5 |
| 6602 | cat conftest.$ac_ext >&5 |
| 6603 | rm -rf conftest* |
| 6604 | eval "ac_cv_func_gethostbyname_r=no" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6605 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6606 | rm -f conftest* |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6607 | fi |
| 6608 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6609 | if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then |
| 6610 | echo "$ac_t""yes" 1>&6 |
| 6611 | |
| 6612 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6613 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6614 | EOF |
| 6615 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6616 | echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6617 | echo "configure:6618: checking gethostbyname_r with 6 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6618 | OLD_CFLAGS=$CFLAGS |
| 6619 | CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6620 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6621 | #line 6622 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6622 | #include "confdefs.h" |
| 6623 | |
| 6624 | # include <netdb.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6625 | |
| 6626 | int main() { |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6627 | |
| 6628 | char *name; |
| 6629 | struct hostent *he, *res; |
| 6630 | char buffer[2048]; |
| 6631 | int buflen = 2048; |
| 6632 | int h_errnop; |
| 6633 | |
| 6634 | (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6635 | |
| 6636 | ; return 0; } |
| 6637 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6638 | if { (eval echo configure:6639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6639 | rm -rf conftest* |
| 6640 | |
| 6641 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6642 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6643 | EOF |
| 6644 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6645 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6646 | #define HAVE_GETHOSTBYNAME_R_6_ARG 1 |
| 6647 | EOF |
| 6648 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6649 | echo "$ac_t""yes" 1>&6 |
| 6650 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6651 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6652 | echo "configure: failed program was:" >&5 |
| 6653 | cat conftest.$ac_ext >&5 |
| 6654 | rm -rf conftest* |
| 6655 | |
| 6656 | echo "$ac_t""no" 1>&6 |
| 6657 | echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6658 | echo "configure:6659: checking gethostbyname_r with 5 args" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6659 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6660 | #line 6661 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6661 | #include "confdefs.h" |
| 6662 | |
| 6663 | # include <netdb.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6664 | |
| 6665 | int main() { |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6666 | |
| 6667 | char *name; |
| 6668 | struct hostent *he; |
| 6669 | char buffer[2048]; |
| 6670 | int buflen = 2048; |
| 6671 | int h_errnop; |
| 6672 | |
| 6673 | (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6674 | |
| 6675 | ; return 0; } |
| 6676 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6677 | if { (eval echo configure:6678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6678 | rm -rf conftest* |
| 6679 | |
| 6680 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6681 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6682 | EOF |
| 6683 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6684 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6685 | #define HAVE_GETHOSTBYNAME_R_5_ARG 1 |
| 6686 | EOF |
| 6687 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6688 | echo "$ac_t""yes" 1>&6 |
| 6689 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6690 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6691 | echo "configure: failed program was:" >&5 |
| 6692 | cat conftest.$ac_ext >&5 |
| 6693 | rm -rf conftest* |
| 6694 | |
| 6695 | echo "$ac_t""no" 1>&6 |
| 6696 | echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6697 | echo "configure:6698: checking gethostbyname_r with 3 args" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6698 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6699 | #line 6700 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6700 | #include "confdefs.h" |
| 6701 | |
| 6702 | # include <netdb.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6703 | |
| 6704 | int main() { |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6705 | |
| 6706 | char *name; |
| 6707 | struct hostent *he; |
| 6708 | struct hostent_data data; |
| 6709 | |
| 6710 | (void) gethostbyname_r(name, he, &data); |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6711 | |
| 6712 | ; return 0; } |
| 6713 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6714 | if { (eval echo configure:6715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6715 | rm -rf conftest* |
| 6716 | |
| 6717 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6718 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6719 | EOF |
| 6720 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6721 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6722 | #define HAVE_GETHOSTBYNAME_R_3_ARG 1 |
| 6723 | EOF |
| 6724 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6725 | echo "$ac_t""yes" 1>&6 |
| 6726 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6727 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6728 | echo "configure: failed program was:" >&5 |
| 6729 | cat conftest.$ac_ext >&5 |
| 6730 | rm -rf conftest* |
| 6731 | |
| 6732 | echo "$ac_t""no" 1>&6 |
| 6733 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6734 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6735 | rm -f conftest* |
| 6736 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6737 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6738 | rm -f conftest* |
| 6739 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6740 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6741 | rm -f conftest* |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6742 | CFLAGS=$OLD_CFLAGS |
| 6743 | |
| 6744 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6745 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6746 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6747 | for ac_func in gethostbyname |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6748 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6749 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6750 | echo "configure:6751: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6751 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 6752 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6753 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6754 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6755 | #line 6756 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6756 | #include "confdefs.h" |
| 6757 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6758 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6759 | #include <assert.h> |
| 6760 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6761 | /* We use char because int might match the return type of a gcc2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6762 | builtin and then its argument prototype would still apply. */ |
| 6763 | char $ac_func(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6764 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6765 | int main() { |
| 6766 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6767 | /* The GNU C library defines this for functions which it implements |
| 6768 | to always fail with ENOSYS. Some functions are actually named |
| 6769 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6770 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6771 | choke me |
| 6772 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6773 | $ac_func(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6774 | #endif |
| 6775 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6776 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 6777 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6778 | if { (eval echo configure:6779: \"$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] | 6779 | rm -rf conftest* |
| 6780 | eval "ac_cv_func_$ac_func=yes" |
| 6781 | else |
| 6782 | echo "configure: failed program was:" >&5 |
| 6783 | cat conftest.$ac_ext >&5 |
| 6784 | rm -rf conftest* |
| 6785 | eval "ac_cv_func_$ac_func=no" |
| 6786 | fi |
| 6787 | rm -f conftest* |
| 6788 | fi |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6789 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6790 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 6791 | echo "$ac_t""yes" 1>&6 |
| 6792 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 6793 | cat >> confdefs.h <<EOF |
| 6794 | #define $ac_tr_func 1 |
| 6795 | EOF |
| 6796 | |
| 6797 | else |
| 6798 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6799 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6800 | done |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6801 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6802 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6803 | fi |
| 6804 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6805 | |
| 6806 | |
| 6807 | |
| 6808 | |
| 6809 | |
| 6810 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6811 | # checks for system services |
| 6812 | # (none yet) |
| 6813 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6814 | # Linux requires this for correct f.p. operations |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6815 | echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6816 | echo "configure:6817: checking for __fpu_control" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6817 | if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then |
| 6818 | echo $ac_n "(cached) $ac_c" 1>&6 |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6819 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6820 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6821 | #line 6822 "configure" |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6822 | #include "confdefs.h" |
| 6823 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6824 | which can conflict with char __fpu_control(); below. */ |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6825 | #include <assert.h> |
| 6826 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6827 | /* 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] | 6828 | builtin and then its argument prototype would still apply. */ |
| 6829 | char __fpu_control(); |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6830 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6831 | int main() { |
| 6832 | |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6833 | /* The GNU C library defines this for functions which it implements |
| 6834 | to always fail with ENOSYS. Some functions are actually named |
| 6835 | something starting with __ and the normal name is an alias. */ |
| 6836 | #if defined (__stub___fpu_control) || defined (__stub_____fpu_control) |
| 6837 | choke me |
| 6838 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6839 | __fpu_control(); |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6840 | #endif |
| 6841 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6842 | ; return 0; } |
| 6843 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6844 | if { (eval echo configure:6845: \"$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] | 6845 | rm -rf conftest* |
| 6846 | eval "ac_cv_func___fpu_control=yes" |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6847 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6848 | echo "configure: failed program was:" >&5 |
| 6849 | cat conftest.$ac_ext >&5 |
| 6850 | rm -rf conftest* |
| 6851 | eval "ac_cv_func___fpu_control=no" |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6852 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6853 | rm -f conftest* |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6854 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6855 | |
| 6856 | if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then |
| 6857 | echo "$ac_t""yes" 1>&6 |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6858 | : |
| 6859 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6860 | echo "$ac_t""no" 1>&6 |
| 6861 | echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6862 | echo "configure:6863: checking for __fpu_control in -lieee" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6863 | ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'` |
| 6864 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 6865 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6866 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6867 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6868 | LIBS="-lieee $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6869 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6870 | #line 6871 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6871 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6872 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6873 | /* 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] | 6874 | builtin and then its argument prototype would still apply. */ |
| 6875 | char __fpu_control(); |
| 6876 | |
| 6877 | int main() { |
| 6878 | __fpu_control() |
| 6879 | ; return 0; } |
| 6880 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6881 | if { (eval echo configure:6882: \"$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] | 6882 | rm -rf conftest* |
| 6883 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6884 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6885 | echo "configure: failed program was:" >&5 |
| 6886 | cat conftest.$ac_ext >&5 |
| 6887 | rm -rf conftest* |
| 6888 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6889 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6890 | rm -f conftest* |
| 6891 | LIBS="$ac_save_LIBS" |
| 6892 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6893 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6894 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 6895 | echo "$ac_t""yes" 1>&6 |
| 6896 | ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 6897 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
| 6898 | cat >> confdefs.h <<EOF |
| 6899 | #define $ac_tr_lib 1 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6900 | EOF |
| 6901 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6902 | LIBS="-lieee $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6903 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6904 | else |
| 6905 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6906 | fi |
| 6907 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6908 | |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6909 | fi |
| 6910 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6911 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6912 | # Check for --with-fpectl |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6913 | echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6914 | echo "configure:6915: checking for --with-fpectl" >&5 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6915 | # Check whether --with-fpectl or --without-fpectl was given. |
| 6916 | if test "${with_fpectl+set}" = set; then |
| 6917 | withval="$with_fpectl" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6918 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6919 | if test "$withval" != no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6920 | then cat >> confdefs.h <<\EOF |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6921 | #define WANT_SIGFPE_HANDLER 1 |
| 6922 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6923 | echo "$ac_t""yes" 1>&6 |
| 6924 | else echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6925 | fi |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6926 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6927 | echo "$ac_t""no" 1>&6 |
| 6928 | fi |
| 6929 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6930 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6931 | # check for --with-libm=... |
| 6932 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 6933 | case $ac_sys_system in |
Guido van Rossum | 3dc0a51 | 2000-10-05 18:00:06 +0000 | [diff] [blame] | 6934 | Darwin) ;; |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 6935 | BeOS) ;; |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 6936 | *) LIBM=-lm |
| 6937 | esac |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6938 | echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6939 | echo "configure:6940: checking for --with-libm=STRING" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6940 | # Check whether --with-libm or --without-libm was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6941 | if test "${with_libm+set}" = set; then |
| 6942 | withval="$with_libm" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6943 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6944 | if test "$withval" = no |
| 6945 | then LIBM= |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6946 | echo "$ac_t""force LIBM empty" 1>&6 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6947 | elif test "$withval" != yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6948 | then LIBM=$withval |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6949 | echo "$ac_t""set LIBM=\"$withval\"" 1>&6 |
| 6950 | 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] | 6951 | fi |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6952 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6953 | echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6 |
| 6954 | fi |
| 6955 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6956 | |
| 6957 | # check for --with-libc=... |
| 6958 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6959 | echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6960 | echo "configure:6961: checking for --with-libc=STRING" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6961 | # Check whether --with-libc or --without-libc was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6962 | if test "${with_libc+set}" = set; then |
| 6963 | withval="$with_libc" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6964 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6965 | if test "$withval" = no |
| 6966 | then LIBC= |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6967 | echo "$ac_t""force LIBC empty" 1>&6 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6968 | elif test "$withval" != yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6969 | then LIBC=$withval |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6970 | echo "$ac_t""set LIBC=\"$withval\"" 1>&6 |
| 6971 | 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] | 6972 | fi |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6973 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6974 | echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6 |
| 6975 | fi |
| 6976 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6977 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6978 | # check for hypot() in math library |
| 6979 | LIBS_SAVE=$LIBS |
| 6980 | LIBS="$LIBS $LIBM" |
| 6981 | for ac_func in hypot |
| 6982 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6983 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6984 | echo "configure:6985: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6985 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 6986 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6987 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6988 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 6989 | #line 6990 "configure" |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6990 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6991 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6992 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6993 | #include <assert.h> |
| 6994 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6995 | /* 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] | 6996 | builtin and then its argument prototype would still apply. */ |
| 6997 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6998 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6999 | int main() { |
| 7000 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 7001 | /* The GNU C library defines this for functions which it implements |
| 7002 | to always fail with ENOSYS. Some functions are actually named |
| 7003 | something starting with __ and the normal name is an alias. */ |
| 7004 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 7005 | choke me |
| 7006 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7007 | $ac_func(); |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 7008 | #endif |
| 7009 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7010 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7011 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 7012 | if { (eval echo configure:7013: \"$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] | 7013 | rm -rf conftest* |
| 7014 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 7015 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7016 | echo "configure: failed program was:" >&5 |
| 7017 | cat conftest.$ac_ext >&5 |
| 7018 | rm -rf conftest* |
| 7019 | eval "ac_cv_func_$ac_func=no" |
| 7020 | fi |
| 7021 | rm -f conftest* |
| 7022 | fi |
| 7023 | |
| 7024 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 7025 | echo "$ac_t""yes" 1>&6 |
| 7026 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 7027 | cat >> confdefs.h <<EOF |
| 7028 | #define $ac_tr_func 1 |
| 7029 | EOF |
| 7030 | |
| 7031 | else |
| 7032 | echo "$ac_t""no" 1>&6 |
| 7033 | LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 7034 | fi |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 7035 | done |
| 7036 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7037 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 7038 | LIBS=$LIBS_SAVE |
| 7039 | |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 7040 | # check whether malloc(0) returns NULL or not |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7041 | echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 7042 | echo "configure:7043: checking what malloc(0) returns" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7043 | if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then |
| 7044 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 7045 | else |
| 7046 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 7047 | ac_cv_malloc_zero=nonnull |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 7048 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7049 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 7050 | #line 7051 "configure" |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 7051 | #include "confdefs.h" |
| 7052 | #include <stdio.h> |
| 7053 | #ifdef HAVE_STDLIB |
| 7054 | #include <stdlib.h> |
| 7055 | #else |
| 7056 | char *malloc(), *realloc(); |
| 7057 | int *free(); |
| 7058 | #endif |
| 7059 | main() { |
| 7060 | char *p; |
| 7061 | p = malloc(0); |
| 7062 | if (p == NULL) exit(1); |
| 7063 | p = realloc(p, 0); |
| 7064 | if (p == NULL) exit(1); |
| 7065 | free(p); |
| 7066 | exit(0); |
| 7067 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7068 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 7069 | if { (eval echo configure:7070: \"$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] | 7070 | then |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 7071 | ac_cv_malloc_zero=nonnull |
| 7072 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7073 | echo "configure: failed program was:" >&5 |
| 7074 | cat conftest.$ac_ext >&5 |
| 7075 | rm -fr conftest* |
| 7076 | ac_cv_malloc_zero=null |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 7077 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7078 | rm -fr conftest* |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 7079 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7080 | |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 7081 | fi |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 7082 | # XXX arm cross-compile? |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7083 | echo "$ac_t""$ac_cv_malloc_zero" 1>&6 |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 7084 | if test "$ac_cv_malloc_zero" = null |
| 7085 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7086 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 7087 | #define MALLOC_ZERO_RETURNS_NULL 1 |
| 7088 | EOF |
| 7089 | |
| 7090 | fi |
| 7091 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7092 | # check for wchar.h |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7093 | ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'` |
| 7094 | echo $ac_n "checking for wchar.h""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 7095 | echo "configure:7096: checking for wchar.h" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7096 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 7097 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7098 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7099 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 7100 | #line 7101 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7101 | #include "confdefs.h" |
| 7102 | #include <wchar.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7103 | EOF |
| 7104 | 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^] | 7105 | { (eval echo configure:7106: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7106 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 7107 | if test -z "$ac_err"; then |
| 7108 | rm -rf conftest* |
| 7109 | eval "ac_cv_header_$ac_safe=yes" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7110 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7111 | echo "$ac_err" >&5 |
| 7112 | echo "configure: failed program was:" >&5 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7113 | cat conftest.$ac_ext >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7114 | rm -rf conftest* |
| 7115 | eval "ac_cv_header_$ac_safe=no" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7116 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7117 | rm -f conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7118 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7119 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 7120 | echo "$ac_t""yes" 1>&6 |
| 7121 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7122 | #define HAVE_WCHAR_H 1 |
| 7123 | EOF |
| 7124 | wchar_h="yes" |
| 7125 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7126 | echo "$ac_t""no" 1>&6 |
| 7127 | wchar_h="no" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7128 | |
| 7129 | fi |
| 7130 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7131 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7132 | # determine wchar_t size |
| 7133 | if test "$wchar_h" = yes |
| 7134 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7135 | echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 7136 | echo "configure:7137: checking size of wchar_t" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7137 | if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then |
| 7138 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7139 | else |
| 7140 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7141 | ac_cv_sizeof_wchar_t=4 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7142 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7143 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 7144 | #line 7145 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7145 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7146 | #include <stdio.h> |
| 7147 | main() |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7148 | { |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7149 | FILE *f=fopen("conftestval", "w"); |
| 7150 | if (!f) exit(1); |
| 7151 | fprintf(f, "%d\n", sizeof(wchar_t)); |
| 7152 | exit(0); |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7153 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7154 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 7155 | if { (eval echo configure:7156: \"$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] | 7156 | then |
| 7157 | ac_cv_sizeof_wchar_t=`cat conftestval` |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7158 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7159 | echo "configure: failed program was:" >&5 |
| 7160 | cat conftest.$ac_ext >&5 |
| 7161 | rm -fr conftest* |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7162 | ac_cv_sizeof_wchar_t=0 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7163 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7164 | rm -fr conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7165 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7166 | |
| 7167 | fi |
| 7168 | echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 |
| 7169 | cat >> confdefs.h <<EOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7170 | #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t |
| 7171 | EOF |
| 7172 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7173 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7174 | fi |
| 7175 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7176 | echo $ac_n "checking what type to use for unicode""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 7177 | echo "configure:7178: checking what type to use for unicode" >&5 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7178 | # Check whether --enable-unicode or --disable-unicode was given. |
| 7179 | if test "${enable_unicode+set}" = set; then |
| 7180 | enableval="$enable_unicode" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7181 | : |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7182 | else |
| 7183 | enable_unicode=yes |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7184 | fi |
| 7185 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7186 | |
| 7187 | if test $enable_unicode = yes |
| 7188 | then |
Martin v. Löwis | fd91779 | 2001-06-27 20:22:04 +0000 | [diff] [blame] | 7189 | # Without any arguments, Py_UNICODE defaults to two-byte mode |
| 7190 | enable_unicode="ucs2" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7191 | fi |
| 7192 | |
| 7193 | case "$enable_unicode" in |
| 7194 | ucs2) unicode_size="2" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7195 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7196 | #define Py_UNICODE_SIZE 2 |
| 7197 | EOF |
| 7198 | |
| 7199 | ;; |
| 7200 | ucs4) unicode_size="4" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7201 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7202 | #define Py_UNICODE_SIZE 4 |
| 7203 | EOF |
| 7204 | |
| 7205 | ;; |
| 7206 | esac |
| 7207 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7208 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7209 | if test "$enable_unicode" = "no" |
| 7210 | then |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 7211 | UNICODE_OBJS="" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7212 | echo "$ac_t""not used" 1>&6 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7213 | else |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 7214 | UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7215 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7216 | #define Py_USING_UNICODE 1 |
| 7217 | EOF |
| 7218 | |
| 7219 | if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" |
| 7220 | then |
| 7221 | PY_UNICODE_TYPE="wchar_t" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7222 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7223 | #define HAVE_USABLE_WCHAR_T 1 |
| 7224 | EOF |
| 7225 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7226 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7227 | #define PY_UNICODE_TYPE wchar_t |
| 7228 | EOF |
| 7229 | |
| 7230 | elif test "$ac_cv_sizeof_short" = "$unicode_size" |
| 7231 | then |
| 7232 | PY_UNICODE_TYPE="unsigned short" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7233 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7234 | #define PY_UNICODE_TYPE unsigned short |
| 7235 | EOF |
| 7236 | |
| 7237 | elif test "$ac_cv_sizeof_long" = "$unicode_size" |
| 7238 | then |
| 7239 | PY_UNICODE_TYPE="unsigned long" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7240 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7241 | #define PY_UNICODE_TYPE unsigned long |
| 7242 | EOF |
| 7243 | |
| 7244 | else |
| 7245 | PY_UNICODE_TYPE="no type found" |
| 7246 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7247 | echo "$ac_t""$PY_UNICODE_TYPE" 1>&6 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7248 | fi |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7249 | |
| 7250 | # check for endianness |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7251 | echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 7252 | echo "configure:7253: checking whether byte ordering is bigendian" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7253 | if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then |
| 7254 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7255 | else |
| 7256 | ac_cv_c_bigendian=unknown |
| 7257 | # See if sys/param.h defines the BYTE_ORDER macro. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7258 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 7259 | #line 7260 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7260 | #include "confdefs.h" |
| 7261 | #include <sys/types.h> |
| 7262 | #include <sys/param.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7263 | int main() { |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7264 | |
| 7265 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN |
| 7266 | bogus endian macros |
| 7267 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7268 | ; return 0; } |
| 7269 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 7270 | if { (eval echo configure:7271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7271 | rm -rf conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7272 | # 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] | 7273 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 7274 | #line 7275 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7275 | #include "confdefs.h" |
| 7276 | #include <sys/types.h> |
| 7277 | #include <sys/param.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7278 | int main() { |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7279 | |
| 7280 | #if BYTE_ORDER != BIG_ENDIAN |
| 7281 | not big endian |
| 7282 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7283 | ; return 0; } |
| 7284 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 7285 | if { (eval echo configure:7286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7286 | rm -rf conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7287 | ac_cv_c_bigendian=yes |
| 7288 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7289 | echo "configure: failed program was:" >&5 |
| 7290 | cat conftest.$ac_ext >&5 |
| 7291 | rm -rf conftest* |
| 7292 | ac_cv_c_bigendian=no |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7293 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7294 | rm -f conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7295 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7296 | echo "configure: failed program was:" >&5 |
| 7297 | cat conftest.$ac_ext >&5 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7298 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7299 | rm -f conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7300 | if test $ac_cv_c_bigendian = unknown; then |
| 7301 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7302 | { 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] | 7303 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7304 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 7305 | #line 7306 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7306 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7307 | main () { |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7308 | /* Are we little or big endian? From Harbison&Steele. */ |
| 7309 | union |
| 7310 | { |
| 7311 | long l; |
| 7312 | char c[sizeof (long)]; |
| 7313 | } u; |
| 7314 | u.l = 1; |
| 7315 | exit (u.c[sizeof (long) - 1] == 1); |
| 7316 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7317 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 7318 | if { (eval echo configure:7319: \"$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] | 7319 | then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7320 | ac_cv_c_bigendian=no |
| 7321 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7322 | echo "configure: failed program was:" >&5 |
| 7323 | cat conftest.$ac_ext >&5 |
| 7324 | rm -fr conftest* |
| 7325 | ac_cv_c_bigendian=yes |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7326 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7327 | rm -fr conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7328 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7329 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7330 | fi |
| 7331 | fi |
| 7332 | |
| 7333 | echo "$ac_t""$ac_cv_c_bigendian" 1>&6 |
| 7334 | if test $ac_cv_c_bigendian = yes; then |
| 7335 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7336 | #define WORDS_BIGENDIAN 1 |
| 7337 | EOF |
| 7338 | |
| 7339 | fi |
| 7340 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7341 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7342 | # Check whether right shifting a negative integer extends the sign bit |
| 7343 | # 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] | 7344 | echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 7345 | echo "configure:7346: checking whether right shift extends the sign bit" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7346 | if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then |
| 7347 | echo $ac_n "(cached) $ac_c" 1>&6 |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 7348 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7349 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7350 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 7351 | ac_cv_rshift_extends_sign=yes |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7352 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7353 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 7354 | #line 7355 "configure" |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7355 | #include "confdefs.h" |
| 7356 | |
| 7357 | int main() |
| 7358 | { |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 7359 | exit(((-1)>>3 == -1) ? 0 : 1); |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7360 | } |
| 7361 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7362 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 7363 | if { (eval echo configure:7364: \"$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] | 7364 | then |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 7365 | ac_cv_rshift_extends_sign=yes |
| 7366 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7367 | echo "configure: failed program was:" >&5 |
| 7368 | cat conftest.$ac_ext >&5 |
| 7369 | rm -fr conftest* |
| 7370 | ac_cv_rshift_extends_sign=no |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 7371 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7372 | rm -fr conftest* |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 7373 | fi |
| 7374 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7375 | fi |
| 7376 | |
| 7377 | echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6 |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 7378 | if test "$ac_cv_rshift_extends_sign" = no |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7379 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7380 | cat >> confdefs.h <<\EOF |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7381 | #define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1 |
| 7382 | EOF |
| 7383 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7384 | fi |
| 7385 | |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7386 | # check for getc_unlocked and related locking functions |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7387 | echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 7388 | echo "configure:7389: checking for getc_unlocked() and friends" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7389 | if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then |
| 7390 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7391 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7392 | |
| 7393 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 7394 | #line 7395 "configure" |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7395 | #include "confdefs.h" |
| 7396 | #include <stdio.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7397 | int main() { |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7398 | |
| 7399 | FILE *f = fopen("/dev/null", "r"); |
| 7400 | flockfile(f); |
| 7401 | getc_unlocked(f); |
| 7402 | funlockfile(f); |
| 7403 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7404 | ; return 0; } |
| 7405 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 7406 | if { (eval echo configure:7407: \"$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] | 7407 | rm -rf conftest* |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7408 | ac_cv_have_getc_unlocked=yes |
| 7409 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7410 | echo "configure: failed program was:" >&5 |
| 7411 | cat conftest.$ac_ext >&5 |
| 7412 | rm -rf conftest* |
| 7413 | ac_cv_have_getc_unlocked=no |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7414 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7415 | rm -f conftest* |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7416 | fi |
| 7417 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7418 | echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6 |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7419 | if test "$ac_cv_have_getc_unlocked" = yes |
| 7420 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7421 | cat >> confdefs.h <<\EOF |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7422 | #define HAVE_GETC_UNLOCKED 1 |
| 7423 | EOF |
| 7424 | |
| 7425 | fi |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7426 | |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7427 | # check for readline 4.0 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7428 | echo $ac_n "checking for rl_pre_input_hook in -lreadline""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 7429 | echo "configure:7430: checking for rl_pre_input_hook in -lreadline" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7430 | ac_lib_var=`echo readline'_'rl_pre_input_hook | sed 'y%./+-%__p_%'` |
| 7431 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 7432 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7433 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7434 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7435 | LIBS="-lreadline -ltermcap $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7436 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 7437 | #line 7438 "configure" |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7438 | #include "confdefs.h" |
| 7439 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 7440 | /* 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] | 7441 | builtin and then its argument prototype would still apply. */ |
| 7442 | char rl_pre_input_hook(); |
| 7443 | |
| 7444 | int main() { |
| 7445 | rl_pre_input_hook() |
| 7446 | ; return 0; } |
| 7447 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 7448 | if { (eval echo configure:7449: \"$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] | 7449 | rm -rf conftest* |
| 7450 | eval "ac_cv_lib_$ac_lib_var=yes" |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7451 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7452 | echo "configure: failed program was:" >&5 |
| 7453 | cat conftest.$ac_ext >&5 |
| 7454 | rm -rf conftest* |
| 7455 | eval "ac_cv_lib_$ac_lib_var=no" |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7456 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7457 | rm -f conftest* |
| 7458 | LIBS="$ac_save_LIBS" |
| 7459 | |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7460 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7461 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 7462 | echo "$ac_t""yes" 1>&6 |
| 7463 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7464 | #define HAVE_RL_PRE_INPUT_HOOK 1 |
| 7465 | EOF |
| 7466 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7467 | else |
| 7468 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7469 | fi |
| 7470 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7471 | |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7472 | # check for readline 4.2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7473 | echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 7474 | echo "configure:7475: checking for rl_completion_matches in -lreadline" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7475 | ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'` |
| 7476 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 7477 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7478 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7479 | ac_save_LIBS="$LIBS" |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7480 | LIBS="-lreadline -ltermcap $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7481 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 7482 | #line 7483 "configure" |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7483 | #include "confdefs.h" |
| 7484 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 7485 | /* 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] | 7486 | builtin and then its argument prototype would still apply. */ |
| 7487 | char rl_completion_matches(); |
| 7488 | |
| 7489 | int main() { |
| 7490 | rl_completion_matches() |
| 7491 | ; return 0; } |
| 7492 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 7493 | if { (eval echo configure:7494: \"$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] | 7494 | rm -rf conftest* |
| 7495 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7496 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7497 | echo "configure: failed program was:" >&5 |
| 7498 | cat conftest.$ac_ext >&5 |
| 7499 | rm -rf conftest* |
| 7500 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7501 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7502 | rm -f conftest* |
| 7503 | LIBS="$ac_save_LIBS" |
| 7504 | |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7505 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7506 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 7507 | echo "$ac_t""yes" 1>&6 |
| 7508 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7509 | #define HAVE_RL_COMPLETION_MATCHES 1 |
| 7510 | EOF |
| 7511 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7512 | else |
| 7513 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7514 | fi |
| 7515 | |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7516 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7517 | echo $ac_n "checking for broken nice()""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 7518 | echo "configure:7519: checking for broken nice()" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7519 | if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then |
| 7520 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 7521 | else |
| 7522 | |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7523 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 7524 | ac_cv_broken_nice=no |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7525 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7526 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 7527 | #line 7528 "configure" |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7528 | #include "confdefs.h" |
| 7529 | |
| 7530 | int main() |
| 7531 | { |
| 7532 | int val1 = nice(1); |
| 7533 | if (val1 != -1 && val1 == nice(2)) |
| 7534 | exit(0); |
| 7535 | exit(1); |
| 7536 | } |
| 7537 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7538 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 7539 | if { (eval echo configure:7540: \"$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] | 7540 | then |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7541 | ac_cv_broken_nice=yes |
| 7542 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7543 | echo "configure: failed program was:" >&5 |
| 7544 | cat conftest.$ac_ext >&5 |
| 7545 | rm -fr conftest* |
| 7546 | ac_cv_broken_nice=no |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7547 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7548 | rm -fr conftest* |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7549 | fi |
| 7550 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7551 | fi |
| 7552 | |
| 7553 | echo "$ac_t""$ac_cv_broken_nice" 1>&6 |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7554 | if test "$ac_cv_broken_nice" = yes |
| 7555 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7556 | cat >> confdefs.h <<\EOF |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7557 | #define HAVE_BROKEN_NICE 1 |
| 7558 | EOF |
| 7559 | |
| 7560 | fi |
| 7561 | |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7562 | # 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] | 7563 | echo $ac_n "checking whether mvwdelch is an expression""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 7564 | echo "configure:7565: checking whether mvwdelch is an expression" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7565 | if eval "test \"`echo '$''{'ac_cv_mvwdelch_is_expression'+set}'`\" = set"; then |
| 7566 | echo $ac_n "(cached) $ac_c" 1>&6 |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7567 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7568 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 7569 | #line 7570 "configure" |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7570 | #include "confdefs.h" |
| 7571 | #include <curses.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7572 | int main() { |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7573 | |
| 7574 | int rtn; |
| 7575 | rtn = mvwdelch(0,0,0); |
| 7576 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7577 | ; return 0; } |
| 7578 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 7579 | if { (eval echo configure:7580: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7580 | rm -rf conftest* |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7581 | ac_cv_mvwdelch_is_expression=yes |
| 7582 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7583 | echo "configure: failed program was:" >&5 |
| 7584 | cat conftest.$ac_ext >&5 |
| 7585 | rm -rf conftest* |
| 7586 | ac_cv_mvwdelch_is_expression=no |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7587 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7588 | rm -f conftest* |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7589 | fi |
| 7590 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7591 | echo "$ac_t""$ac_cv_mvwdelch_is_expression" 1>&6 |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7592 | |
| 7593 | if test "$ac_cv_mvwdelch_is_expression" = yes |
| 7594 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7595 | cat >> confdefs.h <<\EOF |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7596 | #define MVWDELCH_IS_EXPRESSION 1 |
| 7597 | EOF |
| 7598 | |
| 7599 | fi |
| 7600 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7601 | echo $ac_n "checking whether WINDOW has _flags""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 7602 | echo "configure:7603: checking whether WINDOW has _flags" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7603 | if eval "test \"`echo '$''{'ac_cv_window_has_flags'+set}'`\" = set"; then |
| 7604 | echo $ac_n "(cached) $ac_c" 1>&6 |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7605 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7606 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 7607 | #line 7608 "configure" |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7608 | #include "confdefs.h" |
| 7609 | #include <curses.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7610 | int main() { |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7611 | |
| 7612 | WINDOW *w; |
| 7613 | w->_flags = 0; |
| 7614 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7615 | ; return 0; } |
| 7616 | EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 7617 | if { (eval echo configure:7618: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7618 | rm -rf conftest* |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7619 | ac_cv_window_has_flags=yes |
| 7620 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7621 | echo "configure: failed program was:" >&5 |
| 7622 | cat conftest.$ac_ext >&5 |
| 7623 | rm -rf conftest* |
| 7624 | ac_cv_window_has_flags=no |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7625 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7626 | rm -f conftest* |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7627 | fi |
| 7628 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7629 | echo "$ac_t""$ac_cv_window_has_flags" 1>&6 |
| 7630 | |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7631 | |
| 7632 | if test "$ac_cv_window_has_flags" = yes |
| 7633 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7634 | cat >> confdefs.h <<\EOF |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7635 | #define WINDOW_HAS_FLAGS 1 |
| 7636 | EOF |
| 7637 | |
| 7638 | fi |
| 7639 | |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7640 | # THIS MUST BE LAST, IT CAN BREAK OTHER TESTS! |
| 7641 | # Add sys/socket.h to confdefs.h |
| 7642 | cat >> confdefs.h <<\EOF |
| 7643 | #ifdef HAVE_SYS_SOCKET_H |
| 7644 | #include <sys/socket.h> |
| 7645 | #endif |
| 7646 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7647 | echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 7648 | echo "configure:7649: checking for socklen_t" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7649 | if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then |
| 7650 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7651 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7652 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 7653 | #line 7654 "configure" |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7654 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7655 | #include <sys/types.h> |
| 7656 | #if STDC_HEADERS |
| 7657 | #include <stdlib.h> |
| 7658 | #include <stddef.h> |
| 7659 | #endif |
| 7660 | EOF |
| 7661 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 7662 | egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
| 7663 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7664 | ac_cv_type_socklen_t=yes |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7665 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7666 | rm -rf conftest* |
| 7667 | ac_cv_type_socklen_t=no |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7668 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7669 | rm -f conftest* |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7670 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7671 | fi |
| 7672 | echo "$ac_t""$ac_cv_type_socklen_t" 1>&6 |
| 7673 | if test $ac_cv_type_socklen_t = no; then |
| 7674 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7675 | #define socklen_t int |
| 7676 | EOF |
| 7677 | |
| 7678 | fi |
| 7679 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7680 | |
Neil Schemenauer | f25cf6c | 2001-03-04 06:39:33 +0000 | [diff] [blame] | 7681 | # Add Python/ prefix to LIBOBJS |
| 7682 | libobjs=$LIBOBJS |
| 7683 | LIBOBJS= |
| 7684 | for obj in $libobjs; do |
| 7685 | LIBOBJS="$LIBOBJS Python/$obj" |
| 7686 | done |
| 7687 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7688 | #AC_MSG_CHECKING(for Modules/Setup) |
| 7689 | #if test ! -f Modules/Setup ; then |
| 7690 | # if test ! -d Modules ; then |
| 7691 | # mkdir Modules |
| 7692 | # fi |
| 7693 | # cp "$srcdir/Modules/Setup.dist" Modules/Setup |
| 7694 | # AC_MSG_RESULT(creating) |
| 7695 | #else |
| 7696 | # AC_MSG_RESULT(already exists) |
| 7697 | #fi |
| 7698 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7699 | |
| 7700 | |
Martin v. Löwis | 06f15bb | 2001-12-02 13:02:32 +0000 | [diff] [blame] | 7701 | for h in `(cd $srcdir;echo Python/thread_*.h)` |
| 7702 | do |
| 7703 | THREADHEADERS="$THREADHEADERS \$(srcdir)/$h" |
| 7704 | done |
| 7705 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7706 | |
Neil Schemenauer | acbf9ef | 2001-02-27 02:15:14 +0000 | [diff] [blame] | 7707 | SRCDIRS="Parser Grammar Objects Python Modules" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7708 | echo $ac_n "checking for build directories""... $ac_c" 1>&6 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 7709 | echo "configure:7710: checking for build directories" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7710 | for dir in $SRCDIRS; do |
| 7711 | if test ! -d $dir; then |
| 7712 | mkdir $dir |
Guido van Rossum | 262cf20 | 2000-11-02 19:33:53 +0000 | [diff] [blame] | 7713 | fi |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7714 | done |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7715 | echo "$ac_t""done" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 7716 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7717 | # generate output files |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7718 | trap '' 1 2 15 |
| 7719 | cat > confcache <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7720 | # This file is a shell script that caches the results of configure |
| 7721 | # 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] | 7722 | # scripts and configure runs. It is not useful on other systems. |
| 7723 | # 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] | 7724 | # |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7725 | # By default, configure uses ./config.cache as the cache file, |
| 7726 | # creating it if it does not exist already. You can give configure |
| 7727 | # the --cache-file=FILE option to use a different cache file; that is |
| 7728 | # what configure does when it calls configure scripts in |
| 7729 | # subdirectories, so they share the cache. |
| 7730 | # Giving --cache-file=/dev/null disables caching, for debugging configure. |
| 7731 | # config.status only pays attention to the cache file if you give it the |
| 7732 | # --recheck option to rerun configure. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7733 | # |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7734 | EOF |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7735 | # The following way of writing the cache mishandles newlines in values, |
| 7736 | # but we know of no workaround that is simple, portable, and efficient. |
| 7737 | # So, don't put newlines in cache variables' values. |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7738 | # Ultrix sh set writes to stderr and can't be redirected directly, |
| 7739 | # 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] | 7740 | (set) 2>&1 | |
| 7741 | case `(ac_space=' '; set | grep ac_space) 2>&1` in |
| 7742 | *ac_space=\ *) |
| 7743 | # `set' does not quote correctly, so add quotes (double-quote substitution |
| 7744 | # turns \\\\ into \\, and sed turns \\ into \). |
| 7745 | sed -n \ |
| 7746 | -e "s/'/'\\\\''/g" \ |
| 7747 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" |
| 7748 | ;; |
| 7749 | *) |
| 7750 | # `set' quotes correctly as required by POSIX, so do not add quotes. |
| 7751 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' |
| 7752 | ;; |
| 7753 | esac >> confcache |
| 7754 | if cmp -s $cache_file confcache; then |
| 7755 | : |
| 7756 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7757 | if test -w $cache_file; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7758 | echo "updating cache $cache_file" |
| 7759 | cat confcache > $cache_file |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7760 | else |
| 7761 | echo "not updating unwritable cache $cache_file" |
| 7762 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7763 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7764 | rm -f confcache |
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 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 |
| 7767 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7768 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
| 7769 | # Let make expand exec_prefix. |
| 7770 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7771 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7772 | # Any assignment to VPATH causes Sun make to only execute |
| 7773 | # the first set of double-colon rules, so remove it if not needed. |
| 7774 | # 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] | 7775 | if test "x$srcdir" = x.; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7776 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7777 | fi |
| 7778 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7779 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 |
| 7780 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7781 | DEFS=-DHAVE_CONFIG_H |
| 7782 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7783 | # Without the "./", some shells look in PATH for config.status. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7784 | : ${CONFIG_STATUS=./config.status} |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7785 | |
| 7786 | echo creating $CONFIG_STATUS |
| 7787 | rm -f $CONFIG_STATUS |
| 7788 | cat > $CONFIG_STATUS <<EOF |
| 7789 | #! /bin/sh |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7790 | # Generated automatically by configure. |
| 7791 | # Run this file to recreate the current configuration. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7792 | # This directory was configured as follows, |
| 7793 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: |
| 7794 | # |
| 7795 | # $0 $ac_configure_args |
| 7796 | # |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7797 | # Compiler output produced by configure, useful for debugging |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7798 | # configure, is in ./config.log if it exists. |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7799 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7800 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" |
| 7801 | for ac_option |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7802 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7803 | case "\$ac_option" in |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7804 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7805 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" |
| 7806 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; |
| 7807 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) |
| 7808 | echo "$CONFIG_STATUS generated by autoconf version 2.13" |
| 7809 | exit 0 ;; |
| 7810 | -help | --help | --hel | --he | --h) |
| 7811 | echo "\$ac_cs_usage"; exit 0 ;; |
| 7812 | *) echo "\$ac_cs_usage"; exit 1 ;; |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7813 | esac |
| 7814 | done |
| 7815 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7816 | ac_given_srcdir=$srcdir |
| 7817 | ac_given_INSTALL="$INSTALL" |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7818 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7819 | 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] | 7820 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7821 | cat >> $CONFIG_STATUS <<EOF |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7822 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7823 | # Protect against being on the right side of a sed subst in config.status. |
| 7824 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; |
| 7825 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF |
| 7826 | $ac_vpsub |
| 7827 | $extrasub |
| 7828 | s%@SHELL@%$SHELL%g |
| 7829 | s%@CFLAGS@%$CFLAGS%g |
| 7830 | s%@CPPFLAGS@%$CPPFLAGS%g |
| 7831 | s%@CXXFLAGS@%$CXXFLAGS%g |
| 7832 | s%@FFLAGS@%$FFLAGS%g |
| 7833 | s%@DEFS@%$DEFS%g |
| 7834 | s%@LDFLAGS@%$LDFLAGS%g |
| 7835 | s%@LIBS@%$LIBS%g |
| 7836 | s%@exec_prefix@%$exec_prefix%g |
| 7837 | s%@prefix@%$prefix%g |
| 7838 | s%@program_transform_name@%$program_transform_name%g |
| 7839 | s%@bindir@%$bindir%g |
| 7840 | s%@sbindir@%$sbindir%g |
| 7841 | s%@libexecdir@%$libexecdir%g |
| 7842 | s%@datadir@%$datadir%g |
| 7843 | s%@sysconfdir@%$sysconfdir%g |
| 7844 | s%@sharedstatedir@%$sharedstatedir%g |
| 7845 | s%@localstatedir@%$localstatedir%g |
| 7846 | s%@libdir@%$libdir%g |
| 7847 | s%@includedir@%$includedir%g |
| 7848 | s%@oldincludedir@%$oldincludedir%g |
| 7849 | s%@infodir@%$infodir%g |
| 7850 | s%@mandir@%$mandir%g |
| 7851 | s%@VERSION@%$VERSION%g |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 7852 | s%@SOVERSION@%$SOVERSION%g |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7853 | s%@CONFIG_ARGS@%$CONFIG_ARGS%g |
| 7854 | s%@PYTHONFRAMEWORK@%$PYTHONFRAMEWORK%g |
| 7855 | s%@PYTHONFRAMEWORKDIR@%$PYTHONFRAMEWORKDIR%g |
| 7856 | s%@PYTHONFRAMEWORKPREFIX@%$PYTHONFRAMEWORKPREFIX%g |
| 7857 | s%@PYTHONFRAMEWORKINSTALLDIR@%$PYTHONFRAMEWORKINSTALLDIR%g |
| 7858 | s%@MACHDEP@%$MACHDEP%g |
| 7859 | s%@SGI_ABI@%$SGI_ABI%g |
| 7860 | s%@CXX@%$CXX%g |
| 7861 | s%@MAINOBJ@%$MAINOBJ%g |
| 7862 | s%@CC@%$CC%g |
| 7863 | s%@CPP@%$CPP%g |
| 7864 | s%@EXEEXT@%$EXEEXT%g |
| 7865 | s%@BUILDEXEEXT@%$BUILDEXEEXT%g |
| 7866 | s%@LIBRARY@%$LIBRARY%g |
| 7867 | s%@LDLIBRARY@%$LDLIBRARY%g |
| 7868 | s%@DLLLIBRARY@%$DLLLIBRARY%g |
| 7869 | s%@BLDLIBRARY@%$BLDLIBRARY%g |
| 7870 | s%@LDLIBRARYDIR@%$LDLIBRARYDIR%g |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame^] | 7871 | s%@INSTSONAME@%$INSTSONAME%g |
| 7872 | s%@RUNSHARED@%$RUNSHARED%g |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7873 | s%@LINKCC@%$LINKCC%g |
| 7874 | s%@RANLIB@%$RANLIB%g |
| 7875 | s%@AR@%$AR%g |
| 7876 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
| 7877 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g |
| 7878 | s%@INSTALL_DATA@%$INSTALL_DATA%g |
| 7879 | s%@LN@%$LN%g |
| 7880 | s%@OPT@%$OPT%g |
| 7881 | s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g |
| 7882 | s%@SO@%$SO%g |
| 7883 | s%@LDSHARED@%$LDSHARED%g |
| 7884 | s%@BLDSHARED@%$BLDSHARED%g |
| 7885 | s%@CCSHARED@%$CCSHARED%g |
| 7886 | s%@LINKFORSHARED@%$LINKFORSHARED%g |
| 7887 | s%@CFLAGSFORSHARED@%$CFLAGSFORSHARED%g |
| 7888 | s%@USE_SIGNAL_MODULE@%$USE_SIGNAL_MODULE%g |
| 7889 | s%@SIGNAL_OBJS@%$SIGNAL_OBJS%g |
| 7890 | s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g |
| 7891 | s%@LDLAST@%$LDLAST%g |
| 7892 | s%@DLINCLDIR@%$DLINCLDIR%g |
| 7893 | s%@DYNLOADFILE@%$DYNLOADFILE%g |
| 7894 | s%@MACHDEP_OBJS@%$MACHDEP_OBJS%g |
| 7895 | s%@LIBOBJS@%$LIBOBJS%g |
| 7896 | s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g |
| 7897 | s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g |
| 7898 | s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g |
| 7899 | s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g |
| 7900 | s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g |
| 7901 | s%@LIBM@%$LIBM%g |
| 7902 | s%@LIBC@%$LIBC%g |
| 7903 | s%@UNICODE_OBJS@%$UNICODE_OBJS%g |
| 7904 | s%@THREADHEADERS@%$THREADHEADERS%g |
| 7905 | s%@SRCDIRS@%$SRCDIRS%g |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7906 | |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7907 | CEOF |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7908 | EOF |
| 7909 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7910 | cat >> $CONFIG_STATUS <<\EOF |
| 7911 | |
| 7912 | # Split the substitutions into bite-sized pieces for seds with |
| 7913 | # small command number limits, like on Digital OSF/1 and HP-UX. |
| 7914 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. |
| 7915 | ac_file=1 # Number of current file. |
| 7916 | ac_beg=1 # First line for current file. |
| 7917 | ac_end=$ac_max_sed_cmds # Line after last line for current file. |
| 7918 | ac_more_lines=: |
| 7919 | ac_sed_cmds="" |
| 7920 | while $ac_more_lines; do |
| 7921 | if test $ac_beg -gt 1; then |
| 7922 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file |
| 7923 | else |
| 7924 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7925 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7926 | if test ! -s conftest.s$ac_file; then |
| 7927 | ac_more_lines=false |
| 7928 | rm -f conftest.s$ac_file |
| 7929 | else |
| 7930 | if test -z "$ac_sed_cmds"; then |
| 7931 | ac_sed_cmds="sed -f conftest.s$ac_file" |
| 7932 | else |
| 7933 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" |
| 7934 | fi |
| 7935 | ac_file=`expr $ac_file + 1` |
| 7936 | ac_beg=$ac_end |
| 7937 | ac_end=`expr $ac_end + $ac_max_sed_cmds` |
| 7938 | fi |
| 7939 | done |
| 7940 | if test -z "$ac_sed_cmds"; then |
| 7941 | ac_sed_cmds=cat |
| 7942 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7943 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7944 | |
| 7945 | cat >> $CONFIG_STATUS <<EOF |
| 7946 | |
| 7947 | CONFIG_FILES=\${CONFIG_FILES-"Makefile.pre Modules/Setup.config"} |
| 7948 | EOF |
| 7949 | cat >> $CONFIG_STATUS <<\EOF |
| 7950 | 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] | 7951 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7952 | case "$ac_file" in |
| 7953 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
| 7954 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
| 7955 | *) ac_file_in="${ac_file}.in" ;; |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7956 | esac |
| 7957 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7958 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. |
| 7959 | |
| 7960 | # Remove last slash and all that follows it. Not all systems have dirname. |
| 7961 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7962 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7963 | # The file is in a subdirectory. |
| 7964 | test ! -d "$ac_dir" && mkdir "$ac_dir" |
| 7965 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7966 | # A "../" for each directory in $ac_dir_suffix. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7967 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7968 | else |
| 7969 | ac_dir_suffix= ac_dots= |
| 7970 | fi |
| 7971 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7972 | case "$ac_given_srcdir" in |
| 7973 | .) srcdir=. |
| 7974 | if test -z "$ac_dots"; then top_srcdir=. |
| 7975 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; |
| 7976 | /*) 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] | 7977 | *) # Relative path. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7978 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" |
| 7979 | top_srcdir="$ac_dots$ac_given_srcdir" ;; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7980 | esac |
| 7981 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7982 | case "$ac_given_INSTALL" in |
| 7983 | [/$]*) INSTALL="$ac_given_INSTALL" ;; |
| 7984 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7985 | esac |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7986 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7987 | echo creating "$ac_file" |
| 7988 | rm -f "$ac_file" |
| 7989 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." |
| 7990 | case "$ac_file" in |
| 7991 | *Makefile*) ac_comsub="1i\\ |
| 7992 | # $configure_input" ;; |
| 7993 | *) ac_comsub= ;; |
| 7994 | esac |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7995 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7996 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
| 7997 | sed -e "$ac_comsub |
| 7998 | s%@configure_input@%$configure_input%g |
| 7999 | s%@srcdir@%$srcdir%g |
| 8000 | s%@top_srcdir@%$top_srcdir%g |
| 8001 | s%@INSTALL@%$INSTALL%g |
| 8002 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file |
| 8003 | fi; done |
| 8004 | rm -f conftest.s* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 8005 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8006 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where |
| 8007 | # 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] | 8008 | # |
| 8009 | # ac_d sets the value in "#define NAME VALUE" lines. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8010 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' |
| 8011 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' |
| 8012 | ac_dC='\3' |
| 8013 | ac_dD='%g' |
| 8014 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". |
| 8015 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
| 8016 | ac_uB='\([ ]\)%\1#\2define\3' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 8017 | ac_uC=' ' |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8018 | ac_uD='\4%g' |
| 8019 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". |
| 8020 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
| 8021 | ac_eB='$%\1#\2define\3' |
| 8022 | ac_eC=' ' |
| 8023 | ac_eD='%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 8024 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8025 | if test "${CONFIG_HEADERS+set}" != set; then |
| 8026 | EOF |
| 8027 | cat >> $CONFIG_STATUS <<EOF |
| 8028 | CONFIG_HEADERS="pyconfig.h" |
| 8029 | EOF |
| 8030 | cat >> $CONFIG_STATUS <<\EOF |
| 8031 | fi |
| 8032 | 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] | 8033 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8034 | case "$ac_file" in |
| 8035 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
| 8036 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
| 8037 | *) ac_file_in="${ac_file}.in" ;; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8038 | esac |
| 8039 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8040 | echo creating $ac_file |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 8041 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8042 | rm -f conftest.frag conftest.in conftest.out |
| 8043 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
| 8044 | cat $ac_file_inputs > conftest.in |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8045 | |
| 8046 | EOF |
| 8047 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8048 | # Transform confdefs.h into a sed script conftest.vals that substitutes |
| 8049 | # the proper values into config.h.in to produce config.h. And first: |
| 8050 | # Protect against being on the right side of a sed subst in config.status. |
| 8051 | # Protect against being in an unquoted here document in config.status. |
| 8052 | rm -f conftest.vals |
| 8053 | cat > conftest.hdr <<\EOF |
| 8054 | s/[\\&%]/\\&/g |
| 8055 | s%[\\$`]%\\&%g |
| 8056 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp |
| 8057 | s%ac_d%ac_u%gp |
| 8058 | s%ac_u%ac_e%gp |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8059 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8060 | sed -n -f conftest.hdr confdefs.h > conftest.vals |
| 8061 | rm -f conftest.hdr |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8062 | |
| 8063 | # This sed command replaces #undef with comments. This is necessary, for |
| 8064 | # example, in the case of _POSIX_SOURCE, which is predefined and required |
| 8065 | # on some systems where configure will not decide to define it. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8066 | cat >> conftest.vals <<\EOF |
| 8067 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8068 | EOF |
| 8069 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8070 | # Break up conftest.vals because some shells have a limit on |
| 8071 | # 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] | 8072 | |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 8073 | rm -f conftest.tail |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8074 | while : |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 8075 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8076 | ac_lines=`grep -c . conftest.vals` |
| 8077 | # grep -c gives empty output for an empty file on some AIX systems. |
| 8078 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi |
| 8079 | # Write a limited-size here document to conftest.frag. |
| 8080 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS |
| 8081 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 8082 | echo 'CEOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8083 | sed -f conftest.frag conftest.in > conftest.out |
| 8084 | rm -f conftest.in |
| 8085 | mv conftest.out conftest.in |
| 8086 | ' >> $CONFIG_STATUS |
| 8087 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail |
| 8088 | rm -f conftest.vals |
| 8089 | mv conftest.tail conftest.vals |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 8090 | done |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8091 | rm -f conftest.vals |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 8092 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8093 | cat >> $CONFIG_STATUS <<\EOF |
| 8094 | rm -f conftest.frag conftest.h |
| 8095 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h |
| 8096 | cat conftest.in >> conftest.h |
| 8097 | rm -f conftest.in |
| 8098 | if cmp -s $ac_file conftest.h 2>/dev/null; then |
| 8099 | echo "$ac_file is unchanged" |
| 8100 | rm -f conftest.h |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 8101 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8102 | # Remove last slash and all that follows it. Not all systems have dirname. |
| 8103 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 8104 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8105 | # The file is in a subdirectory. |
| 8106 | test ! -d "$ac_dir" && mkdir "$ac_dir" |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 8107 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8108 | rm -f $ac_file |
| 8109 | mv conftest.h $ac_file |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 8110 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8111 | fi; done |
| 8112 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 8113 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8114 | cat >> $CONFIG_STATUS <<EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 8115 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8116 | EOF |
| 8117 | cat >> $CONFIG_STATUS <<\EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 8118 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8119 | exit 0 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 8120 | EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8121 | chmod +x $CONFIG_STATUS |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8122 | rm -fr confdefs* $ac_clean_files |
| 8123 | 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] | 8124 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 8125 | |
| 8126 | echo "creating Setup" |
| 8127 | if test ! -f Modules/Setup |
| 8128 | then |
| 8129 | cp $srcdir/Modules/Setup.dist Modules/Setup |
| 8130 | fi |
| 8131 | |
| 8132 | echo "creating Setup.local" |
| 8133 | if test ! -f Modules/Setup.local |
| 8134 | then |
| 8135 | echo "# Edit this file for local setup changes" >Modules/Setup.local |
| 8136 | fi |
| 8137 | |
| 8138 | echo "creating Makefile" |
| 8139 | $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \ |
| 8140 | -s Modules Modules/Setup.config \ |
Neil Schemenauer | f8b71c5 | 2001-04-21 17:41:16 +0000 | [diff] [blame] | 8141 | Modules/Setup.local Modules/Setup |
Neil Schemenauer | c761fc8 | 2001-02-19 04:50:49 +0000 | [diff] [blame] | 8142 | mv config.c Modules |