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 | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3 | # From configure.in Revision: 1.303 |
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 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 1707 | then |
| 1708 | cat >> confdefs.h <<\EOF |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1709 | #define Py_DEBUG 1 |
| 1710 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 1711 | |
| 1712 | echo "$ac_t""yes" 1>&6; |
| 1713 | Py_DEBUG='true' |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1714 | else echo "$ac_t""no" 1>&6; Py_DEBUG='false' |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1715 | fi |
| 1716 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1717 | echo "$ac_t""no" 1>&6 |
| 1718 | fi |
| 1719 | |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1720 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1721 | # Optimizer/debugger flags |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1722 | |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1723 | if test -z "$OPT" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1724 | then |
Guido van Rossum | edca74a | 1997-07-18 23:29:40 +0000 | [diff] [blame] | 1725 | case $GCC in |
| 1726 | yes) |
| 1727 | case $ac_cv_prog_cc_g in |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1728 | yes) |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1729 | if test "$Py_DEBUG" = 'true' ; then |
| 1730 | # Optimization messes up debuggers, so turn it off for |
| 1731 | # debug builds. |
| 1732 | OPT="-g -Wall -Wstrict-prototypes" |
| 1733 | else |
| 1734 | OPT="-g -O3 -Wall -Wstrict-prototypes" |
| 1735 | fi;; |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1736 | *) |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1737 | OPT="-O3 -Wall -Wstrict-prototypes";; |
| 1738 | esac |
| 1739 | ;; |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1740 | *) |
| 1741 | case $ac_sys_system in |
Martin v. Löwis | 25ae43b | 2001-10-07 08:39:18 +0000 | [diff] [blame] | 1742 | OpenUNIX*|UnixWare*) |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1743 | OPT="-O -K pentium,host,inline,loop_unroll,alloca ";; |
| 1744 | *) |
| 1745 | OPT="-O";; |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1746 | esac |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1747 | esac |
Jack Jansen | ca06bc6 | 2001-08-03 15:32:23 +0000 | [diff] [blame] | 1748 | case $ac_sys_system in |
| 1749 | Darwin*) |
Jack Jansen | 524a098 | 2002-03-12 15:25:52 +0000 | [diff] [blame] | 1750 | OPT="$OPT -Wno-long-double -no-cpp-precomp";; |
Jack Jansen | ca06bc6 | 2001-08-03 15:32:23 +0000 | [diff] [blame] | 1751 | esac |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1752 | fi |
| 1753 | |
Fred Drake | e1ceaa0 | 2001-12-04 20:55:47 +0000 | [diff] [blame] | 1754 | if test "$Py_DEBUG" = 'true'; then |
| 1755 | : |
| 1756 | else |
| 1757 | OPT="-DNDEBUG $OPT" |
| 1758 | fi |
| 1759 | |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1760 | # The current (beta) Monterey compiler dies with optimizations |
| 1761 | case $ac_sys_system in |
| 1762 | Monterey*) OPT="";; |
| 1763 | esac |
| 1764 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 1765 | if test "$ac_arch_flags" |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 1766 | then |
| 1767 | OPT="$OPT $ac_arch_flags" |
| 1768 | fi |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 1769 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1770 | echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 1771 | echo "configure:1772: checking whether $CC accepts -OPT:Olimit=0" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1772 | if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then |
| 1773 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1774 | else |
| 1775 | ac_save_cc="$CC" |
| 1776 | CC="$CC -OPT:Olimit=0" |
| 1777 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 1778 | ac_cv_opt_olimit_ok=no |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1779 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1780 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 1781 | #line 1782 "configure" |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1782 | #include "confdefs.h" |
| 1783 | int main() { return 0; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1784 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 1785 | if { (eval echo configure:1786: \"$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] | 1786 | then |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1787 | ac_cv_opt_olimit_ok=yes |
| 1788 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1789 | echo "configure: failed program was:" >&5 |
| 1790 | cat conftest.$ac_ext >&5 |
| 1791 | rm -fr conftest* |
| 1792 | ac_cv_opt_olimit_ok=no |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1793 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1794 | rm -fr conftest* |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1795 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1796 | |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1797 | CC="$ac_save_cc" |
| 1798 | fi |
| 1799 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1800 | echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6 |
Guido van Rossum | 2efa34b | 1997-10-23 17:43:11 +0000 | [diff] [blame] | 1801 | if test $ac_cv_opt_olimit_ok = yes; then |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 1802 | case $ac_sys_system in |
| 1803 | Darwin*) OPT="$OPT" ;; |
| 1804 | *) OPT="$OPT -OPT:Olimit=0";; |
| 1805 | esac |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1806 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1807 | echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 1808 | echo "configure:1809: checking whether $CC accepts -Olimit 1500" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1809 | if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then |
| 1810 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1811 | else |
| 1812 | ac_save_cc="$CC" |
| 1813 | CC="$CC -Olimit 1500" |
| 1814 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 1815 | ac_cv_olimit_ok=no |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1816 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1817 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 1818 | #line 1819 "configure" |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1819 | #include "confdefs.h" |
| 1820 | int main() { return 0; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1821 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 1822 | if { (eval echo configure:1823: \"$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] | 1823 | then |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1824 | ac_cv_olimit_ok=yes |
| 1825 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1826 | echo "configure: failed program was:" >&5 |
| 1827 | cat conftest.$ac_ext >&5 |
| 1828 | rm -fr conftest* |
| 1829 | ac_cv_olimit_ok=no |
Guido van Rossum | 201afe5 | 1997-05-14 21:14:44 +0000 | [diff] [blame] | 1830 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1831 | rm -fr conftest* |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1832 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1833 | |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1834 | CC="$ac_save_cc" |
| 1835 | fi |
| 1836 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1837 | echo "$ac_t""$ac_cv_olimit_ok" 1>&6 |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1838 | if test $ac_cv_olimit_ok = yes; then |
| 1839 | OPT="$OPT -Olimit 1500" |
| 1840 | fi |
| 1841 | fi |
| 1842 | |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1843 | # On some compilers, pthreads are available without further options |
| 1844 | # (e.g. MacOS X). On some of these systems, the compiler will not |
| 1845 | # complain if unaccepted options are passed (e.g. gcc on Mac OS X). |
| 1846 | # So we have to see first whether pthreads are available without |
| 1847 | # options before we can check whether -Kpthread improves anything. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1848 | echo $ac_n "checking whether pthreads are available without options""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 1849 | echo "configure:1850: checking whether pthreads are available without options" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1850 | if eval "test \"`echo '$''{'ac_cv_pthread_is_default'+set}'`\" = set"; then |
| 1851 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1852 | else |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1853 | if test "$cross_compiling" = yes; then |
| 1854 | ac_cv_pthread_is_default=no |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame] | 1855 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1856 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 1857 | #line 1858 "configure" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1858 | #include "confdefs.h" |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame] | 1859 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1860 | #include <pthread.h> |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame] | 1861 | |
| 1862 | void* routine(void* p){return NULL;} |
| 1863 | |
| 1864 | int main(){ |
| 1865 | pthread_t p; |
| 1866 | if(pthread_create(&p,NULL,routine,NULL)!=0) |
| 1867 | return 1; |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 1868 | (void)pthread_detach(p); |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame] | 1869 | return 0; |
| 1870 | } |
| 1871 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1872 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 1873 | if { (eval echo configure:1874: \"$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] | 1874 | then |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1875 | ac_cv_pthread_is_default=yes |
| 1876 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1877 | echo "configure: failed program was:" >&5 |
| 1878 | cat conftest.$ac_ext >&5 |
| 1879 | rm -fr conftest* |
| 1880 | ac_cv_pthread_is_default=no |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1881 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1882 | rm -fr conftest* |
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 | |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1886 | fi |
| 1887 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1888 | echo "$ac_t""$ac_cv_pthread_is_default" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1889 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1890 | |
| 1891 | if test $ac_cv_pthread_is_default = yes |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1892 | then |
| 1893 | ac_cv_kpthread=no |
| 1894 | else |
| 1895 | # -Kpthread, if available, provides the right #defines |
| 1896 | # and linker options to make pthread_create available |
| 1897 | # Some compilers won't report that they do not support -Kpthread, |
| 1898 | # so we need to run a program to see whether it really made the |
| 1899 | # function available. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1900 | echo $ac_n "checking whether $CC accepts -Kpthread""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 1901 | echo "configure:1902: checking whether $CC accepts -Kpthread" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1902 | if eval "test \"`echo '$''{'ac_cv_kpthread'+set}'`\" = set"; then |
| 1903 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1904 | else |
| 1905 | ac_save_cc="$CC" |
| 1906 | CC="$CC -Kpthread" |
| 1907 | if test "$cross_compiling" = yes; then |
| 1908 | ac_cv_kpthread=no |
| 1909 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1910 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 1911 | #line 1912 "configure" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1912 | #include "confdefs.h" |
| 1913 | |
| 1914 | #include <pthread.h> |
| 1915 | |
| 1916 | void* routine(void* p){return NULL;} |
| 1917 | |
| 1918 | int main(){ |
| 1919 | pthread_t p; |
| 1920 | if(pthread_create(&p,NULL,routine,NULL)!=0) |
| 1921 | return 1; |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 1922 | (void)pthread_detach(p); |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1923 | return 0; |
| 1924 | } |
| 1925 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1926 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 1927 | if { (eval echo configure:1928: \"$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] | 1928 | then |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1929 | ac_cv_kpthread=yes |
| 1930 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1931 | echo "configure: failed program was:" >&5 |
| 1932 | cat conftest.$ac_ext >&5 |
| 1933 | rm -fr conftest* |
| 1934 | ac_cv_kpthread=no |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1935 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1936 | rm -fr conftest* |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame] | 1937 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1938 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1939 | CC="$ac_save_cc" |
| 1940 | fi |
| 1941 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1942 | echo "$ac_t""$ac_cv_kpthread" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1943 | fi |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1944 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1945 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1946 | # checks for header files |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1947 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 1948 | echo "configure:1949: checking for ANSI C header files" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1949 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
| 1950 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1951 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1952 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 1953 | #line 1954 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1954 | #include "confdefs.h" |
| 1955 | #include <stdlib.h> |
| 1956 | #include <stdarg.h> |
| 1957 | #include <string.h> |
| 1958 | #include <float.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1959 | EOF |
| 1960 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 1961 | { (eval echo configure:1962: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1962 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1963 | if test -z "$ac_err"; then |
| 1964 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1965 | ac_cv_header_stdc=yes |
| 1966 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1967 | echo "$ac_err" >&5 |
| 1968 | echo "configure: failed program was:" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1969 | cat conftest.$ac_ext >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1970 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1971 | ac_cv_header_stdc=no |
| 1972 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1973 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1974 | |
| 1975 | if test $ac_cv_header_stdc = yes; then |
| 1976 | # 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] | 1977 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 1978 | #line 1979 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1979 | #include "confdefs.h" |
| 1980 | #include <string.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1981 | EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1982 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1983 | egrep "memchr" >/dev/null 2>&1; then |
| 1984 | : |
| 1985 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1986 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1987 | ac_cv_header_stdc=no |
| 1988 | fi |
| 1989 | rm -f conftest* |
| 1990 | |
| 1991 | fi |
| 1992 | |
| 1993 | if test $ac_cv_header_stdc = yes; then |
| 1994 | # 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] | 1995 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 1996 | #line 1997 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1997 | #include "confdefs.h" |
| 1998 | #include <stdlib.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1999 | EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2000 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2001 | egrep "free" >/dev/null 2>&1; then |
| 2002 | : |
| 2003 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2004 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2005 | ac_cv_header_stdc=no |
| 2006 | fi |
| 2007 | rm -f conftest* |
| 2008 | |
| 2009 | fi |
| 2010 | |
| 2011 | if test $ac_cv_header_stdc = yes; then |
| 2012 | # /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] | 2013 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2014 | : |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2015 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2016 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2017 | #line 2018 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2018 | #include "confdefs.h" |
| 2019 | #include <ctype.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2020 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') |
| 2021 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 2022 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2023 | int main () { int i; for (i = 0; i < 256; i++) |
| 2024 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); |
| 2025 | exit (0); } |
| 2026 | |
| 2027 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2028 | if { (eval echo configure:2029: \"$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] | 2029 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2030 | : |
| 2031 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2032 | echo "configure: failed program was:" >&5 |
| 2033 | cat conftest.$ac_ext >&5 |
| 2034 | rm -fr conftest* |
| 2035 | ac_cv_header_stdc=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2036 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2037 | rm -fr conftest* |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2038 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 2039 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2040 | fi |
| 2041 | fi |
| 2042 | |
| 2043 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 |
| 2044 | if test $ac_cv_header_stdc = yes; then |
| 2045 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2046 | #define STDC_HEADERS 1 |
| 2047 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2048 | |
| 2049 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2050 | |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2051 | for ac_hdr in dlfcn.h fcntl.h grp.h limits.h langinfo.h \ |
| 2052 | libintl.h locale.h ncurses.h poll.h pthread.h \ |
Eric S. Raymond | d2d75d3 | 2001-01-16 15:26:34 +0000 | [diff] [blame] | 2053 | 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] | 2054 | 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] | 2055 | 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] | 2056 | 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] | 2057 | 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] | 2058 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2059 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
| 2060 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2061 | echo "configure:2062: checking for $ac_hdr" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2062 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 2063 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2064 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2065 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2066 | #line 2067 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2067 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2068 | #include <$ac_hdr> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2069 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2070 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2071 | { (eval echo configure:2072: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2072 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 2073 | if test -z "$ac_err"; then |
| 2074 | rm -rf conftest* |
| 2075 | eval "ac_cv_header_$ac_safe=yes" |
| 2076 | else |
| 2077 | echo "$ac_err" >&5 |
| 2078 | echo "configure: failed program was:" >&5 |
| 2079 | cat conftest.$ac_ext >&5 |
| 2080 | rm -rf conftest* |
| 2081 | eval "ac_cv_header_$ac_safe=no" |
| 2082 | fi |
| 2083 | rm -f conftest* |
| 2084 | fi |
| 2085 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 2086 | echo "$ac_t""yes" 1>&6 |
| 2087 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
| 2088 | cat >> confdefs.h <<EOF |
| 2089 | #define $ac_tr_hdr 1 |
| 2090 | EOF |
| 2091 | |
| 2092 | else |
| 2093 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2094 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2095 | done |
| 2096 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2097 | ac_header_dirent=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2098 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h |
| 2099 | do |
| 2100 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
| 2101 | echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2102 | echo "configure:2103: checking for $ac_hdr that defines DIR" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2103 | if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then |
| 2104 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2105 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2106 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2107 | #line 2108 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2108 | #include "confdefs.h" |
| 2109 | #include <sys/types.h> |
| 2110 | #include <$ac_hdr> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2111 | int main() { |
| 2112 | DIR *dirp = 0; |
| 2113 | ; return 0; } |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2114 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2115 | if { (eval echo configure:2116: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2116 | rm -rf conftest* |
| 2117 | eval "ac_cv_header_dirent_$ac_safe=yes" |
| 2118 | else |
| 2119 | echo "configure: failed program was:" >&5 |
| 2120 | cat conftest.$ac_ext >&5 |
| 2121 | rm -rf conftest* |
| 2122 | eval "ac_cv_header_dirent_$ac_safe=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2123 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2124 | rm -f conftest* |
| 2125 | fi |
| 2126 | if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then |
| 2127 | echo "$ac_t""yes" 1>&6 |
| 2128 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
| 2129 | cat >> confdefs.h <<EOF |
| 2130 | #define $ac_tr_hdr 1 |
| 2131 | EOF |
| 2132 | ac_header_dirent=$ac_hdr; break |
| 2133 | else |
| 2134 | echo "$ac_t""no" 1>&6 |
| 2135 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2136 | done |
| 2137 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. |
| 2138 | if test $ac_header_dirent = dirent.h; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2139 | echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2140 | echo "configure:2141: checking for opendir in -ldir" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2141 | ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` |
| 2142 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 2143 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2144 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2145 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2146 | LIBS="-ldir $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2147 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2148 | #line 2149 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2149 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2150 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 2151 | /* 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] | 2152 | builtin and then its argument prototype would still apply. */ |
| 2153 | char opendir(); |
| 2154 | |
| 2155 | int main() { |
| 2156 | opendir() |
| 2157 | ; return 0; } |
| 2158 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2159 | if { (eval echo configure:2160: \"$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] | 2160 | rm -rf conftest* |
| 2161 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2162 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2163 | echo "configure: failed program was:" >&5 |
| 2164 | cat conftest.$ac_ext >&5 |
| 2165 | rm -rf conftest* |
| 2166 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2167 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2168 | rm -f conftest* |
| 2169 | LIBS="$ac_save_LIBS" |
| 2170 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2171 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2172 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 2173 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2174 | LIBS="$LIBS -ldir" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2175 | else |
| 2176 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2177 | fi |
| 2178 | |
| 2179 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2180 | echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2181 | echo "configure:2182: checking for opendir in -lx" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2182 | ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` |
| 2183 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 2184 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2185 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2186 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2187 | LIBS="-lx $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2188 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2189 | #line 2190 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2190 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2191 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 2192 | /* 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] | 2193 | builtin and then its argument prototype would still apply. */ |
| 2194 | char opendir(); |
| 2195 | |
| 2196 | int main() { |
| 2197 | opendir() |
| 2198 | ; return 0; } |
| 2199 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2200 | if { (eval echo configure:2201: \"$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] | 2201 | rm -rf conftest* |
| 2202 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2203 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2204 | echo "configure: failed program was:" >&5 |
| 2205 | cat conftest.$ac_ext >&5 |
| 2206 | rm -rf conftest* |
| 2207 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2208 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2209 | rm -f conftest* |
| 2210 | LIBS="$ac_save_LIBS" |
| 2211 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2212 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2213 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 2214 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2215 | LIBS="$LIBS -lx" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2216 | else |
| 2217 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2218 | fi |
| 2219 | |
| 2220 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2221 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2222 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2223 | # checks for typedefs |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2224 | was_it_defined=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2225 | echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2226 | echo "configure:2227: checking for clock_t in time.h" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2227 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2228 | #line 2229 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2229 | #include "confdefs.h" |
| 2230 | #include <time.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2231 | EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2232 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2233 | egrep "clock_t" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2234 | rm -rf conftest* |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2235 | was_it_defined=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2236 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2237 | rm -rf conftest* |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2238 | |
| 2239 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2240 | #define clock_t long |
| 2241 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2242 | |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2243 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2244 | fi |
| 2245 | rm -f conftest* |
| 2246 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2247 | echo "$ac_t""$was_it_defined" 1>&6 |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2248 | |
Guido van Rossum | 810cc51 | 2001-09-09 23:51:39 +0000 | [diff] [blame] | 2249 | # Two defines needed to enable largefile support on various platforms |
| 2250 | # These may affect some typedefs |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2251 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 810cc51 | 2001-09-09 23:51:39 +0000 | [diff] [blame] | 2252 | #define _LARGEFILE_SOURCE 1 |
| 2253 | EOF |
| 2254 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2255 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 810cc51 | 2001-09-09 23:51:39 +0000 | [diff] [blame] | 2256 | #define _FILE_OFFSET_BITS 64 |
| 2257 | EOF |
| 2258 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2259 | |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 2260 | # Add some code to confdefs.h so that the test for off_t works on SCO |
| 2261 | cat >> confdefs.h <<\EOF |
| 2262 | #if defined(SCO_DS) |
| 2263 | #undef _OFF_T |
| 2264 | #endif |
| 2265 | EOF |
| 2266 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2267 | # Type availability checks |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2268 | echo $ac_n "checking for mode_t""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2269 | echo "configure:2270: checking for mode_t" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2270 | if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then |
| 2271 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2272 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2273 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2274 | #line 2275 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2275 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2276 | #include <sys/types.h> |
| 2277 | #if STDC_HEADERS |
| 2278 | #include <stdlib.h> |
| 2279 | #include <stddef.h> |
| 2280 | #endif |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 2281 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2282 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2283 | egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
| 2284 | rm -rf conftest* |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 2285 | ac_cv_type_mode_t=yes |
| 2286 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2287 | rm -rf conftest* |
| 2288 | ac_cv_type_mode_t=no |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 2289 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2290 | rm -f conftest* |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 2291 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2292 | fi |
| 2293 | echo "$ac_t""$ac_cv_type_mode_t" 1>&6 |
| 2294 | if test $ac_cv_type_mode_t = no; then |
| 2295 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2296 | #define mode_t int |
| 2297 | EOF |
| 2298 | |
| 2299 | fi |
| 2300 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2301 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2302 | echo "configure:2303: checking for off_t" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2303 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
| 2304 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2305 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2306 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2307 | #line 2308 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2308 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2309 | #include <sys/types.h> |
| 2310 | #if STDC_HEADERS |
| 2311 | #include <stdlib.h> |
| 2312 | #include <stddef.h> |
| 2313 | #endif |
| 2314 | EOF |
| 2315 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2316 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
| 2317 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2318 | ac_cv_type_off_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2319 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2320 | rm -rf conftest* |
| 2321 | ac_cv_type_off_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2322 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2323 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2324 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2325 | fi |
| 2326 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 |
| 2327 | if test $ac_cv_type_off_t = no; then |
| 2328 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2329 | #define off_t long |
| 2330 | EOF |
| 2331 | |
| 2332 | fi |
| 2333 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2334 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2335 | echo "configure:2336: checking for pid_t" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2336 | if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then |
| 2337 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2338 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2339 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2340 | #line 2341 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2341 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2342 | #include <sys/types.h> |
| 2343 | #if STDC_HEADERS |
| 2344 | #include <stdlib.h> |
| 2345 | #include <stddef.h> |
| 2346 | #endif |
| 2347 | EOF |
| 2348 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2349 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
| 2350 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2351 | ac_cv_type_pid_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2352 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2353 | rm -rf conftest* |
| 2354 | ac_cv_type_pid_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2355 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2356 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2357 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2358 | fi |
| 2359 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 |
| 2360 | if test $ac_cv_type_pid_t = no; then |
| 2361 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2362 | #define pid_t int |
| 2363 | EOF |
| 2364 | |
| 2365 | fi |
| 2366 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2367 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2368 | echo "configure:2369: checking return type of signal handlers" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2369 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
| 2370 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2371 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2372 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2373 | #line 2374 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2374 | #include "confdefs.h" |
| 2375 | #include <sys/types.h> |
| 2376 | #include <signal.h> |
| 2377 | #ifdef signal |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2378 | #undef signal |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2379 | #endif |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2380 | #ifdef __cplusplus |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2381 | extern "C" void (*signal (int, void (*)(int)))(int); |
| 2382 | #else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2383 | void (*signal ()) (); |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2384 | #endif |
| 2385 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2386 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2387 | int i; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2388 | ; return 0; } |
| 2389 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2390 | if { (eval echo configure:2391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2391 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2392 | ac_cv_type_signal=void |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2393 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2394 | echo "configure: failed program was:" >&5 |
| 2395 | cat conftest.$ac_ext >&5 |
| 2396 | rm -rf conftest* |
| 2397 | ac_cv_type_signal=int |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2398 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2399 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2400 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2401 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2402 | echo "$ac_t""$ac_cv_type_signal" 1>&6 |
| 2403 | cat >> confdefs.h <<EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2404 | #define RETSIGTYPE $ac_cv_type_signal |
| 2405 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2406 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2407 | |
| 2408 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2409 | echo "configure:2410: checking for size_t" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2410 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
| 2411 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2412 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2413 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2414 | #line 2415 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2415 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2416 | #include <sys/types.h> |
| 2417 | #if STDC_HEADERS |
| 2418 | #include <stdlib.h> |
| 2419 | #include <stddef.h> |
| 2420 | #endif |
| 2421 | EOF |
| 2422 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2423 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
| 2424 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2425 | ac_cv_type_size_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2426 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2427 | rm -rf conftest* |
| 2428 | ac_cv_type_size_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2429 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2430 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2431 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2432 | fi |
| 2433 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 |
| 2434 | if test $ac_cv_type_size_t = no; then |
| 2435 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2436 | #define size_t unsigned |
| 2437 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2438 | |
| 2439 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2440 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2441 | echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2442 | echo "configure:2443: checking for uid_t in sys/types.h" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2443 | if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then |
| 2444 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2445 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2446 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2447 | #line 2448 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2448 | #include "confdefs.h" |
| 2449 | #include <sys/types.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2450 | EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2451 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2452 | egrep "uid_t" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2453 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2454 | ac_cv_type_uid_t=yes |
| 2455 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2456 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2457 | ac_cv_type_uid_t=no |
| 2458 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2459 | rm -f conftest* |
| 2460 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2461 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 2462 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2463 | echo "$ac_t""$ac_cv_type_uid_t" 1>&6 |
| 2464 | if test $ac_cv_type_uid_t = no; then |
| 2465 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2466 | #define uid_t int |
| 2467 | EOF |
| 2468 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2469 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2470 | #define gid_t int |
| 2471 | EOF |
| 2472 | |
| 2473 | fi |
| 2474 | |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 2475 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2476 | # Sizes of various common basic types |
| 2477 | echo $ac_n "checking size of int""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2478 | echo "configure:2479: checking size of int" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2479 | if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then |
| 2480 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2481 | else |
| 2482 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2483 | ac_cv_sizeof_int=4 |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2484 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2485 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2486 | #line 2487 "configure" |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2487 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2488 | #include <stdio.h> |
| 2489 | main() |
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 | FILE *f=fopen("conftestval", "w"); |
| 2492 | if (!f) exit(1); |
| 2493 | fprintf(f, "%d\n", sizeof(int)); |
| 2494 | exit(0); |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2495 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2496 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2497 | if { (eval echo configure:2498: \"$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] | 2498 | then |
| 2499 | ac_cv_sizeof_int=`cat conftestval` |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2500 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2501 | echo "configure: failed program was:" >&5 |
| 2502 | cat conftest.$ac_ext >&5 |
| 2503 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2504 | ac_cv_sizeof_int=0 |
| 2505 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2506 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2507 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2508 | |
| 2509 | fi |
| 2510 | echo "$ac_t""$ac_cv_sizeof_int" 1>&6 |
| 2511 | cat >> confdefs.h <<EOF |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2512 | #define SIZEOF_INT $ac_cv_sizeof_int |
| 2513 | EOF |
| 2514 | |
| 2515 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2516 | echo $ac_n "checking size of long""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2517 | echo "configure:2518: checking size of long" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2518 | if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then |
| 2519 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2520 | else |
| 2521 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2522 | ac_cv_sizeof_long=4 |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2523 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2524 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2525 | #line 2526 "configure" |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2526 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2527 | #include <stdio.h> |
| 2528 | main() |
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 | FILE *f=fopen("conftestval", "w"); |
| 2531 | if (!f) exit(1); |
| 2532 | fprintf(f, "%d\n", sizeof(long)); |
| 2533 | exit(0); |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2534 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2535 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2536 | if { (eval echo configure:2537: \"$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] | 2537 | then |
| 2538 | ac_cv_sizeof_long=`cat conftestval` |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2539 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2540 | echo "configure: failed program was:" >&5 |
| 2541 | cat conftest.$ac_ext >&5 |
| 2542 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2543 | ac_cv_sizeof_long=0 |
| 2544 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2545 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2546 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2547 | |
| 2548 | fi |
| 2549 | echo "$ac_t""$ac_cv_sizeof_long" 1>&6 |
| 2550 | cat >> confdefs.h <<EOF |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2551 | #define SIZEOF_LONG $ac_cv_sizeof_long |
| 2552 | EOF |
| 2553 | |
| 2554 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2555 | echo $ac_n "checking size of void *""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2556 | echo "configure:2557: checking size of void *" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2557 | if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then |
| 2558 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2559 | else |
| 2560 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2561 | ac_cv_sizeof_void_p=4 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2562 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2563 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2564 | #line 2565 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2565 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2566 | #include <stdio.h> |
| 2567 | main() |
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 | FILE *f=fopen("conftestval", "w"); |
| 2570 | if (!f) exit(1); |
| 2571 | fprintf(f, "%d\n", sizeof(void *)); |
| 2572 | exit(0); |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2573 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2574 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2575 | if { (eval echo configure:2576: \"$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] | 2576 | then |
| 2577 | ac_cv_sizeof_void_p=`cat conftestval` |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2578 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2579 | echo "configure: failed program was:" >&5 |
| 2580 | cat conftest.$ac_ext >&5 |
| 2581 | rm -fr conftest* |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2582 | ac_cv_sizeof_void_p=0 |
| 2583 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2584 | rm -fr conftest* |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2585 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2586 | |
| 2587 | fi |
| 2588 | echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6 |
| 2589 | cat >> confdefs.h <<EOF |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2590 | #define SIZEOF_VOID_P $ac_cv_sizeof_void_p |
| 2591 | EOF |
| 2592 | |
| 2593 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2594 | echo $ac_n "checking size of char""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2595 | echo "configure:2596: checking size of char" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2596 | if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then |
| 2597 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2598 | else |
| 2599 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2600 | ac_cv_sizeof_char=1 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2601 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2602 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2603 | #line 2604 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2604 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2605 | #include <stdio.h> |
| 2606 | main() |
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 | FILE *f=fopen("conftestval", "w"); |
| 2609 | if (!f) exit(1); |
| 2610 | fprintf(f, "%d\n", sizeof(char)); |
| 2611 | exit(0); |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2612 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2613 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2614 | if { (eval echo configure:2615: \"$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] | 2615 | then |
| 2616 | ac_cv_sizeof_char=`cat conftestval` |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2617 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2618 | echo "configure: failed program was:" >&5 |
| 2619 | cat conftest.$ac_ext >&5 |
| 2620 | rm -fr conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2621 | ac_cv_sizeof_char=0 |
| 2622 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2623 | rm -fr conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2624 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2625 | |
| 2626 | fi |
| 2627 | echo "$ac_t""$ac_cv_sizeof_char" 1>&6 |
| 2628 | cat >> confdefs.h <<EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2629 | #define SIZEOF_CHAR $ac_cv_sizeof_char |
| 2630 | EOF |
| 2631 | |
| 2632 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2633 | echo $ac_n "checking size of short""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2634 | echo "configure:2635: checking size of short" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2635 | if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then |
| 2636 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2637 | else |
| 2638 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2639 | ac_cv_sizeof_short=2 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2640 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2641 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2642 | #line 2643 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2643 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2644 | #include <stdio.h> |
| 2645 | main() |
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 | FILE *f=fopen("conftestval", "w"); |
| 2648 | if (!f) exit(1); |
| 2649 | fprintf(f, "%d\n", sizeof(short)); |
| 2650 | exit(0); |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2651 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2652 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2653 | if { (eval echo configure:2654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2654 | then |
| 2655 | ac_cv_sizeof_short=`cat conftestval` |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2656 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2657 | echo "configure: failed program was:" >&5 |
| 2658 | cat conftest.$ac_ext >&5 |
| 2659 | rm -fr conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2660 | ac_cv_sizeof_short=0 |
| 2661 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2662 | rm -fr conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2663 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2664 | |
| 2665 | fi |
| 2666 | echo "$ac_t""$ac_cv_sizeof_short" 1>&6 |
| 2667 | cat >> confdefs.h <<EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2668 | #define SIZEOF_SHORT $ac_cv_sizeof_short |
| 2669 | EOF |
| 2670 | |
| 2671 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2672 | echo $ac_n "checking size of float""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2673 | echo "configure:2674: checking size of float" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2674 | if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then |
| 2675 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2676 | else |
| 2677 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2678 | ac_cv_sizeof_float=4 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2679 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2680 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2681 | #line 2682 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2682 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2683 | #include <stdio.h> |
| 2684 | main() |
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 | FILE *f=fopen("conftestval", "w"); |
| 2687 | if (!f) exit(1); |
| 2688 | fprintf(f, "%d\n", sizeof(float)); |
| 2689 | exit(0); |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2690 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2691 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2692 | if { (eval echo configure:2693: \"$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] | 2693 | then |
| 2694 | ac_cv_sizeof_float=`cat conftestval` |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2695 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2696 | echo "configure: failed program was:" >&5 |
| 2697 | cat conftest.$ac_ext >&5 |
| 2698 | rm -fr conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2699 | ac_cv_sizeof_float=0 |
| 2700 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2701 | rm -fr conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2702 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2703 | |
| 2704 | fi |
| 2705 | echo "$ac_t""$ac_cv_sizeof_float" 1>&6 |
| 2706 | cat >> confdefs.h <<EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2707 | #define SIZEOF_FLOAT $ac_cv_sizeof_float |
| 2708 | EOF |
| 2709 | |
| 2710 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2711 | echo $ac_n "checking size of double""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2712 | echo "configure:2713: checking size of double" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2713 | if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then |
| 2714 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2715 | else |
| 2716 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2717 | ac_cv_sizeof_double=8 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2718 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2719 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2720 | #line 2721 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2721 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2722 | #include <stdio.h> |
| 2723 | main() |
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 | FILE *f=fopen("conftestval", "w"); |
| 2726 | if (!f) exit(1); |
| 2727 | fprintf(f, "%d\n", sizeof(double)); |
| 2728 | exit(0); |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2729 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2730 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2731 | if { (eval echo configure:2732: \"$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] | 2732 | then |
| 2733 | ac_cv_sizeof_double=`cat conftestval` |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2734 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2735 | echo "configure: failed program was:" >&5 |
| 2736 | cat conftest.$ac_ext >&5 |
| 2737 | rm -fr conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2738 | ac_cv_sizeof_double=0 |
| 2739 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2740 | rm -fr conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2741 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2742 | |
| 2743 | fi |
| 2744 | echo "$ac_t""$ac_cv_sizeof_double" 1>&6 |
| 2745 | cat >> confdefs.h <<EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2746 | #define SIZEOF_DOUBLE $ac_cv_sizeof_double |
| 2747 | EOF |
| 2748 | |
| 2749 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2750 | echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2751 | echo "configure:2752: checking size of fpos_t" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2752 | if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then |
| 2753 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2754 | else |
| 2755 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2756 | ac_cv_sizeof_fpos_t=4 |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2757 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2758 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2759 | #line 2760 "configure" |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2760 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2761 | #include <stdio.h> |
| 2762 | main() |
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 | FILE *f=fopen("conftestval", "w"); |
| 2765 | if (!f) exit(1); |
| 2766 | fprintf(f, "%d\n", sizeof(fpos_t)); |
| 2767 | exit(0); |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2768 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2769 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2770 | if { (eval echo configure:2771: \"$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] | 2771 | then |
| 2772 | ac_cv_sizeof_fpos_t=`cat conftestval` |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2773 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2774 | echo "configure: failed program was:" >&5 |
| 2775 | cat conftest.$ac_ext >&5 |
| 2776 | rm -fr conftest* |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2777 | ac_cv_sizeof_fpos_t=0 |
| 2778 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2779 | rm -fr conftest* |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2780 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2781 | |
| 2782 | fi |
| 2783 | echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6 |
| 2784 | cat >> confdefs.h <<EOF |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2785 | #define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t |
| 2786 | EOF |
| 2787 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2788 | |
| 2789 | |
| 2790 | echo $ac_n "checking for long long support""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2791 | echo "configure:2792: checking for long long support" >&5 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2792 | have_long_long=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2793 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2794 | #line 2795 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2795 | #include "confdefs.h" |
| 2796 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2797 | int main() { |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2798 | long long x; x = (long long)0; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2799 | ; return 0; } |
| 2800 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2801 | if { (eval echo configure:2802: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2802 | rm -rf conftest* |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2803 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2804 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2805 | #define HAVE_LONG_LONG 1 |
| 2806 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2807 | |
| 2808 | have_long_long=yes |
| 2809 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2810 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2811 | echo "configure: failed program was:" >&5 |
| 2812 | cat conftest.$ac_ext >&5 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2813 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2814 | rm -f conftest* |
| 2815 | echo "$ac_t""$have_long_long" 1>&6 |
Guido van Rossum | 96f2eb9 | 1999-04-10 16:02:18 +0000 | [diff] [blame] | 2816 | if test "$have_long_long" = yes ; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2817 | echo $ac_n "checking size of long long""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2818 | echo "configure:2819: checking size of long long" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2819 | if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then |
| 2820 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2821 | else |
| 2822 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2823 | ac_cv_sizeof_long_long=8 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2824 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2825 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2826 | #line 2827 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2827 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2828 | #include <stdio.h> |
| 2829 | main() |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2830 | { |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2831 | FILE *f=fopen("conftestval", "w"); |
| 2832 | if (!f) exit(1); |
| 2833 | fprintf(f, "%d\n", sizeof(long long)); |
| 2834 | exit(0); |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2835 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2836 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2837 | if { (eval echo configure:2838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2838 | then |
| 2839 | ac_cv_sizeof_long_long=`cat conftestval` |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2840 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2841 | echo "configure: failed program was:" >&5 |
| 2842 | cat conftest.$ac_ext >&5 |
| 2843 | rm -fr conftest* |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2844 | ac_cv_sizeof_long_long=0 |
| 2845 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2846 | rm -fr conftest* |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2847 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2848 | |
| 2849 | fi |
| 2850 | echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 |
| 2851 | cat >> confdefs.h <<EOF |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2852 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long |
| 2853 | EOF |
| 2854 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2855 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2856 | fi |
| 2857 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2858 | echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2859 | echo "configure:2860: checking for uintptr_t support" >&5 |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2860 | have_uintptr_t=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2861 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2862 | #line 2863 "configure" |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2863 | #include "confdefs.h" |
| 2864 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2865 | int main() { |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2866 | uintptr_t x; x = (uintptr_t)0; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2867 | ; return 0; } |
| 2868 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2869 | if { (eval echo configure:2870: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2870 | rm -rf conftest* |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2871 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2872 | cat >> confdefs.h <<\EOF |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2873 | #define HAVE_UINTPTR_T 1 |
| 2874 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2875 | |
| 2876 | have_uintptr_t=yes |
| 2877 | |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2878 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2879 | echo "configure: failed program was:" >&5 |
| 2880 | cat conftest.$ac_ext >&5 |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2881 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2882 | rm -f conftest* |
| 2883 | echo "$ac_t""$have_uintptr_t" 1>&6 |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2884 | if test "$have_uintptr_t" = yes ; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2885 | echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2886 | echo "configure:2887: checking size of uintptr_t" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2887 | if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then |
| 2888 | echo $ac_n "(cached) $ac_c" 1>&6 |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2889 | else |
| 2890 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2891 | ac_cv_sizeof_uintptr_t=4 |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2892 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2893 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2894 | #line 2895 "configure" |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2895 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2896 | #include <stdio.h> |
| 2897 | main() |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2898 | { |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2899 | FILE *f=fopen("conftestval", "w"); |
| 2900 | if (!f) exit(1); |
| 2901 | fprintf(f, "%d\n", sizeof(uintptr_t)); |
| 2902 | exit(0); |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2903 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2904 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2905 | if { (eval echo configure:2906: \"$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] | 2906 | then |
| 2907 | ac_cv_sizeof_uintptr_t=`cat conftestval` |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2908 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2909 | echo "configure: failed program was:" >&5 |
| 2910 | cat conftest.$ac_ext >&5 |
| 2911 | rm -fr conftest* |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2912 | ac_cv_sizeof_uintptr_t=0 |
| 2913 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2914 | rm -fr conftest* |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2915 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2916 | |
| 2917 | fi |
| 2918 | echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6 |
| 2919 | cat >> confdefs.h <<EOF |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2920 | #define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t |
| 2921 | EOF |
| 2922 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2923 | |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2924 | fi |
| 2925 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2926 | # Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2927 | echo $ac_n "checking size of off_t""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2928 | echo "configure:2929: checking size of off_t" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2929 | if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then |
| 2930 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2931 | else |
| 2932 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2933 | ac_cv_sizeof_off_t=4 |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2934 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2935 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2936 | #line 2937 "configure" |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2937 | #include "confdefs.h" |
| 2938 | #include <stdio.h> |
| 2939 | #include <sys/types.h> |
| 2940 | main() |
| 2941 | { |
| 2942 | FILE *f=fopen("conftestval", "w"); |
| 2943 | if (!f) exit(1); |
| 2944 | fprintf(f, "%d\n", sizeof(off_t)); |
| 2945 | exit(0); |
| 2946 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2947 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2948 | if { (eval echo configure:2949: \"$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] | 2949 | then |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2950 | ac_cv_sizeof_off_t=`cat conftestval` |
| 2951 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2952 | echo "configure: failed program was:" >&5 |
| 2953 | cat conftest.$ac_ext >&5 |
| 2954 | rm -fr conftest* |
| 2955 | ac_cv_sizeof_off_t=0 |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2956 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2957 | rm -fr conftest* |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2958 | fi |
| 2959 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2960 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2961 | fi |
| 2962 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2963 | echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6 |
| 2964 | cat >> confdefs.h <<EOF |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2965 | #define SIZEOF_OFF_T $ac_cv_sizeof_off_t |
| 2966 | EOF |
| 2967 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2968 | |
| 2969 | echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2970 | echo "configure:2971: checking whether to enable large file support" >&5 |
Guido van Rossum | 96f2eb9 | 1999-04-10 16:02:18 +0000 | [diff] [blame] | 2971 | if test "$have_long_long" = yes -a \ |
| 2972 | "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \ |
| 2973 | "$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] | 2974 | cat >> confdefs.h <<\EOF |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2975 | #define HAVE_LARGEFILE_SUPPORT 1 |
| 2976 | EOF |
| 2977 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2978 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2979 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2980 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2981 | fi |
| 2982 | |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2983 | # AC_CHECK_SIZEOF() doesn't include <time.h>. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2984 | echo $ac_n "checking size of time_t""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2985 | echo "configure:2986: checking size of time_t" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2986 | if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then |
| 2987 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2988 | else |
| 2989 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2990 | ac_cv_sizeof_time_t=4 |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2991 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2992 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 2993 | #line 2994 "configure" |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2994 | #include "confdefs.h" |
| 2995 | #include <stdio.h> |
| 2996 | #include <time.h> |
| 2997 | main() |
| 2998 | { |
| 2999 | FILE *f=fopen("conftestval", "w"); |
| 3000 | if (!f) exit(1); |
| 3001 | fprintf(f, "%d\n", sizeof(time_t)); |
| 3002 | exit(0); |
| 3003 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3004 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3005 | if { (eval echo configure:3006: \"$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] | 3006 | then |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 3007 | ac_cv_sizeof_time_t=`cat conftestval` |
| 3008 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3009 | echo "configure: failed program was:" >&5 |
| 3010 | cat conftest.$ac_ext >&5 |
| 3011 | rm -fr conftest* |
| 3012 | ac_cv_sizeof_time_t=0 |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 3013 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3014 | rm -fr conftest* |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 3015 | fi |
| 3016 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3017 | |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 3018 | fi |
| 3019 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3020 | echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6 |
| 3021 | cat >> confdefs.h <<EOF |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 3022 | #define SIZEOF_TIME_T $ac_cv_sizeof_time_t |
| 3023 | EOF |
| 3024 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3025 | |
| 3026 | |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3027 | # if have pthread_t then define SIZEOF_PTHREAD_T |
Martin v. Löwis | 123cbd2 | 2001-07-19 14:21:10 +0000 | [diff] [blame] | 3028 | ac_save_cc="$CC" |
| 3029 | if test "$ac_cv_kpthread" = "yes" |
| 3030 | then CC="$CC -Kpthread" |
| 3031 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3032 | echo $ac_n "checking for pthread_t""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3033 | echo "configure:3034: checking for pthread_t" >&5 |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3034 | have_pthread_t=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3035 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3036 | #line 3037 "configure" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3037 | #include "confdefs.h" |
| 3038 | #include <pthread.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3039 | int main() { |
Guido van Rossum | 1258049 | 2000-09-24 16:47:19 +0000 | [diff] [blame] | 3040 | pthread_t x; x = *(pthread_t*)0; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3041 | ; return 0; } |
| 3042 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3043 | if { (eval echo configure:3044: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3044 | rm -rf conftest* |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3045 | have_pthread_t=yes |
| 3046 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3047 | echo "configure: failed program was:" >&5 |
| 3048 | cat conftest.$ac_ext >&5 |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3049 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3050 | rm -f conftest* |
| 3051 | echo "$ac_t""$have_pthread_t" 1>&6 |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3052 | if test "$have_pthread_t" = yes ; then |
| 3053 | # AC_CHECK_SIZEOF() doesn't include <pthread.h>. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3054 | echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3055 | echo "configure:3056: checking size of pthread_t" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3056 | if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then |
| 3057 | echo $ac_n "(cached) $ac_c" 1>&6 |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3058 | else |
| 3059 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 3060 | ac_cv_sizeof_pthread_t=4 |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3061 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3062 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3063 | #line 3064 "configure" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3064 | #include "confdefs.h" |
| 3065 | #include <stdio.h> |
| 3066 | #include <pthread.h> |
| 3067 | main() |
| 3068 | { |
| 3069 | FILE *f=fopen("conftestval", "w"); |
| 3070 | if (!f) exit(1); |
| 3071 | fprintf(f, "%d\n", sizeof(pthread_t)); |
| 3072 | exit(0); |
| 3073 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3074 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3075 | if { (eval echo configure:3076: \"$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] | 3076 | then |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3077 | ac_cv_sizeof_pthread_t=`cat conftestval` |
| 3078 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3079 | echo "configure: failed program was:" >&5 |
| 3080 | cat conftest.$ac_ext >&5 |
| 3081 | rm -fr conftest* |
| 3082 | ac_cv_sizeof_pthread_t=0 |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3083 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3084 | rm -fr conftest* |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3085 | fi |
| 3086 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3087 | |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3088 | fi |
| 3089 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3090 | echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6 |
| 3091 | cat >> confdefs.h <<EOF |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3092 | #define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t |
| 3093 | EOF |
| 3094 | |
| 3095 | fi |
Martin v. Löwis | 123cbd2 | 2001-07-19 14:21:10 +0000 | [diff] [blame] | 3096 | CC="$ac_save_cc" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3097 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3098 | echo $ac_n "checking for --enable-toolbox-glue""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3099 | echo "configure:3100: checking for --enable-toolbox-glue" >&5 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3100 | # Check whether --enable-toolbox-glue or --disable-toolbox-glue was given. |
| 3101 | if test "${enable_toolbox_glue+set}" = set; then |
| 3102 | enableval="$enable_toolbox_glue" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3103 | : |
| 3104 | fi |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3105 | |
| 3106 | |
| 3107 | if test -z "$enable_toolbox_glue" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3108 | then |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3109 | case $ac_sys_system/$ac_sys_release in |
| 3110 | Darwin/*) |
| 3111 | enable_toolbox_glue="yes";; |
| 3112 | *) |
| 3113 | enable_toolbox_glue="no";; |
| 3114 | esac |
| 3115 | fi |
| 3116 | case "$enable_toolbox_glue" in |
| 3117 | yes) |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 3118 | extra_frameworks="-framework CoreServices -framework Foundation" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3119 | extra_machdep_objs="Python/mactoolboxglue.o" |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3120 | extra_undefs="-u __dummy -u _PyMac_Error" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3121 | cat >> confdefs.h <<\EOF |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3122 | #define USE_TOOLBOX_OBJECT_GLUE 1 |
| 3123 | EOF |
| 3124 | |
| 3125 | ;; |
| 3126 | *) |
| 3127 | extra_frameworks="" |
| 3128 | extra_machdep_objs="" |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3129 | extra_undefs="" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3130 | ;; |
| 3131 | esac |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3132 | echo "$ac_t""$enable_toolbox_glue" 1>&6 |
| 3133 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3134 | |
| 3135 | case $ac_sys_system/$ac_sys_release in |
Jack Jansen | 418c3b1 | 2001-11-14 10:59:57 +0000 | [diff] [blame] | 3136 | Darwin/1.3*) |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 3137 | ns_undef_sym='_environ' |
Jack Jansen | 418c3b1 | 2001-11-14 10:59:57 +0000 | [diff] [blame] | 3138 | LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym" |
| 3139 | LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks" |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 3140 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python' |
| 3141 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 3142 | Darwin/*) |
| 3143 | ns_undef_sym='_environ' |
Jack Jansen | 418c3b1 | 2001-11-14 10:59:57 +0000 | [diff] [blame] | 3144 | LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -flat_namespace -U $ns_undef_sym" |
| 3145 | LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3146 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python' |
| 3147 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3148 | esac |
| 3149 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3150 | echo $ac_n "checking for --enable-framework""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3151 | echo "configure:3152: checking for --enable-framework" >&5 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3152 | if test "$enable_framework" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3153 | then |
Jack Jansen | ca06bc6 | 2001-08-03 15:32:23 +0000 | [diff] [blame] | 3154 | OPT="$OPT -fno-common -dynamic" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3155 | # -U __environ is needed since bundles don't have access |
| 3156 | # to crt0 when built but will always be linked against it |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3157 | # -F. is needed to allow linking to the framework while |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3158 | # in the build location. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3159 | |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 3160 | case $ac_sys_system/$ac_sys_release in |
Jack Jansen | 418c3b1 | 2001-11-14 10:59:57 +0000 | [diff] [blame] | 3161 | Darwin/1.3*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym";; |
| 3162 | Darwin/*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-flat_namespace,-U,$ns_undef_sym";; |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 3163 | esac |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3164 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3165 | #define WITH_NEXT_FRAMEWORK 1 |
| 3166 | EOF |
| 3167 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3168 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3169 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3170 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3171 | fi |
| 3172 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3173 | echo $ac_n "checking for dyld""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3174 | echo "configure:3175: checking for dyld" >&5 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3175 | case $ac_sys_system/$ac_sys_release in |
| 3176 | Darwin/*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3177 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3178 | #define WITH_DYLD 1 |
| 3179 | EOF |
| 3180 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3181 | echo "$ac_t""always on for Darwin" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3182 | ;; |
| 3183 | *) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3184 | echo "$ac_t""no" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3185 | ;; |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3186 | esac |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3187 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3188 | # Set info about shared libraries. |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3189 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3190 | |
| 3191 | |
| 3192 | |
| 3193 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3194 | # SO is the extension of shared libraries `(including the dot!) |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3195 | # -- usually .so, .sl on HP-UX, .dll on Cygwin |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3196 | echo $ac_n "checking SO""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3197 | echo "configure:3198: checking SO" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3198 | if test -z "$SO" |
| 3199 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3200 | case $ac_sys_system in |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 3201 | hp*|HP*) SO=.sl;; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3202 | CYGWIN*) SO=.dll;; |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 3203 | *) SO=.so;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3204 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3205 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3206 | echo "$ac_t""$SO" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3207 | # LDSHARED is the ld *command* used to create shared library |
Martin v. Löwis | 5b718fc | 2001-09-10 15:34:42 +0000 | [diff] [blame] | 3208 | # -- "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] | 3209 | # (Shared libraries in this instance are shared modules to be loaded into |
| 3210 | # Python, as opposed to building Python itself as a shared library.) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3211 | echo $ac_n "checking LDSHARED""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3212 | echo "configure:3213: checking LDSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3213 | if test -z "$LDSHARED" |
| 3214 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3215 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3216 | AIX*) |
| 3217 | BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp" |
Guido van Rossum | ce608b0 | 2001-09-28 15:59:38 +0000 | [diff] [blame] | 3218 | LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp" |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3219 | ;; |
| 3220 | BeOS*) |
| 3221 | BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY" |
Guido van Rossum | ce608b0 | 2001-09-28 15:59:38 +0000 | [diff] [blame] | 3222 | LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY" |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3223 | ;; |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3224 | IRIX/5*) LDSHARED="ld -shared";; |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 3225 | IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3226 | SunOS/4*) LDSHARED="ld";; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3227 | SunOS/5*) |
Greg Ward | 57c9a663 | 2000-05-26 12:22:54 +0000 | [diff] [blame] | 3228 | if test "$GCC" = "yes" |
Neil Schemenauer | 8ba9445 | 2001-02-19 18:18:48 +0000 | [diff] [blame] | 3229 | then LDSHARED='$(CC) -shared' |
Martin v. Löwis | 5b718fc | 2001-09-10 15:34:42 +0000 | [diff] [blame] | 3230 | else LDSHARED="$(CC) -G"; |
Greg Ward | 57c9a663 | 2000-05-26 12:22:54 +0000 | [diff] [blame] | 3231 | fi ;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3232 | hp*|HP*) LDSHARED="ld -b";; |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 3233 | OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";; |
| 3234 | DYNIX/ptx*) LDSHARED="ld -G";; |
Jack Jansen | 418c3b1 | 2001-11-14 10:59:57 +0000 | [diff] [blame] | 3235 | Darwin/1.3*) |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 3236 | LDSHARED='$(CC) $(LDFLAGS) -bundle' |
| 3237 | if test "$enable_framework" ; then |
| 3238 | # Link against the framework. All externals should be defined. |
| 3239 | LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)' |
| 3240 | else |
| 3241 | # No framework. Ignore undefined symbols, assuming they come from Python |
Jack Jansen | 418c3b1 | 2001-11-14 10:59:57 +0000 | [diff] [blame] | 3242 | LDSHARED="$LDSHARED -undefined suppress" |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 3243 | fi ;; |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3244 | Darwin/*) |
| 3245 | LDSHARED='$(CC) $(LDFLAGS) -bundle' |
| 3246 | if test "$enable_framework" ; then |
| 3247 | # Link against the framework. All externals should be defined. |
| 3248 | LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)' |
| 3249 | else |
Michael W. Hudson | 594bc80 | 2002-03-07 09:59:15 +0000 | [diff] [blame] | 3250 | # No framework, use the Python app as bundle-loader |
| 3251 | BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)' |
| 3252 | LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)' |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3253 | fi ;; |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3254 | Linux*|GNU*) LDSHARED="gcc -shared";; |
Guido van Rossum | 3c4bb80 | 1997-12-18 23:55:32 +0000 | [diff] [blame] | 3255 | dgux*) LDSHARED="ld -G";; |
Guido van Rossum | 458e7fa | 1999-09-17 15:40:40 +0000 | [diff] [blame] | 3256 | BSD/OS*/4*) LDSHARED="gcc -shared";; |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame] | 3257 | OpenBSD*|NetBSD*|FreeBSD*) |
Jeremy Hylton | 4bcc7c5 | 2000-08-31 17:45:35 +0000 | [diff] [blame] | 3258 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 3259 | then |
| 3260 | LDSHARED="cc -shared ${LDFLAGS}" |
| 3261 | else |
| 3262 | LDSHARED="ld -Bshareable ${LDFLAGS}" |
| 3263 | fi;; |
Martin v. Löwis | 25ae43b | 2001-10-07 08:39:18 +0000 | [diff] [blame] | 3264 | OpenUNIX*|UnixWare*) |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3265 | if test "$GCC" = "yes" |
| 3266 | then LDSHARED="$(CC) -shared" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3267 | else LDSHARED="$(CC) -G" |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3268 | fi;; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3269 | SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3270 | Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3271 | CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3272 | *) LDSHARED="ld";; |
| 3273 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3274 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3275 | echo "$ac_t""$LDSHARED" 1>&6 |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3276 | BLDSHARED=${BLDSHARED-$LDSHARED} |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3277 | # 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] | 3278 | # library (module) -- this is only needed for a few systems |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3279 | echo $ac_n "checking CCSHARED""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3280 | echo "configure:3281: checking CCSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3281 | if test -z "$CCSHARED" |
| 3282 | then |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3283 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | c761fc8 | 2001-02-19 04:50:49 +0000 | [diff] [blame] | 3284 | SunOS*) if test "$GCC" = yes; |
| 3285 | then CCSHARED="-fPIC"; |
| 3286 | fi;; |
Guido van Rossum | af07a44 | 1995-02-13 19:45:27 +0000 | [diff] [blame] | 3287 | hp*|HP*) if test "$GCC" = yes; |
Martin v. Löwis | 703ad70 | 2001-09-05 08:36:52 +0000 | [diff] [blame] | 3288 | then CCSHARED="-fPIC"; |
Guido van Rossum | af07a44 | 1995-02-13 19:45:27 +0000 | [diff] [blame] | 3289 | else CCSHARED="+z"; |
| 3290 | fi;; |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3291 | Linux*|GNU*) CCSHARED="-fPIC";; |
Guido van Rossum | f5957ea | 1999-10-05 21:59:33 +0000 | [diff] [blame] | 3292 | BSD/OS*/4*) CCSHARED="-fpic";; |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame] | 3293 | FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";; |
Martin v. Löwis | 25ae43b | 2001-10-07 08:39:18 +0000 | [diff] [blame] | 3294 | OpenUNIX*|UnixWare*) |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3295 | if test "$GCC" = "yes" |
| 3296 | then CCSHARED="-fPIC" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3297 | else CCSHARED="-KPIC" |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3298 | fi;; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3299 | SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3300 | Monterey*) CCSHARED="-G";; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3301 | IRIX*/6*) case $CC in |
| 3302 | *gcc*) CCSHARED="-shared";; |
Guido van Rossum | ee21f41 | 1998-04-20 18:51:54 +0000 | [diff] [blame] | 3303 | *) CCSHARED="";; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3304 | esac;; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3305 | CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3306 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3307 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3308 | echo "$ac_t""$CCSHARED" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3309 | # LINKFORSHARED are the flags passed to the $(CC) command that links |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3310 | # the python executable -- this is only needed for a few systems |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3311 | echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3312 | echo "configure:3313: checking LINKFORSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3313 | if test -z "$LINKFORSHARED" |
| 3314 | then |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3315 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3316 | AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';; |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 3317 | hp*|HP*) |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 3318 | LINKFORSHARED="-Wl,-E -Wl,+s";; |
| 3319 | # LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";; |
Guido van Rossum | f5957ea | 1999-10-05 21:59:33 +0000 | [diff] [blame] | 3320 | BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";; |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3321 | Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";; |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3322 | # -u libsys_s pulls in all symbols in libsys |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3323 | Darwin/*) |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3324 | # -u __dummy makes the linker aware of the objc runtime |
| 3325 | # in System.framework; otherwise, __objcInit (referenced in |
| 3326 | # crt1.o) gets erroneously defined as common, which breaks dynamic |
| 3327 | # loading of any modules which reference it in System.framework. |
| 3328 | # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is |
| 3329 | # not used by the core itself but which needs to be in the core so |
| 3330 | # that dynamically loaded extension modules have access to it. |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3331 | LINKFORSHARED="$extra_undefs -framework System" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3332 | if test "$enable_framework" |
| 3333 | then |
| 3334 | LINKFORSHARED="$LINKFORSHARED -framework Python" |
| 3335 | fi |
| 3336 | LINKFORSHARED="$LINKFORSHARED $extra_frameworks";; |
Martin v. Löwis | 25ae43b | 2001-10-07 08:39:18 +0000 | [diff] [blame] | 3337 | OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3338 | SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";; |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3339 | ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3340 | FreeBSD*|NetBSD*|OpenBSD*) |
Guido van Rossum | df69365 | 1999-01-07 21:50:41 +0000 | [diff] [blame] | 3341 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
| 3342 | then |
| 3343 | LINKFORSHARED="-Wl,--export-dynamic" |
| 3344 | fi;; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3345 | SunOS/5*) case $CC in |
| 3346 | *gcc*) |
Guido van Rossum | ff48418 | 2000-02-03 13:50:24 +0000 | [diff] [blame] | 3347 | if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null |
Guido van Rossum | 8f4ceb1 | 1997-12-18 23:42:19 +0000 | [diff] [blame] | 3348 | then |
| 3349 | LINKFORSHARED="-Xlinker --export-dynamic" |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3350 | fi;; |
| 3351 | esac;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3352 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3353 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3354 | echo "$ac_t""$LINKFORSHARED" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3355 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3356 | |
| 3357 | echo $ac_n "checking CFLAGSFORSHARED""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3358 | echo "configure:3359: checking CFLAGSFORSHARED" >&5 |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3359 | if test ! "$LIBRARY" = "$LDLIBRARY" |
| 3360 | then |
Neil Schemenauer | 0c6141f | 2001-01-27 21:40:54 +0000 | [diff] [blame] | 3361 | case $ac_sys_system in |
| 3362 | CYGWIN*) |
| 3363 | # Cygwin needs CCSHARED when building extension DLLs |
| 3364 | # but not when building the interpreter DLL. |
| 3365 | CFLAGSFORSHARED='';; |
| 3366 | *) |
| 3367 | CFLAGSFORSHARED='$(CCSHARED)' |
| 3368 | esac |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3369 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3370 | echo "$ac_t""$CFLAGSFORSHARED" 1>&6 |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3371 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3372 | # checks for libraries |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3373 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3374 | echo "configure:3375: checking for dlopen in -ldl" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3375 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
| 3376 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 3377 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3378 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3379 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3380 | LIBS="-ldl $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3381 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3382 | #line 3383 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3383 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3384 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3385 | /* 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] | 3386 | builtin and then its argument prototype would still apply. */ |
| 3387 | char dlopen(); |
| 3388 | |
| 3389 | int main() { |
| 3390 | dlopen() |
| 3391 | ; return 0; } |
| 3392 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3393 | if { (eval echo configure:3394: \"$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] | 3394 | rm -rf conftest* |
| 3395 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3396 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3397 | echo "configure: failed program was:" >&5 |
| 3398 | cat conftest.$ac_ext >&5 |
| 3399 | rm -rf conftest* |
| 3400 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3401 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3402 | rm -f conftest* |
| 3403 | LIBS="$ac_save_LIBS" |
| 3404 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3405 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3406 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3407 | echo "$ac_t""yes" 1>&6 |
| 3408 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 3409 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
| 3410 | cat >> confdefs.h <<EOF |
| 3411 | #define $ac_tr_lib 1 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3412 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3413 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3414 | LIBS="-ldl $LIBS" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3415 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3416 | else |
| 3417 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3418 | fi |
| 3419 | # Dynamic linking for SunOS/Solaris and SYSV |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3420 | echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3421 | echo "configure:3422: checking for shl_load in -ldld" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3422 | ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` |
| 3423 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 3424 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3425 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3426 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3427 | LIBS="-ldld $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3428 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3429 | #line 3430 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3430 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3431 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3432 | /* 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] | 3433 | builtin and then its argument prototype would still apply. */ |
| 3434 | char shl_load(); |
| 3435 | |
| 3436 | int main() { |
| 3437 | shl_load() |
| 3438 | ; return 0; } |
| 3439 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3440 | if { (eval echo configure:3441: \"$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] | 3441 | rm -rf conftest* |
| 3442 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3443 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3444 | echo "configure: failed program was:" >&5 |
| 3445 | cat conftest.$ac_ext >&5 |
| 3446 | rm -rf conftest* |
| 3447 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3448 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3449 | rm -f conftest* |
| 3450 | LIBS="$ac_save_LIBS" |
| 3451 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3452 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3453 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3454 | echo "$ac_t""yes" 1>&6 |
| 3455 | ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 3456 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
| 3457 | cat >> confdefs.h <<EOF |
| 3458 | #define $ac_tr_lib 1 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3459 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3460 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3461 | LIBS="-ldld $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3462 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3463 | else |
| 3464 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3465 | fi |
| 3466 | # Dynamic linking for HP-UX |
Martin v. Löwis | 41933dd | 2002-03-21 15:10:58 +0000 | [diff] [blame] | 3467 | echo $ac_n "checking for sem_init in -lrt""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3468 | echo "configure:3469: checking for sem_init in -lrt" >&5 |
Martin v. Löwis | 41933dd | 2002-03-21 15:10:58 +0000 | [diff] [blame] | 3469 | ac_lib_var=`echo rt'_'sem_init | sed 'y%./+-%__p_%'` |
| 3470 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 3471 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3472 | else |
| 3473 | ac_save_LIBS="$LIBS" |
| 3474 | LIBS="-lrt $LIBS" |
| 3475 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3476 | #line 3477 "configure" |
Martin v. Löwis | 41933dd | 2002-03-21 15:10:58 +0000 | [diff] [blame] | 3477 | #include "confdefs.h" |
| 3478 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3479 | /* We use char because int might match the return type of a gcc2 |
| 3480 | builtin and then its argument prototype would still apply. */ |
| 3481 | char sem_init(); |
| 3482 | |
| 3483 | int main() { |
| 3484 | sem_init() |
| 3485 | ; return 0; } |
| 3486 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3487 | if { (eval echo configure:3488: \"$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] | 3488 | rm -rf conftest* |
| 3489 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3490 | else |
| 3491 | echo "configure: failed program was:" >&5 |
| 3492 | cat conftest.$ac_ext >&5 |
| 3493 | rm -rf conftest* |
| 3494 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3495 | fi |
| 3496 | rm -f conftest* |
| 3497 | LIBS="$ac_save_LIBS" |
| 3498 | |
| 3499 | fi |
| 3500 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3501 | echo "$ac_t""yes" 1>&6 |
| 3502 | ac_tr_lib=HAVE_LIB`echo rt | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 3503 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
| 3504 | cat >> confdefs.h <<EOF |
| 3505 | #define $ac_tr_lib 1 |
| 3506 | EOF |
| 3507 | |
| 3508 | LIBS="-lrt $LIBS" |
| 3509 | |
| 3510 | else |
| 3511 | echo "$ac_t""no" 1>&6 |
| 3512 | fi |
| 3513 | # 'Real Time' functions on Solaris |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3514 | |
| 3515 | # checks for system dependent C++ extensions support |
| 3516 | case "$ac_sys_system" in |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3517 | AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3518 | echo "configure:3519: checking for genuine AIX C++ extensions support" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3519 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3520 | #line 3521 "configure" |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3521 | #include "confdefs.h" |
| 3522 | #include "/usr/lpp/xlC/include/load.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3523 | int main() { |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3524 | loadAndInit("", 0, "") |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3525 | ; return 0; } |
| 3526 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3527 | if { (eval echo configure:3528: \"$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] | 3528 | rm -rf conftest* |
| 3529 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3530 | #define AIX_GENUINE_CPLUSPLUS 1 |
| 3531 | EOF |
| 3532 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3533 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3534 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3535 | echo "configure: failed program was:" >&5 |
| 3536 | cat conftest.$ac_ext >&5 |
| 3537 | rm -rf conftest* |
| 3538 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3539 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3540 | rm -f conftest*;; |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3541 | *) ;; |
| 3542 | esac |
| 3543 | |
Guido van Rossum | 70c7f48 | 1998-03-26 18:44:10 +0000 | [diff] [blame] | 3544 | # Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl. |
| 3545 | # However on SGI IRIX, these exist but are broken. |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3546 | # BeOS' sockets are stashed in libnet. |
| 3547 | case "$ac_sys_system" in |
| 3548 | IRIX*) ;; |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3549 | *) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3550 | echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3551 | echo "configure:3552: checking for t_open in -lnsl" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3552 | ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'` |
| 3553 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 3554 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3555 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3556 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3557 | LIBS="-lnsl $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3558 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3559 | #line 3560 "configure" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3560 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3561 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3562 | /* 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] | 3563 | builtin and then its argument prototype would still apply. */ |
| 3564 | char t_open(); |
| 3565 | |
| 3566 | int main() { |
| 3567 | t_open() |
| 3568 | ; return 0; } |
| 3569 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3570 | if { (eval echo configure:3571: \"$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] | 3571 | rm -rf conftest* |
| 3572 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3573 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3574 | echo "configure: failed program was:" >&5 |
| 3575 | cat conftest.$ac_ext >&5 |
| 3576 | rm -rf conftest* |
| 3577 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3578 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3579 | rm -f conftest* |
| 3580 | LIBS="$ac_save_LIBS" |
| 3581 | |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3582 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3583 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3584 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3585 | LIBS="-lnsl $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3586 | else |
| 3587 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3588 | fi |
Guido van Rossum | 0ddb028 | 1995-01-17 16:46:14 +0000 | [diff] [blame] | 3589 | # SVR4 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3590 | echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3591 | echo "configure:3592: checking for socket in -lsocket" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3592 | ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` |
| 3593 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 3594 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3595 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3596 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3597 | LIBS="-lsocket $LIBS $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3598 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3599 | #line 3600 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3600 | #include "confdefs.h" |
| 3601 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3602 | /* 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] | 3603 | builtin and then its argument prototype would still apply. */ |
| 3604 | char socket(); |
| 3605 | |
| 3606 | int main() { |
| 3607 | socket() |
| 3608 | ; return 0; } |
| 3609 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3610 | if { (eval echo configure:3611: \"$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] | 3611 | rm -rf conftest* |
| 3612 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3613 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3614 | echo "configure: failed program was:" >&5 |
| 3615 | cat conftest.$ac_ext >&5 |
| 3616 | rm -rf conftest* |
| 3617 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3618 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3619 | rm -f conftest* |
| 3620 | LIBS="$ac_save_LIBS" |
| 3621 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3622 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3623 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3624 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3625 | LIBS="-lsocket $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3626 | else |
| 3627 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3628 | fi |
| 3629 | # SVR4 sockets |
Jeremy Hylton | cb25d5e | 2000-07-27 21:23:28 +0000 | [diff] [blame] | 3630 | ;; |
| 3631 | esac |
| 3632 | case "$ac_sys_system" in |
| 3633 | BeOS*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3634 | echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3635 | echo "configure:3636: checking for socket in -lnet" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3636 | ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'` |
| 3637 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 3638 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3639 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3640 | ac_save_LIBS="$LIBS" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3641 | LIBS="-lnet $LIBS $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3642 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3643 | #line 3644 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3644 | #include "confdefs.h" |
| 3645 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3646 | /* 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] | 3647 | builtin and then its argument prototype would still apply. */ |
| 3648 | char socket(); |
| 3649 | |
| 3650 | int main() { |
| 3651 | socket() |
| 3652 | ; return 0; } |
| 3653 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3654 | if { (eval echo configure:3655: \"$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] | 3655 | rm -rf conftest* |
| 3656 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3657 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3658 | echo "configure: failed program was:" >&5 |
| 3659 | cat conftest.$ac_ext >&5 |
| 3660 | rm -rf conftest* |
| 3661 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3662 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3663 | rm -f conftest* |
| 3664 | LIBS="$ac_save_LIBS" |
| 3665 | |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3666 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3667 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3668 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3669 | LIBS="-lnet $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3670 | else |
| 3671 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3672 | fi |
| 3673 | # BeOS |
| 3674 | ;; |
| 3675 | esac |
Guido van Rossum | 70c7f48 | 1998-03-26 18:44:10 +0000 | [diff] [blame] | 3676 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3677 | echo $ac_n "checking for --with-libs""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3678 | echo "configure:3679: checking for --with-libs" >&5 |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 3679 | # Check whether --with-libs or --without-libs was given. |
| 3680 | if test "${with_libs+set}" = set; then |
| 3681 | withval="$with_libs" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3682 | |
| 3683 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 3684 | LIBS="$withval $LIBS" |
| 3685 | |
| 3686 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3687 | echo "$ac_t""no" 1>&6 |
| 3688 | fi |
| 3689 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3690 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 3691 | # Determine if signalmodule should be used. |
| 3692 | |
| 3693 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3694 | echo $ac_n "checking for --with-signal-module""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3695 | echo "configure:3696: checking for --with-signal-module" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 3696 | # Check whether --with-signal-module or --without-signal-module was given. |
| 3697 | if test "${with_signal_module+set}" = set; then |
| 3698 | withval="$with_signal_module" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3699 | : |
| 3700 | fi |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 3701 | |
| 3702 | |
| 3703 | if test -z "$with_signal_module" |
| 3704 | then with_signal_module="yes" |
| 3705 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3706 | echo "$ac_t""$with_signal_module" 1>&6 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 3707 | |
| 3708 | if test "${with_signal_module}" = "yes"; then |
| 3709 | USE_SIGNAL_MODULE="" |
| 3710 | SIGNAL_OBJS="" |
| 3711 | else |
| 3712 | USE_SIGNAL_MODULE="#" |
| 3713 | SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o" |
| 3714 | fi |
| 3715 | |
Guido van Rossum | 3d15bd8 | 2001-01-10 18:53:48 +0000 | [diff] [blame] | 3716 | # This is used to generate Setup.config |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 3717 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3718 | USE_THREAD_MODULE="" |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 3719 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3720 | echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3721 | echo "configure:3722: checking for --with-dec-threads" >&5 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3722 | |
| 3723 | # Check whether --with-dec-threads or --without-dec-threads was given. |
| 3724 | if test "${with_dec_threads+set}" = set; then |
| 3725 | withval="$with_dec_threads" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3726 | |
| 3727 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3728 | LDLAST=-threads |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3729 | if test "${with_thread+set}" != set; then |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3730 | with_thread="$withval"; |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3731 | fi |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3732 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3733 | echo "$ac_t""no" 1>&6 |
| 3734 | fi |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3735 | |
| 3736 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3737 | echo $ac_n "checking for --with-threads""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3738 | echo "configure:3739: checking for --with-threads" >&5 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3739 | # Check whether --with-threads or --without-threads was given. |
| 3740 | if test "${with_threads+set}" = set; then |
| 3741 | withval="$with_threads" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3742 | : |
| 3743 | fi |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3744 | |
| 3745 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3746 | # --with-thread is deprecated, but check for it anyway |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3747 | # Check whether --with-thread or --without-thread was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3748 | if test "${with_thread+set}" = set; then |
| 3749 | withval="$with_thread" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3750 | |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 3751 | with_threads=$with_thread |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3752 | fi |
| 3753 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3754 | |
| 3755 | if test -z "$with_threads" |
| 3756 | then with_threads="yes" |
| 3757 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3758 | echo "$ac_t""$with_threads" 1>&6 |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3759 | |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 3760 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3761 | if test "$with_threads" = "no" |
| 3762 | then |
| 3763 | USE_THREAD_MODULE="#" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3764 | elif test "$ac_cv_pthread_is_default" = yes |
| 3765 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3766 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3767 | #define WITH_THREAD 1 |
| 3768 | EOF |
| 3769 | |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3770 | # Defining _REENTRANT on system with POSIX threads should not hurt. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3771 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3772 | #define _REENTRANT 1 |
| 3773 | EOF |
| 3774 | |
| 3775 | posix_threads=yes |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 3776 | THREADOBJ="Python/thread.o" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3777 | elif test "$ac_cv_kpthread" = "yes" |
| 3778 | then |
| 3779 | CC="$CC -Kpthread" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3780 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 3781 | #define WITH_THREAD 1 |
| 3782 | EOF |
| 3783 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 3784 | posix_threads=yes |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 3785 | THREADOBJ="Python/thread.o" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3786 | else |
| 3787 | if test ! -z "$with_threads" -a -d "$with_threads" |
| 3788 | then LDFLAGS="$LDFLAGS -L$with_threads" |
| 3789 | fi |
| 3790 | if test ! -z "$withval" -a -d "$withval" |
| 3791 | then LDFLAGS="$LDFLAGS -L$withval" |
| 3792 | fi |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3793 | |
| 3794 | # According to the POSIX spec, a pthreads implementation must |
| 3795 | # 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] | 3796 | echo $ac_n "checking for _POSIX_THREADS in unistd.h""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3797 | echo "configure:3798: checking for _POSIX_THREADS in unistd.h" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3798 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3799 | #line 3800 "configure" |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3800 | #include "confdefs.h" |
| 3801 | #include <unistd.h> |
| 3802 | #ifdef _POSIX_THREADS |
| 3803 | yes |
| 3804 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3805 | |
| 3806 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3807 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 3808 | egrep "yes" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3809 | rm -rf conftest* |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3810 | unistd_defines_pthreads=yes |
| 3811 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3812 | rm -rf conftest* |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3813 | unistd_defines_pthreads=no |
| 3814 | fi |
| 3815 | rm -f conftest* |
| 3816 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3817 | echo "$ac_t""$unistd_defines_pthreads" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3818 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3819 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9caf77a | 1996-08-01 00:52:26 +0000 | [diff] [blame] | 3820 | #define _REENTRANT 1 |
| 3821 | EOF |
| 3822 | |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3823 | ac_safe=`echo "cthreads.h" | sed 'y%./+-%__p_%'` |
| 3824 | echo $ac_n "checking for cthreads.h""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3825 | echo "configure:3826: checking for cthreads.h" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3826 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 3827 | echo $ac_n "(cached) $ac_c" 1>&6 |
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 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3830 | #line 3831 "configure" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3831 | #include "confdefs.h" |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3832 | #include <cthreads.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3833 | EOF |
| 3834 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3835 | { (eval echo configure:3836: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3836 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 3837 | if test -z "$ac_err"; then |
| 3838 | rm -rf conftest* |
| 3839 | eval "ac_cv_header_$ac_safe=yes" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3840 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3841 | echo "$ac_err" >&5 |
| 3842 | echo "configure: failed program was:" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3843 | cat conftest.$ac_ext >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3844 | rm -rf conftest* |
| 3845 | eval "ac_cv_header_$ac_safe=no" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3846 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3847 | rm -f conftest* |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3848 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3849 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 3850 | echo "$ac_t""yes" 1>&6 |
| 3851 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3852 | #define WITH_THREAD 1 |
| 3853 | EOF |
| 3854 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3855 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3856 | #define C_THREADS 1 |
| 3857 | EOF |
| 3858 | |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3859 | cat >> confdefs.h <<\EOF |
| 3860 | #define HURD_C_THREADS 1 |
| 3861 | EOF |
| 3862 | |
| 3863 | LIBS="$LIBS -lthreads" |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 3864 | THREADOBJ="Python/thread.o" |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3865 | else |
| 3866 | echo "$ac_t""no" 1>&6 |
| 3867 | |
| 3868 | ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'` |
| 3869 | echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3870 | echo "configure:3871: checking for mach/cthreads.h" >&5 |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3871 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 3872 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3873 | else |
| 3874 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3875 | #line 3876 "configure" |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3876 | #include "confdefs.h" |
| 3877 | #include <mach/cthreads.h> |
| 3878 | EOF |
| 3879 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3880 | { (eval echo configure:3881: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3881 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 3882 | if test -z "$ac_err"; then |
| 3883 | rm -rf conftest* |
| 3884 | eval "ac_cv_header_$ac_safe=yes" |
| 3885 | else |
| 3886 | echo "$ac_err" >&5 |
| 3887 | echo "configure: failed program was:" >&5 |
| 3888 | cat conftest.$ac_ext >&5 |
| 3889 | rm -rf conftest* |
| 3890 | eval "ac_cv_header_$ac_safe=no" |
| 3891 | fi |
| 3892 | rm -f conftest* |
| 3893 | fi |
| 3894 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 3895 | echo "$ac_t""yes" 1>&6 |
| 3896 | cat >> confdefs.h <<\EOF |
| 3897 | #define WITH_THREAD 1 |
| 3898 | EOF |
| 3899 | |
| 3900 | cat >> confdefs.h <<\EOF |
| 3901 | #define C_THREADS 1 |
| 3902 | EOF |
| 3903 | |
| 3904 | cat >> confdefs.h <<\EOF |
| 3905 | #define MACH_C_THREADS 1 |
| 3906 | EOF |
| 3907 | |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 3908 | THREADOBJ="Python/thread.o" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3909 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3910 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3911 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3912 | echo $ac_n "checking for --with-pth""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3913 | echo "configure:3914: checking for --with-pth" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3914 | # Check whether --with-pth or --without-pth was given. |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3915 | if test "${with_pth+set}" = set; then |
| 3916 | withval="$with_pth" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3917 | |
| 3918 | echo "$ac_t""$withval" 1>&6 |
| 3919 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3920 | #define WITH_THREAD 1 |
| 3921 | EOF |
| 3922 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3923 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3924 | #define HAVE_PTH 1 |
| 3925 | EOF |
| 3926 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3927 | LIBS="-lpth $LIBS" |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 3928 | THREADOBJ="Python/thread.o" |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3929 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3930 | |
| 3931 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3932 | |
| 3933 | # Just looking for pthread_create in libpthread is not enough: |
| 3934 | # on HP/UX, pthread.h renames pthread_create to a different symbol name. |
| 3935 | # So we really have to include pthread.h, and then link. |
| 3936 | _libs=$LIBS |
| 3937 | LIBS="$LIBS -lpthread" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3938 | echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3939 | echo "configure:3940: checking for pthread_create in -lpthread" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3940 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3941 | #line 3942 "configure" |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3942 | #include "confdefs.h" |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3943 | #include <pthread.h> |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3944 | |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3945 | void * start_routine (void *arg) { exit (0); } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3946 | int main() { |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3947 | |
| 3948 | pthread_create (NULL, NULL, start_routine, NULL) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3949 | ; return 0; } |
| 3950 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3951 | if { (eval echo configure:3952: \"$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] | 3952 | rm -rf conftest* |
| 3953 | |
| 3954 | echo "$ac_t""yes" 1>&6 |
| 3955 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3956 | #define WITH_THREAD 1 |
| 3957 | EOF |
| 3958 | |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3959 | posix_threads=yes |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 3960 | THREADOBJ="Python/thread.o" |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3961 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3962 | echo "configure: failed program was:" >&5 |
| 3963 | cat conftest.$ac_ext >&5 |
| 3964 | rm -rf conftest* |
| 3965 | |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3966 | LIBS=$_libs |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3967 | echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3968 | echo "configure:3969: checking for pthread_detach" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3969 | if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then |
| 3970 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3971 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3972 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3973 | #line 3974 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3974 | #include "confdefs.h" |
| 3975 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3976 | which can conflict with char pthread_detach(); below. */ |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3977 | #include <assert.h> |
| 3978 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3979 | /* 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] | 3980 | builtin and then its argument prototype would still apply. */ |
| 3981 | char pthread_detach(); |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3982 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3983 | int main() { |
| 3984 | |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3985 | /* The GNU C library defines this for functions which it implements |
| 3986 | to always fail with ENOSYS. Some functions are actually named |
| 3987 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3988 | #if defined (__stub_pthread_detach) || defined (__stub___pthread_detach) |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3989 | choke me |
| 3990 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3991 | pthread_detach(); |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3992 | #endif |
| 3993 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3994 | ; return 0; } |
| 3995 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 3996 | if { (eval echo configure:3997: \"$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] | 3997 | rm -rf conftest* |
| 3998 | eval "ac_cv_func_pthread_detach=yes" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3999 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4000 | echo "configure: failed program was:" >&5 |
| 4001 | cat conftest.$ac_ext >&5 |
| 4002 | rm -rf conftest* |
| 4003 | eval "ac_cv_func_pthread_detach=no" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 4004 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4005 | rm -f conftest* |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 4006 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4007 | |
| 4008 | if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then |
| 4009 | echo "$ac_t""yes" 1>&6 |
| 4010 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 4011 | #define WITH_THREAD 1 |
| 4012 | EOF |
| 4013 | |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4014 | posix_threads=yes |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4015 | THREADOBJ="Python/thread.o" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 4016 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4017 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 4018 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4019 | ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'` |
| 4020 | echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4021 | echo "configure:4022: checking for kernel/OS.h" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4022 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 4023 | echo $ac_n "(cached) $ac_c" 1>&6 |
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 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4026 | #line 4027 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 4027 | #include "confdefs.h" |
| 4028 | #include <kernel/OS.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4029 | EOF |
| 4030 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4031 | { (eval echo configure:4032: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4032 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 4033 | if test -z "$ac_err"; then |
| 4034 | rm -rf conftest* |
| 4035 | eval "ac_cv_header_$ac_safe=yes" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 4036 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4037 | echo "$ac_err" >&5 |
| 4038 | echo "configure: failed program was:" >&5 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 4039 | cat conftest.$ac_ext >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4040 | rm -rf conftest* |
| 4041 | eval "ac_cv_header_$ac_safe=no" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 4042 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4043 | rm -f conftest* |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 4044 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4045 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 4046 | echo "$ac_t""yes" 1>&6 |
| 4047 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 4048 | #define WITH_THREAD 1 |
| 4049 | EOF |
| 4050 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4051 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 4052 | #define BEOS_THREADS 1 |
| 4053 | EOF |
| 4054 | |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4055 | THREADOBJ="Python/thread.o" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 4056 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4057 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 4058 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4059 | echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4060 | echo "configure:4061: checking for pthread_create in -lpthreads" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4061 | ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'` |
| 4062 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 4063 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4064 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4065 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4066 | LIBS="-lpthreads $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4067 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4068 | #line 4069 "configure" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4069 | #include "confdefs.h" |
| 4070 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4071 | /* 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] | 4072 | builtin and then its argument prototype would still apply. */ |
| 4073 | char pthread_create(); |
| 4074 | |
| 4075 | int main() { |
| 4076 | pthread_create() |
| 4077 | ; return 0; } |
| 4078 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4079 | if { (eval echo configure:4080: \"$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] | 4080 | rm -rf conftest* |
| 4081 | eval "ac_cv_lib_$ac_lib_var=yes" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4082 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4083 | echo "configure: failed program was:" >&5 |
| 4084 | cat conftest.$ac_ext >&5 |
| 4085 | rm -rf conftest* |
| 4086 | eval "ac_cv_lib_$ac_lib_var=no" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4087 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4088 | rm -f conftest* |
| 4089 | LIBS="$ac_save_LIBS" |
| 4090 | |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4091 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4092 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4093 | echo "$ac_t""yes" 1>&6 |
| 4094 | cat >> confdefs.h <<\EOF |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4095 | #define WITH_THREAD 1 |
| 4096 | EOF |
| 4097 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4098 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4099 | LIBS="$LIBS -lpthreads" |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4100 | THREADOBJ="Python/thread.o" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4101 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4102 | echo "$ac_t""no" 1>&6 |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4103 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4104 | echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4105 | echo "configure:4106: checking for pthread_create in -lc_r" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4106 | ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` |
| 4107 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 4108 | echo $ac_n "(cached) $ac_c" 1>&6 |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4109 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4110 | ac_save_LIBS="$LIBS" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4111 | LIBS="-lc_r $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4112 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4113 | #line 4114 "configure" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4114 | #include "confdefs.h" |
| 4115 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4116 | /* 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] | 4117 | builtin and then its argument prototype would still apply. */ |
| 4118 | char pthread_create(); |
| 4119 | |
| 4120 | int main() { |
| 4121 | pthread_create() |
| 4122 | ; return 0; } |
| 4123 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4124 | if { (eval echo configure:4125: \"$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] | 4125 | rm -rf conftest* |
| 4126 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4127 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4128 | echo "configure: failed program was:" >&5 |
| 4129 | cat conftest.$ac_ext >&5 |
| 4130 | rm -rf conftest* |
| 4131 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4132 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4133 | rm -f conftest* |
| 4134 | LIBS="$ac_save_LIBS" |
| 4135 | |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4136 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4137 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4138 | echo "$ac_t""yes" 1>&6 |
| 4139 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4140 | #define WITH_THREAD 1 |
| 4141 | EOF |
| 4142 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4143 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4144 | LIBS="$LIBS -lc_r" |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4145 | THREADOBJ="Python/thread.o" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4146 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4147 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4148 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4149 | echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4150 | echo "configure:4151: checking for __d6_pthread_create in -lthread" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4151 | ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'` |
| 4152 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 4153 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4154 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4155 | ac_save_LIBS="$LIBS" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4156 | LIBS="-lthread $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4157 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4158 | #line 4159 "configure" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4159 | #include "confdefs.h" |
| 4160 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4161 | /* 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] | 4162 | builtin and then its argument prototype would still apply. */ |
| 4163 | char __d6_pthread_create(); |
| 4164 | |
| 4165 | int main() { |
| 4166 | __d6_pthread_create() |
| 4167 | ; return 0; } |
| 4168 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4169 | if { (eval echo configure:4170: \"$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] | 4170 | rm -rf conftest* |
| 4171 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4172 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4173 | echo "configure: failed program was:" >&5 |
| 4174 | cat conftest.$ac_ext >&5 |
| 4175 | rm -rf conftest* |
| 4176 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4177 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4178 | rm -f conftest* |
| 4179 | LIBS="$ac_save_LIBS" |
| 4180 | |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4181 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4182 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4183 | echo "$ac_t""yes" 1>&6 |
| 4184 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4185 | #define WITH_THREAD 1 |
| 4186 | EOF |
| 4187 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4188 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4189 | LIBS="$LIBS -lthread" |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4190 | THREADOBJ="Python/thread.o" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4191 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4192 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4193 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4194 | echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4195 | echo "configure:4196: checking for __pthread_create_system in -lpthread" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4196 | ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'` |
| 4197 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 4198 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4199 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4200 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4201 | LIBS="-lpthread $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4202 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4203 | #line 4204 "configure" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4204 | #include "confdefs.h" |
| 4205 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4206 | /* 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] | 4207 | builtin and then its argument prototype would still apply. */ |
| 4208 | char __pthread_create_system(); |
| 4209 | |
| 4210 | int main() { |
| 4211 | __pthread_create_system() |
| 4212 | ; return 0; } |
| 4213 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4214 | if { (eval echo configure:4215: \"$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] | 4215 | rm -rf conftest* |
| 4216 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4217 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4218 | echo "configure: failed program was:" >&5 |
| 4219 | cat conftest.$ac_ext >&5 |
| 4220 | rm -rf conftest* |
| 4221 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4222 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4223 | rm -f conftest* |
| 4224 | LIBS="$ac_save_LIBS" |
| 4225 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4226 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4227 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4228 | echo "$ac_t""yes" 1>&6 |
| 4229 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4230 | #define WITH_THREAD 1 |
| 4231 | EOF |
| 4232 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4233 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4234 | LIBS="$LIBS -lpthread" |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4235 | THREADOBJ="Python/thread.o" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4236 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4237 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4238 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4239 | echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4240 | echo "configure:4241: checking for pthread_create in -lcma" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4241 | ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'` |
| 4242 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 4243 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4244 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4245 | ac_save_LIBS="$LIBS" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4246 | LIBS="-lcma $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4247 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4248 | #line 4249 "configure" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4249 | #include "confdefs.h" |
| 4250 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4251 | /* 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] | 4252 | builtin and then its argument prototype would still apply. */ |
| 4253 | char pthread_create(); |
| 4254 | |
| 4255 | int main() { |
| 4256 | pthread_create() |
| 4257 | ; return 0; } |
| 4258 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4259 | if { (eval echo configure:4260: \"$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] | 4260 | rm -rf conftest* |
| 4261 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4262 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4263 | echo "configure: failed program was:" >&5 |
| 4264 | cat conftest.$ac_ext >&5 |
| 4265 | rm -rf conftest* |
| 4266 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4267 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4268 | rm -f conftest* |
| 4269 | LIBS="$ac_save_LIBS" |
| 4270 | |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4271 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4272 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4273 | echo "$ac_t""yes" 1>&6 |
| 4274 | cat >> confdefs.h <<\EOF |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4275 | #define WITH_THREAD 1 |
| 4276 | EOF |
| 4277 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4278 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4279 | LIBS="$LIBS -lcma" |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4280 | THREADOBJ="Python/thread.o" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4281 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4282 | echo "$ac_t""no" 1>&6 |
Thomas Wouters | 0db2b2b | 2000-08-26 11:33:43 +0000 | [diff] [blame] | 4283 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4284 | USE_THREAD_MODULE="#" |
Guido van Rossum | 2d38f91 | 1996-06-26 19:47:01 +0000 | [diff] [blame] | 4285 | fi |
| 4286 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4287 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4288 | fi |
| 4289 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 4290 | fi |
| 4291 | |
Guido van Rossum | 0be3e49 | 1997-05-22 20:33:33 +0000 | [diff] [blame] | 4292 | fi |
| 4293 | |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4294 | fi |
| 4295 | |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4296 | fi |
| 4297 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 4298 | fi |
| 4299 | |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 4300 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4301 | rm -f conftest* |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4302 | fi |
| 4303 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4304 | fi |
| 4305 | |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 4306 | fi |
| 4307 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4308 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4309 | if test "$posix_threads" = "yes"; then |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4310 | if test "$unistd_defines_pthreads" = "no"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4311 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4312 | #define _POSIX_THREADS 1 |
| 4313 | EOF |
| 4314 | |
| 4315 | fi |
| 4316 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4317 | echo $ac_n "checking if PTHREAD_SCOPE_SYSTEM is supported""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4318 | echo "configure:4319: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4319 | if eval "test \"`echo '$''{'ac_cv_pthread_system_supported'+set}'`\" = set"; then |
| 4320 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4321 | else |
| 4322 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 4323 | ac_cv_pthread_system_supported=no |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4324 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4325 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4326 | #line 4327 "configure" |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4327 | #include "confdefs.h" |
| 4328 | #include <pthread.h> |
| 4329 | void *foo(void *parm) { |
| 4330 | return NULL; |
| 4331 | } |
| 4332 | main() { |
| 4333 | pthread_attr_t attr; |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame] | 4334 | pthread_t id; |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4335 | if (pthread_attr_init(&attr)) exit(-1); |
| 4336 | if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1); |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame] | 4337 | if (pthread_create(&id, &attr, foo, NULL)) exit(-1); |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4338 | exit(0); |
| 4339 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4340 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4341 | if { (eval echo configure:4342: \"$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] | 4342 | then |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4343 | ac_cv_pthread_system_supported=yes |
| 4344 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4345 | echo "configure: failed program was:" >&5 |
| 4346 | cat conftest.$ac_ext >&5 |
| 4347 | rm -fr conftest* |
| 4348 | ac_cv_pthread_system_supported=no |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4349 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4350 | rm -fr conftest* |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4351 | fi |
| 4352 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4353 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4354 | fi |
| 4355 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4356 | echo "$ac_t""$ac_cv_pthread_system_supported" 1>&6 |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4357 | if test "$ac_cv_pthread_system_supported" = "yes"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4358 | cat >> confdefs.h <<\EOF |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4359 | #define PTHREAD_SYSTEM_SCHED_SUPPORTED 1 |
| 4360 | EOF |
| 4361 | |
| 4362 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4363 | for ac_func in pthread_sigmask |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4364 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4365 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4366 | echo "configure:4367: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4367 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 4368 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4369 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4370 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4371 | #line 4372 "configure" |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4372 | #include "confdefs.h" |
| 4373 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4374 | which can conflict with char $ac_func(); below. */ |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4375 | #include <assert.h> |
| 4376 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4377 | /* 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] | 4378 | builtin and then its argument prototype would still apply. */ |
| 4379 | char $ac_func(); |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4380 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4381 | int main() { |
| 4382 | |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4383 | /* The GNU C library defines this for functions which it implements |
| 4384 | to always fail with ENOSYS. Some functions are actually named |
| 4385 | something starting with __ and the normal name is an alias. */ |
| 4386 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 4387 | choke me |
| 4388 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4389 | $ac_func(); |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4390 | #endif |
| 4391 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4392 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 4393 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4394 | if { (eval echo configure:4395: \"$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] | 4395 | rm -rf conftest* |
| 4396 | eval "ac_cv_func_$ac_func=yes" |
| 4397 | else |
| 4398 | echo "configure: failed program was:" >&5 |
| 4399 | cat conftest.$ac_ext >&5 |
| 4400 | rm -rf conftest* |
| 4401 | eval "ac_cv_func_$ac_func=no" |
| 4402 | fi |
| 4403 | rm -f conftest* |
| 4404 | fi |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4405 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4406 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4407 | echo "$ac_t""yes" 1>&6 |
| 4408 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4409 | cat >> confdefs.h <<EOF |
| 4410 | #define $ac_tr_func 1 |
| 4411 | EOF |
| 4412 | |
| 4413 | else |
| 4414 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4415 | fi |
| 4416 | done |
| 4417 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4418 | fi |
| 4419 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4420 | echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4421 | echo "configure:4422: checking for usconfig in -lmpc" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4422 | ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'` |
| 4423 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 4424 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4425 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4426 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4427 | LIBS="-lmpc $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4428 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4429 | #line 4430 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4430 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4431 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4432 | /* 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] | 4433 | builtin and then its argument prototype would still apply. */ |
| 4434 | char usconfig(); |
| 4435 | |
| 4436 | int main() { |
| 4437 | usconfig() |
| 4438 | ; return 0; } |
| 4439 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4440 | if { (eval echo configure:4441: \"$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] | 4441 | rm -rf conftest* |
| 4442 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4443 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4444 | echo "configure: failed program was:" >&5 |
| 4445 | cat conftest.$ac_ext >&5 |
| 4446 | rm -rf conftest* |
| 4447 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4448 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4449 | rm -f conftest* |
| 4450 | LIBS="$ac_save_LIBS" |
| 4451 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4452 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4453 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4454 | echo "$ac_t""yes" 1>&6 |
| 4455 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4456 | #define WITH_THREAD 1 |
| 4457 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4458 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4459 | LIBS="$LIBS -lmpc" |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4460 | THREADOBJ="Python/thread.o" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4461 | USE_THREAD_MODULE="" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4462 | else |
| 4463 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4464 | fi |
| 4465 | |
Martin v. Löwis | 3d2b549 | 2002-03-15 13:48:21 +0000 | [diff] [blame] | 4466 | |
| 4467 | if test $posix_threads != "yes"; then |
| 4468 | echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4469 | echo "configure:4470: checking for thr_create in -lthread" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4470 | ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'` |
| 4471 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 4472 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4473 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4474 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4475 | LIBS="-lthread $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4476 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4477 | #line 4478 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4478 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4479 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4480 | /* 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] | 4481 | builtin and then its argument prototype would still apply. */ |
| 4482 | char thr_create(); |
| 4483 | |
| 4484 | int main() { |
| 4485 | thr_create() |
| 4486 | ; return 0; } |
| 4487 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4488 | if { (eval echo configure:4489: \"$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] | 4489 | rm -rf conftest* |
| 4490 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4491 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4492 | echo "configure: failed program was:" >&5 |
| 4493 | cat conftest.$ac_ext >&5 |
| 4494 | rm -rf conftest* |
| 4495 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4496 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4497 | rm -f conftest* |
| 4498 | LIBS="$ac_save_LIBS" |
| 4499 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4500 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4501 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4502 | echo "$ac_t""yes" 1>&6 |
| 4503 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4504 | #define WITH_THREAD 1 |
| 4505 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4506 | |
Martin v. Löwis | 3d2b549 | 2002-03-15 13:48:21 +0000 | [diff] [blame] | 4507 | LIBS="$LIBS -lthread" |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 4508 | THREADOBJ="Python/thread.o" |
Martin v. Löwis | 3d2b549 | 2002-03-15 13:48:21 +0000 | [diff] [blame] | 4509 | USE_THREAD_MODULE="" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4510 | else |
| 4511 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4512 | fi |
| 4513 | |
Martin v. Löwis | 3d2b549 | 2002-03-15 13:48:21 +0000 | [diff] [blame] | 4514 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4515 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4516 | if test "$USE_THREAD_MODULE" != "#" |
| 4517 | then |
| 4518 | # If the above checks didn't disable threads, (at least) OSF1 |
| 4519 | # needs this '-threads' argument during linking. |
| 4520 | case $ac_sys_system in |
| 4521 | OSF1) LDLAST=-threads;; |
| 4522 | esac |
Jeremy Hylton | 1a2ca86 | 2000-10-16 16:59:12 +0000 | [diff] [blame] | 4523 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4524 | fi |
| 4525 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4526 | # Check for enable-ipv6 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4527 | echo $ac_n "checking if --enable-ipv6 is specified""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4528 | echo "configure:4529: checking if --enable-ipv6 is specified" >&5 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4529 | # Check whether --enable-ipv6 or --disable-ipv6 was given. |
| 4530 | if test "${enable_ipv6+set}" = set; then |
| 4531 | enableval="$enable_ipv6" |
| 4532 | case "$enableval" in |
| 4533 | no) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4534 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4535 | ipv6=no |
| 4536 | ;; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4537 | *) echo "$ac_t""yes" 1>&6 |
| 4538 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4539 | #define ENABLE_IPV6 1 |
| 4540 | EOF |
| 4541 | |
| 4542 | ipv6=yes |
| 4543 | ;; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4544 | esac |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4545 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4546 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4547 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4548 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4549 | ipv6=no |
| 4550 | |
| 4551 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4552 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4553 | #line 4554 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4554 | #include "confdefs.h" |
| 4555 | /* AF_INET6 available check */ |
| 4556 | #include <sys/types.h> |
| 4557 | #include <sys/socket.h> |
| 4558 | main() |
| 4559 | { |
| 4560 | if (socket(AF_INET6, SOCK_STREAM, 0) < 0) |
| 4561 | exit(1); |
| 4562 | else |
| 4563 | exit(0); |
| 4564 | } |
| 4565 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4566 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4567 | if { (eval echo configure:4568: \"$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] | 4568 | then |
| 4569 | echo "$ac_t""yes" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4570 | ipv6=yes |
| 4571 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4572 | echo "configure: failed program was:" >&5 |
| 4573 | cat conftest.$ac_ext >&5 |
| 4574 | rm -fr conftest* |
| 4575 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4576 | ipv6=no |
| 4577 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4578 | rm -fr conftest* |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4579 | fi |
| 4580 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4581 | |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4582 | if test "$ipv6" = "yes"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4583 | echo $ac_n "checking if RFC2553 API is available""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4584 | echo "configure:4585: checking if RFC2553 API is available" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4585 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4586 | #line 4587 "configure" |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4587 | #include "confdefs.h" |
| 4588 | #include <sys/types.h> |
| 4589 | #include <netinet/in.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4590 | int main() { |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4591 | struct sockaddr_in6 x; |
| 4592 | x.sin6_scope_id; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4593 | ; return 0; } |
| 4594 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4595 | if { (eval echo configure:4596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4596 | rm -rf conftest* |
| 4597 | echo "$ac_t""yes" 1>&6 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4598 | ipv6=yes |
| 4599 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4600 | echo "configure: failed program was:" >&5 |
| 4601 | cat conftest.$ac_ext >&5 |
| 4602 | rm -rf conftest* |
| 4603 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4604 | ipv6=no |
| 4605 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4606 | rm -f conftest* |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4607 | fi |
| 4608 | |
| 4609 | if test "$ipv6" = "yes"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4610 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4611 | #define ENABLE_IPV6 1 |
| 4612 | EOF |
| 4613 | |
| 4614 | fi |
| 4615 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4616 | fi |
| 4617 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4618 | |
| 4619 | ipv6type=unknown |
| 4620 | ipv6lib=none |
| 4621 | ipv6trylibc=no |
| 4622 | |
| 4623 | if test "$ipv6" = "yes"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4624 | echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4625 | echo "configure:4626: checking ipv6 stack type" >&5 |
Guido van Rossum | b855216 | 2001-09-05 14:58:11 +0000 | [diff] [blame] | 4626 | for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta; |
| 4627 | do |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4628 | case $i in |
| 4629 | inria) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4630 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4631 | #line 4632 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4632 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4633 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4634 | #include <netinet/in.h> |
| 4635 | #ifdef IPV6_INRIA_VERSION |
| 4636 | yes |
| 4637 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4638 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4639 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4640 | egrep "yes" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4641 | rm -rf conftest* |
Martin v. Löwis | 44ddbde | 2001-12-02 10:15:37 +0000 | [diff] [blame] | 4642 | ipv6type=$i |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4643 | fi |
| 4644 | rm -f conftest* |
| 4645 | |
| 4646 | ;; |
| 4647 | kame) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4648 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4649 | #line 4650 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4650 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4651 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4652 | #include <netinet/in.h> |
| 4653 | #ifdef __KAME__ |
| 4654 | yes |
| 4655 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4656 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4657 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4658 | egrep "yes" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4659 | rm -rf conftest* |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4660 | ipv6type=$i; |
| 4661 | ipv6lib=inet6 |
| 4662 | ipv6libdir=/usr/local/v6/lib |
| 4663 | ipv6trylibc=yes |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4664 | fi |
| 4665 | rm -f conftest* |
| 4666 | |
| 4667 | ;; |
| 4668 | linux-glibc) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4669 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4670 | #line 4671 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4671 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4672 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4673 | #include <features.h> |
| 4674 | #if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)) |
| 4675 | yes |
| 4676 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4677 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4678 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4679 | egrep "yes" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4680 | rm -rf conftest* |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4681 | ipv6type=$i; |
| 4682 | ipv6trylibc=yes |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4683 | fi |
| 4684 | rm -f conftest* |
| 4685 | |
| 4686 | ;; |
| 4687 | linux-inet6) |
| 4688 | if test -d /usr/inet6; then |
| 4689 | ipv6type=$i |
| 4690 | ipv6lib=inet6 |
| 4691 | ipv6libdir=/usr/inet6/lib |
Martin v. Löwis | 44ddbde | 2001-12-02 10:15:37 +0000 | [diff] [blame] | 4692 | OPT="-I/usr/inet6/include $OPT" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4693 | fi |
| 4694 | ;; |
| 4695 | solaris) |
| 4696 | if test -f /etc/netconfig; then |
| 4697 | if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then |
| 4698 | ipv6type=$i |
| 4699 | ipv6trylibc=yes |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4700 | fi |
| 4701 | fi |
| 4702 | ;; |
| 4703 | toshiba) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4704 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4705 | #line 4706 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4706 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4707 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4708 | #include <sys/param.h> |
| 4709 | #ifdef _TOSHIBA_INET6 |
| 4710 | yes |
| 4711 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4712 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4713 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4714 | egrep "yes" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4715 | rm -rf conftest* |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4716 | ipv6type=$i; |
| 4717 | ipv6lib=inet6; |
Martin v. Löwis | 44ddbde | 2001-12-02 10:15:37 +0000 | [diff] [blame] | 4718 | ipv6libdir=/usr/local/v6/lib |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4719 | fi |
| 4720 | rm -f conftest* |
| 4721 | |
| 4722 | ;; |
| 4723 | v6d) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4724 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4725 | #line 4726 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4726 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4727 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4728 | #include </usr/local/v6/include/sys/v6config.h> |
| 4729 | #ifdef __V6D__ |
| 4730 | yes |
| 4731 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4732 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4733 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4734 | egrep "yes" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4735 | rm -rf conftest* |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4736 | ipv6type=$i; |
| 4737 | ipv6lib=v6; |
| 4738 | ipv6libdir=/usr/local/v6/lib; |
| 4739 | OPT="-I/usr/local/v6/include $OPT" |
| 4740 | fi |
| 4741 | rm -f conftest* |
| 4742 | |
| 4743 | ;; |
| 4744 | zeta) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4745 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4746 | #line 4747 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4747 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4748 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4749 | #include <sys/param.h> |
| 4750 | #ifdef _ZETA_MINAMI_INET6 |
| 4751 | yes |
| 4752 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4753 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4754 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4755 | egrep "yes" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4756 | rm -rf conftest* |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4757 | ipv6type=$i; |
| 4758 | ipv6lib=inet6; |
Martin v. Löwis | 44ddbde | 2001-12-02 10:15:37 +0000 | [diff] [blame] | 4759 | ipv6libdir=/usr/local/v6/lib |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4760 | fi |
| 4761 | rm -f conftest* |
| 4762 | |
| 4763 | ;; |
| 4764 | esac |
| 4765 | if test "$ipv6type" != "unknown"; then |
| 4766 | break |
| 4767 | fi |
| 4768 | done |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4769 | echo "$ac_t""$ipv6type" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4770 | fi |
| 4771 | |
| 4772 | if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then |
| 4773 | if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then |
| 4774 | LIBS="-L$ipv6libdir -l$ipv6lib $LIBS" |
| 4775 | echo "using lib$ipv6lib" |
| 4776 | else |
| 4777 | if test $ipv6trylibc = "yes"; then |
| 4778 | echo "using libc" |
| 4779 | else |
| 4780 | echo 'Fatal: no $ipv6lib library found. cannot continue.' |
| 4781 | echo "You need to fetch lib$ipv6lib.a from appropriate" |
| 4782 | echo 'ipv6 kit and compile beforehand.' |
| 4783 | exit 1 |
| 4784 | fi |
| 4785 | fi |
| 4786 | fi |
| 4787 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4788 | # Check for GC support |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4789 | echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4790 | echo "configure:4791: checking for --with-cycle-gc" >&5 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4791 | # Check whether --with-cycle-gc or --without-cycle-gc was given. |
| 4792 | if test "${with_cycle_gc+set}" = set; then |
| 4793 | withval="$with_cycle_gc" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4794 | : |
| 4795 | fi |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4796 | |
| 4797 | |
| 4798 | if test -z "$with_cycle_gc" |
| 4799 | then with_cycle_gc="yes" |
| 4800 | fi |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame] | 4801 | if test "$with_cycle_gc" != "no" |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4802 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4803 | cat >> confdefs.h <<\EOF |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4804 | #define WITH_CYCLE_GC 1 |
| 4805 | EOF |
| 4806 | |
| 4807 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4808 | echo "$ac_t""$with_cycle_gc" 1>&6 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4809 | |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 4810 | # Check for Python-specific malloc support |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4811 | echo $ac_n "checking for --with-pymalloc""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4812 | echo "configure:4813: checking for --with-pymalloc" >&5 |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 4813 | # Check whether --with-pymalloc or --without-pymalloc was given. |
| 4814 | if test "${with_pymalloc+set}" = set; then |
| 4815 | withval="$with_pymalloc" |
Neil Schemenauer | 16c2297 | 2002-03-22 15:34:49 +0000 | [diff] [blame] | 4816 | : |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4817 | fi |
| 4818 | |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 4819 | |
Neil Schemenauer | 16c2297 | 2002-03-22 15:34:49 +0000 | [diff] [blame] | 4820 | if test -z "$with_pymalloc" |
| 4821 | then with_pymalloc="yes" |
| 4822 | fi |
| 4823 | if test "$with_pymalloc" != "no" |
| 4824 | then |
| 4825 | cat >> confdefs.h <<\EOF |
| 4826 | #define WITH_PYMALLOC 1 |
| 4827 | EOF |
| 4828 | |
| 4829 | fi |
| 4830 | echo "$ac_t""$with_pymalloc" 1>&6 |
| 4831 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4832 | # Check for --with-wctype-functions |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4833 | echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4834 | echo "configure:4835: checking for --with-wctype-functions" >&5 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4835 | # Check whether --with-wctype-functions or --without-wctype-functions was given. |
| 4836 | if test "${with_wctype_functions+set}" = set; then |
| 4837 | withval="$with_wctype_functions" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4838 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4839 | if test "$withval" != no |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4840 | then |
| 4841 | cat >> confdefs.h <<\EOF |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4842 | #define WANT_WCTYPE_FUNCTIONS 1 |
| 4843 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4844 | |
| 4845 | echo "$ac_t""yes" 1>&6 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4846 | else echo "$ac_t""no" 1>&6 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4847 | fi |
| 4848 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4849 | echo "$ac_t""no" 1>&6 |
| 4850 | fi |
| 4851 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4852 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4853 | # -I${DLINCLDIR} is added to the compile rule for importdl.o |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4854 | |
Guido van Rossum | 98935bf | 2001-09-05 19:13:16 +0000 | [diff] [blame] | 4855 | DLINCLDIR=. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4856 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4857 | echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4858 | echo "configure:4859: checking for --with-sgi-dl" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4859 | # Check whether --with-sgi-dl or --without-sgi-dl was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4860 | if test "${with_sgi_dl+set}" = set; then |
| 4861 | withval="$with_sgi_dl" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4862 | |
| 4863 | echo "$ac_t""$withval" 1>&6 |
| 4864 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4865 | #define WITH_SGI_DL 1 |
| 4866 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4867 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4868 | DYNLOADFILE="dynload_dl.o" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4869 | dldir=$withval |
Guido van Rossum | 4095101 | 2000-10-07 16:21:27 +0000 | [diff] [blame] | 4870 | if test ! -z "$dldir" -a -d "$dldir" |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 4871 | then LDFLAGS="$LDFLAGS -L$dldir" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4872 | 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] | 4873 | fi |
| 4874 | DLINCLDIR=${dldir} |
| 4875 | LIBS="$LIBS -ldl -lmld" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4876 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4877 | echo "$ac_t""no" 1>&6 |
| 4878 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4879 | |
| 4880 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4881 | echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4882 | echo "configure:4883: checking for --with-dl-dld" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4883 | # Check whether --with-dl-dld or --without-dl-dld was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4884 | if test "${with_dl_dld+set}" = set; then |
| 4885 | withval="$with_dl_dld" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4886 | |
| 4887 | echo "$ac_t""$withval" 1>&6 |
| 4888 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4889 | #define WITH_DL_DLD 1 |
| 4890 | EOF |
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 | DYNLOADFILE="dynload_dl.o" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4893 | dldir=`echo "$withval" | sed 's/,.*//'` |
| 4894 | dlddir=`echo "$withval" | sed 's/.*,//'` |
Barry Warsaw | 7d1219d | 2000-10-05 18:45:53 +0000 | [diff] [blame] | 4895 | 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] | 4896 | then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4897 | 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] | 4898 | fi |
| 4899 | DLINCLDIR=${dldir} |
| 4900 | LIBS="$LIBS -ldl -ldld" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4901 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4902 | echo "$ac_t""no" 1>&6 |
| 4903 | fi |
| 4904 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4905 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4906 | # the dlopen() function means we might want to use dynload_shlib.o. some |
| 4907 | # 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] | 4908 | for ac_func in dlopen |
| 4909 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4910 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4911 | echo "configure:4912: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4912 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 4913 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4914 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4915 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4916 | #line 4917 "configure" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4917 | #include "confdefs.h" |
| 4918 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4919 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4920 | #include <assert.h> |
| 4921 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4922 | /* 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] | 4923 | builtin and then its argument prototype would still apply. */ |
| 4924 | char $ac_func(); |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4925 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4926 | int main() { |
| 4927 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4928 | /* The GNU C library defines this for functions which it implements |
| 4929 | to always fail with ENOSYS. Some functions are actually named |
| 4930 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4931 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4932 | choke me |
| 4933 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4934 | $ac_func(); |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4935 | #endif |
| 4936 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4937 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 4938 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4939 | if { (eval echo configure:4940: \"$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] | 4940 | rm -rf conftest* |
| 4941 | eval "ac_cv_func_$ac_func=yes" |
| 4942 | else |
| 4943 | echo "configure: failed program was:" >&5 |
| 4944 | cat conftest.$ac_ext >&5 |
| 4945 | rm -rf conftest* |
| 4946 | eval "ac_cv_func_$ac_func=no" |
| 4947 | fi |
| 4948 | rm -f conftest* |
| 4949 | fi |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4950 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4951 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4952 | echo "$ac_t""yes" 1>&6 |
| 4953 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4954 | cat >> confdefs.h <<EOF |
| 4955 | #define $ac_tr_func 1 |
| 4956 | EOF |
| 4957 | |
| 4958 | else |
| 4959 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4960 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4961 | done |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4962 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4963 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4964 | # DYNLOADFILE specifies which dynload_*.o file we will use for dynamic |
| 4965 | # loading of modules. |
| 4966 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4967 | echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4968 | echo "configure:4969: checking DYNLOADFILE" >&5 |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4969 | if test -z "$DYNLOADFILE" |
| 4970 | then |
| 4971 | case $ac_sys_system/$ac_sys_release in |
| 4972 | AIX*) DYNLOADFILE="dynload_aix.o";; |
| 4973 | BeOS*) DYNLOADFILE="dynload_beos.o";; |
| 4974 | hp*|HP*) DYNLOADFILE="dynload_hpux.o";; |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 4975 | Darwin/*) DYNLOADFILE="dynload_next.o";; |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4976 | *) |
| 4977 | # use dynload_shlib.c and dlopen() if we have it; otherwise stub |
| 4978 | # out any dynamic loading |
| 4979 | if test "$ac_cv_func_dlopen" = yes |
| 4980 | then DYNLOADFILE="dynload_shlib.o" |
| 4981 | else DYNLOADFILE="dynload_stub.o" |
| 4982 | fi |
| 4983 | ;; |
| 4984 | esac |
| 4985 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4986 | echo "$ac_t""$DYNLOADFILE" 1>&6 |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4987 | if test "$DYNLOADFILE" != "dynload_stub.o" |
| 4988 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4989 | cat >> confdefs.h <<\EOF |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4990 | #define HAVE_DYNAMIC_LOADING 1 |
| 4991 | EOF |
| 4992 | |
| 4993 | fi |
| 4994 | |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4995 | # MACHDEP_OBJS can be set to platform-specific object files needed by Python |
| 4996 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4997 | |
| 4998 | echo $ac_n "checking MACHDEP_OBJS""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 4999 | echo "configure:5000: checking MACHDEP_OBJS" >&5 |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 5000 | if test -z "$MACHDEP_OBJS" |
| 5001 | then |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 5002 | MACHDEP_OBJS=$extra_machdep_objs |
| 5003 | else |
| 5004 | MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs" |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 5005 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5006 | echo "$ac_t""MACHDEP_OBJS" 1>&6 |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 5007 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5008 | # checks for library functions |
Martin v. Löwis | 244edc8 | 2001-10-04 22:44:26 +0000 | [diff] [blame] | 5009 | 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] | 5010 | flock fork fsync fdatasync fpathconf ftime ftruncate \ |
Martin v. Löwis | f95dd0a | 2001-08-15 17:14:33 +0000 | [diff] [blame] | 5011 | gai_strerror getgroups getlogin getpeername getpid getpwent getwd \ |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 5012 | hstrerror inet_pton kill killpg link lstat mkfifo mktime mremap \ |
Andrew M. Kuchling | 5821b77 | 2000-08-25 01:14:08 +0000 | [diff] [blame] | 5013 | nice pathconf pause plock poll pthread_init \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 5014 | putenv readlink \ |
Martin v. Löwis | 61c5edf | 2001-10-18 04:06:00 +0000 | [diff] [blame] | 5015 | select setegid seteuid setgid setgroups \ |
Martin v. Löwis | 791bfda | 2001-07-24 06:33:08 +0000 | [diff] [blame] | 5016 | setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 5017 | sigaction siginterrupt sigrelse strftime strptime symlink sysconf \ |
Fred Drake | 89143df | 1999-12-09 22:03:25 +0000 | [diff] [blame] | 5018 | tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ |
Guido van Rossum | c524d95 | 2001-10-19 01:31:59 +0000 | [diff] [blame] | 5019 | truncate uname unsetenv waitpid _getpty getpriority |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5020 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5021 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5022 | echo "configure:5023: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5023 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5024 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5025 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5026 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5027 | #line 5028 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5028 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5029 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5030 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5031 | #include <assert.h> |
| 5032 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5033 | /* 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] | 5034 | builtin and then its argument prototype would still apply. */ |
| 5035 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5036 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5037 | int main() { |
| 5038 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5039 | /* The GNU C library defines this for functions which it implements |
| 5040 | to always fail with ENOSYS. Some functions are actually named |
| 5041 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5042 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5043 | choke me |
| 5044 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5045 | $ac_func(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5046 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5047 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5048 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5049 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5050 | if { (eval echo configure:5051: \"$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] | 5051 | rm -rf conftest* |
| 5052 | eval "ac_cv_func_$ac_func=yes" |
| 5053 | else |
| 5054 | echo "configure: failed program was:" >&5 |
| 5055 | cat conftest.$ac_ext >&5 |
| 5056 | rm -rf conftest* |
| 5057 | eval "ac_cv_func_$ac_func=no" |
| 5058 | fi |
| 5059 | rm -f conftest* |
| 5060 | fi |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5061 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5062 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5063 | echo "$ac_t""yes" 1>&6 |
| 5064 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5065 | cat >> confdefs.h <<EOF |
| 5066 | #define $ac_tr_func 1 |
| 5067 | EOF |
| 5068 | |
| 5069 | else |
| 5070 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 5071 | fi |
| 5072 | done |
| 5073 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5074 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 5075 | # check for openpty and forkpty |
| 5076 | |
| 5077 | for ac_func in openpty |
| 5078 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5079 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5080 | echo "configure:5081: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5081 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5082 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 5083 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5084 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5085 | #line 5086 "configure" |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 5086 | #include "confdefs.h" |
| 5087 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5088 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 5089 | #include <assert.h> |
| 5090 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5091 | /* 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] | 5092 | builtin and then its argument prototype would still apply. */ |
| 5093 | char $ac_func(); |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 5094 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5095 | int main() { |
| 5096 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 5097 | /* The GNU C library defines this for functions which it implements |
| 5098 | to always fail with ENOSYS. Some functions are actually named |
| 5099 | something starting with __ and the normal name is an alias. */ |
| 5100 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5101 | choke me |
| 5102 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5103 | $ac_func(); |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 5104 | #endif |
| 5105 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5106 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5107 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5108 | if { (eval echo configure:5109: \"$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] | 5109 | rm -rf conftest* |
| 5110 | eval "ac_cv_func_$ac_func=yes" |
| 5111 | else |
| 5112 | echo "configure: failed program was:" >&5 |
| 5113 | cat conftest.$ac_ext >&5 |
| 5114 | rm -rf conftest* |
| 5115 | eval "ac_cv_func_$ac_func=no" |
| 5116 | fi |
| 5117 | rm -f conftest* |
| 5118 | fi |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 5119 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5120 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5121 | echo "$ac_t""yes" 1>&6 |
| 5122 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5123 | cat >> confdefs.h <<EOF |
| 5124 | #define $ac_tr_func 1 |
| 5125 | EOF |
| 5126 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 5127 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5128 | echo "$ac_t""no" 1>&6 |
| 5129 | echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5130 | echo "configure:5131: checking for openpty in -lutil" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5131 | ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'` |
| 5132 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 5133 | echo $ac_n "(cached) $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5134 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5135 | ac_save_LIBS="$LIBS" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5136 | LIBS="-lutil $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5137 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5138 | #line 5139 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5139 | #include "confdefs.h" |
| 5140 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5141 | /* 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] | 5142 | builtin and then its argument prototype would still apply. */ |
| 5143 | char openpty(); |
| 5144 | |
| 5145 | int main() { |
| 5146 | openpty() |
| 5147 | ; return 0; } |
| 5148 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5149 | if { (eval echo configure:5150: \"$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] | 5150 | rm -rf conftest* |
| 5151 | eval "ac_cv_lib_$ac_lib_var=yes" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5152 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5153 | echo "configure: failed program was:" >&5 |
| 5154 | cat conftest.$ac_ext >&5 |
| 5155 | rm -rf conftest* |
| 5156 | eval "ac_cv_lib_$ac_lib_var=no" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5157 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5158 | rm -f conftest* |
| 5159 | LIBS="$ac_save_LIBS" |
| 5160 | |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5161 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5162 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 5163 | echo "$ac_t""yes" 1>&6 |
| 5164 | cat >> confdefs.h <<\EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5165 | #define HAVE_OPENPTY 1 |
| 5166 | EOF |
| 5167 | LIBS="$LIBS -lutil" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5168 | else |
| 5169 | echo "$ac_t""no" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5170 | fi |
| 5171 | |
| 5172 | fi |
| 5173 | done |
| 5174 | |
| 5175 | for ac_func in forkpty |
| 5176 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5177 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5178 | echo "configure:5179: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5179 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5180 | echo $ac_n "(cached) $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5181 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5182 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5183 | #line 5184 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5184 | #include "confdefs.h" |
| 5185 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5186 | which can conflict with char $ac_func(); below. */ |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5187 | #include <assert.h> |
| 5188 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5189 | /* 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] | 5190 | builtin and then its argument prototype would still apply. */ |
| 5191 | char $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5192 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5193 | int main() { |
| 5194 | |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5195 | /* The GNU C library defines this for functions which it implements |
| 5196 | to always fail with ENOSYS. Some functions are actually named |
| 5197 | something starting with __ and the normal name is an alias. */ |
| 5198 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5199 | choke me |
| 5200 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5201 | $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5202 | #endif |
| 5203 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5204 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5205 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5206 | if { (eval echo configure:5207: \"$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] | 5207 | rm -rf conftest* |
| 5208 | eval "ac_cv_func_$ac_func=yes" |
| 5209 | else |
| 5210 | echo "configure: failed program was:" >&5 |
| 5211 | cat conftest.$ac_ext >&5 |
| 5212 | rm -rf conftest* |
| 5213 | eval "ac_cv_func_$ac_func=no" |
| 5214 | fi |
| 5215 | rm -f conftest* |
| 5216 | fi |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5217 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5218 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5219 | echo "$ac_t""yes" 1>&6 |
| 5220 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5221 | cat >> confdefs.h <<EOF |
| 5222 | #define $ac_tr_func 1 |
| 5223 | EOF |
| 5224 | |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5225 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5226 | echo "$ac_t""no" 1>&6 |
| 5227 | echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5228 | echo "configure:5229: checking for forkpty in -lutil" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5229 | ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'` |
| 5230 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 5231 | echo $ac_n "(cached) $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5232 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5233 | ac_save_LIBS="$LIBS" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5234 | LIBS="-lutil $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5235 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5236 | #line 5237 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5237 | #include "confdefs.h" |
| 5238 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5239 | /* 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] | 5240 | builtin and then its argument prototype would still apply. */ |
| 5241 | char forkpty(); |
| 5242 | |
| 5243 | int main() { |
| 5244 | forkpty() |
| 5245 | ; return 0; } |
| 5246 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5247 | if { (eval echo configure:5248: \"$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] | 5248 | rm -rf conftest* |
| 5249 | eval "ac_cv_lib_$ac_lib_var=yes" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5250 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5251 | echo "configure: failed program was:" >&5 |
| 5252 | cat conftest.$ac_ext >&5 |
| 5253 | rm -rf conftest* |
| 5254 | eval "ac_cv_lib_$ac_lib_var=no" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5255 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5256 | rm -f conftest* |
| 5257 | LIBS="$ac_save_LIBS" |
| 5258 | |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5259 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5260 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 5261 | echo "$ac_t""yes" 1>&6 |
| 5262 | cat >> confdefs.h <<\EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5263 | #define HAVE_FORKPTY 1 |
| 5264 | EOF |
| 5265 | LIBS="$LIBS -lutil" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5266 | else |
| 5267 | echo "$ac_t""no" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5268 | fi |
| 5269 | |
| 5270 | fi |
| 5271 | done |
| 5272 | |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5273 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5274 | # check for long file support functions |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5275 | for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs |
| 5276 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5277 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5278 | echo "configure:5279: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5279 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5280 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5281 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5282 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5283 | #line 5284 "configure" |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5284 | #include "confdefs.h" |
| 5285 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5286 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5287 | #include <assert.h> |
| 5288 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5289 | /* 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] | 5290 | builtin and then its argument prototype would still apply. */ |
| 5291 | char $ac_func(); |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5292 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5293 | int main() { |
| 5294 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5295 | /* The GNU C library defines this for functions which it implements |
| 5296 | to always fail with ENOSYS. Some functions are actually named |
| 5297 | something starting with __ and the normal name is an alias. */ |
| 5298 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5299 | choke me |
| 5300 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5301 | $ac_func(); |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5302 | #endif |
| 5303 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5304 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5305 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5306 | if { (eval echo configure:5307: \"$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] | 5307 | rm -rf conftest* |
| 5308 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5309 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5310 | echo "configure: failed program was:" >&5 |
| 5311 | cat conftest.$ac_ext >&5 |
| 5312 | rm -rf conftest* |
| 5313 | eval "ac_cv_func_$ac_func=no" |
| 5314 | fi |
| 5315 | rm -f conftest* |
| 5316 | fi |
| 5317 | |
| 5318 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5319 | echo "$ac_t""yes" 1>&6 |
| 5320 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5321 | cat >> confdefs.h <<EOF |
| 5322 | #define $ac_tr_func 1 |
| 5323 | EOF |
| 5324 | |
| 5325 | else |
| 5326 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5327 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5328 | done |
| 5329 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5330 | |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 5331 | for ac_func in dup2 getcwd strdup strerror memmove |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5332 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5333 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5334 | echo "configure:5335: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5335 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5336 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5337 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5338 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5339 | #line 5340 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5340 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5341 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5342 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5343 | #include <assert.h> |
| 5344 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5345 | /* 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] | 5346 | builtin and then its argument prototype would still apply. */ |
| 5347 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5348 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5349 | int main() { |
| 5350 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5351 | /* The GNU C library defines this for functions which it implements |
| 5352 | to always fail with ENOSYS. Some functions are actually named |
| 5353 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5354 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5355 | choke me |
| 5356 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5357 | $ac_func(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5358 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5359 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5360 | ; return 0; } |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5361 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5362 | if { (eval echo configure:5363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 5363 | rm -rf conftest* |
| 5364 | eval "ac_cv_func_$ac_func=yes" |
| 5365 | else |
| 5366 | echo "configure: failed program was:" >&5 |
| 5367 | cat conftest.$ac_ext >&5 |
| 5368 | rm -rf conftest* |
| 5369 | eval "ac_cv_func_$ac_func=no" |
| 5370 | fi |
| 5371 | rm -f conftest* |
| 5372 | fi |
| 5373 | |
| 5374 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5375 | echo "$ac_t""yes" 1>&6 |
| 5376 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5377 | cat >> confdefs.h <<EOF |
| 5378 | #define $ac_tr_func 1 |
| 5379 | EOF |
| 5380 | |
| 5381 | else |
| 5382 | echo "$ac_t""no" 1>&6 |
| 5383 | LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" |
| 5384 | fi |
| 5385 | done |
| 5386 | |
| 5387 | |
| 5388 | for ac_func in getpgrp |
| 5389 | do |
| 5390 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5391 | echo "configure:5392: checking for $ac_func" >&5 |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 5392 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5393 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5394 | else |
| 5395 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5396 | #line 5397 "configure" |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 5397 | #include "confdefs.h" |
| 5398 | /* System header to define __stub macros and hopefully few prototypes, |
| 5399 | which can conflict with char $ac_func(); below. */ |
| 5400 | #include <assert.h> |
| 5401 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5402 | /* We use char because int might match the return type of a gcc2 |
| 5403 | builtin and then its argument prototype would still apply. */ |
| 5404 | char $ac_func(); |
| 5405 | |
| 5406 | int main() { |
| 5407 | |
| 5408 | /* The GNU C library defines this for functions which it implements |
| 5409 | to always fail with ENOSYS. Some functions are actually named |
| 5410 | something starting with __ and the normal name is an alias. */ |
| 5411 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5412 | choke me |
| 5413 | #else |
| 5414 | $ac_func(); |
| 5415 | #endif |
| 5416 | |
| 5417 | ; return 0; } |
| 5418 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5419 | if { (eval echo configure:5420: \"$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] | 5420 | rm -rf conftest* |
| 5421 | eval "ac_cv_func_$ac_func=yes" |
| 5422 | else |
| 5423 | echo "configure: failed program was:" >&5 |
| 5424 | cat conftest.$ac_ext >&5 |
| 5425 | rm -rf conftest* |
| 5426 | eval "ac_cv_func_$ac_func=no" |
| 5427 | fi |
| 5428 | rm -f conftest* |
| 5429 | fi |
| 5430 | |
| 5431 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5432 | echo "$ac_t""yes" 1>&6 |
| 5433 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5434 | cat >> confdefs.h <<EOF |
| 5435 | #define $ac_tr_func 1 |
| 5436 | EOF |
| 5437 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5438 | #line 5439 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5439 | #include "confdefs.h" |
| 5440 | #include <unistd.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5441 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5442 | getpgrp(0); |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5443 | ; return 0; } |
| 5444 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5445 | if { (eval echo configure:5446: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5446 | rm -rf conftest* |
| 5447 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5448 | #define GETPGRP_HAVE_ARG 1 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5449 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5450 | |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5451 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5452 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5453 | echo "configure: failed program was:" >&5 |
| 5454 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5455 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5456 | rm -f conftest* |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5457 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5458 | else |
| 5459 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5460 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5461 | done |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5462 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5463 | for ac_func in setpgrp |
| 5464 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5465 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5466 | echo "configure:5467: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5467 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5468 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5469 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5470 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5471 | #line 5472 "configure" |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5472 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5473 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5474 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5475 | #include <assert.h> |
| 5476 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5477 | /* 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] | 5478 | builtin and then its argument prototype would still apply. */ |
| 5479 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5480 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5481 | int main() { |
| 5482 | |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5483 | /* The GNU C library defines this for functions which it implements |
| 5484 | to always fail with ENOSYS. Some functions are actually named |
| 5485 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5486 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5487 | choke me |
| 5488 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5489 | $ac_func(); |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5490 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5491 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5492 | ; return 0; } |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5493 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5494 | if { (eval echo configure:5495: \"$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] | 5495 | rm -rf conftest* |
| 5496 | eval "ac_cv_func_$ac_func=yes" |
| 5497 | else |
| 5498 | echo "configure: failed program was:" >&5 |
| 5499 | cat conftest.$ac_ext >&5 |
| 5500 | rm -rf conftest* |
| 5501 | eval "ac_cv_func_$ac_func=no" |
| 5502 | fi |
| 5503 | rm -f conftest* |
| 5504 | fi |
| 5505 | |
| 5506 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5507 | echo "$ac_t""yes" 1>&6 |
| 5508 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5509 | cat >> confdefs.h <<EOF |
| 5510 | #define $ac_tr_func 1 |
| 5511 | EOF |
| 5512 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5513 | #line 5514 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5514 | #include "confdefs.h" |
| 5515 | #include <unistd.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5516 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5517 | setpgrp(0,0); |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5518 | ; return 0; } |
| 5519 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5520 | if { (eval echo configure:5521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5521 | rm -rf conftest* |
| 5522 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5523 | #define SETPGRP_HAVE_ARG 1 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5524 | EOF |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5525 | |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5526 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5527 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5528 | echo "configure: failed program was:" >&5 |
| 5529 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5530 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5531 | rm -f conftest* |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5532 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5533 | else |
| 5534 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5535 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5536 | done |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5537 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5538 | for ac_func in gettimeofday |
| 5539 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5540 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5541 | echo "configure:5542: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5542 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5543 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5544 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5545 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5546 | #line 5547 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5547 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5548 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5549 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5550 | #include <assert.h> |
| 5551 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5552 | /* 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] | 5553 | builtin and then its argument prototype would still apply. */ |
| 5554 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5555 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5556 | int main() { |
| 5557 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5558 | /* The GNU C library defines this for functions which it implements |
| 5559 | to always fail with ENOSYS. Some functions are actually named |
| 5560 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5561 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5562 | choke me |
| 5563 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5564 | $ac_func(); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5565 | #endif |
| 5566 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5567 | ; return 0; } |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5568 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5569 | if { (eval echo configure:5570: \"$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] | 5570 | rm -rf conftest* |
| 5571 | eval "ac_cv_func_$ac_func=yes" |
| 5572 | else |
| 5573 | echo "configure: failed program was:" >&5 |
| 5574 | cat conftest.$ac_ext >&5 |
| 5575 | rm -rf conftest* |
| 5576 | eval "ac_cv_func_$ac_func=no" |
| 5577 | fi |
| 5578 | rm -f conftest* |
| 5579 | fi |
| 5580 | |
| 5581 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5582 | echo "$ac_t""yes" 1>&6 |
| 5583 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5584 | cat >> confdefs.h <<EOF |
| 5585 | #define $ac_tr_func 1 |
| 5586 | EOF |
| 5587 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5588 | #line 5589 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5589 | #include "confdefs.h" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5590 | #include <sys/time.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5591 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5592 | gettimeofday((struct timeval*)0,(struct timezone*)0); |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5593 | ; return 0; } |
| 5594 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5595 | if { (eval echo configure:5596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5596 | : |
| 5597 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5598 | echo "configure: failed program was:" >&5 |
| 5599 | cat conftest.$ac_ext >&5 |
| 5600 | rm -rf conftest* |
| 5601 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5602 | #define GETTIMEOFDAY_NO_TZ 1 |
| 5603 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5604 | |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5605 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5606 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5607 | rm -f conftest* |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5608 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5609 | else |
| 5610 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5611 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5612 | done |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5613 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5614 | |
| 5615 | |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 5616 | # On OSF/1 V5.1, getaddrinfo is available, but a define |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5617 | # for [no]getaddrinfo in netdb.h. |
| 5618 | echo $ac_n "checking for getaddrinfo""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5619 | echo "configure:5620: checking for getaddrinfo" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5620 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5621 | #line 5622 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5622 | #include "confdefs.h" |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 5623 | |
Martin v. Löwis | c010b6d | 2001-11-09 17:50:52 +0000 | [diff] [blame] | 5624 | #include <sys/types.h> |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 5625 | #include <sys/socket.h> |
| 5626 | #include <netdb.h> |
Martin v. Löwis | c010b6d | 2001-11-09 17:50:52 +0000 | [diff] [blame] | 5627 | #include <stdio.h> |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5628 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5629 | int main() { |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5630 | |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 5631 | getaddrinfo(NULL, NULL, NULL, NULL); |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5632 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5633 | ; return 0; } |
| 5634 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5635 | if { (eval echo configure:5636: \"$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] | 5636 | rm -rf conftest* |
| 5637 | |
| 5638 | echo "$ac_t""yes" 1>&6 |
| 5639 | echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5640 | echo "configure:5641: checking getaddrinfo bug" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5641 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5642 | echo "$ac_t""buggy" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5643 | buggygetaddrinfo=yes |
| 5644 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5645 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5646 | #line 5647 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5647 | #include "confdefs.h" |
| 5648 | |
| 5649 | #include <sys/types.h> |
| 5650 | #include <netdb.h> |
| 5651 | #include <string.h> |
| 5652 | #include <sys/socket.h> |
| 5653 | #include <netinet/in.h> |
| 5654 | |
| 5655 | main() |
| 5656 | { |
| 5657 | int passive, gaierr, inet4 = 0, inet6 = 0; |
| 5658 | struct addrinfo hints, *ai, *aitop; |
| 5659 | char straddr[INET6_ADDRSTRLEN], strport[16]; |
| 5660 | |
| 5661 | for (passive = 0; passive <= 1; passive++) { |
| 5662 | memset(&hints, 0, sizeof(hints)); |
| 5663 | hints.ai_family = AF_UNSPEC; |
| 5664 | hints.ai_flags = passive ? AI_PASSIVE : 0; |
| 5665 | hints.ai_socktype = SOCK_STREAM; |
| 5666 | if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) { |
| 5667 | (void)gai_strerror(gaierr); |
| 5668 | goto bad; |
| 5669 | } |
| 5670 | for (ai = aitop; ai; ai = ai->ai_next) { |
| 5671 | if (ai->ai_addr == NULL || |
| 5672 | ai->ai_addrlen == 0 || |
| 5673 | getnameinfo(ai->ai_addr, ai->ai_addrlen, |
| 5674 | straddr, sizeof(straddr), strport, sizeof(strport), |
| 5675 | NI_NUMERICHOST|NI_NUMERICSERV) != 0) { |
| 5676 | goto bad; |
| 5677 | } |
| 5678 | switch (ai->ai_family) { |
| 5679 | case AF_INET: |
| 5680 | if (strcmp(strport, "54321") != 0) { |
| 5681 | goto bad; |
| 5682 | } |
| 5683 | if (passive) { |
| 5684 | if (strcmp(straddr, "0.0.0.0") != 0) { |
| 5685 | goto bad; |
| 5686 | } |
| 5687 | } else { |
| 5688 | if (strcmp(straddr, "127.0.0.1") != 0) { |
| 5689 | goto bad; |
| 5690 | } |
| 5691 | } |
| 5692 | inet4++; |
| 5693 | break; |
| 5694 | case AF_INET6: |
| 5695 | if (strcmp(strport, "54321") != 0) { |
| 5696 | goto bad; |
| 5697 | } |
| 5698 | if (passive) { |
| 5699 | if (strcmp(straddr, "::") != 0) { |
| 5700 | goto bad; |
| 5701 | } |
| 5702 | } else { |
| 5703 | if (strcmp(straddr, "::1") != 0) { |
| 5704 | goto bad; |
| 5705 | } |
| 5706 | } |
| 5707 | inet6++; |
| 5708 | break; |
| 5709 | case AF_UNSPEC: |
| 5710 | goto bad; |
| 5711 | break; |
| 5712 | default: |
| 5713 | /* another family support? */ |
| 5714 | break; |
| 5715 | } |
| 5716 | } |
| 5717 | } |
| 5718 | |
| 5719 | if (!(inet4 == 0 || inet4 == 2)) |
| 5720 | goto bad; |
| 5721 | if (!(inet6 == 0 || inet6 == 2)) |
| 5722 | goto bad; |
| 5723 | |
| 5724 | if (aitop) |
| 5725 | freeaddrinfo(aitop); |
| 5726 | exit(0); |
| 5727 | |
| 5728 | bad: |
| 5729 | if (aitop) |
| 5730 | freeaddrinfo(aitop); |
| 5731 | exit(1); |
| 5732 | } |
| 5733 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5734 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5735 | if { (eval echo configure:5736: \"$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] | 5736 | then |
| 5737 | echo "$ac_t""good" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5738 | buggygetaddrinfo=no |
| 5739 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5740 | echo "configure: failed program was:" >&5 |
| 5741 | cat conftest.$ac_ext >&5 |
| 5742 | rm -fr conftest* |
| 5743 | echo "$ac_t""buggy" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5744 | buggygetaddrinfo=yes |
| 5745 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5746 | rm -fr conftest* |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5747 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5748 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5749 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5750 | echo "configure: failed program was:" >&5 |
| 5751 | cat conftest.$ac_ext >&5 |
| 5752 | rm -rf conftest* |
| 5753 | |
| 5754 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5755 | buggygetaddrinfo=yes |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5756 | |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 5757 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5758 | rm -f conftest* |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5759 | |
| 5760 | if test "$buggygetaddrinfo" = "yes"; then |
| 5761 | if test "$ipv6" = "yes"; then |
| 5762 | echo 'Fatal: You must get working getaddrinfo() function.' |
| 5763 | echo ' or you can specify "--disable-ipv6"'. |
| 5764 | exit 1 |
| 5765 | fi |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 5766 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5767 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 5768 | #define HAVE_GETADDRINFO 1 |
| 5769 | EOF |
| 5770 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5771 | fi |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5772 | for ac_func in getnameinfo |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5773 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5774 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5775 | echo "configure:5776: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5776 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5777 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5778 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5779 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5780 | #line 5781 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5781 | #include "confdefs.h" |
| 5782 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5783 | which can conflict with char $ac_func(); below. */ |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5784 | #include <assert.h> |
| 5785 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5786 | /* 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] | 5787 | builtin and then its argument prototype would still apply. */ |
| 5788 | char $ac_func(); |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5789 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5790 | int main() { |
| 5791 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5792 | /* The GNU C library defines this for functions which it implements |
| 5793 | to always fail with ENOSYS. Some functions are actually named |
| 5794 | something starting with __ and the normal name is an alias. */ |
| 5795 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5796 | choke me |
| 5797 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5798 | $ac_func(); |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5799 | #endif |
| 5800 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5801 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5802 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5803 | if { (eval echo configure:5804: \"$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] | 5804 | rm -rf conftest* |
| 5805 | eval "ac_cv_func_$ac_func=yes" |
| 5806 | else |
| 5807 | echo "configure: failed program was:" >&5 |
| 5808 | cat conftest.$ac_ext >&5 |
| 5809 | rm -rf conftest* |
| 5810 | eval "ac_cv_func_$ac_func=no" |
| 5811 | fi |
| 5812 | rm -f conftest* |
| 5813 | fi |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5814 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5815 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5816 | echo "$ac_t""yes" 1>&6 |
| 5817 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5818 | cat >> confdefs.h <<EOF |
| 5819 | #define $ac_tr_func 1 |
| 5820 | EOF |
| 5821 | |
| 5822 | else |
| 5823 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5824 | fi |
| 5825 | done |
| 5826 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5827 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5828 | # checks for structures |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5829 | echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5830 | echo "configure:5831: 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] | 5831 | if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then |
| 5832 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5833 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5834 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5835 | #line 5836 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5836 | #include "confdefs.h" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5837 | #include <sys/types.h> |
| 5838 | #include <sys/time.h> |
| 5839 | #include <time.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5840 | int main() { |
| 5841 | struct tm *tp; |
| 5842 | ; return 0; } |
| 5843 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5844 | if { (eval echo configure:5845: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5845 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5846 | ac_cv_header_time=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5847 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5848 | echo "configure: failed program was:" >&5 |
| 5849 | cat conftest.$ac_ext >&5 |
| 5850 | rm -rf conftest* |
| 5851 | ac_cv_header_time=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5852 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5853 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5854 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5855 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5856 | echo "$ac_t""$ac_cv_header_time" 1>&6 |
| 5857 | if test $ac_cv_header_time = yes; then |
| 5858 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5859 | #define TIME_WITH_SYS_TIME 1 |
| 5860 | EOF |
| 5861 | |
| 5862 | fi |
| 5863 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5864 | echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5865 | echo "configure:5866: 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] | 5866 | if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then |
| 5867 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5868 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5869 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5870 | #line 5871 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5871 | #include "confdefs.h" |
| 5872 | #include <sys/types.h> |
| 5873 | #include <time.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5874 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5875 | struct tm *tp; tp->tm_sec; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5876 | ; return 0; } |
| 5877 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5878 | if { (eval echo configure:5879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5879 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5880 | ac_cv_struct_tm=time.h |
| 5881 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5882 | echo "configure: failed program was:" >&5 |
| 5883 | cat conftest.$ac_ext >&5 |
| 5884 | rm -rf conftest* |
| 5885 | ac_cv_struct_tm=sys/time.h |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5886 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5887 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5888 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5889 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5890 | echo "$ac_t""$ac_cv_struct_tm" 1>&6 |
| 5891 | if test $ac_cv_struct_tm = sys/time.h; then |
| 5892 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5893 | #define TM_IN_SYS_TIME 1 |
| 5894 | EOF |
| 5895 | |
| 5896 | fi |
| 5897 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5898 | echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5899 | echo "configure:5900: checking for tm_zone in struct tm" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5900 | if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then |
| 5901 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5902 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5903 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5904 | #line 5905 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5905 | #include "confdefs.h" |
| 5906 | #include <sys/types.h> |
| 5907 | #include <$ac_cv_struct_tm> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5908 | int main() { |
| 5909 | struct tm tm; tm.tm_zone; |
| 5910 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5911 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5912 | if { (eval echo configure:5913: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5913 | rm -rf conftest* |
| 5914 | ac_cv_struct_tm_zone=yes |
| 5915 | else |
| 5916 | echo "configure: failed program was:" >&5 |
| 5917 | cat conftest.$ac_ext >&5 |
| 5918 | rm -rf conftest* |
| 5919 | ac_cv_struct_tm_zone=no |
| 5920 | fi |
| 5921 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5922 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5923 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5924 | echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6 |
| 5925 | if test "$ac_cv_struct_tm_zone" = yes; then |
| 5926 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5927 | #define HAVE_TM_ZONE 1 |
| 5928 | EOF |
| 5929 | |
| 5930 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5931 | echo $ac_n "checking for tzname""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5932 | echo "configure:5933: checking for tzname" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5933 | if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then |
| 5934 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5935 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5936 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5937 | #line 5938 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5938 | #include "confdefs.h" |
| 5939 | #include <time.h> |
| 5940 | #ifndef tzname /* For SGI. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5941 | extern char *tzname[]; /* RS6000 and others reject char **tzname. */ |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5942 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5943 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5944 | atoi(*tzname); |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5945 | ; return 0; } |
| 5946 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5947 | if { (eval echo configure:5948: \"$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] | 5948 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5949 | ac_cv_var_tzname=yes |
| 5950 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5951 | echo "configure: failed program was:" >&5 |
| 5952 | cat conftest.$ac_ext >&5 |
| 5953 | rm -rf conftest* |
| 5954 | ac_cv_var_tzname=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5955 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5956 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5957 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5958 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5959 | echo "$ac_t""$ac_cv_var_tzname" 1>&6 |
| 5960 | if test $ac_cv_var_tzname = yes; then |
| 5961 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5962 | #define HAVE_TZNAME 1 |
| 5963 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5964 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5965 | fi |
| 5966 | fi |
| 5967 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5968 | echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5969 | echo "configure:5970: checking for st_rdev in struct stat" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5970 | if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then |
| 5971 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5972 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5973 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5974 | #line 5975 "configure" |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5975 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5976 | #include <sys/types.h> |
| 5977 | #include <sys/stat.h> |
| 5978 | int main() { |
| 5979 | struct stat s; s.st_rdev; |
| 5980 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5981 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 5982 | if { (eval echo configure:5983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5983 | rm -rf conftest* |
| 5984 | ac_cv_struct_st_rdev=yes |
| 5985 | else |
| 5986 | echo "configure: failed program was:" >&5 |
| 5987 | cat conftest.$ac_ext >&5 |
| 5988 | rm -rf conftest* |
| 5989 | ac_cv_struct_st_rdev=no |
| 5990 | fi |
| 5991 | rm -f conftest* |
| 5992 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5993 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5994 | echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6 |
| 5995 | if test $ac_cv_struct_st_rdev = yes; then |
| 5996 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5997 | #define HAVE_ST_RDEV 1 |
| 5998 | EOF |
| 5999 | |
| 6000 | fi |
| 6001 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6002 | echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6003 | echo "configure:6004: checking for st_blksize in struct stat" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6004 | if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then |
| 6005 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6006 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6007 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6008 | #line 6009 "configure" |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6009 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6010 | #include <sys/types.h> |
| 6011 | #include <sys/stat.h> |
| 6012 | int main() { |
| 6013 | struct stat s; s.st_blksize; |
| 6014 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 6015 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6016 | if { (eval echo configure:6017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6017 | rm -rf conftest* |
| 6018 | ac_cv_struct_st_blksize=yes |
| 6019 | else |
| 6020 | echo "configure: failed program was:" >&5 |
| 6021 | cat conftest.$ac_ext >&5 |
| 6022 | rm -rf conftest* |
| 6023 | ac_cv_struct_st_blksize=no |
| 6024 | fi |
| 6025 | rm -f conftest* |
| 6026 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 6027 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6028 | echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6 |
| 6029 | if test $ac_cv_struct_st_blksize = yes; then |
| 6030 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6031 | #define HAVE_ST_BLKSIZE 1 |
| 6032 | EOF |
| 6033 | |
| 6034 | fi |
| 6035 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6036 | echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6037 | echo "configure:6038: checking for st_blocks in struct stat" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6038 | if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then |
| 6039 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6040 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6041 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6042 | #line 6043 "configure" |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6043 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6044 | #include <sys/types.h> |
| 6045 | #include <sys/stat.h> |
| 6046 | int main() { |
| 6047 | struct stat s; s.st_blocks; |
| 6048 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 6049 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6050 | if { (eval echo configure:6051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6051 | rm -rf conftest* |
| 6052 | ac_cv_struct_st_blocks=yes |
| 6053 | else |
| 6054 | echo "configure: failed program was:" >&5 |
| 6055 | cat conftest.$ac_ext >&5 |
| 6056 | rm -rf conftest* |
| 6057 | ac_cv_struct_st_blocks=no |
| 6058 | fi |
| 6059 | rm -f conftest* |
| 6060 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 6061 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6062 | echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6 |
| 6063 | if test $ac_cv_struct_st_blocks = yes; then |
| 6064 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6065 | #define HAVE_ST_BLOCKS 1 |
| 6066 | EOF |
| 6067 | |
| 6068 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6069 | LIBOBJS="$LIBOBJS fileblocks.${ac_objext}" |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6070 | fi |
| 6071 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6072 | |
| 6073 | echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6074 | echo "configure:6075: checking for time.h that defines altzone" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6075 | if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then |
| 6076 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6077 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6078 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6079 | #line 6080 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6080 | #include "confdefs.h" |
| 6081 | #include <time.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6082 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6083 | return altzone; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6084 | ; return 0; } |
| 6085 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6086 | if { (eval echo configure:6087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6087 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6088 | ac_cv_header_time_altzone=yes |
| 6089 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6090 | echo "configure: failed program was:" >&5 |
| 6091 | cat conftest.$ac_ext >&5 |
| 6092 | rm -rf conftest* |
| 6093 | ac_cv_header_time_altzone=no |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6094 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6095 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6096 | fi |
| 6097 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6098 | echo "$ac_t""$ac_cv_header_time_altzone" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6099 | if test $ac_cv_header_time_altzone = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6100 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6101 | #define HAVE_ALTZONE 1 |
| 6102 | EOF |
| 6103 | |
| 6104 | fi |
| 6105 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6106 | was_it_defined=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6107 | echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6108 | echo "configure:6109: 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] | 6109 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6110 | #line 6111 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6111 | #include "confdefs.h" |
| 6112 | |
| 6113 | #include <sys/types.h> |
| 6114 | #include <sys/select.h> |
| 6115 | #include <sys/time.h> |
| 6116 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6117 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6118 | ; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6119 | ; return 0; } |
| 6120 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6121 | if { (eval echo configure:6122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6122 | rm -rf conftest* |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6123 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6124 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6125 | #define SYS_SELECT_WITH_SYS_TIME 1 |
| 6126 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6127 | |
| 6128 | was_it_defined=yes |
| 6129 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6130 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6131 | echo "configure: failed program was:" >&5 |
| 6132 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6133 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6134 | rm -f conftest* |
| 6135 | echo "$ac_t""$was_it_defined" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6136 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6137 | echo $ac_n "checking for addrinfo""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6138 | echo "configure:6139: checking for addrinfo" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6139 | if eval "test \"`echo '$''{'ac_cv_struct_addrinfo'+set}'`\" = set"; then |
| 6140 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6141 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6142 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6143 | #line 6144 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6144 | #include "confdefs.h" |
| 6145 | |
| 6146 | # include <netdb.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6147 | int main() { |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6148 | struct addrinfo a |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6149 | ; return 0; } |
| 6150 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6151 | if { (eval echo configure:6152: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6152 | rm -rf conftest* |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6153 | ac_cv_struct_addrinfo=yes |
| 6154 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6155 | echo "configure: failed program was:" >&5 |
| 6156 | cat conftest.$ac_ext >&5 |
| 6157 | rm -rf conftest* |
| 6158 | ac_cv_struct_addrinfo=no |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6159 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6160 | rm -f conftest* |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6161 | fi |
| 6162 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6163 | echo "$ac_t""$ac_cv_struct_addrinfo" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6164 | if test $ac_cv_struct_addrinfo = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6165 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6166 | #define HAVE_ADDRINFO 1 |
| 6167 | EOF |
| 6168 | |
| 6169 | fi |
| 6170 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6171 | echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6172 | echo "configure:6173: checking for sockaddr_storage" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6173 | if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then |
| 6174 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6175 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6176 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6177 | #line 6178 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6178 | #include "confdefs.h" |
| 6179 | |
| 6180 | # include <sys/types.h> |
| 6181 | # include <sys/socket.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6182 | int main() { |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6183 | struct sockaddr_storage s |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6184 | ; return 0; } |
| 6185 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6186 | if { (eval echo configure:6187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6187 | rm -rf conftest* |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6188 | ac_cv_struct_sockaddr_storage=yes |
| 6189 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6190 | echo "configure: failed program was:" >&5 |
| 6191 | cat conftest.$ac_ext >&5 |
| 6192 | rm -rf conftest* |
| 6193 | ac_cv_struct_sockaddr_storage=no |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6194 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6195 | rm -f conftest* |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6196 | fi |
| 6197 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6198 | echo "$ac_t""$ac_cv_struct_sockaddr_storage" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6199 | if test $ac_cv_struct_sockaddr_storage = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6200 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6201 | #define HAVE_SOCKADDR_STORAGE 1 |
| 6202 | EOF |
| 6203 | |
| 6204 | fi |
| 6205 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6206 | # checks for compiler characteristics |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6207 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6208 | echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6209 | echo "configure:6210: checking whether char is unsigned" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6210 | if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then |
| 6211 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6212 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6213 | if test "$GCC" = yes; then |
| 6214 | # GCC predefines this symbol on systems where it applies. |
| 6215 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6216 | #line 6217 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6217 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6218 | #ifdef __CHAR_UNSIGNED__ |
| 6219 | yes |
| 6220 | #endif |
| 6221 | |
| 6222 | EOF |
| 6223 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 6224 | egrep "yes" >/dev/null 2>&1; then |
| 6225 | rm -rf conftest* |
| 6226 | ac_cv_c_char_unsigned=yes |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 6227 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6228 | rm -rf conftest* |
| 6229 | ac_cv_c_char_unsigned=no |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6230 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6231 | rm -f conftest* |
| 6232 | |
| 6233 | else |
| 6234 | if test "$cross_compiling" = yes; then |
| 6235 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 6236 | else |
| 6237 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6238 | #line 6239 "configure" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6239 | #include "confdefs.h" |
| 6240 | /* volatile prevents gcc2 from optimizing the test away on sparcs. */ |
| 6241 | #if !defined(__STDC__) || __STDC__ != 1 |
| 6242 | #define volatile |
| 6243 | #endif |
| 6244 | main() { |
| 6245 | volatile char c = 255; exit(c < 0); |
| 6246 | } |
| 6247 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6248 | if { (eval echo configure:6249: \"$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] | 6249 | then |
| 6250 | ac_cv_c_char_unsigned=yes |
| 6251 | else |
| 6252 | echo "configure: failed program was:" >&5 |
| 6253 | cat conftest.$ac_ext >&5 |
| 6254 | rm -fr conftest* |
| 6255 | ac_cv_c_char_unsigned=no |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6256 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6257 | rm -fr conftest* |
| 6258 | fi |
| 6259 | |
| 6260 | fi |
| 6261 | fi |
| 6262 | |
| 6263 | echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6264 | 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] | 6265 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6266 | #define __CHAR_UNSIGNED__ 1 |
| 6267 | EOF |
| 6268 | |
| 6269 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6270 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6271 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6272 | echo "configure:6273: checking for working const" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6273 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
| 6274 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6275 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6276 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6277 | #line 6278 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6278 | #include "confdefs.h" |
| 6279 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6280 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6281 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6282 | /* Ultrix mips cc rejects this. */ |
| 6283 | typedef int charset[2]; const charset x; |
| 6284 | /* SunOS 4.1.1 cc rejects this. */ |
| 6285 | char const *const *ccp; |
| 6286 | char **p; |
| 6287 | /* NEC SVR4.0.2 mips cc rejects this. */ |
| 6288 | struct point {int x, y;}; |
| 6289 | static struct point const zero = {0,0}; |
| 6290 | /* AIX XL C 1.02.0.0 rejects this. |
| 6291 | It does not let you subtract one const X* pointer from another in an arm |
| 6292 | of an if-expression whose if-part is not a constant expression */ |
| 6293 | const char *g = "string"; |
| 6294 | ccp = &g + (g ? g-g : 0); |
| 6295 | /* HPUX 7.0 cc rejects these. */ |
| 6296 | ++ccp; |
| 6297 | p = (char**) ccp; |
| 6298 | ccp = (char const *const *) p; |
| 6299 | { /* SCO 3.2v4 cc rejects this. */ |
| 6300 | char *t; |
| 6301 | char const *s = 0 ? (char *) 0 : (char const *) 0; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6302 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6303 | *t++ = 0; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6304 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6305 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ |
| 6306 | int x[] = {25, 17}; |
| 6307 | const int *foo = &x[0]; |
| 6308 | ++foo; |
| 6309 | } |
| 6310 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ |
| 6311 | typedef const int *iptr; |
| 6312 | iptr p = 0; |
| 6313 | ++p; |
| 6314 | } |
| 6315 | { /* AIX XL C 1.02.0.0 rejects this saying |
| 6316 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ |
| 6317 | struct s { int j; const int *ap[3]; }; |
| 6318 | struct s *b; b->j = 5; |
| 6319 | } |
| 6320 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ |
| 6321 | const int foo = 10; |
| 6322 | } |
| 6323 | |
| 6324 | ; return 0; } |
| 6325 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6326 | if { (eval echo configure:6327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6327 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6328 | ac_cv_c_const=yes |
| 6329 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6330 | echo "configure: failed program was:" >&5 |
| 6331 | cat conftest.$ac_ext >&5 |
| 6332 | rm -rf conftest* |
| 6333 | ac_cv_c_const=no |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6334 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6335 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6336 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6337 | |
| 6338 | echo "$ac_t""$ac_cv_c_const" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6339 | if test $ac_cv_c_const = no; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6340 | cat >> confdefs.h <<\EOF |
| 6341 | #define const |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6342 | EOF |
| 6343 | |
| 6344 | fi |
| 6345 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6346 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6347 | works=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6348 | echo $ac_n "checking for working volatile""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6349 | echo "configure:6350: checking for working volatile" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6350 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6351 | #line 6352 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6352 | #include "confdefs.h" |
| 6353 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6354 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6355 | volatile int x; x = 0; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6356 | ; return 0; } |
| 6357 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6358 | if { (eval echo configure:6359: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6359 | rm -rf conftest* |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6360 | works=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6361 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6362 | echo "configure: failed program was:" >&5 |
| 6363 | cat conftest.$ac_ext >&5 |
| 6364 | rm -rf conftest* |
| 6365 | cat >> confdefs.h <<\EOF |
| 6366 | #define volatile |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6367 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6368 | |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6369 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6370 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6371 | rm -f conftest* |
| 6372 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6373 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6374 | works=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6375 | echo $ac_n "checking for working signed char""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6376 | echo "configure:6377: checking for working signed char" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6377 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6378 | #line 6379 "configure" |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 6379 | #include "confdefs.h" |
| 6380 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6381 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6382 | signed char c; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6383 | ; return 0; } |
| 6384 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6385 | if { (eval echo configure:6386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6386 | rm -rf conftest* |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6387 | works=yes |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 6388 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6389 | echo "configure: failed program was:" >&5 |
| 6390 | cat conftest.$ac_ext >&5 |
| 6391 | rm -rf conftest* |
| 6392 | cat >> confdefs.h <<\EOF |
| 6393 | #define signed |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6394 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6395 | |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6396 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6397 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6398 | rm -f conftest* |
| 6399 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6400 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6401 | have_prototypes=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6402 | echo $ac_n "checking for prototypes""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6403 | echo "configure:6404: checking for prototypes" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6404 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6405 | #line 6406 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6406 | #include "confdefs.h" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6407 | int foo(int x) { return 0; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6408 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6409 | return foo(10); |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6410 | ; return 0; } |
| 6411 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6412 | if { (eval echo configure:6413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6413 | rm -rf conftest* |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6414 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6415 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6416 | #define HAVE_PROTOTYPES 1 |
| 6417 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6418 | |
| 6419 | have_prototypes=yes |
| 6420 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6421 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6422 | echo "configure: failed program was:" >&5 |
| 6423 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6424 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6425 | rm -f conftest* |
| 6426 | echo "$ac_t""$have_prototypes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6427 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6428 | works=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6429 | echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6430 | echo "configure:6431: checking for variable length prototypes and stdarg.h" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6431 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6432 | #line 6433 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6433 | #include "confdefs.h" |
| 6434 | |
| 6435 | #include <stdarg.h> |
Guido van Rossum | 90eea07 | 1996-08-30 20:58:57 +0000 | [diff] [blame] | 6436 | int foo(int x, ...) { |
| 6437 | va_list va; |
| 6438 | va_start(va, x); |
| 6439 | va_arg(va, int); |
| 6440 | va_arg(va, char *); |
| 6441 | va_arg(va, double); |
| 6442 | return 0; |
| 6443 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6444 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6445 | int main() { |
Guido van Rossum | 90eea07 | 1996-08-30 20:58:57 +0000 | [diff] [blame] | 6446 | return foo(10, "", 3.14); |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6447 | ; return 0; } |
| 6448 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6449 | if { (eval echo configure:6450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6450 | rm -rf conftest* |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6451 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6452 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6453 | #define HAVE_STDARG_PROTOTYPES 1 |
| 6454 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6455 | |
| 6456 | works=yes |
| 6457 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6458 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6459 | echo "configure: failed program was:" >&5 |
| 6460 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6461 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6462 | rm -f conftest* |
| 6463 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6464 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6465 | if test "$have_prototypes" = yes; then |
| 6466 | bad_prototypes=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6467 | echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6468 | echo "configure:6469: checking for bad exec* prototypes" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6469 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6470 | #line 6471 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6471 | #include "confdefs.h" |
| 6472 | #include <unistd.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6473 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6474 | char **t;execve("@",t,t); |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6475 | ; return 0; } |
| 6476 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6477 | if { (eval echo configure:6478: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6478 | : |
| 6479 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6480 | echo "configure: failed program was:" >&5 |
| 6481 | cat conftest.$ac_ext >&5 |
| 6482 | rm -rf conftest* |
| 6483 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6484 | #define BAD_EXEC_PROTOTYPES 1 |
| 6485 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6486 | |
| 6487 | bad_prototypes=yes |
| 6488 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6489 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6490 | rm -f conftest* |
| 6491 | echo "$ac_t""$bad_prototypes" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6492 | fi |
| 6493 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6494 | # check if sockaddr has sa_len member |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6495 | echo $ac_n "checking if sockaddr has sa_len member""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6496 | echo "configure:6497: checking if sockaddr has sa_len member" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6497 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6498 | #line 6499 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6499 | #include "confdefs.h" |
| 6500 | #include <sys/types.h> |
| 6501 | #include <sys/socket.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6502 | int main() { |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6503 | struct sockaddr x; |
| 6504 | x.sa_len = 0; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6505 | ; return 0; } |
| 6506 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6507 | if { (eval echo configure:6508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6508 | rm -rf conftest* |
| 6509 | echo "$ac_t""yes" 1>&6 |
| 6510 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6511 | #define HAVE_SOCKADDR_SA_LEN 1 |
| 6512 | EOF |
| 6513 | |
| 6514 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6515 | echo "configure: failed program was:" >&5 |
| 6516 | cat conftest.$ac_ext >&5 |
| 6517 | rm -rf conftest* |
| 6518 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6519 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6520 | rm -f conftest* |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6521 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6522 | echo $ac_n "checking for bad static forward""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6523 | echo "configure:6524: checking for bad static forward" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6524 | if eval "test \"`echo '$''{'ac_cv_bad_static_forward'+set}'`\" = set"; then |
| 6525 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6526 | else |
| 6527 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 6528 | ac_cv_bad_static_forward=no |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6529 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6530 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6531 | #line 6532 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6532 | #include "confdefs.h" |
| 6533 | |
| 6534 | struct s { int a; int b; }; |
| 6535 | static struct s foo; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6536 | int foobar() { |
| 6537 | static int random; |
| 6538 | random = (int) &foo; |
| 6539 | return random; |
| 6540 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6541 | static struct s foo = { 1, 2 }; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6542 | main() { |
| 6543 | exit(!((int)&foo == foobar())); |
| 6544 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6545 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6546 | if { (eval echo configure:6547: \"$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] | 6547 | then |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6548 | ac_cv_bad_static_forward=no |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6549 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6550 | echo "configure: failed program was:" >&5 |
| 6551 | cat conftest.$ac_ext >&5 |
| 6552 | rm -fr conftest* |
| 6553 | ac_cv_bad_static_forward=yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6554 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6555 | rm -fr conftest* |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6556 | fi |
| 6557 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6558 | fi |
| 6559 | |
| 6560 | echo "$ac_t""$ac_cv_bad_static_forward" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6561 | if test "$ac_cv_bad_static_forward" = yes |
| 6562 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6563 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6564 | #define BAD_STATIC_FORWARD 1 |
| 6565 | EOF |
| 6566 | |
| 6567 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6568 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6569 | va_list_is_array=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6570 | echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6571 | echo "configure:6572: checking whether va_list is an array" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6572 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6573 | #line 6574 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6574 | #include "confdefs.h" |
| 6575 | |
| 6576 | #ifdef HAVE_STDARG_PROTOTYPES |
| 6577 | #include <stdarg.h> |
| 6578 | #else |
| 6579 | #include <varargs.h> |
| 6580 | #endif |
| 6581 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6582 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6583 | va_list list1, list2; list1 = list2; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6584 | ; return 0; } |
| 6585 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6586 | if { (eval echo configure:6587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6587 | : |
| 6588 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6589 | echo "configure: failed program was:" >&5 |
| 6590 | cat conftest.$ac_ext >&5 |
| 6591 | rm -rf conftest* |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6592 | |
| 6593 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6594 | #define VA_LIST_IS_ARRAY 1 |
| 6595 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6596 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6597 | va_list_is_array=yes |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6598 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6599 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6600 | rm -f conftest* |
| 6601 | echo "$ac_t""$va_list_is_array" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6602 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6603 | # 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] | 6604 | echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6605 | echo "configure:6606: checking for gethostbyname_r" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6606 | if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then |
| 6607 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6608 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6609 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6610 | #line 6611 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6611 | #include "confdefs.h" |
| 6612 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6613 | which can conflict with char gethostbyname_r(); below. */ |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6614 | #include <assert.h> |
| 6615 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6616 | /* 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] | 6617 | builtin and then its argument prototype would still apply. */ |
| 6618 | char gethostbyname_r(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6619 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6620 | int main() { |
| 6621 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6622 | /* The GNU C library defines this for functions which it implements |
| 6623 | to always fail with ENOSYS. Some functions are actually named |
| 6624 | something starting with __ and the normal name is an alias. */ |
| 6625 | #if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r) |
| 6626 | choke me |
| 6627 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6628 | gethostbyname_r(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6629 | #endif |
| 6630 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6631 | ; return 0; } |
| 6632 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6633 | if { (eval echo configure:6634: \"$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] | 6634 | rm -rf conftest* |
| 6635 | eval "ac_cv_func_gethostbyname_r=yes" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6636 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6637 | echo "configure: failed program was:" >&5 |
| 6638 | cat conftest.$ac_ext >&5 |
| 6639 | rm -rf conftest* |
| 6640 | eval "ac_cv_func_gethostbyname_r=no" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6641 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6642 | rm -f conftest* |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6643 | fi |
| 6644 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6645 | if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then |
| 6646 | echo "$ac_t""yes" 1>&6 |
| 6647 | |
| 6648 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6649 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6650 | EOF |
| 6651 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6652 | echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6653 | echo "configure:6654: checking gethostbyname_r with 6 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6654 | OLD_CFLAGS=$CFLAGS |
| 6655 | CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6656 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6657 | #line 6658 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6658 | #include "confdefs.h" |
| 6659 | |
| 6660 | # include <netdb.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6661 | |
| 6662 | int main() { |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6663 | |
| 6664 | char *name; |
| 6665 | struct hostent *he, *res; |
| 6666 | char buffer[2048]; |
| 6667 | int buflen = 2048; |
| 6668 | int h_errnop; |
| 6669 | |
| 6670 | (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6671 | |
| 6672 | ; return 0; } |
| 6673 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6674 | if { (eval echo configure:6675: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6675 | rm -rf conftest* |
| 6676 | |
| 6677 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6678 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6679 | EOF |
| 6680 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6681 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6682 | #define HAVE_GETHOSTBYNAME_R_6_ARG 1 |
| 6683 | EOF |
| 6684 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6685 | echo "$ac_t""yes" 1>&6 |
| 6686 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6687 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6688 | echo "configure: failed program was:" >&5 |
| 6689 | cat conftest.$ac_ext >&5 |
| 6690 | rm -rf conftest* |
| 6691 | |
| 6692 | echo "$ac_t""no" 1>&6 |
| 6693 | echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6694 | echo "configure:6695: checking gethostbyname_r with 5 args" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6695 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6696 | #line 6697 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6697 | #include "confdefs.h" |
| 6698 | |
| 6699 | # include <netdb.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6700 | |
| 6701 | int main() { |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6702 | |
| 6703 | char *name; |
| 6704 | struct hostent *he; |
| 6705 | char buffer[2048]; |
| 6706 | int buflen = 2048; |
| 6707 | int h_errnop; |
| 6708 | |
| 6709 | (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6710 | |
| 6711 | ; return 0; } |
| 6712 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6713 | if { (eval echo configure:6714: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6714 | rm -rf conftest* |
| 6715 | |
| 6716 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6717 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6718 | EOF |
| 6719 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6720 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6721 | #define HAVE_GETHOSTBYNAME_R_5_ARG 1 |
| 6722 | EOF |
| 6723 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6724 | echo "$ac_t""yes" 1>&6 |
| 6725 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6726 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6727 | echo "configure: failed program was:" >&5 |
| 6728 | cat conftest.$ac_ext >&5 |
| 6729 | rm -rf conftest* |
| 6730 | |
| 6731 | echo "$ac_t""no" 1>&6 |
| 6732 | echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6733 | echo "configure:6734: checking gethostbyname_r with 3 args" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6734 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6735 | #line 6736 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6736 | #include "confdefs.h" |
| 6737 | |
| 6738 | # include <netdb.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6739 | |
| 6740 | int main() { |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6741 | |
| 6742 | char *name; |
| 6743 | struct hostent *he; |
| 6744 | struct hostent_data data; |
| 6745 | |
| 6746 | (void) gethostbyname_r(name, he, &data); |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6747 | |
| 6748 | ; return 0; } |
| 6749 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6750 | if { (eval echo configure:6751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6751 | rm -rf conftest* |
| 6752 | |
| 6753 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6754 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6755 | EOF |
| 6756 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6757 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6758 | #define HAVE_GETHOSTBYNAME_R_3_ARG 1 |
| 6759 | EOF |
| 6760 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6761 | echo "$ac_t""yes" 1>&6 |
| 6762 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6763 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6764 | echo "configure: failed program was:" >&5 |
| 6765 | cat conftest.$ac_ext >&5 |
| 6766 | rm -rf conftest* |
| 6767 | |
| 6768 | echo "$ac_t""no" 1>&6 |
| 6769 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6770 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6771 | rm -f conftest* |
| 6772 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6773 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6774 | rm -f conftest* |
| 6775 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6776 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6777 | rm -f conftest* |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6778 | CFLAGS=$OLD_CFLAGS |
| 6779 | |
| 6780 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6781 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6782 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6783 | for ac_func in gethostbyname |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6784 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6785 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6786 | echo "configure:6787: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6787 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 6788 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6789 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6790 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6791 | #line 6792 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6792 | #include "confdefs.h" |
| 6793 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6794 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6795 | #include <assert.h> |
| 6796 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6797 | /* 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] | 6798 | builtin and then its argument prototype would still apply. */ |
| 6799 | char $ac_func(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6800 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6801 | int main() { |
| 6802 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6803 | /* The GNU C library defines this for functions which it implements |
| 6804 | to always fail with ENOSYS. Some functions are actually named |
| 6805 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6806 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6807 | choke me |
| 6808 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6809 | $ac_func(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6810 | #endif |
| 6811 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6812 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 6813 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6814 | if { (eval echo configure:6815: \"$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] | 6815 | rm -rf conftest* |
| 6816 | eval "ac_cv_func_$ac_func=yes" |
| 6817 | else |
| 6818 | echo "configure: failed program was:" >&5 |
| 6819 | cat conftest.$ac_ext >&5 |
| 6820 | rm -rf conftest* |
| 6821 | eval "ac_cv_func_$ac_func=no" |
| 6822 | fi |
| 6823 | rm -f conftest* |
| 6824 | fi |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6825 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6826 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 6827 | echo "$ac_t""yes" 1>&6 |
| 6828 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 6829 | cat >> confdefs.h <<EOF |
| 6830 | #define $ac_tr_func 1 |
| 6831 | EOF |
| 6832 | |
| 6833 | else |
| 6834 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6835 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6836 | done |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6837 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6838 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6839 | fi |
| 6840 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6841 | |
| 6842 | |
| 6843 | |
| 6844 | |
| 6845 | |
| 6846 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6847 | # checks for system services |
| 6848 | # (none yet) |
| 6849 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6850 | # Linux requires this for correct f.p. operations |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6851 | echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6852 | echo "configure:6853: checking for __fpu_control" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6853 | if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then |
| 6854 | echo $ac_n "(cached) $ac_c" 1>&6 |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6855 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6856 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6857 | #line 6858 "configure" |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6858 | #include "confdefs.h" |
| 6859 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6860 | which can conflict with char __fpu_control(); below. */ |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6861 | #include <assert.h> |
| 6862 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6863 | /* 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] | 6864 | builtin and then its argument prototype would still apply. */ |
| 6865 | char __fpu_control(); |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6866 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6867 | int main() { |
| 6868 | |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6869 | /* The GNU C library defines this for functions which it implements |
| 6870 | to always fail with ENOSYS. Some functions are actually named |
| 6871 | something starting with __ and the normal name is an alias. */ |
| 6872 | #if defined (__stub___fpu_control) || defined (__stub_____fpu_control) |
| 6873 | choke me |
| 6874 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6875 | __fpu_control(); |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6876 | #endif |
| 6877 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6878 | ; return 0; } |
| 6879 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6880 | if { (eval echo configure:6881: \"$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] | 6881 | rm -rf conftest* |
| 6882 | eval "ac_cv_func___fpu_control=yes" |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6883 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6884 | echo "configure: failed program was:" >&5 |
| 6885 | cat conftest.$ac_ext >&5 |
| 6886 | rm -rf conftest* |
| 6887 | eval "ac_cv_func___fpu_control=no" |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6888 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6889 | rm -f conftest* |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6890 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6891 | |
| 6892 | if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then |
| 6893 | echo "$ac_t""yes" 1>&6 |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6894 | : |
| 6895 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6896 | echo "$ac_t""no" 1>&6 |
| 6897 | echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6898 | echo "configure:6899: checking for __fpu_control in -lieee" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6899 | ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'` |
| 6900 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 6901 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6902 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6903 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6904 | LIBS="-lieee $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6905 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6906 | #line 6907 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6907 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6908 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6909 | /* 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] | 6910 | builtin and then its argument prototype would still apply. */ |
| 6911 | char __fpu_control(); |
| 6912 | |
| 6913 | int main() { |
| 6914 | __fpu_control() |
| 6915 | ; return 0; } |
| 6916 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6917 | if { (eval echo configure:6918: \"$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] | 6918 | rm -rf conftest* |
| 6919 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6920 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6921 | echo "configure: failed program was:" >&5 |
| 6922 | cat conftest.$ac_ext >&5 |
| 6923 | rm -rf conftest* |
| 6924 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6925 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6926 | rm -f conftest* |
| 6927 | LIBS="$ac_save_LIBS" |
| 6928 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6929 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6930 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 6931 | echo "$ac_t""yes" 1>&6 |
| 6932 | ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 6933 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
| 6934 | cat >> confdefs.h <<EOF |
| 6935 | #define $ac_tr_lib 1 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6936 | EOF |
| 6937 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6938 | LIBS="-lieee $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6939 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6940 | else |
| 6941 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6942 | fi |
| 6943 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6944 | |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6945 | fi |
| 6946 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6947 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6948 | # Check for --with-fpectl |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6949 | echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6950 | echo "configure:6951: checking for --with-fpectl" >&5 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6951 | # Check whether --with-fpectl or --without-fpectl was given. |
| 6952 | if test "${with_fpectl+set}" = set; then |
| 6953 | withval="$with_fpectl" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6954 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6955 | if test "$withval" != no |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6956 | then |
| 6957 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6958 | #define WANT_SIGFPE_HANDLER 1 |
| 6959 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6960 | |
| 6961 | echo "$ac_t""yes" 1>&6 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6962 | else echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6963 | fi |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6964 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6965 | echo "$ac_t""no" 1>&6 |
| 6966 | fi |
| 6967 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6968 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6969 | # check for --with-libm=... |
| 6970 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 6971 | case $ac_sys_system in |
Guido van Rossum | 3dc0a51 | 2000-10-05 18:00:06 +0000 | [diff] [blame] | 6972 | Darwin) ;; |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 6973 | BeOS) ;; |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 6974 | *) LIBM=-lm |
| 6975 | esac |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6976 | echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6977 | echo "configure:6978: checking for --with-libm=STRING" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6978 | # Check whether --with-libm or --without-libm was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6979 | if test "${with_libm+set}" = set; then |
| 6980 | withval="$with_libm" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6981 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6982 | if test "$withval" = no |
| 6983 | then LIBM= |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6984 | echo "$ac_t""force LIBM empty" 1>&6 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6985 | elif test "$withval" != yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6986 | then LIBM=$withval |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6987 | echo "$ac_t""set LIBM=\"$withval\"" 1>&6 |
| 6988 | 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] | 6989 | fi |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6990 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6991 | echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6 |
| 6992 | fi |
| 6993 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6994 | |
| 6995 | # check for --with-libc=... |
| 6996 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6997 | echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 6998 | echo "configure:6999: checking for --with-libc=STRING" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6999 | # Check whether --with-libc or --without-libc was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7000 | if test "${with_libc+set}" = set; then |
| 7001 | withval="$with_libc" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7002 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 7003 | if test "$withval" = no |
| 7004 | then LIBC= |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7005 | echo "$ac_t""force LIBC empty" 1>&6 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 7006 | elif test "$withval" != yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7007 | then LIBC=$withval |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7008 | echo "$ac_t""set LIBC=\"$withval\"" 1>&6 |
| 7009 | 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] | 7010 | fi |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 7011 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7012 | echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6 |
| 7013 | fi |
| 7014 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7015 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 7016 | # check for hypot() in math library |
| 7017 | LIBS_SAVE=$LIBS |
| 7018 | LIBS="$LIBS $LIBM" |
| 7019 | for ac_func in hypot |
| 7020 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7021 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7022 | echo "configure:7023: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7023 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 7024 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 7025 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7026 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7027 | #line 7028 "configure" |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 7028 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7029 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7030 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7031 | #include <assert.h> |
| 7032 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7033 | /* 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] | 7034 | builtin and then its argument prototype would still apply. */ |
| 7035 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7036 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7037 | int main() { |
| 7038 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 7039 | /* The GNU C library defines this for functions which it implements |
| 7040 | to always fail with ENOSYS. Some functions are actually named |
| 7041 | something starting with __ and the normal name is an alias. */ |
| 7042 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 7043 | choke me |
| 7044 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7045 | $ac_func(); |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 7046 | #endif |
| 7047 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7048 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7049 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7050 | if { (eval echo configure:7051: \"$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] | 7051 | rm -rf conftest* |
| 7052 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 7053 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7054 | echo "configure: failed program was:" >&5 |
| 7055 | cat conftest.$ac_ext >&5 |
| 7056 | rm -rf conftest* |
| 7057 | eval "ac_cv_func_$ac_func=no" |
| 7058 | fi |
| 7059 | rm -f conftest* |
| 7060 | fi |
| 7061 | |
| 7062 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 7063 | echo "$ac_t""yes" 1>&6 |
| 7064 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 7065 | cat >> confdefs.h <<EOF |
| 7066 | #define $ac_tr_func 1 |
| 7067 | EOF |
| 7068 | |
| 7069 | else |
| 7070 | echo "$ac_t""no" 1>&6 |
| 7071 | LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 7072 | fi |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 7073 | done |
| 7074 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7075 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 7076 | LIBS=$LIBS_SAVE |
| 7077 | |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 7078 | # check whether malloc(0) returns NULL or not |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7079 | echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7080 | echo "configure:7081: checking what malloc(0) returns" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7081 | if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then |
| 7082 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 7083 | else |
| 7084 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 7085 | ac_cv_malloc_zero=nonnull |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 7086 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7087 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7088 | #line 7089 "configure" |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 7089 | #include "confdefs.h" |
| 7090 | #include <stdio.h> |
| 7091 | #ifdef HAVE_STDLIB |
| 7092 | #include <stdlib.h> |
| 7093 | #else |
| 7094 | char *malloc(), *realloc(); |
| 7095 | int *free(); |
| 7096 | #endif |
| 7097 | main() { |
| 7098 | char *p; |
| 7099 | p = malloc(0); |
| 7100 | if (p == NULL) exit(1); |
| 7101 | p = realloc(p, 0); |
| 7102 | if (p == NULL) exit(1); |
| 7103 | free(p); |
| 7104 | exit(0); |
| 7105 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7106 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7107 | if { (eval echo configure:7108: \"$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] | 7108 | then |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 7109 | ac_cv_malloc_zero=nonnull |
| 7110 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7111 | echo "configure: failed program was:" >&5 |
| 7112 | cat conftest.$ac_ext >&5 |
| 7113 | rm -fr conftest* |
| 7114 | ac_cv_malloc_zero=null |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 7115 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7116 | rm -fr conftest* |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 7117 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7118 | |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 7119 | fi |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 7120 | # XXX arm cross-compile? |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7121 | echo "$ac_t""$ac_cv_malloc_zero" 1>&6 |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 7122 | if test "$ac_cv_malloc_zero" = null |
| 7123 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7124 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 7125 | #define MALLOC_ZERO_RETURNS_NULL 1 |
| 7126 | EOF |
| 7127 | |
| 7128 | fi |
| 7129 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7130 | # check for wchar.h |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7131 | ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'` |
| 7132 | echo $ac_n "checking for wchar.h""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7133 | echo "configure:7134: checking for wchar.h" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7134 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 7135 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7136 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7137 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7138 | #line 7139 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7139 | #include "confdefs.h" |
| 7140 | #include <wchar.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7141 | EOF |
| 7142 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7143 | { (eval echo configure:7144: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7144 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 7145 | if test -z "$ac_err"; then |
| 7146 | rm -rf conftest* |
| 7147 | eval "ac_cv_header_$ac_safe=yes" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7148 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7149 | echo "$ac_err" >&5 |
| 7150 | echo "configure: failed program was:" >&5 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7151 | cat conftest.$ac_ext >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7152 | rm -rf conftest* |
| 7153 | eval "ac_cv_header_$ac_safe=no" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7154 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7155 | rm -f conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7156 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7157 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 7158 | echo "$ac_t""yes" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7159 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7160 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7161 | #define HAVE_WCHAR_H 1 |
| 7162 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7163 | |
| 7164 | wchar_h="yes" |
| 7165 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7166 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7167 | echo "$ac_t""no" 1>&6 |
| 7168 | wchar_h="no" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7169 | |
| 7170 | fi |
| 7171 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7172 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7173 | # determine wchar_t size |
| 7174 | if test "$wchar_h" = yes |
| 7175 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7176 | echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7177 | echo "configure:7178: checking size of wchar_t" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7178 | if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then |
| 7179 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7180 | else |
| 7181 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7182 | ac_cv_sizeof_wchar_t=4 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7183 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7184 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7185 | #line 7186 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7186 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7187 | #include <stdio.h> |
| 7188 | main() |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7189 | { |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7190 | FILE *f=fopen("conftestval", "w"); |
| 7191 | if (!f) exit(1); |
| 7192 | fprintf(f, "%d\n", sizeof(wchar_t)); |
| 7193 | exit(0); |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7194 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7195 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7196 | if { (eval echo configure:7197: \"$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] | 7197 | then |
| 7198 | ac_cv_sizeof_wchar_t=`cat conftestval` |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7199 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7200 | echo "configure: failed program was:" >&5 |
| 7201 | cat conftest.$ac_ext >&5 |
| 7202 | rm -fr conftest* |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7203 | ac_cv_sizeof_wchar_t=0 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7204 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7205 | rm -fr conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7206 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7207 | |
| 7208 | fi |
| 7209 | echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 |
| 7210 | cat >> confdefs.h <<EOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7211 | #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t |
| 7212 | EOF |
| 7213 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7214 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7215 | fi |
| 7216 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7217 | echo $ac_n "checking what type to use for unicode""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7218 | echo "configure:7219: checking what type to use for unicode" >&5 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7219 | # Check whether --enable-unicode or --disable-unicode was given. |
| 7220 | if test "${enable_unicode+set}" = set; then |
| 7221 | enableval="$enable_unicode" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7222 | : |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7223 | else |
| 7224 | enable_unicode=yes |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7225 | fi |
| 7226 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7227 | |
| 7228 | if test $enable_unicode = yes |
| 7229 | then |
Martin v. Löwis | fd91779 | 2001-06-27 20:22:04 +0000 | [diff] [blame] | 7230 | # Without any arguments, Py_UNICODE defaults to two-byte mode |
| 7231 | enable_unicode="ucs2" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7232 | fi |
| 7233 | |
| 7234 | case "$enable_unicode" in |
| 7235 | ucs2) unicode_size="2" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7236 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7237 | #define Py_UNICODE_SIZE 2 |
| 7238 | EOF |
| 7239 | |
| 7240 | ;; |
| 7241 | ucs4) unicode_size="4" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7242 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7243 | #define Py_UNICODE_SIZE 4 |
| 7244 | EOF |
| 7245 | |
| 7246 | ;; |
| 7247 | esac |
| 7248 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7249 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7250 | if test "$enable_unicode" = "no" |
| 7251 | then |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 7252 | UNICODE_OBJS="" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7253 | echo "$ac_t""not used" 1>&6 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7254 | else |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 7255 | UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7256 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7257 | #define Py_USING_UNICODE 1 |
| 7258 | EOF |
| 7259 | |
| 7260 | if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" |
| 7261 | then |
| 7262 | PY_UNICODE_TYPE="wchar_t" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7263 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7264 | #define HAVE_USABLE_WCHAR_T 1 |
| 7265 | EOF |
| 7266 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7267 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7268 | #define PY_UNICODE_TYPE wchar_t |
| 7269 | EOF |
| 7270 | |
| 7271 | elif test "$ac_cv_sizeof_short" = "$unicode_size" |
| 7272 | then |
| 7273 | PY_UNICODE_TYPE="unsigned short" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7274 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7275 | #define PY_UNICODE_TYPE unsigned short |
| 7276 | EOF |
| 7277 | |
| 7278 | elif test "$ac_cv_sizeof_long" = "$unicode_size" |
| 7279 | then |
| 7280 | PY_UNICODE_TYPE="unsigned long" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7281 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7282 | #define PY_UNICODE_TYPE unsigned long |
| 7283 | EOF |
| 7284 | |
| 7285 | else |
| 7286 | PY_UNICODE_TYPE="no type found" |
| 7287 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7288 | echo "$ac_t""$PY_UNICODE_TYPE" 1>&6 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7289 | fi |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7290 | |
| 7291 | # check for endianness |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7292 | echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7293 | echo "configure:7294: checking whether byte ordering is bigendian" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7294 | if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then |
| 7295 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7296 | else |
| 7297 | ac_cv_c_bigendian=unknown |
| 7298 | # See if sys/param.h defines the BYTE_ORDER macro. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7299 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7300 | #line 7301 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7301 | #include "confdefs.h" |
| 7302 | #include <sys/types.h> |
| 7303 | #include <sys/param.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7304 | int main() { |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7305 | |
| 7306 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN |
| 7307 | bogus endian macros |
| 7308 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7309 | ; return 0; } |
| 7310 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7311 | if { (eval echo configure:7312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7312 | rm -rf conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7313 | # 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] | 7314 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7315 | #line 7316 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7316 | #include "confdefs.h" |
| 7317 | #include <sys/types.h> |
| 7318 | #include <sys/param.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7319 | int main() { |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7320 | |
| 7321 | #if BYTE_ORDER != BIG_ENDIAN |
| 7322 | not big endian |
| 7323 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7324 | ; return 0; } |
| 7325 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7326 | if { (eval echo configure:7327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7327 | rm -rf conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7328 | ac_cv_c_bigendian=yes |
| 7329 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7330 | echo "configure: failed program was:" >&5 |
| 7331 | cat conftest.$ac_ext >&5 |
| 7332 | rm -rf conftest* |
| 7333 | ac_cv_c_bigendian=no |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7334 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7335 | rm -f conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7336 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7337 | echo "configure: failed program was:" >&5 |
| 7338 | cat conftest.$ac_ext >&5 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7339 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7340 | rm -f conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7341 | if test $ac_cv_c_bigendian = unknown; then |
| 7342 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7343 | { 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] | 7344 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7345 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7346 | #line 7347 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7347 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7348 | main () { |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7349 | /* Are we little or big endian? From Harbison&Steele. */ |
| 7350 | union |
| 7351 | { |
| 7352 | long l; |
| 7353 | char c[sizeof (long)]; |
| 7354 | } u; |
| 7355 | u.l = 1; |
| 7356 | exit (u.c[sizeof (long) - 1] == 1); |
| 7357 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7358 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7359 | if { (eval echo configure:7360: \"$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] | 7360 | then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7361 | ac_cv_c_bigendian=no |
| 7362 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7363 | echo "configure: failed program was:" >&5 |
| 7364 | cat conftest.$ac_ext >&5 |
| 7365 | rm -fr conftest* |
| 7366 | ac_cv_c_bigendian=yes |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7367 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7368 | rm -fr conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7369 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7370 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7371 | fi |
| 7372 | fi |
| 7373 | |
| 7374 | echo "$ac_t""$ac_cv_c_bigendian" 1>&6 |
| 7375 | if test $ac_cv_c_bigendian = yes; then |
| 7376 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7377 | #define WORDS_BIGENDIAN 1 |
| 7378 | EOF |
| 7379 | |
| 7380 | fi |
| 7381 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7382 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7383 | # Check whether right shifting a negative integer extends the sign bit |
| 7384 | # 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] | 7385 | echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7386 | echo "configure:7387: checking whether right shift extends the sign bit" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7387 | if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then |
| 7388 | echo $ac_n "(cached) $ac_c" 1>&6 |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 7389 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7390 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7391 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 7392 | ac_cv_rshift_extends_sign=yes |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7393 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7394 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7395 | #line 7396 "configure" |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7396 | #include "confdefs.h" |
| 7397 | |
| 7398 | int main() |
| 7399 | { |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 7400 | exit(((-1)>>3 == -1) ? 0 : 1); |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7401 | } |
| 7402 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7403 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7404 | if { (eval echo configure:7405: \"$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] | 7405 | then |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 7406 | ac_cv_rshift_extends_sign=yes |
| 7407 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7408 | echo "configure: failed program was:" >&5 |
| 7409 | cat conftest.$ac_ext >&5 |
| 7410 | rm -fr conftest* |
| 7411 | ac_cv_rshift_extends_sign=no |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 7412 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7413 | rm -fr conftest* |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 7414 | fi |
| 7415 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7416 | fi |
| 7417 | |
| 7418 | echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6 |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 7419 | if test "$ac_cv_rshift_extends_sign" = no |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7420 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7421 | cat >> confdefs.h <<\EOF |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7422 | #define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1 |
| 7423 | EOF |
| 7424 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7425 | fi |
| 7426 | |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7427 | # check for getc_unlocked and related locking functions |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7428 | echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7429 | echo "configure:7430: checking for getc_unlocked() and friends" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7430 | if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then |
| 7431 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7432 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7433 | |
| 7434 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7435 | #line 7436 "configure" |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7436 | #include "confdefs.h" |
| 7437 | #include <stdio.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7438 | int main() { |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7439 | |
| 7440 | FILE *f = fopen("/dev/null", "r"); |
| 7441 | flockfile(f); |
| 7442 | getc_unlocked(f); |
| 7443 | funlockfile(f); |
| 7444 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7445 | ; return 0; } |
| 7446 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7447 | if { (eval echo configure:7448: \"$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] | 7448 | rm -rf conftest* |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7449 | ac_cv_have_getc_unlocked=yes |
| 7450 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7451 | echo "configure: failed program was:" >&5 |
| 7452 | cat conftest.$ac_ext >&5 |
| 7453 | rm -rf conftest* |
| 7454 | ac_cv_have_getc_unlocked=no |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7455 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7456 | rm -f conftest* |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7457 | fi |
| 7458 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7459 | echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6 |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7460 | if test "$ac_cv_have_getc_unlocked" = yes |
| 7461 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7462 | cat >> confdefs.h <<\EOF |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7463 | #define HAVE_GETC_UNLOCKED 1 |
| 7464 | EOF |
| 7465 | |
| 7466 | fi |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7467 | |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7468 | # check for readline 4.0 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7469 | echo $ac_n "checking for rl_pre_input_hook in -lreadline""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7470 | echo "configure:7471: checking for rl_pre_input_hook in -lreadline" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7471 | ac_lib_var=`echo readline'_'rl_pre_input_hook | sed 'y%./+-%__p_%'` |
| 7472 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 7473 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7474 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7475 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7476 | LIBS="-lreadline -ltermcap $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7477 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7478 | #line 7479 "configure" |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7479 | #include "confdefs.h" |
| 7480 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 7481 | /* 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] | 7482 | builtin and then its argument prototype would still apply. */ |
| 7483 | char rl_pre_input_hook(); |
| 7484 | |
| 7485 | int main() { |
| 7486 | rl_pre_input_hook() |
| 7487 | ; return 0; } |
| 7488 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7489 | if { (eval echo configure:7490: \"$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] | 7490 | rm -rf conftest* |
| 7491 | eval "ac_cv_lib_$ac_lib_var=yes" |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7492 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7493 | echo "configure: failed program was:" >&5 |
| 7494 | cat conftest.$ac_ext >&5 |
| 7495 | rm -rf conftest* |
| 7496 | eval "ac_cv_lib_$ac_lib_var=no" |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7497 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7498 | rm -f conftest* |
| 7499 | LIBS="$ac_save_LIBS" |
| 7500 | |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7501 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7502 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 7503 | echo "$ac_t""yes" 1>&6 |
| 7504 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7505 | #define HAVE_RL_PRE_INPUT_HOOK 1 |
| 7506 | EOF |
| 7507 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7508 | else |
| 7509 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7510 | fi |
| 7511 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7512 | |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7513 | # check for readline 4.2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7514 | echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7515 | echo "configure:7516: checking for rl_completion_matches in -lreadline" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7516 | ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'` |
| 7517 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 7518 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7519 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7520 | ac_save_LIBS="$LIBS" |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7521 | LIBS="-lreadline -ltermcap $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7522 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7523 | #line 7524 "configure" |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7524 | #include "confdefs.h" |
| 7525 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 7526 | /* 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] | 7527 | builtin and then its argument prototype would still apply. */ |
| 7528 | char rl_completion_matches(); |
| 7529 | |
| 7530 | int main() { |
| 7531 | rl_completion_matches() |
| 7532 | ; return 0; } |
| 7533 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7534 | if { (eval echo configure:7535: \"$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] | 7535 | rm -rf conftest* |
| 7536 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7537 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7538 | echo "configure: failed program was:" >&5 |
| 7539 | cat conftest.$ac_ext >&5 |
| 7540 | rm -rf conftest* |
| 7541 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7542 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7543 | rm -f conftest* |
| 7544 | LIBS="$ac_save_LIBS" |
| 7545 | |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7546 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7547 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 7548 | echo "$ac_t""yes" 1>&6 |
| 7549 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7550 | #define HAVE_RL_COMPLETION_MATCHES 1 |
| 7551 | EOF |
| 7552 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7553 | else |
| 7554 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7555 | fi |
| 7556 | |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7557 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7558 | echo $ac_n "checking for broken nice()""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7559 | echo "configure:7560: checking for broken nice()" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7560 | if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then |
| 7561 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 7562 | else |
| 7563 | |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7564 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 7565 | ac_cv_broken_nice=no |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7566 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7567 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7568 | #line 7569 "configure" |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7569 | #include "confdefs.h" |
| 7570 | |
| 7571 | int main() |
| 7572 | { |
| 7573 | int val1 = nice(1); |
| 7574 | if (val1 != -1 && val1 == nice(2)) |
| 7575 | exit(0); |
| 7576 | exit(1); |
| 7577 | } |
| 7578 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7579 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7580 | if { (eval echo configure:7581: \"$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] | 7581 | then |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7582 | ac_cv_broken_nice=yes |
| 7583 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7584 | echo "configure: failed program was:" >&5 |
| 7585 | cat conftest.$ac_ext >&5 |
| 7586 | rm -fr conftest* |
| 7587 | ac_cv_broken_nice=no |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7588 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7589 | rm -fr conftest* |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7590 | fi |
| 7591 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7592 | fi |
| 7593 | |
| 7594 | echo "$ac_t""$ac_cv_broken_nice" 1>&6 |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7595 | if test "$ac_cv_broken_nice" = yes |
| 7596 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7597 | cat >> confdefs.h <<\EOF |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7598 | #define HAVE_BROKEN_NICE 1 |
| 7599 | EOF |
| 7600 | |
| 7601 | fi |
| 7602 | |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7603 | # 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] | 7604 | echo $ac_n "checking whether mvwdelch is an expression""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7605 | echo "configure:7606: checking whether mvwdelch is an expression" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7606 | if eval "test \"`echo '$''{'ac_cv_mvwdelch_is_expression'+set}'`\" = set"; then |
| 7607 | echo $ac_n "(cached) $ac_c" 1>&6 |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7608 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7609 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7610 | #line 7611 "configure" |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7611 | #include "confdefs.h" |
| 7612 | #include <curses.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7613 | int main() { |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7614 | |
| 7615 | int rtn; |
| 7616 | rtn = mvwdelch(0,0,0); |
| 7617 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7618 | ; return 0; } |
| 7619 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7620 | if { (eval echo configure:7621: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7621 | rm -rf conftest* |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7622 | ac_cv_mvwdelch_is_expression=yes |
| 7623 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7624 | echo "configure: failed program was:" >&5 |
| 7625 | cat conftest.$ac_ext >&5 |
| 7626 | rm -rf conftest* |
| 7627 | ac_cv_mvwdelch_is_expression=no |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7628 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7629 | rm -f conftest* |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7630 | fi |
| 7631 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7632 | echo "$ac_t""$ac_cv_mvwdelch_is_expression" 1>&6 |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7633 | |
| 7634 | if test "$ac_cv_mvwdelch_is_expression" = yes |
| 7635 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7636 | cat >> confdefs.h <<\EOF |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7637 | #define MVWDELCH_IS_EXPRESSION 1 |
| 7638 | EOF |
| 7639 | |
| 7640 | fi |
| 7641 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7642 | echo $ac_n "checking whether WINDOW has _flags""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7643 | echo "configure:7644: checking whether WINDOW has _flags" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7644 | if eval "test \"`echo '$''{'ac_cv_window_has_flags'+set}'`\" = set"; then |
| 7645 | echo $ac_n "(cached) $ac_c" 1>&6 |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7646 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7647 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7648 | #line 7649 "configure" |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7649 | #include "confdefs.h" |
| 7650 | #include <curses.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7651 | int main() { |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7652 | |
| 7653 | WINDOW *w; |
| 7654 | w->_flags = 0; |
| 7655 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7656 | ; return 0; } |
| 7657 | EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7658 | if { (eval echo configure:7659: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7659 | rm -rf conftest* |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7660 | ac_cv_window_has_flags=yes |
| 7661 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7662 | echo "configure: failed program was:" >&5 |
| 7663 | cat conftest.$ac_ext >&5 |
| 7664 | rm -rf conftest* |
| 7665 | ac_cv_window_has_flags=no |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7666 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7667 | rm -f conftest* |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7668 | fi |
| 7669 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7670 | echo "$ac_t""$ac_cv_window_has_flags" 1>&6 |
| 7671 | |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7672 | |
| 7673 | if test "$ac_cv_window_has_flags" = yes |
| 7674 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7675 | cat >> confdefs.h <<\EOF |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7676 | #define WINDOW_HAS_FLAGS 1 |
| 7677 | EOF |
| 7678 | |
| 7679 | fi |
| 7680 | |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7681 | # THIS MUST BE LAST, IT CAN BREAK OTHER TESTS! |
| 7682 | # Add sys/socket.h to confdefs.h |
| 7683 | cat >> confdefs.h <<\EOF |
| 7684 | #ifdef HAVE_SYS_SOCKET_H |
| 7685 | #include <sys/socket.h> |
| 7686 | #endif |
| 7687 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7688 | echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7689 | echo "configure:7690: checking for socklen_t" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7690 | if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then |
| 7691 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7692 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7693 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7694 | #line 7695 "configure" |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7695 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7696 | #include <sys/types.h> |
| 7697 | #if STDC_HEADERS |
| 7698 | #include <stdlib.h> |
| 7699 | #include <stddef.h> |
| 7700 | #endif |
| 7701 | EOF |
| 7702 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 7703 | egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
| 7704 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7705 | ac_cv_type_socklen_t=yes |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7706 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7707 | rm -rf conftest* |
| 7708 | ac_cv_type_socklen_t=no |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7709 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7710 | rm -f conftest* |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7711 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7712 | fi |
| 7713 | echo "$ac_t""$ac_cv_type_socklen_t" 1>&6 |
| 7714 | if test $ac_cv_type_socklen_t = no; then |
| 7715 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7716 | #define socklen_t int |
| 7717 | EOF |
| 7718 | |
| 7719 | fi |
| 7720 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7721 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7722 | #AC_MSG_CHECKING(for Modules/Setup) |
| 7723 | #if test ! -f Modules/Setup ; then |
| 7724 | # if test ! -d Modules ; then |
| 7725 | # mkdir Modules |
| 7726 | # fi |
| 7727 | # cp "$srcdir/Modules/Setup.dist" Modules/Setup |
| 7728 | # AC_MSG_RESULT(creating) |
| 7729 | #else |
| 7730 | # AC_MSG_RESULT(already exists) |
| 7731 | #fi |
| 7732 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7733 | |
| 7734 | |
Martin v. Löwis | 06f15bb | 2001-12-02 13:02:32 +0000 | [diff] [blame] | 7735 | for h in `(cd $srcdir;echo Python/thread_*.h)` |
| 7736 | do |
| 7737 | THREADHEADERS="$THREADHEADERS \$(srcdir)/$h" |
| 7738 | done |
| 7739 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7740 | |
Neil Schemenauer | acbf9ef | 2001-02-27 02:15:14 +0000 | [diff] [blame] | 7741 | SRCDIRS="Parser Grammar Objects Python Modules" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7742 | echo $ac_n "checking for build directories""... $ac_c" 1>&6 |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 7743 | echo "configure:7744: checking for build directories" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7744 | for dir in $SRCDIRS; do |
| 7745 | if test ! -d $dir; then |
| 7746 | mkdir $dir |
Guido van Rossum | 262cf20 | 2000-11-02 19:33:53 +0000 | [diff] [blame] | 7747 | fi |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7748 | done |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7749 | echo "$ac_t""done" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 7750 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7751 | # generate output files |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7752 | trap '' 1 2 15 |
| 7753 | cat > confcache <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7754 | # This file is a shell script that caches the results of configure |
| 7755 | # 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] | 7756 | # scripts and configure runs. It is not useful on other systems. |
| 7757 | # 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] | 7758 | # |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7759 | # By default, configure uses ./config.cache as the cache file, |
| 7760 | # creating it if it does not exist already. You can give configure |
| 7761 | # the --cache-file=FILE option to use a different cache file; that is |
| 7762 | # what configure does when it calls configure scripts in |
| 7763 | # subdirectories, so they share the cache. |
| 7764 | # Giving --cache-file=/dev/null disables caching, for debugging configure. |
| 7765 | # config.status only pays attention to the cache file if you give it the |
| 7766 | # --recheck option to rerun configure. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7767 | # |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7768 | EOF |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7769 | # The following way of writing the cache mishandles newlines in values, |
| 7770 | # but we know of no workaround that is simple, portable, and efficient. |
| 7771 | # So, don't put newlines in cache variables' values. |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7772 | # Ultrix sh set writes to stderr and can't be redirected directly, |
| 7773 | # 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] | 7774 | (set) 2>&1 | |
| 7775 | case `(ac_space=' '; set | grep ac_space) 2>&1` in |
| 7776 | *ac_space=\ *) |
| 7777 | # `set' does not quote correctly, so add quotes (double-quote substitution |
| 7778 | # turns \\\\ into \\, and sed turns \\ into \). |
| 7779 | sed -n \ |
| 7780 | -e "s/'/'\\\\''/g" \ |
| 7781 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" |
| 7782 | ;; |
| 7783 | *) |
| 7784 | # `set' quotes correctly as required by POSIX, so do not add quotes. |
| 7785 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' |
| 7786 | ;; |
| 7787 | esac >> confcache |
| 7788 | if cmp -s $cache_file confcache; then |
| 7789 | : |
| 7790 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7791 | if test -w $cache_file; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7792 | echo "updating cache $cache_file" |
| 7793 | cat confcache > $cache_file |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7794 | else |
| 7795 | echo "not updating unwritable cache $cache_file" |
| 7796 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7797 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7798 | rm -f confcache |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7799 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7800 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 |
| 7801 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7802 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
| 7803 | # Let make expand exec_prefix. |
| 7804 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7805 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7806 | # Any assignment to VPATH causes Sun make to only execute |
| 7807 | # the first set of double-colon rules, so remove it if not needed. |
| 7808 | # 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] | 7809 | if test "x$srcdir" = x.; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7810 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7811 | fi |
| 7812 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7813 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 |
| 7814 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7815 | DEFS=-DHAVE_CONFIG_H |
| 7816 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7817 | # Without the "./", some shells look in PATH for config.status. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7818 | : ${CONFIG_STATUS=./config.status} |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7819 | |
| 7820 | echo creating $CONFIG_STATUS |
| 7821 | rm -f $CONFIG_STATUS |
| 7822 | cat > $CONFIG_STATUS <<EOF |
| 7823 | #! /bin/sh |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7824 | # Generated automatically by configure. |
| 7825 | # Run this file to recreate the current configuration. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7826 | # This directory was configured as follows, |
| 7827 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: |
| 7828 | # |
| 7829 | # $0 $ac_configure_args |
| 7830 | # |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7831 | # Compiler output produced by configure, useful for debugging |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7832 | # configure, is in ./config.log if it exists. |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7833 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7834 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" |
| 7835 | for ac_option |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7836 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7837 | case "\$ac_option" in |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7838 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7839 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" |
| 7840 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; |
| 7841 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) |
| 7842 | echo "$CONFIG_STATUS generated by autoconf version 2.13" |
| 7843 | exit 0 ;; |
| 7844 | -help | --help | --hel | --he | --h) |
| 7845 | echo "\$ac_cs_usage"; exit 0 ;; |
| 7846 | *) echo "\$ac_cs_usage"; exit 1 ;; |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7847 | esac |
| 7848 | done |
| 7849 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7850 | ac_given_srcdir=$srcdir |
| 7851 | ac_given_INSTALL="$INSTALL" |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7852 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7853 | 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] | 7854 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7855 | cat >> $CONFIG_STATUS <<EOF |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7856 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7857 | # Protect against being on the right side of a sed subst in config.status. |
| 7858 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; |
| 7859 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF |
| 7860 | $ac_vpsub |
| 7861 | $extrasub |
| 7862 | s%@SHELL@%$SHELL%g |
| 7863 | s%@CFLAGS@%$CFLAGS%g |
| 7864 | s%@CPPFLAGS@%$CPPFLAGS%g |
| 7865 | s%@CXXFLAGS@%$CXXFLAGS%g |
| 7866 | s%@FFLAGS@%$FFLAGS%g |
| 7867 | s%@DEFS@%$DEFS%g |
| 7868 | s%@LDFLAGS@%$LDFLAGS%g |
| 7869 | s%@LIBS@%$LIBS%g |
| 7870 | s%@exec_prefix@%$exec_prefix%g |
| 7871 | s%@prefix@%$prefix%g |
| 7872 | s%@program_transform_name@%$program_transform_name%g |
| 7873 | s%@bindir@%$bindir%g |
| 7874 | s%@sbindir@%$sbindir%g |
| 7875 | s%@libexecdir@%$libexecdir%g |
| 7876 | s%@datadir@%$datadir%g |
| 7877 | s%@sysconfdir@%$sysconfdir%g |
| 7878 | s%@sharedstatedir@%$sharedstatedir%g |
| 7879 | s%@localstatedir@%$localstatedir%g |
| 7880 | s%@libdir@%$libdir%g |
| 7881 | s%@includedir@%$includedir%g |
| 7882 | s%@oldincludedir@%$oldincludedir%g |
| 7883 | s%@infodir@%$infodir%g |
| 7884 | s%@mandir@%$mandir%g |
| 7885 | s%@VERSION@%$VERSION%g |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 7886 | s%@SOVERSION@%$SOVERSION%g |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7887 | s%@CONFIG_ARGS@%$CONFIG_ARGS%g |
| 7888 | s%@PYTHONFRAMEWORK@%$PYTHONFRAMEWORK%g |
| 7889 | s%@PYTHONFRAMEWORKDIR@%$PYTHONFRAMEWORKDIR%g |
| 7890 | s%@PYTHONFRAMEWORKPREFIX@%$PYTHONFRAMEWORKPREFIX%g |
| 7891 | s%@PYTHONFRAMEWORKINSTALLDIR@%$PYTHONFRAMEWORKINSTALLDIR%g |
| 7892 | s%@MACHDEP@%$MACHDEP%g |
| 7893 | s%@SGI_ABI@%$SGI_ABI%g |
| 7894 | s%@CXX@%$CXX%g |
| 7895 | s%@MAINOBJ@%$MAINOBJ%g |
| 7896 | s%@CC@%$CC%g |
| 7897 | s%@CPP@%$CPP%g |
| 7898 | s%@EXEEXT@%$EXEEXT%g |
| 7899 | s%@BUILDEXEEXT@%$BUILDEXEEXT%g |
| 7900 | s%@LIBRARY@%$LIBRARY%g |
| 7901 | s%@LDLIBRARY@%$LDLIBRARY%g |
| 7902 | s%@DLLLIBRARY@%$DLLLIBRARY%g |
| 7903 | s%@BLDLIBRARY@%$BLDLIBRARY%g |
| 7904 | s%@LDLIBRARYDIR@%$LDLIBRARYDIR%g |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 7905 | s%@INSTSONAME@%$INSTSONAME%g |
| 7906 | s%@RUNSHARED@%$RUNSHARED%g |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7907 | s%@LINKCC@%$LINKCC%g |
| 7908 | s%@RANLIB@%$RANLIB%g |
| 7909 | s%@AR@%$AR%g |
| 7910 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
| 7911 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g |
| 7912 | s%@INSTALL_DATA@%$INSTALL_DATA%g |
| 7913 | s%@LN@%$LN%g |
| 7914 | s%@OPT@%$OPT%g |
| 7915 | s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g |
| 7916 | s%@SO@%$SO%g |
| 7917 | s%@LDSHARED@%$LDSHARED%g |
| 7918 | s%@BLDSHARED@%$BLDSHARED%g |
| 7919 | s%@CCSHARED@%$CCSHARED%g |
| 7920 | s%@LINKFORSHARED@%$LINKFORSHARED%g |
| 7921 | s%@CFLAGSFORSHARED@%$CFLAGSFORSHARED%g |
| 7922 | s%@USE_SIGNAL_MODULE@%$USE_SIGNAL_MODULE%g |
| 7923 | s%@SIGNAL_OBJS@%$SIGNAL_OBJS%g |
| 7924 | s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g |
| 7925 | s%@LDLAST@%$LDLAST%g |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 7926 | s%@THREADOBJ@%$THREADOBJ%g |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7927 | s%@DLINCLDIR@%$DLINCLDIR%g |
| 7928 | s%@DYNLOADFILE@%$DYNLOADFILE%g |
| 7929 | s%@MACHDEP_OBJS@%$MACHDEP_OBJS%g |
| 7930 | s%@LIBOBJS@%$LIBOBJS%g |
| 7931 | s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g |
| 7932 | s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g |
| 7933 | s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g |
| 7934 | s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g |
| 7935 | s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g |
| 7936 | s%@LIBM@%$LIBM%g |
| 7937 | s%@LIBC@%$LIBC%g |
| 7938 | s%@UNICODE_OBJS@%$UNICODE_OBJS%g |
| 7939 | s%@THREADHEADERS@%$THREADHEADERS%g |
| 7940 | s%@SRCDIRS@%$SRCDIRS%g |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7941 | |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7942 | CEOF |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7943 | EOF |
| 7944 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7945 | cat >> $CONFIG_STATUS <<\EOF |
| 7946 | |
| 7947 | # Split the substitutions into bite-sized pieces for seds with |
| 7948 | # small command number limits, like on Digital OSF/1 and HP-UX. |
| 7949 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. |
| 7950 | ac_file=1 # Number of current file. |
| 7951 | ac_beg=1 # First line for current file. |
| 7952 | ac_end=$ac_max_sed_cmds # Line after last line for current file. |
| 7953 | ac_more_lines=: |
| 7954 | ac_sed_cmds="" |
| 7955 | while $ac_more_lines; do |
| 7956 | if test $ac_beg -gt 1; then |
| 7957 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file |
| 7958 | else |
| 7959 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7960 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7961 | if test ! -s conftest.s$ac_file; then |
| 7962 | ac_more_lines=false |
| 7963 | rm -f conftest.s$ac_file |
| 7964 | else |
| 7965 | if test -z "$ac_sed_cmds"; then |
| 7966 | ac_sed_cmds="sed -f conftest.s$ac_file" |
| 7967 | else |
| 7968 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" |
| 7969 | fi |
| 7970 | ac_file=`expr $ac_file + 1` |
| 7971 | ac_beg=$ac_end |
| 7972 | ac_end=`expr $ac_end + $ac_max_sed_cmds` |
| 7973 | fi |
| 7974 | done |
| 7975 | if test -z "$ac_sed_cmds"; then |
| 7976 | ac_sed_cmds=cat |
| 7977 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7978 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7979 | |
| 7980 | cat >> $CONFIG_STATUS <<EOF |
| 7981 | |
| 7982 | CONFIG_FILES=\${CONFIG_FILES-"Makefile.pre Modules/Setup.config"} |
| 7983 | EOF |
| 7984 | cat >> $CONFIG_STATUS <<\EOF |
| 7985 | 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] | 7986 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7987 | case "$ac_file" in |
| 7988 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
| 7989 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
| 7990 | *) ac_file_in="${ac_file}.in" ;; |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7991 | esac |
| 7992 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7993 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. |
| 7994 | |
| 7995 | # Remove last slash and all that follows it. Not all systems have dirname. |
| 7996 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7997 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7998 | # The file is in a subdirectory. |
| 7999 | test ! -d "$ac_dir" && mkdir "$ac_dir" |
| 8000 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8001 | # A "../" for each directory in $ac_dir_suffix. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8002 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8003 | else |
| 8004 | ac_dir_suffix= ac_dots= |
| 8005 | fi |
| 8006 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8007 | case "$ac_given_srcdir" in |
| 8008 | .) srcdir=. |
| 8009 | if test -z "$ac_dots"; then top_srcdir=. |
| 8010 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; |
| 8011 | /*) 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] | 8012 | *) # Relative path. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8013 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" |
| 8014 | top_srcdir="$ac_dots$ac_given_srcdir" ;; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8015 | esac |
| 8016 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8017 | case "$ac_given_INSTALL" in |
| 8018 | [/$]*) INSTALL="$ac_given_INSTALL" ;; |
| 8019 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 8020 | esac |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 8021 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8022 | echo creating "$ac_file" |
| 8023 | rm -f "$ac_file" |
| 8024 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." |
| 8025 | case "$ac_file" in |
| 8026 | *Makefile*) ac_comsub="1i\\ |
| 8027 | # $configure_input" ;; |
| 8028 | *) ac_comsub= ;; |
| 8029 | esac |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 8030 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8031 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
| 8032 | sed -e "$ac_comsub |
| 8033 | s%@configure_input@%$configure_input%g |
| 8034 | s%@srcdir@%$srcdir%g |
| 8035 | s%@top_srcdir@%$top_srcdir%g |
| 8036 | s%@INSTALL@%$INSTALL%g |
| 8037 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file |
| 8038 | fi; done |
| 8039 | rm -f conftest.s* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 8040 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8041 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where |
| 8042 | # 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] | 8043 | # |
| 8044 | # ac_d sets the value in "#define NAME VALUE" lines. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8045 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' |
| 8046 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' |
| 8047 | ac_dC='\3' |
| 8048 | ac_dD='%g' |
| 8049 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". |
| 8050 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
| 8051 | ac_uB='\([ ]\)%\1#\2define\3' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 8052 | ac_uC=' ' |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8053 | ac_uD='\4%g' |
| 8054 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". |
| 8055 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
| 8056 | ac_eB='$%\1#\2define\3' |
| 8057 | ac_eC=' ' |
| 8058 | ac_eD='%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 8059 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8060 | if test "${CONFIG_HEADERS+set}" != set; then |
| 8061 | EOF |
| 8062 | cat >> $CONFIG_STATUS <<EOF |
| 8063 | CONFIG_HEADERS="pyconfig.h" |
| 8064 | EOF |
| 8065 | cat >> $CONFIG_STATUS <<\EOF |
| 8066 | fi |
| 8067 | 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] | 8068 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8069 | case "$ac_file" in |
| 8070 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
| 8071 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
| 8072 | *) ac_file_in="${ac_file}.in" ;; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8073 | esac |
| 8074 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8075 | echo creating $ac_file |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 8076 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8077 | rm -f conftest.frag conftest.in conftest.out |
| 8078 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
| 8079 | cat $ac_file_inputs > conftest.in |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8080 | |
| 8081 | EOF |
| 8082 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8083 | # Transform confdefs.h into a sed script conftest.vals that substitutes |
| 8084 | # the proper values into config.h.in to produce config.h. And first: |
| 8085 | # Protect against being on the right side of a sed subst in config.status. |
| 8086 | # Protect against being in an unquoted here document in config.status. |
| 8087 | rm -f conftest.vals |
| 8088 | cat > conftest.hdr <<\EOF |
| 8089 | s/[\\&%]/\\&/g |
| 8090 | s%[\\$`]%\\&%g |
| 8091 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp |
| 8092 | s%ac_d%ac_u%gp |
| 8093 | s%ac_u%ac_e%gp |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8094 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8095 | sed -n -f conftest.hdr confdefs.h > conftest.vals |
| 8096 | rm -f conftest.hdr |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8097 | |
| 8098 | # This sed command replaces #undef with comments. This is necessary, for |
| 8099 | # example, in the case of _POSIX_SOURCE, which is predefined and required |
| 8100 | # on some systems where configure will not decide to define it. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8101 | cat >> conftest.vals <<\EOF |
| 8102 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8103 | EOF |
| 8104 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8105 | # Break up conftest.vals because some shells have a limit on |
| 8106 | # 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] | 8107 | |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 8108 | rm -f conftest.tail |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8109 | while : |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 8110 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8111 | ac_lines=`grep -c . conftest.vals` |
| 8112 | # grep -c gives empty output for an empty file on some AIX systems. |
| 8113 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi |
| 8114 | # Write a limited-size here document to conftest.frag. |
| 8115 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS |
| 8116 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 8117 | echo 'CEOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8118 | sed -f conftest.frag conftest.in > conftest.out |
| 8119 | rm -f conftest.in |
| 8120 | mv conftest.out conftest.in |
| 8121 | ' >> $CONFIG_STATUS |
| 8122 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail |
| 8123 | rm -f conftest.vals |
| 8124 | mv conftest.tail conftest.vals |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 8125 | done |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8126 | rm -f conftest.vals |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 8127 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8128 | cat >> $CONFIG_STATUS <<\EOF |
| 8129 | rm -f conftest.frag conftest.h |
| 8130 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h |
| 8131 | cat conftest.in >> conftest.h |
| 8132 | rm -f conftest.in |
| 8133 | if cmp -s $ac_file conftest.h 2>/dev/null; then |
| 8134 | echo "$ac_file is unchanged" |
| 8135 | rm -f conftest.h |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 8136 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8137 | # Remove last slash and all that follows it. Not all systems have dirname. |
| 8138 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 8139 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8140 | # The file is in a subdirectory. |
| 8141 | test ! -d "$ac_dir" && mkdir "$ac_dir" |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 8142 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8143 | rm -f $ac_file |
| 8144 | mv conftest.h $ac_file |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 8145 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8146 | fi; done |
| 8147 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 8148 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8149 | cat >> $CONFIG_STATUS <<EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 8150 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8151 | EOF |
| 8152 | cat >> $CONFIG_STATUS <<\EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 8153 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8154 | exit 0 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 8155 | EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8156 | chmod +x $CONFIG_STATUS |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8157 | rm -fr confdefs* $ac_clean_files |
| 8158 | 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] | 8159 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 8160 | |
| 8161 | echo "creating Setup" |
| 8162 | if test ! -f Modules/Setup |
| 8163 | then |
| 8164 | cp $srcdir/Modules/Setup.dist Modules/Setup |
| 8165 | fi |
| 8166 | |
| 8167 | echo "creating Setup.local" |
| 8168 | if test ! -f Modules/Setup.local |
| 8169 | then |
| 8170 | echo "# Edit this file for local setup changes" >Modules/Setup.local |
| 8171 | fi |
| 8172 | |
| 8173 | echo "creating Makefile" |
| 8174 | $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \ |
| 8175 | -s Modules Modules/Setup.config \ |
Neil Schemenauer | f8b71c5 | 2001-04-21 17:41:16 +0000 | [diff] [blame] | 8176 | Modules/Setup.local Modules/Setup |
Neil Schemenauer | c761fc8 | 2001-02-19 04:50:49 +0000 | [diff] [blame] | 8177 | mv config.c Modules |