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 | |
Neil Schemenauer | 16c2297 | 2002-03-22 15:34:49 +0000 | [diff] [blame] | 3 | # From configure.in Revision: 1.300 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5 | # Guess values for system-dependent variables and create Makefiles. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6 | # Generated automatically using autoconf version 2.13 |
| 7 | # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8 | # |
| 9 | # This configure script is free software; the Free Software Foundation |
| 10 | # gives unlimited permission to copy, distribute and modify it. |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 11 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 12 | # Defaults: |
| 13 | ac_help= |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 14 | ac_default_prefix=/usr/local |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 15 | # Any additions from configure.in: |
| 16 | ac_help="$ac_help |
| 17 | --enable-framework[=INSTALLDIR] Build (MacOSX|Darwin) framework" |
| 18 | ac_help="$ac_help |
| 19 | --without-gcc never use gcc" |
| 20 | ac_help="$ac_help |
| 21 | --with-cxx=<compiler> enable C++ support" |
| 22 | ac_help="$ac_help |
| 23 | --with-suffix=.exe set executable suffix" |
| 24 | ac_help="$ac_help |
| 25 | --with-pydebug build with Py_DEBUG defined" |
| 26 | ac_help="$ac_help |
| 27 | --enable-toolbox-glue disable/enable MacOSX glue code for extensions" |
| 28 | ac_help="$ac_help |
| 29 | --with-libs='lib1 ...' link against additional libs" |
| 30 | ac_help="$ac_help |
| 31 | --with-signal-module disable/enable signal module" |
| 32 | ac_help="$ac_help |
| 33 | --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries" |
| 34 | ac_help="$ac_help |
| 35 | --with(out)-threads[=DIRECTORY] disable/enable thread support" |
| 36 | ac_help="$ac_help |
| 37 | --with(out)-thread[=DIRECTORY] deprecated; use --with(out)-threads" |
| 38 | ac_help="$ac_help |
| 39 | --with-pth use GNU pth threading libraries" |
| 40 | ac_help="$ac_help |
| 41 | --enable-ipv6 Enable ipv6 (with ipv4) support |
| 42 | --disable-ipv6 Disable ipv6 support" |
| 43 | ac_help="$ac_help |
| 44 | --with(out)-cycle-gc disable/enable garbage collection" |
| 45 | ac_help="$ac_help |
| 46 | --with(out)-pymalloc disable/enable specialized mallocs" |
| 47 | ac_help="$ac_help |
| 48 | --with-wctype-functions use wctype.h functions" |
| 49 | ac_help="$ac_help |
| 50 | --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking" |
| 51 | ac_help="$ac_help |
| 52 | --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking" |
| 53 | ac_help="$ac_help |
| 54 | --with-fpectl enable SIGFPE catching" |
| 55 | ac_help="$ac_help |
| 56 | --with-libm=STRING math library" |
| 57 | ac_help="$ac_help |
| 58 | --with-libc=STRING C library" |
| 59 | ac_help="$ac_help |
| 60 | --enable-unicode[=ucs2,ucs4] Enable Unicode strings (default is yes)" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 61 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 62 | # Initialize some variables set by options. |
| 63 | # The variables have the same names as the options, with |
| 64 | # dashes changed to underlines. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 65 | build=NONE |
| 66 | cache_file=./config.cache |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 67 | exec_prefix=NONE |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 68 | host=NONE |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 69 | no_create= |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 70 | nonopt=NONE |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 71 | no_recursion= |
| 72 | prefix=NONE |
| 73 | program_prefix=NONE |
| 74 | program_suffix=NONE |
| 75 | program_transform_name=s,x,x, |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 76 | silent= |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 77 | site= |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 78 | srcdir= |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 79 | target=NONE |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 80 | verbose= |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 81 | x_includes=NONE |
| 82 | x_libraries=NONE |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 83 | bindir='${exec_prefix}/bin' |
| 84 | sbindir='${exec_prefix}/sbin' |
| 85 | libexecdir='${exec_prefix}/libexec' |
| 86 | datadir='${prefix}/share' |
| 87 | sysconfdir='${prefix}/etc' |
| 88 | sharedstatedir='${prefix}/com' |
| 89 | localstatedir='${prefix}/var' |
| 90 | libdir='${exec_prefix}/lib' |
| 91 | includedir='${prefix}/include' |
| 92 | oldincludedir='/usr/include' |
| 93 | infodir='${prefix}/info' |
| 94 | mandir='${prefix}/man' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 95 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 96 | # Initialize some other variables. |
| 97 | subdirs= |
| 98 | MFLAGS= MAKEFLAGS= |
| 99 | SHELL=${CONFIG_SHELL-/bin/sh} |
| 100 | # Maximum number of lines to put in a shell here document. |
| 101 | ac_max_here_lines=12 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 102 | |
| 103 | ac_prev= |
| 104 | for ac_option |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 105 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 106 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 107 | # If the previous option needs an argument, assign it. |
| 108 | if test -n "$ac_prev"; then |
| 109 | eval "$ac_prev=\$ac_option" |
| 110 | ac_prev= |
| 111 | continue |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 112 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 113 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 114 | case "$ac_option" in |
| 115 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; |
| 116 | *) ac_optarg= ;; |
| 117 | esac |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 118 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 119 | # Accept the important Cygnus configure options, so we can diagnose typos. |
| 120 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 121 | case "$ac_option" in |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 122 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 123 | -bindir | --bindir | --bindi | --bind | --bin | --bi) |
| 124 | ac_prev=bindir ;; |
| 125 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 126 | bindir="$ac_optarg" ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 127 | |
| 128 | -build | --build | --buil | --bui | --bu) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 129 | ac_prev=build ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 130 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 131 | build="$ac_optarg" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 132 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 133 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
| 134 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) |
| 135 | ac_prev=cache_file ;; |
| 136 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ |
| 137 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 138 | cache_file="$ac_optarg" ;; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 139 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 140 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) |
| 141 | ac_prev=datadir ;; |
| 142 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ |
| 143 | | --da=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 144 | datadir="$ac_optarg" ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 145 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 146 | -disable-* | --disable-*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 147 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 148 | # Reject names that are not valid shell variable names. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 149 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then |
| 150 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } |
| 151 | fi |
| 152 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` |
| 153 | eval "enable_${ac_feature}=no" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 154 | |
| 155 | -enable-* | --enable-*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 156 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 157 | # Reject names that are not valid shell variable names. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 158 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then |
| 159 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } |
| 160 | fi |
| 161 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` |
| 162 | case "$ac_option" in |
| 163 | *=*) ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 164 | *) ac_optarg=yes ;; |
| 165 | esac |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 166 | eval "enable_${ac_feature}='$ac_optarg'" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 167 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 168 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ |
| 169 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ |
| 170 | | --exec | --exe | --ex) |
| 171 | ac_prev=exec_prefix ;; |
| 172 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ |
| 173 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ |
| 174 | | --exec=* | --exe=* | --ex=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 175 | exec_prefix="$ac_optarg" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 176 | |
| 177 | -gas | --gas | --ga | --g) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 178 | # Obsolete; use --with-gas. |
| 179 | with_gas=yes ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 180 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 181 | -help | --help | --hel | --he) |
| 182 | # Omit some internal or obsolete options to make the list less imposing. |
| 183 | # This message is too long to be a string in the A/UX 3.1 sh. |
| 184 | cat << EOF |
| 185 | Usage: configure [options] [host] |
| 186 | Options: [defaults in brackets after descriptions] |
| 187 | Configuration: |
| 188 | --cache-file=FILE cache test results in FILE |
| 189 | --help print this message |
| 190 | --no-create do not create output files |
| 191 | --quiet, --silent do not print \`checking...' messages |
| 192 | --version print the version of autoconf that created configure |
| 193 | Directory and file names: |
| 194 | --prefix=PREFIX install architecture-independent files in PREFIX |
| 195 | [$ac_default_prefix] |
| 196 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
| 197 | [same as prefix] |
| 198 | --bindir=DIR user executables in DIR [EPREFIX/bin] |
| 199 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] |
| 200 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] |
| 201 | --datadir=DIR read-only architecture-independent data in DIR |
| 202 | [PREFIX/share] |
| 203 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] |
| 204 | --sharedstatedir=DIR modifiable architecture-independent data in DIR |
| 205 | [PREFIX/com] |
| 206 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] |
| 207 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] |
| 208 | --includedir=DIR C header files in DIR [PREFIX/include] |
| 209 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] |
| 210 | --infodir=DIR info documentation in DIR [PREFIX/info] |
| 211 | --mandir=DIR man documentation in DIR [PREFIX/man] |
| 212 | --srcdir=DIR find the sources in DIR [configure dir or ..] |
| 213 | --program-prefix=PREFIX prepend PREFIX to installed program names |
| 214 | --program-suffix=SUFFIX append SUFFIX to installed program names |
| 215 | --program-transform-name=PROGRAM |
| 216 | run sed PROGRAM on installed program names |
| 217 | EOF |
| 218 | cat << EOF |
| 219 | Host type: |
| 220 | --build=BUILD configure for building on BUILD [BUILD=HOST] |
| 221 | --host=HOST configure for HOST [guessed] |
| 222 | --target=TARGET configure for TARGET [TARGET=HOST] |
| 223 | Features and packages: |
| 224 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) |
| 225 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] |
| 226 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] |
| 227 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) |
| 228 | --x-includes=DIR X include files are in DIR |
| 229 | --x-libraries=DIR X library files are in DIR |
| 230 | EOF |
| 231 | if test -n "$ac_help"; then |
| 232 | echo "--enable and --with options recognized:$ac_help" |
| 233 | fi |
| 234 | exit 0 ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 235 | |
| 236 | -host | --host | --hos | --ho) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 237 | ac_prev=host ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 238 | -host=* | --host=* | --hos=* | --ho=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 239 | host="$ac_optarg" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 240 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 241 | -includedir | --includedir | --includedi | --included | --include \ |
| 242 | | --includ | --inclu | --incl | --inc) |
| 243 | ac_prev=includedir ;; |
| 244 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ |
| 245 | | --includ=* | --inclu=* | --incl=* | --inc=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 246 | includedir="$ac_optarg" ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 247 | |
| 248 | -infodir | --infodir | --infodi | --infod | --info | --inf) |
| 249 | ac_prev=infodir ;; |
| 250 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 251 | infodir="$ac_optarg" ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 252 | |
| 253 | -libdir | --libdir | --libdi | --libd) |
| 254 | ac_prev=libdir ;; |
| 255 | -libdir=* | --libdir=* | --libdi=* | --libd=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 256 | libdir="$ac_optarg" ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 257 | |
| 258 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ |
| 259 | | --libexe | --libex | --libe) |
| 260 | ac_prev=libexecdir ;; |
| 261 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ |
| 262 | | --libexe=* | --libex=* | --libe=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 263 | libexecdir="$ac_optarg" ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 264 | |
| 265 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
| 266 | | --localstate | --localstat | --localsta | --localst \ |
| 267 | | --locals | --local | --loca | --loc | --lo) |
| 268 | ac_prev=localstatedir ;; |
| 269 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ |
| 270 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ |
| 271 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 272 | localstatedir="$ac_optarg" ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 273 | |
| 274 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) |
| 275 | ac_prev=mandir ;; |
| 276 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 277 | mandir="$ac_optarg" ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 278 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 279 | -nfp | --nfp | --nf) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 280 | # Obsolete; use --without-fp. |
| 281 | with_fp=no ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 282 | |
| 283 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ |
| 284 | | --no-cr | --no-c) |
| 285 | no_create=yes ;; |
| 286 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 287 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ |
| 288 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) |
| 289 | no_recursion=yes ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 290 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 291 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ |
| 292 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ |
| 293 | | --oldin | --oldi | --old | --ol | --o) |
| 294 | ac_prev=oldincludedir ;; |
| 295 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ |
| 296 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ |
| 297 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 298 | oldincludedir="$ac_optarg" ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 299 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 300 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
| 301 | ac_prev=prefix ;; |
| 302 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 303 | prefix="$ac_optarg" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 304 | |
| 305 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ |
| 306 | | --program-pre | --program-pr | --program-p) |
| 307 | ac_prev=program_prefix ;; |
| 308 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ |
| 309 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 310 | program_prefix="$ac_optarg" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 311 | |
| 312 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ |
| 313 | | --program-suf | --program-su | --program-s) |
| 314 | ac_prev=program_suffix ;; |
| 315 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ |
| 316 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 317 | program_suffix="$ac_optarg" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 318 | |
| 319 | -program-transform-name | --program-transform-name \ |
| 320 | | --program-transform-nam | --program-transform-na \ |
| 321 | | --program-transform-n | --program-transform- \ |
| 322 | | --program-transform | --program-transfor \ |
| 323 | | --program-transfo | --program-transf \ |
| 324 | | --program-trans | --program-tran \ |
| 325 | | --progr-tra | --program-tr | --program-t) |
| 326 | ac_prev=program_transform_name ;; |
| 327 | -program-transform-name=* | --program-transform-name=* \ |
| 328 | | --program-transform-nam=* | --program-transform-na=* \ |
| 329 | | --program-transform-n=* | --program-transform-=* \ |
| 330 | | --program-transform=* | --program-transfor=* \ |
| 331 | | --program-transfo=* | --program-transf=* \ |
| 332 | | --program-trans=* | --program-tran=* \ |
| 333 | | --progr-tra=* | --program-tr=* | --program-t=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 334 | program_transform_name="$ac_optarg" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 335 | |
| 336 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
| 337 | | -silent | --silent | --silen | --sile | --sil) |
| 338 | silent=yes ;; |
| 339 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 340 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) |
| 341 | ac_prev=sbindir ;; |
| 342 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ |
| 343 | | --sbi=* | --sb=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 344 | sbindir="$ac_optarg" ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 345 | |
| 346 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ |
| 347 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ |
| 348 | | --sharedst | --shareds | --shared | --share | --shar \ |
| 349 | | --sha | --sh) |
| 350 | ac_prev=sharedstatedir ;; |
| 351 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ |
| 352 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ |
| 353 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ |
| 354 | | --sha=* | --sh=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 355 | sharedstatedir="$ac_optarg" ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 356 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 357 | -site | --site | --sit) |
| 358 | ac_prev=site ;; |
| 359 | -site=* | --site=* | --sit=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 360 | site="$ac_optarg" ;; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 361 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 362 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
| 363 | ac_prev=srcdir ;; |
| 364 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 365 | srcdir="$ac_optarg" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 366 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 367 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ |
| 368 | | --syscon | --sysco | --sysc | --sys | --sy) |
| 369 | ac_prev=sysconfdir ;; |
| 370 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ |
| 371 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 372 | sysconfdir="$ac_optarg" ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 373 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 374 | -target | --target | --targe | --targ | --tar | --ta | --t) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 375 | ac_prev=target ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 376 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 377 | target="$ac_optarg" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 378 | |
| 379 | -v | -verbose | --verbose | --verbos | --verbo | --verb) |
| 380 | verbose=yes ;; |
| 381 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 382 | -version | --version | --versio | --versi | --vers) |
| 383 | echo "configure generated by autoconf version 2.13" |
| 384 | exit 0 ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 385 | |
| 386 | -with-* | --with-*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 387 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 388 | # Reject names that are not valid shell variable names. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 389 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then |
| 390 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } |
| 391 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 392 | ac_package=`echo $ac_package| sed 's/-/_/g'` |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 393 | case "$ac_option" in |
| 394 | *=*) ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 395 | *) ac_optarg=yes ;; |
| 396 | esac |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 397 | eval "with_${ac_package}='$ac_optarg'" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 398 | |
| 399 | -without-* | --without-*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 400 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 401 | # Reject names that are not valid shell variable names. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 402 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then |
| 403 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } |
| 404 | fi |
| 405 | ac_package=`echo $ac_package| sed 's/-/_/g'` |
| 406 | eval "with_${ac_package}=no" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 407 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 408 | --x) |
| 409 | # Obsolete; use --with-x. |
| 410 | with_x=yes ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 411 | |
| 412 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ |
| 413 | | --x-incl | --x-inc | --x-in | --x-i) |
| 414 | ac_prev=x_includes ;; |
| 415 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ |
| 416 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 417 | x_includes="$ac_optarg" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 418 | |
| 419 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ |
| 420 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) |
| 421 | ac_prev=x_libraries ;; |
| 422 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ |
| 423 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 424 | x_libraries="$ac_optarg" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 425 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 426 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 427 | ;; |
| 428 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 429 | *) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 430 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then |
| 431 | echo "configure: warning: $ac_option: invalid host type" 1>&2 |
| 432 | fi |
| 433 | if test "x$nonopt" != xNONE; then |
| 434 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } |
| 435 | fi |
| 436 | nonopt="$ac_option" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 437 | ;; |
| 438 | |
| 439 | esac |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 440 | done |
| 441 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 442 | if test -n "$ac_prev"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 443 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 444 | fi |
| 445 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 446 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 |
| 447 | |
| 448 | # File descriptor usage: |
| 449 | # 0 standard input |
| 450 | # 1 file creation |
| 451 | # 2 errors and warnings |
| 452 | # 3 some systems may open it to /dev/tty |
| 453 | # 4 used on the Kubota Titan |
| 454 | # 6 checking for... messages and results |
| 455 | # 5 compiler messages saved in config.log |
| 456 | if test "$silent" = yes; then |
| 457 | exec 6>/dev/null |
| 458 | else |
| 459 | exec 6>&1 |
| 460 | fi |
| 461 | exec 5>./config.log |
| 462 | |
| 463 | echo "\ |
| 464 | This file contains any messages produced by compilers while |
| 465 | running configure, to aid debugging if configure makes a mistake. |
| 466 | " 1>&5 |
| 467 | |
| 468 | # Strip out --no-create and --no-recursion so they do not pile up. |
| 469 | # Also quote any args containing shell metacharacters. |
| 470 | ac_configure_args= |
| 471 | for ac_arg |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 472 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 473 | case "$ac_arg" in |
| 474 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ |
| 475 | | --no-cr | --no-c) ;; |
| 476 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ |
| 477 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; |
| 478 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) |
| 479 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; |
| 480 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 481 | esac |
| 482 | done |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 483 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 484 | # NLS nuisances. |
| 485 | # Only set these to C if already set. These must not be set unconditionally |
| 486 | # because not all systems understand e.g. LANG=C (notably SCO). |
| 487 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! |
| 488 | # Non-C LC_CTYPE values break the ctype check. |
| 489 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi |
| 490 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi |
| 491 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi |
| 492 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 493 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 494 | # confdefs.h avoids OS command line length limits that DEFS can exceed. |
| 495 | rm -rf conftest* confdefs.h |
| 496 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. |
| 497 | echo > confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 498 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 499 | # A filename unique to this package, relative to the directory that |
| 500 | # configure is in, which we can look for to find out if srcdir is correct. |
| 501 | ac_unique_file=Include/object.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 502 | |
| 503 | # Find the source files, if location was not specified. |
| 504 | if test -z "$srcdir"; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 505 | ac_srcdir_defaulted=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 506 | # Try the directory containing this script, then its parent. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 507 | ac_prog=$0 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 508 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 509 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. |
| 510 | srcdir=$ac_confdir |
| 511 | if test ! -r $srcdir/$ac_unique_file; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 512 | srcdir=.. |
| 513 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 514 | else |
| 515 | ac_srcdir_defaulted=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 516 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 517 | if test ! -r $srcdir/$ac_unique_file; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 518 | if test "$ac_srcdir_defaulted" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 519 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 520 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 521 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 522 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 523 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 524 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 525 | |
| 526 | # Prefer explicitly selected file to automatically selected ones. |
| 527 | if test -z "$CONFIG_SITE"; then |
| 528 | if test "x$prefix" != xNONE; then |
| 529 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" |
| 530 | else |
| 531 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" |
| 532 | fi |
| 533 | fi |
| 534 | for ac_site_file in $CONFIG_SITE; do |
| 535 | if test -r "$ac_site_file"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 536 | echo "loading site script $ac_site_file" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 537 | . "$ac_site_file" |
| 538 | fi |
| 539 | done |
| 540 | |
| 541 | if test -r "$cache_file"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 542 | echo "loading cache $cache_file" |
| 543 | . $cache_file |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 544 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 545 | echo "creating cache $cache_file" |
| 546 | > $cache_file |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 547 | fi |
| 548 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 549 | ac_ext=c |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 550 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 551 | ac_cpp='$CPP $CPPFLAGS' |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 552 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 553 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 554 | cross_compiling=$ac_cv_prog_cc_cross |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 555 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 556 | ac_exeext= |
| 557 | ac_objext=o |
| 558 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then |
| 559 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. |
| 560 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then |
| 561 | ac_n= ac_c=' |
| 562 | ' ac_t=' ' |
| 563 | else |
| 564 | ac_n=-n ac_c= ac_t= |
| 565 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 566 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 567 | ac_n= ac_c='\c' ac_t= |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 568 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 569 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 570 | |
| 571 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 572 | |
Guido van Rossum | 1fd74a7 | 1997-07-19 19:36:02 +0000 | [diff] [blame] | 573 | # Set VERSION so we only need to edit in one place (i.e., here) |
| 574 | |
Andrew M. Kuchling | f2f219d | 2002-02-11 16:31:10 +0000 | [diff] [blame] | 575 | VERSION=2.3 |
Guido van Rossum | 1fd74a7 | 1997-07-19 19:36:02 +0000 | [diff] [blame] | 576 | |
Neil Schemenauer | 4edbc2a | 2001-03-22 00:34:03 +0000 | [diff] [blame] | 577 | # Arguments passed to configure. |
| 578 | |
| 579 | CONFIG_ARGS="$ac_configure_args" |
| 580 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 581 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 582 | # Check whether --enable-framework or --disable-framework was given. |
| 583 | if test "${enable_framework+set}" = set; then |
| 584 | enableval="$enable_framework" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 585 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 586 | case $enableval in |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 587 | yes) |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 588 | enableval=/Library/Frameworks |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 589 | esac |
| 590 | case $enableval in |
| 591 | no) |
| 592 | PYTHONFRAMEWORK= |
| 593 | PYTHONFRAMEWORKDIR=no-framework |
| 594 | PYTHONFRAMEWORKPREFIX= |
| 595 | PYTHONFRAMEWORKINSTALLDIR= |
| 596 | enable_framework= |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 597 | ;; |
| 598 | *) |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 599 | PYTHONFRAMEWORK=Python |
| 600 | PYTHONFRAMEWORKDIR=Python.framework |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 601 | PYTHONFRAMEWORKPREFIX=$enableval |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 602 | PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR |
| 603 | prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 604 | esac |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 605 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 606 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 607 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 608 | PYTHONFRAMEWORK= |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 609 | PYTHONFRAMEWORKDIR=no-framework |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 610 | PYTHONFRAMEWORKPREFIX= |
| 611 | PYTHONFRAMEWORKINSTALLDIR= |
| 612 | enable_framework= |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 613 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 614 | fi |
| 615 | |
| 616 | |
| 617 | |
| 618 | |
| 619 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 620 | |
| 621 | ##AC_ARG_WITH(dyld, |
| 622 | ##[ --with-dyld Use (OpenStep|Rhapsody) dynamic linker],,) |
| 623 | ## |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 624 | # Set name for machine-dependent library files |
| 625 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 626 | echo $ac_n "checking MACHDEP""... $ac_c" 1>&6 |
| 627 | echo "configure:628: checking MACHDEP" >&5 |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 628 | if test -z "$MACHDEP" |
| 629 | then |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 630 | ac_sys_system=`uname -s` |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 631 | if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 632 | ac_sys_release=`uname -v` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 633 | else |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 634 | ac_sys_release=`uname -r` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 635 | fi |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 636 | ac_md_system=`echo $ac_sys_system | |
| 637 | tr -d '/ ' | tr '[A-Z]' '[a-z]'` |
| 638 | ac_md_release=`echo $ac_sys_release | |
Guido van Rossum | 67b2659 | 2001-10-20 14:21:45 +0000 | [diff] [blame] | 639 | tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'` |
Guido van Rossum | b97ef17 | 1997-09-28 05:44:03 +0000 | [diff] [blame] | 640 | MACHDEP="$ac_md_system$ac_md_release" |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 641 | |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 642 | case $MACHDEP in |
Andrew M. Kuchling | 5a3e4cb | 2001-07-20 19:29:04 +0000 | [diff] [blame] | 643 | cygwin*) MACHDEP="cygwin";; |
Jack Jansen | 8a97f4a | 2001-12-05 23:27:32 +0000 | [diff] [blame] | 644 | darwin*) MACHDEP="darwin";; |
Guido van Rossum | b97ef17 | 1997-09-28 05:44:03 +0000 | [diff] [blame] | 645 | '') MACHDEP="unknown";; |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 646 | esac |
| 647 | fi |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 648 | |
| 649 | # |
| 650 | # SGI compilers allow the specification of the both the ABI and the |
| 651 | # ISA on the command line. Depending on the values of these switches, |
| 652 | # different and often incompatable code will be generated. |
| 653 | # |
| 654 | # The SGI_ABI variable can be used to modify the CC and LDFLAGS and |
| 655 | # thus supply support for various ABI/ISA combinations. The MACHDEP |
| 656 | # variable is also adjusted. |
| 657 | # |
| 658 | |
| 659 | if test ! -z "$SGI_ABI" |
| 660 | then |
| 661 | CC="cc $SGI_ABI" |
| 662 | LDFLAGS="$SGI_ABI $LDFLAGS" |
| 663 | MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'` |
| 664 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 665 | echo "$ac_t""$MACHDEP" 1>&6 |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 666 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 667 | # checks for alternative programs |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 668 | echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6 |
| 669 | echo "configure:670: checking for --without-gcc" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 670 | # Check whether --with-gcc or --without-gcc was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 671 | if test "${with_gcc+set}" = set; then |
| 672 | withval="$with_gcc" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 673 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 674 | case $withval in |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 675 | no) CC=cc |
| 676 | without_gcc=yes;; |
| 677 | yes) CC=gcc |
| 678 | without_gcc=no;; |
| 679 | *) CC=$withval |
| 680 | without_gcc=$withval;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 681 | esac |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 682 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 683 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 684 | case $ac_sys_system in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 685 | AIX*) CC=cc_r |
| 686 | without_gcc=;; |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 687 | BeOS*) |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 688 | case $BE_HOST_CPU in |
| 689 | ppc) |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 690 | CC=mwcc |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 691 | without_gcc=yes |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 692 | OPT="-O -D'DL_EXPORT(RTYPE)=__declspec(dllexport) RTYPE' -D'DL_IMPORT(RTYPE)=__declspec(dllexport) RTYPE' -export pragma" |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 693 | CCSHARED="-UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'" |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 694 | LDFLAGS="$LDFLAGS -nodup" |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 695 | ;; |
| 696 | x86) |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 697 | CC=gcc |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 698 | without_gcc=no |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 699 | OPT=-O |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 700 | ;; |
| 701 | *) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 702 | { echo "configure: error: Unknown BeOS platform \"$BE_HOST_CPU\"" 1>&2; exit 1; } |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 703 | ;; |
| 704 | esac |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 705 | AR="\$(srcdir)/Modules/ar_beos" |
| 706 | RANLIB=: |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 707 | ;; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 708 | Monterey*) |
| 709 | RANLIB=: |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 710 | without_gcc=;; |
| 711 | *) without_gcc=no;; |
Guido van Rossum | e77438c | 1995-09-13 18:59:59 +0000 | [diff] [blame] | 712 | esac |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 713 | fi |
| 714 | |
| 715 | echo "$ac_t""$without_gcc" 1>&6 |
| 716 | |
| 717 | |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 718 | |
Fred Drake | a1a84e7 | 2001-03-06 05:52:16 +0000 | [diff] [blame] | 719 | MAINOBJ=python.o |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 720 | echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6 |
| 721 | echo "configure:722: checking for --with-cxx=<compiler>" >&5 |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 722 | # Check whether --with-cxx or --without-cxx was given. |
| 723 | if test "${with_cxx+set}" = set; then |
| 724 | withval="$with_cxx" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 725 | |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 726 | check_cxx=no |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 727 | case $withval in |
| 728 | no) CXX= |
| 729 | with_cxx=no;; |
| 730 | *) CXX=$withval |
Fred Drake | a1a84e7 | 2001-03-06 05:52:16 +0000 | [diff] [blame] | 731 | MAINOBJ=ccpython.o |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 732 | with_cxx=$withval;; |
| 733 | esac |
| 734 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 735 | |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 736 | with_cxx=no |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 737 | check_cxx=yes |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 738 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 739 | fi |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 740 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 741 | echo "$ac_t""$with_cxx" 1>&6 |
| 742 | |
| 743 | if test "$with_cxx" = "yes" |
| 744 | then |
| 745 | { echo "configure: error: must supply a compiler when using --with-cxx" 1>&2; exit 1; } |
| 746 | fi |
| 747 | |
| 748 | |
| 749 | |
| 750 | |
| 751 | if test "$check_cxx" = "yes" |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 752 | then |
| 753 | for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl |
| 754 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 755 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 756 | set dummy $ac_prog; ac_word=$2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 757 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| 758 | echo "configure:759: checking for $ac_word" >&5 |
| 759 | if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then |
| 760 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 761 | else |
| 762 | if test -n "$CXX"; then |
| 763 | ac_cv_prog_CXX="$CXX" # Let the user override the test. |
| 764 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 765 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 766 | ac_dummy="$PATH" |
| 767 | for ac_dir in $ac_dummy; do |
| 768 | test -z "$ac_dir" && ac_dir=. |
| 769 | if test -f $ac_dir/$ac_word; then |
| 770 | ac_cv_prog_CXX="$ac_prog" |
| 771 | break |
| 772 | fi |
| 773 | done |
| 774 | IFS="$ac_save_ifs" |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 775 | fi |
| 776 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 777 | CXX="$ac_cv_prog_CXX" |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 778 | if test -n "$CXX"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 779 | echo "$ac_t""$CXX" 1>&6 |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 780 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 781 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 782 | fi |
| 783 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 784 | test -n "$CXX" && break |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 785 | done |
| 786 | test -n "$CXX" || CXX="notfound" |
| 787 | |
| 788 | if test "$CXX" = "notfound" |
| 789 | then |
| 790 | CXX= |
| 791 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 792 | echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
| 793 | echo "configure:794: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 |
| 794 | |
| 795 | ac_ext=C |
| 796 | # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 797 | ac_cpp='$CXXCPP $CPPFLAGS' |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 798 | ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 799 | ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 800 | cross_compiling=$ac_cv_prog_cxx_cross |
| 801 | |
| 802 | cat > conftest.$ac_ext << EOF |
| 803 | |
| 804 | #line 805 "configure" |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 805 | #include "confdefs.h" |
| 806 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 807 | int main(){return(0);} |
| 808 | EOF |
| 809 | if { (eval echo configure:810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| 810 | ac_cv_prog_cxx_works=yes |
| 811 | # If we can't run a trivial program, we are probably using a cross compiler. |
| 812 | if (./conftest; exit) 2>/dev/null; then |
| 813 | ac_cv_prog_cxx_cross=no |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 814 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 815 | ac_cv_prog_cxx_cross=yes |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 816 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 817 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 818 | echo "configure: failed program was:" >&5 |
| 819 | cat conftest.$ac_ext >&5 |
| 820 | ac_cv_prog_cxx_works=no |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 821 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 822 | rm -fr conftest* |
| 823 | ac_ext=c |
| 824 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 825 | ac_cpp='$CPP $CPPFLAGS' |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 826 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 827 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 828 | cross_compiling=$ac_cv_prog_cc_cross |
| 829 | |
| 830 | echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6 |
| 831 | if test $ac_cv_prog_cxx_works = no; then |
| 832 | { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } |
| 833 | fi |
| 834 | echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 |
| 835 | echo "configure:836: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 |
| 836 | echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 |
| 837 | cross_compiling=$ac_cv_prog_cxx_cross |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 838 | |
| 839 | fi |
| 840 | fi |
| 841 | |
Guido van Rossum | 8b131c5 | 1995-03-09 14:10:13 +0000 | [diff] [blame] | 842 | # If the user switches compilers, we can't believe the cache |
| 843 | if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC" |
| 844 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 845 | { echo "configure: error: cached CC is different -- throw away $cache_file |
| 846 | (it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; } |
Guido van Rossum | 8b131c5 | 1995-03-09 14:10:13 +0000 | [diff] [blame] | 847 | fi |
| 848 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 849 | # Extract the first word of "gcc", so it can be a program name with args. |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 850 | set dummy gcc; ac_word=$2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 851 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| 852 | echo "configure:853: checking for $ac_word" >&5 |
| 853 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
| 854 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 855 | else |
| 856 | if test -n "$CC"; then |
| 857 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 858 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 859 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 860 | ac_dummy="$PATH" |
| 861 | for ac_dir in $ac_dummy; do |
| 862 | test -z "$ac_dir" && ac_dir=. |
| 863 | if test -f $ac_dir/$ac_word; then |
| 864 | ac_cv_prog_CC="gcc" |
| 865 | break |
| 866 | fi |
| 867 | done |
| 868 | IFS="$ac_save_ifs" |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 869 | fi |
| 870 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 871 | CC="$ac_cv_prog_CC" |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 872 | if test -n "$CC"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 873 | echo "$ac_t""$CC" 1>&6 |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 874 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 875 | echo "$ac_t""no" 1>&6 |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 876 | fi |
| 877 | |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 878 | if test -z "$CC"; then |
| 879 | # Extract the first word of "cc", so it can be a program name with args. |
| 880 | set dummy cc; ac_word=$2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 881 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| 882 | echo "configure:883: checking for $ac_word" >&5 |
| 883 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
| 884 | echo $ac_n "(cached) $ac_c" 1>&6 |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 885 | else |
| 886 | if test -n "$CC"; then |
| 887 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 888 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 889 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 890 | ac_prog_rejected=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 891 | ac_dummy="$PATH" |
| 892 | for ac_dir in $ac_dummy; do |
| 893 | test -z "$ac_dir" && ac_dir=. |
| 894 | if test -f $ac_dir/$ac_word; then |
| 895 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then |
| 896 | ac_prog_rejected=yes |
| 897 | continue |
| 898 | fi |
| 899 | ac_cv_prog_CC="cc" |
| 900 | break |
| 901 | fi |
| 902 | done |
| 903 | IFS="$ac_save_ifs" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 904 | if test $ac_prog_rejected = yes; then |
| 905 | # We found a bogon in the path, so make sure we never use it. |
| 906 | set dummy $ac_cv_prog_CC |
| 907 | shift |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 908 | if test $# -gt 0; then |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 909 | # We chose a different compiler from the bogus one. |
| 910 | # However, it has the same basename, so the bogon will be chosen |
| 911 | # first if we set CC to just the basename; use the full file name. |
| 912 | shift |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 913 | set dummy "$ac_dir/$ac_word" "$@" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 914 | shift |
| 915 | ac_cv_prog_CC="$@" |
| 916 | fi |
| 917 | fi |
| 918 | fi |
| 919 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 920 | CC="$ac_cv_prog_CC" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 921 | if test -n "$CC"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 922 | echo "$ac_t""$CC" 1>&6 |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 923 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 924 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 925 | fi |
| 926 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 927 | if test -z "$CC"; then |
| 928 | case "`uname -s`" in |
| 929 | *win32* | *WIN32*) |
| 930 | # Extract the first word of "cl", so it can be a program name with args. |
| 931 | set dummy cl; ac_word=$2 |
| 932 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| 933 | echo "configure:934: checking for $ac_word" >&5 |
| 934 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
| 935 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 936 | else |
| 937 | if test -n "$CC"; then |
| 938 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 939 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 940 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 941 | ac_dummy="$PATH" |
| 942 | for ac_dir in $ac_dummy; do |
| 943 | test -z "$ac_dir" && ac_dir=. |
| 944 | if test -f $ac_dir/$ac_word; then |
| 945 | ac_cv_prog_CC="cl" |
| 946 | break |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 947 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 948 | done |
| 949 | IFS="$ac_save_ifs" |
| 950 | fi |
| 951 | fi |
| 952 | CC="$ac_cv_prog_CC" |
| 953 | if test -n "$CC"; then |
| 954 | echo "$ac_t""$CC" 1>&6 |
| 955 | else |
| 956 | echo "$ac_t""no" 1>&6 |
| 957 | fi |
| 958 | ;; |
| 959 | esac |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 960 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 961 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 962 | fi |
| 963 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 964 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
| 965 | echo "configure:966: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 966 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 967 | ac_ext=c |
| 968 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 969 | ac_cpp='$CPP $CPPFLAGS' |
| 970 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 971 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 972 | cross_compiling=$ac_cv_prog_cc_cross |
| 973 | |
| 974 | cat > conftest.$ac_ext << EOF |
| 975 | |
| 976 | #line 977 "configure" |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 977 | #include "confdefs.h" |
| 978 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 979 | main(){return(0);} |
| 980 | EOF |
| 981 | if { (eval echo configure:982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| 982 | ac_cv_prog_cc_works=yes |
| 983 | # If we can't run a trivial program, we are probably using a cross compiler. |
| 984 | if (./conftest; exit) 2>/dev/null; then |
| 985 | ac_cv_prog_cc_cross=no |
| 986 | else |
| 987 | ac_cv_prog_cc_cross=yes |
| 988 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 989 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 990 | echo "configure: failed program was:" >&5 |
| 991 | cat conftest.$ac_ext >&5 |
| 992 | ac_cv_prog_cc_works=no |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 993 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 994 | rm -fr conftest* |
| 995 | ac_ext=c |
| 996 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 997 | ac_cpp='$CPP $CPPFLAGS' |
| 998 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 999 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 1000 | cross_compiling=$ac_cv_prog_cc_cross |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 1001 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1002 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 |
| 1003 | if test $ac_cv_prog_cc_works = no; then |
| 1004 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 1005 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1006 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 |
| 1007 | echo "configure:1008: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
| 1008 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
| 1009 | cross_compiling=$ac_cv_prog_cc_cross |
| 1010 | |
| 1011 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 |
| 1012 | echo "configure:1013: checking whether we are using GNU C" >&5 |
| 1013 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
| 1014 | echo $ac_n "(cached) $ac_c" 1>&6 |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 1015 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1016 | cat > conftest.c <<EOF |
| 1017 | #ifdef __GNUC__ |
| 1018 | yes; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1019 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1020 | EOF |
| 1021 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
| 1022 | ac_cv_prog_gcc=yes |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1023 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1024 | ac_cv_prog_gcc=no |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1025 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1026 | fi |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1027 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1028 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 |
| 1029 | |
| 1030 | if test $ac_cv_prog_gcc = yes; then |
| 1031 | GCC=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1032 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1033 | GCC= |
| 1034 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 1035 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1036 | ac_test_CFLAGS="${CFLAGS+set}" |
| 1037 | ac_save_CFLAGS="$CFLAGS" |
| 1038 | CFLAGS= |
| 1039 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 |
| 1040 | echo "configure:1041: checking whether ${CC-cc} accepts -g" >&5 |
| 1041 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
| 1042 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1043 | else |
| 1044 | echo 'void f(){}' > conftest.c |
| 1045 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1046 | ac_cv_prog_cc_g=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1047 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1048 | ac_cv_prog_cc_g=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1049 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1050 | rm -f conftest* |
| 1051 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1052 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1053 | |
| 1054 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1055 | if test "$ac_test_CFLAGS" = set; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1056 | CFLAGS="$ac_save_CFLAGS" |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1057 | elif test $ac_cv_prog_cc_g = yes; then |
| 1058 | if test "$GCC" = yes; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1059 | CFLAGS="-g -O2" |
| 1060 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1061 | CFLAGS="-g" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1062 | fi |
| 1063 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1064 | if test "$GCC" = yes; then |
| 1065 | CFLAGS="-O2" |
| 1066 | else |
| 1067 | CFLAGS= |
| 1068 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1069 | fi |
| 1070 | |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1071 | |
| 1072 | # checks for UNIX variants that set C preprocessor variables |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1073 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
| 1074 | echo "configure:1075: checking how to run the C preprocessor" >&5 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1075 | # On Suns, sometimes $CPP names a directory. |
| 1076 | if test -n "$CPP" && test -d "$CPP"; then |
| 1077 | CPP= |
| 1078 | fi |
| 1079 | if test -z "$CPP"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1080 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then |
| 1081 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1082 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1083 | # This must be in double quotes, not single quotes, because CPP may get |
| 1084 | # substituted into the Makefile and "${CC-cc}" will confuse make. |
| 1085 | CPP="${CC-cc} -E" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1086 | # On the NeXT, cc -E runs the code through the compiler's parser, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1087 | # not just through cpp. |
| 1088 | cat > conftest.$ac_ext <<EOF |
| 1089 | #line 1090 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1090 | #include "confdefs.h" |
| 1091 | #include <assert.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1092 | Syntax Error |
| 1093 | EOF |
| 1094 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
| 1095 | { (eval echo configure:1096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
| 1096 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1097 | if test -z "$ac_err"; then |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1098 | : |
| 1099 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1100 | echo "$ac_err" >&5 |
| 1101 | echo "configure: failed program was:" >&5 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1102 | cat conftest.$ac_ext >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1103 | rm -rf conftest* |
| 1104 | CPP="${CC-cc} -E -traditional-cpp" |
| 1105 | cat > conftest.$ac_ext <<EOF |
| 1106 | #line 1107 "configure" |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 1107 | #include "confdefs.h" |
| 1108 | #include <assert.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1109 | Syntax Error |
| 1110 | EOF |
| 1111 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
| 1112 | { (eval echo configure:1113: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
| 1113 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1114 | if test -z "$ac_err"; then |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 1115 | : |
| 1116 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1117 | echo "$ac_err" >&5 |
| 1118 | echo "configure: failed program was:" >&5 |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 1119 | cat conftest.$ac_ext >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1120 | rm -rf conftest* |
| 1121 | CPP="${CC-cc} -nologo -E" |
| 1122 | cat > conftest.$ac_ext <<EOF |
| 1123 | #line 1124 "configure" |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 1124 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1125 | #include <assert.h> |
| 1126 | Syntax Error |
| 1127 | EOF |
| 1128 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
| 1129 | { (eval echo configure:1130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
| 1130 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1131 | if test -z "$ac_err"; then |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 1132 | : |
| 1133 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1134 | echo "$ac_err" >&5 |
| 1135 | echo "configure: failed program was:" >&5 |
| 1136 | cat conftest.$ac_ext >&5 |
| 1137 | rm -rf conftest* |
| 1138 | CPP=/lib/cpp |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 1139 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1140 | rm -f conftest* |
| 1141 | fi |
| 1142 | rm -f conftest* |
| 1143 | fi |
| 1144 | rm -f conftest* |
| 1145 | ac_cv_prog_CPP="$CPP" |
| 1146 | fi |
| 1147 | CPP="$ac_cv_prog_CPP" |
| 1148 | else |
| 1149 | ac_cv_prog_CPP="$CPP" |
| 1150 | fi |
| 1151 | echo "$ac_t""$CPP" 1>&6 |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 1152 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1153 | echo $ac_n "checking for AIX""... $ac_c" 1>&6 |
| 1154 | echo "configure:1155: checking for AIX" >&5 |
| 1155 | cat > conftest.$ac_ext <<EOF |
| 1156 | #line 1157 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1157 | #include "confdefs.h" |
| 1158 | #ifdef _AIX |
| 1159 | yes |
| 1160 | #endif |
| 1161 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1162 | EOF |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1163 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1164 | egrep "yes" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1165 | rm -rf conftest* |
| 1166 | echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1167 | #define _ALL_SOURCE 1 |
| 1168 | EOF |
| 1169 | |
| 1170 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1171 | rm -rf conftest* |
| 1172 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1173 | fi |
| 1174 | rm -f conftest* |
| 1175 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1176 | |
| 1177 | ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'` |
| 1178 | echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 |
| 1179 | echo "configure:1180: checking for minix/config.h" >&5 |
| 1180 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 1181 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1182 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1183 | cat > conftest.$ac_ext <<EOF |
| 1184 | #line 1185 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1185 | #include "confdefs.h" |
| 1186 | #include <minix/config.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1187 | EOF |
| 1188 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
| 1189 | { (eval echo configure:1190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
| 1190 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1191 | if test -z "$ac_err"; then |
| 1192 | rm -rf conftest* |
| 1193 | eval "ac_cv_header_$ac_safe=yes" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1194 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1195 | echo "$ac_err" >&5 |
| 1196 | echo "configure: failed program was:" >&5 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1197 | cat conftest.$ac_ext >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1198 | rm -rf conftest* |
| 1199 | eval "ac_cv_header_$ac_safe=no" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1200 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1201 | rm -f conftest* |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1202 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1203 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 1204 | echo "$ac_t""yes" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1205 | MINIX=yes |
| 1206 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1207 | echo "$ac_t""no" 1>&6 |
| 1208 | MINIX= |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1209 | fi |
| 1210 | |
| 1211 | if test "$MINIX" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1212 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1213 | #define _POSIX_SOURCE 1 |
| 1214 | EOF |
| 1215 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1216 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1217 | #define _POSIX_1_SOURCE 2 |
| 1218 | EOF |
| 1219 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1220 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1221 | #define _MINIX 1 |
| 1222 | EOF |
| 1223 | |
| 1224 | fi |
| 1225 | |
| 1226 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1227 | echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 |
| 1228 | echo "configure:1229: checking for Cygwin environment" >&5 |
| 1229 | if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then |
| 1230 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1231 | else |
| 1232 | cat > conftest.$ac_ext <<EOF |
| 1233 | #line 1234 "configure" |
| 1234 | #include "confdefs.h" |
| 1235 | |
| 1236 | int main() { |
| 1237 | |
| 1238 | #ifndef __CYGWIN__ |
| 1239 | #define __CYGWIN__ __CYGWIN32__ |
| 1240 | #endif |
| 1241 | return __CYGWIN__; |
| 1242 | ; return 0; } |
| 1243 | EOF |
| 1244 | if { (eval echo configure:1245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| 1245 | rm -rf conftest* |
| 1246 | ac_cv_cygwin=yes |
| 1247 | else |
| 1248 | echo "configure: failed program was:" >&5 |
| 1249 | cat conftest.$ac_ext >&5 |
| 1250 | rm -rf conftest* |
| 1251 | ac_cv_cygwin=no |
| 1252 | fi |
| 1253 | rm -f conftest* |
| 1254 | rm -f conftest* |
| 1255 | fi |
| 1256 | |
| 1257 | echo "$ac_t""$ac_cv_cygwin" 1>&6 |
| 1258 | CYGWIN= |
| 1259 | test "$ac_cv_cygwin" = yes && CYGWIN=yes |
| 1260 | echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 |
| 1261 | echo "configure:1262: checking for mingw32 environment" >&5 |
| 1262 | if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then |
| 1263 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1264 | else |
| 1265 | cat > conftest.$ac_ext <<EOF |
| 1266 | #line 1267 "configure" |
| 1267 | #include "confdefs.h" |
| 1268 | |
| 1269 | int main() { |
| 1270 | return __MINGW32__; |
| 1271 | ; return 0; } |
| 1272 | EOF |
| 1273 | if { (eval echo configure:1274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| 1274 | rm -rf conftest* |
| 1275 | ac_cv_mingw32=yes |
| 1276 | else |
| 1277 | echo "configure: failed program was:" >&5 |
| 1278 | cat conftest.$ac_ext >&5 |
| 1279 | rm -rf conftest* |
| 1280 | ac_cv_mingw32=no |
| 1281 | fi |
| 1282 | rm -f conftest* |
| 1283 | rm -f conftest* |
| 1284 | fi |
| 1285 | |
| 1286 | echo "$ac_t""$ac_cv_mingw32" 1>&6 |
| 1287 | MINGW32= |
| 1288 | test "$ac_cv_mingw32" = yes && MINGW32=yes |
| 1289 | |
| 1290 | |
| 1291 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 |
| 1292 | echo "configure:1293: checking for executable suffix" >&5 |
| 1293 | if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then |
| 1294 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1295 | else |
| 1296 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then |
| 1297 | ac_cv_exeext=.exe |
| 1298 | else |
| 1299 | rm -f conftest* |
| 1300 | echo 'int main () { return 0; }' > conftest.$ac_ext |
| 1301 | ac_cv_exeext= |
| 1302 | if { (eval echo configure:1303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
| 1303 | for file in conftest.*; do |
| 1304 | case $file in |
| 1305 | *.c | *.o | *.obj) ;; |
| 1306 | *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; |
| 1307 | esac |
| 1308 | done |
| 1309 | else |
| 1310 | { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } |
| 1311 | fi |
| 1312 | rm -f conftest* |
| 1313 | test x"${ac_cv_exeext}" = x && ac_cv_exeext=no |
| 1314 | fi |
| 1315 | fi |
| 1316 | |
| 1317 | EXEEXT="" |
| 1318 | test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} |
| 1319 | echo "$ac_t""${ac_cv_exeext}" 1>&6 |
| 1320 | ac_exeext=$EXEEXT |
| 1321 | |
| 1322 | echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6 |
| 1323 | echo "configure:1324: checking for --with-suffix" >&5 |
Neil Schemenauer | dfb38e4 | 2001-01-27 06:57:08 +0000 | [diff] [blame] | 1324 | # Check whether --with-suffix or --without-suffix was given. |
| 1325 | if test "${with_suffix+set}" = set; then |
| 1326 | withval="$with_suffix" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1327 | |
Neil Schemenauer | dfb38e4 | 2001-01-27 06:57:08 +0000 | [diff] [blame] | 1328 | case $withval in |
| 1329 | no) EXEEXT=;; |
| 1330 | yes) EXEEXT=.exe;; |
| 1331 | *) EXEEXT=$withval;; |
| 1332 | esac |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1333 | fi |
| 1334 | |
| 1335 | echo "$ac_t""$EXEEXT" 1>&6 |
Jack Jansen | 1999ef4 | 2001-12-06 21:47:20 +0000 | [diff] [blame] | 1336 | |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1337 | # Test whether we're running on a non-case-sensitive system, in which |
| 1338 | # case we give a warning if no ext is given |
Jack Jansen | 1999ef4 | 2001-12-06 21:47:20 +0000 | [diff] [blame] | 1339 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1340 | echo $ac_n "checking for case-insensitive build directory""... $ac_c" 1>&6 |
| 1341 | echo "configure:1342: checking for case-insensitive build directory" >&5 |
Jack Jansen | 1999ef4 | 2001-12-06 21:47:20 +0000 | [diff] [blame] | 1342 | if test -d "python" |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1343 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1344 | echo "$ac_t""yes" 1>&6 |
Jack Jansen | 1999ef4 | 2001-12-06 21:47:20 +0000 | [diff] [blame] | 1345 | BUILDEXEEXT=.exe |
| 1346 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1347 | echo "$ac_t""no" 1>&6 |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 1348 | BUILDEXEEXT=$EXEEXT |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1349 | fi |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1350 | |
Guido van Rossum | dd997f7 | 1998-10-07 19:58:26 +0000 | [diff] [blame] | 1351 | case $MACHDEP in |
| 1352 | bsdos*) |
| 1353 | case $CC in |
| 1354 | gcc) CC="$CC -D_HAVE_BSDI";; |
| 1355 | esac;; |
| 1356 | esac |
| 1357 | |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1358 | case $ac_sys_system in |
| 1359 | hp*|HP*) |
| 1360 | case $CC in |
Guido van Rossum | cd5ff9f | 2000-09-22 16:15:54 +0000 | [diff] [blame] | 1361 | cc|*/cc) CC="$CC -Ae";; |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1362 | esac;; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1363 | Monterey*) |
| 1364 | case $CC in |
| 1365 | cc) CC="$CC -Wl,-Bexport";; |
| 1366 | esac;; |
Martin v. Löwis | a30c100 | 2001-03-06 12:10:20 +0000 | [diff] [blame] | 1367 | SunOS*) |
| 1368 | # Some functions have a prototype only with that define, e.g. confstr |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1369 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | a30c100 | 2001-03-06 12:10:20 +0000 | [diff] [blame] | 1370 | #define __EXTENSIONS__ 1 |
| 1371 | EOF |
| 1372 | |
| 1373 | ;; |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1374 | esac |
| 1375 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1376 | |
| 1377 | |
| 1378 | echo $ac_n "checking LIBRARY""... $ac_c" 1>&6 |
| 1379 | echo "configure:1380: checking LIBRARY" >&5 |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1380 | if test -z "$LIBRARY" |
| 1381 | then |
| 1382 | LIBRARY='libpython$(VERSION).a' |
| 1383 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1384 | echo "$ac_t""$LIBRARY" 1>&6 |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1385 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1386 | # LDLIBRARY is the name of the library to link against (as opposed to the |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1387 | # name of the library into which to insert object files). BLDLIBRARY is also |
| 1388 | # the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY |
| 1389 | # is blank as the main program is not linked directly against LDLIBRARY. |
| 1390 | # LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On |
| 1391 | # systems without shared libraries, LDLIBRARY is the same as LIBRARY |
| 1392 | # (defined in the Makefiles). On Cygwin LDLIBRARY is the import library, |
| 1393 | # DLLLIBRARY is the shared (i.e., DLL) library. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1394 | # |
| 1395 | |
| 1396 | |
| 1397 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1398 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1399 | LDLIBRARY="$LIBRARY" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1400 | BLDLIBRARY='$(LDLIBRARY)' |
Guido van Rossum | ca563f2 | 2001-01-23 01:52:44 +0000 | [diff] [blame] | 1401 | DLLLIBRARY='' |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1402 | LDLIBRARYDIR='' |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1403 | |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1404 | # LINKCC is the command that links the python executable -- default is $(CC). |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1405 | # If CXX is set, and if it is needed to link a main function that was |
| 1406 | # compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable: |
| 1407 | # python might then depend on the C++ runtime |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1408 | # This is altered for AIX in order to build the export list before |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 1409 | # linking. |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1410 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1411 | echo $ac_n "checking LINKCC""... $ac_c" 1>&6 |
| 1412 | echo "configure:1413: checking LINKCC" >&5 |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1413 | if test -z "$LINKCC" |
| 1414 | then |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1415 | if test -z "$CXX"; then |
| 1416 | LINKCC="\$(PURIFY) \$(CC)" |
| 1417 | else |
| 1418 | echo 'int main(){return 0;}' > conftest.$ac_ext |
| 1419 | $CXX -c conftest.$ac_ext 2>&5 |
| 1420 | if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \ |
| 1421 | && test -s conftest$ac_exeext && ./conftest$ac_exeext |
| 1422 | then |
| 1423 | LINKCC="\$(PURIFY) \$(CC)" |
| 1424 | else |
| 1425 | LINKCC="\$(PURIFY) \$(CXX)" |
| 1426 | fi |
| 1427 | rm -fr conftest* |
| 1428 | fi |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1429 | case $ac_sys_system in |
| 1430 | AIX*) |
Jack Jansen | 524a098 | 2002-03-12 15:25:52 +0000 | [diff] [blame] | 1431 | LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $LINKCC";; |
Guido van Rossum | 3c4bb80 | 1997-12-18 23:55:32 +0000 | [diff] [blame] | 1432 | dgux*) |
Martin v. Löwis | 4e732dc | 2002-03-19 15:15:32 +0000 | [diff] [blame] | 1433 | LINKCC="LD_RUN_PATH=$libdir $LINKCC";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1434 | Monterey64*) |
Martin v. Löwis | 4e732dc | 2002-03-19 15:15:32 +0000 | [diff] [blame] | 1435 | LINKCC="$LINKCC -L/usr/lib/ia64l64";; |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1436 | esac |
| 1437 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1438 | echo "$ac_t""$LINKCC" 1>&6 |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1439 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1440 | echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6 |
| 1441 | echo "configure:1442: checking LDLIBRARY" >&5 |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1442 | |
| 1443 | # DG/UX requires some fancy ld contortions to produce a .so from an .a |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 1444 | case $MACHDEP in |
| 1445 | dguxR4) |
| 1446 | LDLIBRARY='libpython$(VERSION).so' |
| 1447 | OPT="$OPT -pic" |
| 1448 | ;; |
| 1449 | beos*) |
| 1450 | LDLIBRARY='libpython$(VERSION).so' |
| 1451 | ;; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1452 | cygwin*) |
| 1453 | LDLIBRARY='libpython$(VERSION).dll.a' |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1454 | DLLLIBRARY='libpython$(VERSION).dll' |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1455 | ;; |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 1456 | esac |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1457 | |
Guido van Rossum | b855216 | 2001-09-05 14:58:11 +0000 | [diff] [blame] | 1458 | # MacOSX framework builds need more magic. LDLIBRARY is the dynamic |
| 1459 | # library that we build, but we do not want to link against it (we |
| 1460 | # will find it with a -framework option). For this reason there is an |
| 1461 | # extra variable BLDLIBRARY against which Python and the extension |
| 1462 | # modules are linked, BLDLIBRARY. This is normally the same as |
| 1463 | # LDLIBRARY, but empty for MacOSX framework builds. |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1464 | if test "$enable_framework" |
| 1465 | then |
| 1466 | LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' |
| 1467 | LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)' |
| 1468 | BLDLIBRARY='' |
| 1469 | else |
| 1470 | BLDLIBRARY='$(LDLIBRARY)' |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1471 | fi |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1472 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1473 | echo "$ac_t""$LDLIBRARY" 1>&6 |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1474 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1475 | # Extract the first word of "ranlib", so it can be a program name with args. |
| 1476 | set dummy ranlib; ac_word=$2 |
| 1477 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| 1478 | echo "configure:1479: checking for $ac_word" >&5 |
| 1479 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
| 1480 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1481 | else |
| 1482 | if test -n "$RANLIB"; then |
| 1483 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. |
| 1484 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1485 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 1486 | ac_dummy="$PATH" |
| 1487 | for ac_dir in $ac_dummy; do |
| 1488 | test -z "$ac_dir" && ac_dir=. |
| 1489 | if test -f $ac_dir/$ac_word; then |
| 1490 | ac_cv_prog_RANLIB="ranlib" |
| 1491 | break |
| 1492 | fi |
| 1493 | done |
| 1494 | IFS="$ac_save_ifs" |
| 1495 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1496 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1497 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1498 | RANLIB="$ac_cv_prog_RANLIB" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1499 | if test -n "$RANLIB"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1500 | echo "$ac_t""$RANLIB" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1501 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1502 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1503 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1504 | |
| 1505 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1506 | for ac_prog in ar aal |
| 1507 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1508 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1509 | set dummy $ac_prog; ac_word=$2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1510 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
| 1511 | echo "configure:1512: checking for $ac_word" >&5 |
| 1512 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
| 1513 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1514 | else |
| 1515 | if test -n "$AR"; then |
| 1516 | ac_cv_prog_AR="$AR" # Let the user override the test. |
| 1517 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1518 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 1519 | ac_dummy="$PATH" |
| 1520 | for ac_dir in $ac_dummy; do |
| 1521 | test -z "$ac_dir" && ac_dir=. |
| 1522 | if test -f $ac_dir/$ac_word; then |
| 1523 | ac_cv_prog_AR="$ac_prog" |
| 1524 | break |
| 1525 | fi |
| 1526 | done |
| 1527 | IFS="$ac_save_ifs" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1528 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1529 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1530 | AR="$ac_cv_prog_AR" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1531 | if test -n "$AR"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1532 | echo "$ac_t""$AR" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1533 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1534 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1535 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1536 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1537 | test -n "$AR" && break |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1538 | done |
| 1539 | test -n "$AR" || AR="ar" |
| 1540 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1541 | |
Neil Schemenauer | a42c827 | 2001-03-31 00:01:55 +0000 | [diff] [blame] | 1542 | case $MACHDEP in |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 1543 | bsdos*|hp*|HP*) |
| 1544 | # install -d does not work on BSDI or HP-UX |
Neil Schemenauer | a42c827 | 2001-03-31 00:01:55 +0000 | [diff] [blame] | 1545 | if test -z "$INSTALL" |
| 1546 | then |
| 1547 | INSTALL="${srcdir}/install-sh -c" |
| 1548 | fi |
| 1549 | esac |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1550 | ac_aux_dir= |
| 1551 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do |
| 1552 | if test -f $ac_dir/install-sh; then |
| 1553 | ac_aux_dir=$ac_dir |
| 1554 | ac_install_sh="$ac_aux_dir/install-sh -c" |
| 1555 | break |
| 1556 | elif test -f $ac_dir/install.sh; then |
| 1557 | ac_aux_dir=$ac_dir |
| 1558 | ac_install_sh="$ac_aux_dir/install.sh -c" |
| 1559 | break |
| 1560 | fi |
| 1561 | done |
| 1562 | if test -z "$ac_aux_dir"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1563 | { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1564 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1565 | ac_config_guess=$ac_aux_dir/config.guess |
| 1566 | ac_config_sub=$ac_aux_dir/config.sub |
| 1567 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1568 | |
| 1569 | # Find a good install program. We prefer a C program (faster), |
| 1570 | # so one script is as good as another. But avoid the broken or |
| 1571 | # incompatible versions: |
| 1572 | # SysV /etc/install, /usr/sbin/install |
| 1573 | # SunOS /usr/etc/install |
| 1574 | # IRIX /sbin/install |
| 1575 | # AIX /bin/install |
| 1576 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag |
| 1577 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args |
| 1578 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" |
| 1579 | # ./install, which can be erroneously created by make from ./install.sh. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1580 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 |
| 1581 | echo "configure:1582: checking for a BSD compatible install" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1582 | if test -z "$INSTALL"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1583 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then |
| 1584 | echo $ac_n "(cached) $ac_c" 1>&6 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1585 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1586 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1587 | for ac_dir in $PATH; do |
| 1588 | # Account for people who put trailing slashes in PATH elements. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1589 | case "$ac_dir/" in |
| 1590 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1591 | *) |
| 1592 | # OSF1 and SCO ODT 3.0 have their own names for install. |
| 1593 | # Don't use installbsd from OSF since it installs stuff as root |
| 1594 | # by default. |
| 1595 | for ac_prog in ginstall scoinst install; do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1596 | if test -f $ac_dir/$ac_prog; then |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1597 | if test $ac_prog = install && |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1598 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1599 | # AIX install. It has an incompatible calling convention. |
| 1600 | : |
| 1601 | else |
| 1602 | ac_cv_path_install="$ac_dir/$ac_prog -c" |
| 1603 | break 2 |
| 1604 | fi |
| 1605 | fi |
| 1606 | done |
| 1607 | ;; |
| 1608 | esac |
| 1609 | done |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1610 | IFS="$ac_save_IFS" |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1611 | |
| 1612 | fi |
| 1613 | if test "${ac_cv_path_install+set}" = set; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1614 | INSTALL="$ac_cv_path_install" |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1615 | else |
| 1616 | # As a last resort, use the slow shell script. We don't cache a |
| 1617 | # path for INSTALL within a source directory, because that will |
| 1618 | # break other packages using the cache if that directory is |
| 1619 | # removed, or if the path is relative. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1620 | INSTALL="$ac_install_sh" |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1621 | fi |
| 1622 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1623 | echo "$ac_t""$INSTALL" 1>&6 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1624 | |
| 1625 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. |
| 1626 | # It thinks the first close brace ends the variable substitution. |
| 1627 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' |
| 1628 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1629 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1630 | |
| 1631 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' |
| 1632 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1633 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 1634 | # Not every filesystem supports hard links |
| 1635 | |
| 1636 | if test -z "$LN" ; then |
| 1637 | case $ac_sys_system in |
| 1638 | BeOS*) LN="ln -s";; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1639 | CYGWIN*) LN="ln -s";; |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 1640 | *) LN=ln;; |
| 1641 | esac |
| 1642 | fi |
| 1643 | |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1644 | # Check for --with-pydebug |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1645 | echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6 |
| 1646 | echo "configure:1647: checking for --with-pydebug" >&5 |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1647 | # Check whether --with-pydebug or --without-pydebug was given. |
| 1648 | if test "${with_pydebug+set}" = set; then |
| 1649 | withval="$with_pydebug" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1650 | |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1651 | if test "$withval" != no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1652 | then cat >> confdefs.h <<\EOF |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1653 | #define Py_DEBUG 1 |
| 1654 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1655 | echo "$ac_t""yes" 1>&6; Py_DEBUG='true' |
| 1656 | else echo "$ac_t""no" 1>&6; Py_DEBUG='false' |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1657 | fi |
| 1658 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1659 | echo "$ac_t""no" 1>&6 |
| 1660 | fi |
| 1661 | |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1662 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1663 | # Optimizer/debugger flags |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1664 | |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1665 | if test -z "$OPT" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1666 | then |
Guido van Rossum | edca74a | 1997-07-18 23:29:40 +0000 | [diff] [blame] | 1667 | case $GCC in |
| 1668 | yes) |
| 1669 | case $ac_cv_prog_cc_g in |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1670 | yes) |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1671 | if test "$Py_DEBUG" = 'true' ; then |
| 1672 | # Optimization messes up debuggers, so turn it off for |
| 1673 | # debug builds. |
| 1674 | OPT="-g -Wall -Wstrict-prototypes" |
| 1675 | else |
| 1676 | OPT="-g -O3 -Wall -Wstrict-prototypes" |
| 1677 | fi;; |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1678 | *) |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1679 | OPT="-O3 -Wall -Wstrict-prototypes";; |
| 1680 | esac |
| 1681 | ;; |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1682 | *) |
| 1683 | case $ac_sys_system in |
Martin v. Löwis | 25ae43b | 2001-10-07 08:39:18 +0000 | [diff] [blame] | 1684 | OpenUNIX*|UnixWare*) |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1685 | OPT="-O -K pentium,host,inline,loop_unroll,alloca ";; |
| 1686 | *) |
| 1687 | OPT="-O";; |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1688 | esac |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1689 | esac |
Jack Jansen | ca06bc6 | 2001-08-03 15:32:23 +0000 | [diff] [blame] | 1690 | case $ac_sys_system in |
| 1691 | Darwin*) |
Jack Jansen | 524a098 | 2002-03-12 15:25:52 +0000 | [diff] [blame] | 1692 | OPT="$OPT -Wno-long-double -no-cpp-precomp";; |
Jack Jansen | ca06bc6 | 2001-08-03 15:32:23 +0000 | [diff] [blame] | 1693 | esac |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1694 | fi |
| 1695 | |
Fred Drake | e1ceaa0 | 2001-12-04 20:55:47 +0000 | [diff] [blame] | 1696 | if test "$Py_DEBUG" = 'true'; then |
| 1697 | : |
| 1698 | else |
| 1699 | OPT="-DNDEBUG $OPT" |
| 1700 | fi |
| 1701 | |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1702 | # The current (beta) Monterey compiler dies with optimizations |
| 1703 | case $ac_sys_system in |
| 1704 | Monterey*) OPT="";; |
| 1705 | esac |
| 1706 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 1707 | if test "$ac_arch_flags" |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 1708 | then |
| 1709 | OPT="$OPT $ac_arch_flags" |
| 1710 | fi |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 1711 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1712 | echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6 |
| 1713 | echo "configure:1714: checking whether $CC accepts -OPT:Olimit=0" >&5 |
| 1714 | if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then |
| 1715 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1716 | else |
| 1717 | ac_save_cc="$CC" |
| 1718 | CC="$CC -OPT:Olimit=0" |
| 1719 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 1720 | ac_cv_opt_olimit_ok=no |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1721 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1722 | cat > conftest.$ac_ext <<EOF |
| 1723 | #line 1724 "configure" |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1724 | #include "confdefs.h" |
| 1725 | int main() { return 0; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1726 | EOF |
| 1727 | if { (eval echo configure:1728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
| 1728 | then |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1729 | ac_cv_opt_olimit_ok=yes |
| 1730 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1731 | echo "configure: failed program was:" >&5 |
| 1732 | cat conftest.$ac_ext >&5 |
| 1733 | rm -fr conftest* |
| 1734 | ac_cv_opt_olimit_ok=no |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1735 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1736 | rm -fr conftest* |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1737 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1738 | |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1739 | CC="$ac_save_cc" |
| 1740 | fi |
| 1741 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1742 | echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6 |
Guido van Rossum | 2efa34b | 1997-10-23 17:43:11 +0000 | [diff] [blame] | 1743 | if test $ac_cv_opt_olimit_ok = yes; then |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 1744 | case $ac_sys_system in |
| 1745 | Darwin*) OPT="$OPT" ;; |
| 1746 | *) OPT="$OPT -OPT:Olimit=0";; |
| 1747 | esac |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1748 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1749 | echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6 |
| 1750 | echo "configure:1751: checking whether $CC accepts -Olimit 1500" >&5 |
| 1751 | if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then |
| 1752 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1753 | else |
| 1754 | ac_save_cc="$CC" |
| 1755 | CC="$CC -Olimit 1500" |
| 1756 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 1757 | ac_cv_olimit_ok=no |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1758 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1759 | cat > conftest.$ac_ext <<EOF |
| 1760 | #line 1761 "configure" |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1761 | #include "confdefs.h" |
| 1762 | int main() { return 0; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1763 | EOF |
| 1764 | if { (eval echo configure:1765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
| 1765 | then |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1766 | ac_cv_olimit_ok=yes |
| 1767 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1768 | echo "configure: failed program was:" >&5 |
| 1769 | cat conftest.$ac_ext >&5 |
| 1770 | rm -fr conftest* |
| 1771 | ac_cv_olimit_ok=no |
Guido van Rossum | 201afe5 | 1997-05-14 21:14:44 +0000 | [diff] [blame] | 1772 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1773 | rm -fr conftest* |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1774 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1775 | |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1776 | CC="$ac_save_cc" |
| 1777 | fi |
| 1778 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1779 | echo "$ac_t""$ac_cv_olimit_ok" 1>&6 |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1780 | if test $ac_cv_olimit_ok = yes; then |
| 1781 | OPT="$OPT -Olimit 1500" |
| 1782 | fi |
| 1783 | fi |
| 1784 | |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1785 | # On some compilers, pthreads are available without further options |
| 1786 | # (e.g. MacOS X). On some of these systems, the compiler will not |
| 1787 | # complain if unaccepted options are passed (e.g. gcc on Mac OS X). |
| 1788 | # So we have to see first whether pthreads are available without |
| 1789 | # options before we can check whether -Kpthread improves anything. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1790 | echo $ac_n "checking whether pthreads are available without options""... $ac_c" 1>&6 |
| 1791 | echo "configure:1792: checking whether pthreads are available without options" >&5 |
| 1792 | if eval "test \"`echo '$''{'ac_cv_pthread_is_default'+set}'`\" = set"; then |
| 1793 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1794 | else |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1795 | if test "$cross_compiling" = yes; then |
| 1796 | ac_cv_pthread_is_default=no |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame] | 1797 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1798 | cat > conftest.$ac_ext <<EOF |
| 1799 | #line 1800 "configure" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1800 | #include "confdefs.h" |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame] | 1801 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1802 | #include <pthread.h> |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame] | 1803 | |
| 1804 | void* routine(void* p){return NULL;} |
| 1805 | |
| 1806 | int main(){ |
| 1807 | pthread_t p; |
| 1808 | if(pthread_create(&p,NULL,routine,NULL)!=0) |
| 1809 | return 1; |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 1810 | (void)pthread_detach(p); |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame] | 1811 | return 0; |
| 1812 | } |
| 1813 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1814 | EOF |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 1815 | if { (eval echo configure:1816: \"$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] | 1816 | then |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1817 | ac_cv_pthread_is_default=yes |
| 1818 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1819 | echo "configure: failed program was:" >&5 |
| 1820 | cat conftest.$ac_ext >&5 |
| 1821 | rm -fr conftest* |
| 1822 | ac_cv_pthread_is_default=no |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1823 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1824 | rm -fr conftest* |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1825 | fi |
| 1826 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1827 | |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1828 | fi |
| 1829 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1830 | echo "$ac_t""$ac_cv_pthread_is_default" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1831 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1832 | |
| 1833 | if test $ac_cv_pthread_is_default = yes |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1834 | then |
| 1835 | ac_cv_kpthread=no |
| 1836 | else |
| 1837 | # -Kpthread, if available, provides the right #defines |
| 1838 | # and linker options to make pthread_create available |
| 1839 | # Some compilers won't report that they do not support -Kpthread, |
| 1840 | # so we need to run a program to see whether it really made the |
| 1841 | # function available. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1842 | echo $ac_n "checking whether $CC accepts -Kpthread""... $ac_c" 1>&6 |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 1843 | echo "configure:1844: checking whether $CC accepts -Kpthread" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1844 | if eval "test \"`echo '$''{'ac_cv_kpthread'+set}'`\" = set"; then |
| 1845 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1846 | else |
| 1847 | ac_save_cc="$CC" |
| 1848 | CC="$CC -Kpthread" |
| 1849 | if test "$cross_compiling" = yes; then |
| 1850 | ac_cv_kpthread=no |
| 1851 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1852 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 1853 | #line 1854 "configure" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1854 | #include "confdefs.h" |
| 1855 | |
| 1856 | #include <pthread.h> |
| 1857 | |
| 1858 | void* routine(void* p){return NULL;} |
| 1859 | |
| 1860 | int main(){ |
| 1861 | pthread_t p; |
| 1862 | if(pthread_create(&p,NULL,routine,NULL)!=0) |
| 1863 | return 1; |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 1864 | (void)pthread_detach(p); |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1865 | return 0; |
| 1866 | } |
| 1867 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1868 | EOF |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 1869 | if { (eval echo configure:1870: \"$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] | 1870 | then |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1871 | ac_cv_kpthread=yes |
| 1872 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1873 | echo "configure: failed program was:" >&5 |
| 1874 | cat conftest.$ac_ext >&5 |
| 1875 | rm -fr conftest* |
| 1876 | ac_cv_kpthread=no |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1877 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1878 | rm -fr conftest* |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame] | 1879 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1880 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1881 | CC="$ac_save_cc" |
| 1882 | fi |
| 1883 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1884 | echo "$ac_t""$ac_cv_kpthread" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1885 | fi |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1886 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1887 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1888 | # checks for header files |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1889 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 1890 | echo "configure:1891: checking for ANSI C header files" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1891 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
| 1892 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1893 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1894 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 1895 | #line 1896 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1896 | #include "confdefs.h" |
| 1897 | #include <stdlib.h> |
| 1898 | #include <stdarg.h> |
| 1899 | #include <string.h> |
| 1900 | #include <float.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1901 | EOF |
| 1902 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 1903 | { (eval echo configure:1904: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1904 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1905 | if test -z "$ac_err"; then |
| 1906 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1907 | ac_cv_header_stdc=yes |
| 1908 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1909 | echo "$ac_err" >&5 |
| 1910 | echo "configure: failed program was:" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1911 | cat conftest.$ac_ext >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1912 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1913 | ac_cv_header_stdc=no |
| 1914 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1915 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1916 | |
| 1917 | if test $ac_cv_header_stdc = yes; then |
| 1918 | # 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] | 1919 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 1920 | #line 1921 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1921 | #include "confdefs.h" |
| 1922 | #include <string.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1923 | EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1924 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1925 | egrep "memchr" >/dev/null 2>&1; then |
| 1926 | : |
| 1927 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1928 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1929 | ac_cv_header_stdc=no |
| 1930 | fi |
| 1931 | rm -f conftest* |
| 1932 | |
| 1933 | fi |
| 1934 | |
| 1935 | if test $ac_cv_header_stdc = yes; then |
| 1936 | # 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] | 1937 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 1938 | #line 1939 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1939 | #include "confdefs.h" |
| 1940 | #include <stdlib.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1941 | EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1942 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1943 | egrep "free" >/dev/null 2>&1; then |
| 1944 | : |
| 1945 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1946 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1947 | ac_cv_header_stdc=no |
| 1948 | fi |
| 1949 | rm -f conftest* |
| 1950 | |
| 1951 | fi |
| 1952 | |
| 1953 | if test $ac_cv_header_stdc = yes; then |
| 1954 | # /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] | 1955 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1956 | : |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1957 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1958 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 1959 | #line 1960 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1960 | #include "confdefs.h" |
| 1961 | #include <ctype.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1962 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') |
| 1963 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 1964 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1965 | int main () { int i; for (i = 0; i < 256; i++) |
| 1966 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); |
| 1967 | exit (0); } |
| 1968 | |
| 1969 | EOF |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 1970 | if { (eval echo configure:1971: \"$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] | 1971 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1972 | : |
| 1973 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1974 | echo "configure: failed program was:" >&5 |
| 1975 | cat conftest.$ac_ext >&5 |
| 1976 | rm -fr conftest* |
| 1977 | ac_cv_header_stdc=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1978 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1979 | rm -fr conftest* |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1980 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 1981 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 1982 | fi |
| 1983 | fi |
| 1984 | |
| 1985 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 |
| 1986 | if test $ac_cv_header_stdc = yes; then |
| 1987 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1988 | #define STDC_HEADERS 1 |
| 1989 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1990 | |
| 1991 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1992 | |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 1993 | for ac_hdr in dlfcn.h fcntl.h grp.h limits.h langinfo.h \ |
| 1994 | libintl.h locale.h ncurses.h poll.h pthread.h \ |
Eric S. Raymond | d2d75d3 | 2001-01-16 15:26:34 +0000 | [diff] [blame] | 1995 | 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] | 1996 | 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] | 1997 | 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] | 1998 | 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] | 1999 | 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] | 2000 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2001 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
| 2002 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 2003 | echo "configure:2004: checking for $ac_hdr" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2004 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 2005 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2006 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2007 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 2008 | #line 2009 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2009 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2010 | #include <$ac_hdr> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2011 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2012 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 2013 | { (eval echo configure:2014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2014 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 2015 | if test -z "$ac_err"; then |
| 2016 | rm -rf conftest* |
| 2017 | eval "ac_cv_header_$ac_safe=yes" |
| 2018 | else |
| 2019 | echo "$ac_err" >&5 |
| 2020 | echo "configure: failed program was:" >&5 |
| 2021 | cat conftest.$ac_ext >&5 |
| 2022 | rm -rf conftest* |
| 2023 | eval "ac_cv_header_$ac_safe=no" |
| 2024 | fi |
| 2025 | rm -f conftest* |
| 2026 | fi |
| 2027 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 2028 | echo "$ac_t""yes" 1>&6 |
| 2029 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
| 2030 | cat >> confdefs.h <<EOF |
| 2031 | #define $ac_tr_hdr 1 |
| 2032 | EOF |
| 2033 | |
| 2034 | else |
| 2035 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2036 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2037 | done |
| 2038 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2039 | ac_header_dirent=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2040 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h |
| 2041 | do |
| 2042 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
| 2043 | echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 2044 | echo "configure:2045: checking for $ac_hdr that defines DIR" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2045 | if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then |
| 2046 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2047 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2048 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 2049 | #line 2050 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2050 | #include "confdefs.h" |
| 2051 | #include <sys/types.h> |
| 2052 | #include <$ac_hdr> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2053 | int main() { |
| 2054 | DIR *dirp = 0; |
| 2055 | ; return 0; } |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2056 | EOF |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 2057 | if { (eval echo configure:2058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2058 | rm -rf conftest* |
| 2059 | eval "ac_cv_header_dirent_$ac_safe=yes" |
| 2060 | else |
| 2061 | echo "configure: failed program was:" >&5 |
| 2062 | cat conftest.$ac_ext >&5 |
| 2063 | rm -rf conftest* |
| 2064 | eval "ac_cv_header_dirent_$ac_safe=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2065 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2066 | rm -f conftest* |
| 2067 | fi |
| 2068 | if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then |
| 2069 | echo "$ac_t""yes" 1>&6 |
| 2070 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
| 2071 | cat >> confdefs.h <<EOF |
| 2072 | #define $ac_tr_hdr 1 |
| 2073 | EOF |
| 2074 | ac_header_dirent=$ac_hdr; break |
| 2075 | else |
| 2076 | echo "$ac_t""no" 1>&6 |
| 2077 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2078 | done |
| 2079 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. |
| 2080 | if test $ac_header_dirent = dirent.h; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2081 | echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 2082 | echo "configure:2083: checking for opendir in -ldir" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2083 | ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` |
| 2084 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 2085 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2086 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2087 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2088 | LIBS="-ldir $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2089 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 2090 | #line 2091 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2091 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2092 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 2093 | /* 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] | 2094 | builtin and then its argument prototype would still apply. */ |
| 2095 | char opendir(); |
| 2096 | |
| 2097 | int main() { |
| 2098 | opendir() |
| 2099 | ; return 0; } |
| 2100 | EOF |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 2101 | if { (eval echo configure:2102: \"$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] | 2102 | rm -rf conftest* |
| 2103 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2104 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2105 | echo "configure: failed program was:" >&5 |
| 2106 | cat conftest.$ac_ext >&5 |
| 2107 | rm -rf conftest* |
| 2108 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2109 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2110 | rm -f conftest* |
| 2111 | LIBS="$ac_save_LIBS" |
| 2112 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2113 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2114 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 2115 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2116 | LIBS="$LIBS -ldir" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2117 | else |
| 2118 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2119 | fi |
| 2120 | |
| 2121 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2122 | echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 2123 | echo "configure:2124: checking for opendir in -lx" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2124 | ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` |
| 2125 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 2126 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2127 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2128 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2129 | LIBS="-lx $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2130 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 2131 | #line 2132 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2132 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2133 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 2134 | /* 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] | 2135 | builtin and then its argument prototype would still apply. */ |
| 2136 | char opendir(); |
| 2137 | |
| 2138 | int main() { |
| 2139 | opendir() |
| 2140 | ; return 0; } |
| 2141 | EOF |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 2142 | if { (eval echo configure:2143: \"$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] | 2143 | rm -rf conftest* |
| 2144 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2145 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2146 | echo "configure: failed program was:" >&5 |
| 2147 | cat conftest.$ac_ext >&5 |
| 2148 | rm -rf conftest* |
| 2149 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2150 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2151 | rm -f conftest* |
| 2152 | LIBS="$ac_save_LIBS" |
| 2153 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2154 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2155 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 2156 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2157 | LIBS="$LIBS -lx" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2158 | else |
| 2159 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2160 | fi |
| 2161 | |
| 2162 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2163 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2164 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2165 | # checks for typedefs |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2166 | was_it_defined=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2167 | echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6 |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 2168 | echo "configure:2169: checking for clock_t in time.h" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2169 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 2170 | #line 2171 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2171 | #include "confdefs.h" |
| 2172 | #include <time.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2173 | EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2174 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2175 | egrep "clock_t" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2176 | rm -rf conftest* |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2177 | was_it_defined=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2178 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2179 | rm -rf conftest* |
| 2180 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2181 | #define clock_t long |
| 2182 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2183 | |
| 2184 | fi |
| 2185 | rm -f conftest* |
| 2186 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2187 | echo "$ac_t""$was_it_defined" 1>&6 |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2188 | |
Guido van Rossum | 810cc51 | 2001-09-09 23:51:39 +0000 | [diff] [blame] | 2189 | # Two defines needed to enable largefile support on various platforms |
| 2190 | # These may affect some typedefs |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2191 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 810cc51 | 2001-09-09 23:51:39 +0000 | [diff] [blame] | 2192 | #define _LARGEFILE_SOURCE 1 |
| 2193 | EOF |
| 2194 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2195 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 810cc51 | 2001-09-09 23:51:39 +0000 | [diff] [blame] | 2196 | #define _FILE_OFFSET_BITS 64 |
| 2197 | EOF |
| 2198 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2199 | |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 2200 | # Add some code to confdefs.h so that the test for off_t works on SCO |
| 2201 | cat >> confdefs.h <<\EOF |
| 2202 | #if defined(SCO_DS) |
| 2203 | #undef _OFF_T |
| 2204 | #endif |
| 2205 | EOF |
| 2206 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2207 | # Type availability checks |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2208 | echo $ac_n "checking for mode_t""... $ac_c" 1>&6 |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 2209 | echo "configure:2210: checking for mode_t" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2210 | if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then |
| 2211 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2212 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2213 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 2214 | #line 2215 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2215 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2216 | #include <sys/types.h> |
| 2217 | #if STDC_HEADERS |
| 2218 | #include <stdlib.h> |
| 2219 | #include <stddef.h> |
| 2220 | #endif |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 2221 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2222 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2223 | egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
| 2224 | rm -rf conftest* |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 2225 | ac_cv_type_mode_t=yes |
| 2226 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2227 | rm -rf conftest* |
| 2228 | ac_cv_type_mode_t=no |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 2229 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2230 | rm -f conftest* |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 2231 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2232 | fi |
| 2233 | echo "$ac_t""$ac_cv_type_mode_t" 1>&6 |
| 2234 | if test $ac_cv_type_mode_t = no; then |
| 2235 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2236 | #define mode_t int |
| 2237 | EOF |
| 2238 | |
| 2239 | fi |
| 2240 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2241 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 2242 | echo "configure:2243: checking for off_t" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2243 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
| 2244 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2245 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2246 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 2247 | #line 2248 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2248 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2249 | #include <sys/types.h> |
| 2250 | #if STDC_HEADERS |
| 2251 | #include <stdlib.h> |
| 2252 | #include <stddef.h> |
| 2253 | #endif |
| 2254 | EOF |
| 2255 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2256 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
| 2257 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2258 | ac_cv_type_off_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2259 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2260 | rm -rf conftest* |
| 2261 | ac_cv_type_off_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2262 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2263 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2264 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2265 | fi |
| 2266 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 |
| 2267 | if test $ac_cv_type_off_t = no; then |
| 2268 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2269 | #define off_t long |
| 2270 | EOF |
| 2271 | |
| 2272 | fi |
| 2273 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2274 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 2275 | echo "configure:2276: checking for pid_t" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2276 | if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then |
| 2277 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2278 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2279 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 2280 | #line 2281 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2281 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2282 | #include <sys/types.h> |
| 2283 | #if STDC_HEADERS |
| 2284 | #include <stdlib.h> |
| 2285 | #include <stddef.h> |
| 2286 | #endif |
| 2287 | EOF |
| 2288 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2289 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
| 2290 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2291 | ac_cv_type_pid_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2292 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2293 | rm -rf conftest* |
| 2294 | ac_cv_type_pid_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2295 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2296 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2297 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2298 | fi |
| 2299 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 |
| 2300 | if test $ac_cv_type_pid_t = no; then |
| 2301 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2302 | #define pid_t int |
| 2303 | EOF |
| 2304 | |
| 2305 | fi |
| 2306 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2307 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 2308 | echo "configure:2309: checking return type of signal handlers" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2309 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
| 2310 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2311 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2312 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 2313 | #line 2314 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2314 | #include "confdefs.h" |
| 2315 | #include <sys/types.h> |
| 2316 | #include <signal.h> |
| 2317 | #ifdef signal |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2318 | #undef signal |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2319 | #endif |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2320 | #ifdef __cplusplus |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2321 | extern "C" void (*signal (int, void (*)(int)))(int); |
| 2322 | #else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2323 | void (*signal ()) (); |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2324 | #endif |
| 2325 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2326 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2327 | int i; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2328 | ; return 0; } |
| 2329 | EOF |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 2330 | if { (eval echo configure:2331: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2331 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2332 | ac_cv_type_signal=void |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2333 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2334 | echo "configure: failed program was:" >&5 |
| 2335 | cat conftest.$ac_ext >&5 |
| 2336 | rm -rf conftest* |
| 2337 | ac_cv_type_signal=int |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2338 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2339 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2340 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2341 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2342 | echo "$ac_t""$ac_cv_type_signal" 1>&6 |
| 2343 | cat >> confdefs.h <<EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2344 | #define RETSIGTYPE $ac_cv_type_signal |
| 2345 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2346 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2347 | |
| 2348 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 2349 | echo "configure:2350: checking for size_t" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2350 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
| 2351 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2352 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2353 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 2354 | #line 2355 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2355 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2356 | #include <sys/types.h> |
| 2357 | #if STDC_HEADERS |
| 2358 | #include <stdlib.h> |
| 2359 | #include <stddef.h> |
| 2360 | #endif |
| 2361 | EOF |
| 2362 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2363 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
| 2364 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2365 | ac_cv_type_size_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2366 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2367 | rm -rf conftest* |
| 2368 | ac_cv_type_size_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2369 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2370 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2371 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2372 | fi |
| 2373 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 |
| 2374 | if test $ac_cv_type_size_t = no; then |
| 2375 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2376 | #define size_t unsigned |
| 2377 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2378 | |
| 2379 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2380 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2381 | echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 2382 | echo "configure:2383: checking for uid_t in sys/types.h" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2383 | if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then |
| 2384 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2385 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2386 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 2387 | #line 2388 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2388 | #include "confdefs.h" |
| 2389 | #include <sys/types.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2390 | EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2391 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2392 | egrep "uid_t" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2393 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2394 | ac_cv_type_uid_t=yes |
| 2395 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2396 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2397 | ac_cv_type_uid_t=no |
| 2398 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2399 | rm -f conftest* |
| 2400 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2401 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 2402 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2403 | echo "$ac_t""$ac_cv_type_uid_t" 1>&6 |
| 2404 | if test $ac_cv_type_uid_t = no; then |
| 2405 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2406 | #define uid_t int |
| 2407 | EOF |
| 2408 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2409 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2410 | #define gid_t int |
| 2411 | EOF |
| 2412 | |
| 2413 | fi |
| 2414 | |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 2415 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2416 | # Sizes of various common basic types |
| 2417 | echo $ac_n "checking size of int""... $ac_c" 1>&6 |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 2418 | echo "configure:2419: checking size of int" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2419 | if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then |
| 2420 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2421 | else |
| 2422 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2423 | ac_cv_sizeof_int=4 |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2424 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2425 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 4f8d054 | 2002-03-08 13:43:01 +0000 | [diff] [blame] | 2426 | #line 2427 "configure" |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2427 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2428 | #include <stdio.h> |
| 2429 | main() |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2430 | { |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2431 | FILE *f=fopen("conftestval", "w"); |
| 2432 | if (!f) exit(1); |
| 2433 | fprintf(f, "%d\n", sizeof(int)); |
| 2434 | exit(0); |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2435 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2436 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2437 | if { (eval echo configure:2438: \"$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] | 2438 | then |
| 2439 | ac_cv_sizeof_int=`cat conftestval` |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2440 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2441 | echo "configure: failed program was:" >&5 |
| 2442 | cat conftest.$ac_ext >&5 |
| 2443 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2444 | ac_cv_sizeof_int=0 |
| 2445 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2446 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2447 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2448 | |
| 2449 | fi |
| 2450 | echo "$ac_t""$ac_cv_sizeof_int" 1>&6 |
| 2451 | cat >> confdefs.h <<EOF |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2452 | #define SIZEOF_INT $ac_cv_sizeof_int |
| 2453 | EOF |
| 2454 | |
| 2455 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2456 | echo $ac_n "checking size of long""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2457 | echo "configure:2458: checking size of long" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2458 | if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then |
| 2459 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2460 | else |
| 2461 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2462 | ac_cv_sizeof_long=4 |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2463 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2464 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2465 | #line 2466 "configure" |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2466 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2467 | #include <stdio.h> |
| 2468 | main() |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2469 | { |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2470 | FILE *f=fopen("conftestval", "w"); |
| 2471 | if (!f) exit(1); |
| 2472 | fprintf(f, "%d\n", sizeof(long)); |
| 2473 | exit(0); |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2474 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2475 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2476 | if { (eval echo configure:2477: \"$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] | 2477 | then |
| 2478 | ac_cv_sizeof_long=`cat conftestval` |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2479 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2480 | echo "configure: failed program was:" >&5 |
| 2481 | cat conftest.$ac_ext >&5 |
| 2482 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2483 | ac_cv_sizeof_long=0 |
| 2484 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2485 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2486 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2487 | |
| 2488 | fi |
| 2489 | echo "$ac_t""$ac_cv_sizeof_long" 1>&6 |
| 2490 | cat >> confdefs.h <<EOF |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2491 | #define SIZEOF_LONG $ac_cv_sizeof_long |
| 2492 | EOF |
| 2493 | |
| 2494 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2495 | echo $ac_n "checking size of void *""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2496 | echo "configure:2497: checking size of void *" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2497 | if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then |
| 2498 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2499 | else |
| 2500 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2501 | ac_cv_sizeof_void_p=4 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2502 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2503 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2504 | #line 2505 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2505 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2506 | #include <stdio.h> |
| 2507 | main() |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2508 | { |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2509 | FILE *f=fopen("conftestval", "w"); |
| 2510 | if (!f) exit(1); |
| 2511 | fprintf(f, "%d\n", sizeof(void *)); |
| 2512 | exit(0); |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2513 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2514 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2515 | if { (eval echo configure:2516: \"$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] | 2516 | then |
| 2517 | ac_cv_sizeof_void_p=`cat conftestval` |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2518 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2519 | echo "configure: failed program was:" >&5 |
| 2520 | cat conftest.$ac_ext >&5 |
| 2521 | rm -fr conftest* |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2522 | ac_cv_sizeof_void_p=0 |
| 2523 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2524 | rm -fr conftest* |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2525 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2526 | |
| 2527 | fi |
| 2528 | echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6 |
| 2529 | cat >> confdefs.h <<EOF |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2530 | #define SIZEOF_VOID_P $ac_cv_sizeof_void_p |
| 2531 | EOF |
| 2532 | |
| 2533 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2534 | echo $ac_n "checking size of char""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2535 | echo "configure:2536: checking size of char" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2536 | if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then |
| 2537 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2538 | else |
| 2539 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2540 | ac_cv_sizeof_char=1 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2541 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2542 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2543 | #line 2544 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2544 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2545 | #include <stdio.h> |
| 2546 | main() |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2547 | { |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2548 | FILE *f=fopen("conftestval", "w"); |
| 2549 | if (!f) exit(1); |
| 2550 | fprintf(f, "%d\n", sizeof(char)); |
| 2551 | exit(0); |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2552 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2553 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2554 | if { (eval echo configure:2555: \"$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] | 2555 | then |
| 2556 | ac_cv_sizeof_char=`cat conftestval` |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2557 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2558 | echo "configure: failed program was:" >&5 |
| 2559 | cat conftest.$ac_ext >&5 |
| 2560 | rm -fr conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2561 | ac_cv_sizeof_char=0 |
| 2562 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2563 | rm -fr conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2564 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2565 | |
| 2566 | fi |
| 2567 | echo "$ac_t""$ac_cv_sizeof_char" 1>&6 |
| 2568 | cat >> confdefs.h <<EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2569 | #define SIZEOF_CHAR $ac_cv_sizeof_char |
| 2570 | EOF |
| 2571 | |
| 2572 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2573 | echo $ac_n "checking size of short""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2574 | echo "configure:2575: checking size of short" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2575 | if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then |
| 2576 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2577 | else |
| 2578 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2579 | ac_cv_sizeof_short=2 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2580 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2581 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2582 | #line 2583 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2583 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2584 | #include <stdio.h> |
| 2585 | main() |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2586 | { |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2587 | FILE *f=fopen("conftestval", "w"); |
| 2588 | if (!f) exit(1); |
| 2589 | fprintf(f, "%d\n", sizeof(short)); |
| 2590 | exit(0); |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2591 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2592 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2593 | if { (eval echo configure:2594: \"$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] | 2594 | then |
| 2595 | ac_cv_sizeof_short=`cat conftestval` |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2596 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2597 | echo "configure: failed program was:" >&5 |
| 2598 | cat conftest.$ac_ext >&5 |
| 2599 | rm -fr conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2600 | ac_cv_sizeof_short=0 |
| 2601 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2602 | rm -fr conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2603 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2604 | |
| 2605 | fi |
| 2606 | echo "$ac_t""$ac_cv_sizeof_short" 1>&6 |
| 2607 | cat >> confdefs.h <<EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2608 | #define SIZEOF_SHORT $ac_cv_sizeof_short |
| 2609 | EOF |
| 2610 | |
| 2611 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2612 | echo $ac_n "checking size of float""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2613 | echo "configure:2614: checking size of float" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2614 | if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then |
| 2615 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2616 | else |
| 2617 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2618 | ac_cv_sizeof_float=4 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2619 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2620 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2621 | #line 2622 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2622 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2623 | #include <stdio.h> |
| 2624 | main() |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2625 | { |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2626 | FILE *f=fopen("conftestval", "w"); |
| 2627 | if (!f) exit(1); |
| 2628 | fprintf(f, "%d\n", sizeof(float)); |
| 2629 | exit(0); |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2630 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2631 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2632 | if { (eval echo configure:2633: \"$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] | 2633 | then |
| 2634 | ac_cv_sizeof_float=`cat conftestval` |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2635 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2636 | echo "configure: failed program was:" >&5 |
| 2637 | cat conftest.$ac_ext >&5 |
| 2638 | rm -fr conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2639 | ac_cv_sizeof_float=0 |
| 2640 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2641 | rm -fr conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2642 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2643 | |
| 2644 | fi |
| 2645 | echo "$ac_t""$ac_cv_sizeof_float" 1>&6 |
| 2646 | cat >> confdefs.h <<EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2647 | #define SIZEOF_FLOAT $ac_cv_sizeof_float |
| 2648 | EOF |
| 2649 | |
| 2650 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2651 | echo $ac_n "checking size of double""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2652 | echo "configure:2653: checking size of double" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2653 | if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then |
| 2654 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2655 | else |
| 2656 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2657 | ac_cv_sizeof_double=8 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2658 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2659 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2660 | #line 2661 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2661 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2662 | #include <stdio.h> |
| 2663 | main() |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2664 | { |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2665 | FILE *f=fopen("conftestval", "w"); |
| 2666 | if (!f) exit(1); |
| 2667 | fprintf(f, "%d\n", sizeof(double)); |
| 2668 | exit(0); |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2669 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2670 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2671 | if { (eval echo configure:2672: \"$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] | 2672 | then |
| 2673 | ac_cv_sizeof_double=`cat conftestval` |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2674 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2675 | echo "configure: failed program was:" >&5 |
| 2676 | cat conftest.$ac_ext >&5 |
| 2677 | rm -fr conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2678 | ac_cv_sizeof_double=0 |
| 2679 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2680 | rm -fr conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2681 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2682 | |
| 2683 | fi |
| 2684 | echo "$ac_t""$ac_cv_sizeof_double" 1>&6 |
| 2685 | cat >> confdefs.h <<EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2686 | #define SIZEOF_DOUBLE $ac_cv_sizeof_double |
| 2687 | EOF |
| 2688 | |
| 2689 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2690 | echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2691 | echo "configure:2692: checking size of fpos_t" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2692 | if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then |
| 2693 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2694 | else |
| 2695 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2696 | ac_cv_sizeof_fpos_t=4 |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2697 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2698 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2699 | #line 2700 "configure" |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2700 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2701 | #include <stdio.h> |
| 2702 | main() |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2703 | { |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2704 | FILE *f=fopen("conftestval", "w"); |
| 2705 | if (!f) exit(1); |
| 2706 | fprintf(f, "%d\n", sizeof(fpos_t)); |
| 2707 | exit(0); |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2708 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2709 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2710 | if { (eval echo configure:2711: \"$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] | 2711 | then |
| 2712 | ac_cv_sizeof_fpos_t=`cat conftestval` |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2713 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2714 | echo "configure: failed program was:" >&5 |
| 2715 | cat conftest.$ac_ext >&5 |
| 2716 | rm -fr conftest* |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2717 | ac_cv_sizeof_fpos_t=0 |
| 2718 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2719 | rm -fr conftest* |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2720 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2721 | |
| 2722 | fi |
| 2723 | echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6 |
| 2724 | cat >> confdefs.h <<EOF |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2725 | #define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t |
| 2726 | EOF |
| 2727 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2728 | |
| 2729 | |
| 2730 | echo $ac_n "checking for long long support""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2731 | echo "configure:2732: checking for long long support" >&5 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2732 | have_long_long=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2733 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2734 | #line 2735 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2735 | #include "confdefs.h" |
| 2736 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2737 | int main() { |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2738 | long long x; x = (long long)0; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2739 | ; return 0; } |
| 2740 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2741 | if { (eval echo configure:2742: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2742 | rm -rf conftest* |
| 2743 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2744 | #define HAVE_LONG_LONG 1 |
| 2745 | EOF |
| 2746 | have_long_long=yes |
| 2747 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2748 | echo "configure: failed program was:" >&5 |
| 2749 | cat conftest.$ac_ext >&5 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2750 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2751 | rm -f conftest* |
| 2752 | echo "$ac_t""$have_long_long" 1>&6 |
Guido van Rossum | 96f2eb9 | 1999-04-10 16:02:18 +0000 | [diff] [blame] | 2753 | if test "$have_long_long" = yes ; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2754 | echo $ac_n "checking size of long long""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2755 | echo "configure:2756: checking size of long long" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2756 | if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then |
| 2757 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2758 | else |
| 2759 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2760 | ac_cv_sizeof_long_long=8 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2761 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2762 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2763 | #line 2764 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2764 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2765 | #include <stdio.h> |
| 2766 | main() |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2767 | { |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2768 | FILE *f=fopen("conftestval", "w"); |
| 2769 | if (!f) exit(1); |
| 2770 | fprintf(f, "%d\n", sizeof(long long)); |
| 2771 | exit(0); |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2772 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2773 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2774 | if { (eval echo configure:2775: \"$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] | 2775 | then |
| 2776 | ac_cv_sizeof_long_long=`cat conftestval` |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2777 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2778 | echo "configure: failed program was:" >&5 |
| 2779 | cat conftest.$ac_ext >&5 |
| 2780 | rm -fr conftest* |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2781 | ac_cv_sizeof_long_long=0 |
| 2782 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2783 | rm -fr conftest* |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2784 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2785 | |
| 2786 | fi |
| 2787 | echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 |
| 2788 | cat >> confdefs.h <<EOF |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2789 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long |
| 2790 | EOF |
| 2791 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2792 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2793 | fi |
| 2794 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2795 | echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2796 | echo "configure:2797: checking for uintptr_t support" >&5 |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2797 | have_uintptr_t=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2798 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2799 | #line 2800 "configure" |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2800 | #include "confdefs.h" |
| 2801 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2802 | int main() { |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2803 | uintptr_t x; x = (uintptr_t)0; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2804 | ; return 0; } |
| 2805 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2806 | if { (eval echo configure:2807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2807 | rm -rf conftest* |
| 2808 | cat >> confdefs.h <<\EOF |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2809 | #define HAVE_UINTPTR_T 1 |
| 2810 | EOF |
| 2811 | have_uintptr_t=yes |
| 2812 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2813 | echo "configure: failed program was:" >&5 |
| 2814 | cat conftest.$ac_ext >&5 |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2815 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2816 | rm -f conftest* |
| 2817 | echo "$ac_t""$have_uintptr_t" 1>&6 |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2818 | if test "$have_uintptr_t" = yes ; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2819 | echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2820 | echo "configure:2821: checking size of uintptr_t" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2821 | if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then |
| 2822 | echo $ac_n "(cached) $ac_c" 1>&6 |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2823 | else |
| 2824 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2825 | ac_cv_sizeof_uintptr_t=4 |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2826 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2827 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2828 | #line 2829 "configure" |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2829 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2830 | #include <stdio.h> |
| 2831 | main() |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2832 | { |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2833 | FILE *f=fopen("conftestval", "w"); |
| 2834 | if (!f) exit(1); |
| 2835 | fprintf(f, "%d\n", sizeof(uintptr_t)); |
| 2836 | exit(0); |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2837 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2838 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2839 | if { (eval echo configure:2840: \"$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] | 2840 | then |
| 2841 | ac_cv_sizeof_uintptr_t=`cat conftestval` |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2842 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2843 | echo "configure: failed program was:" >&5 |
| 2844 | cat conftest.$ac_ext >&5 |
| 2845 | rm -fr conftest* |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2846 | ac_cv_sizeof_uintptr_t=0 |
| 2847 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2848 | rm -fr conftest* |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2849 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2850 | |
| 2851 | fi |
| 2852 | echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6 |
| 2853 | cat >> confdefs.h <<EOF |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2854 | #define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t |
| 2855 | EOF |
| 2856 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2857 | |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2858 | fi |
| 2859 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2860 | # Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2861 | echo $ac_n "checking size of off_t""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2862 | echo "configure:2863: checking size of off_t" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2863 | if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then |
| 2864 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2865 | else |
| 2866 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2867 | ac_cv_sizeof_off_t=4 |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2868 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2869 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2870 | #line 2871 "configure" |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2871 | #include "confdefs.h" |
| 2872 | #include <stdio.h> |
| 2873 | #include <sys/types.h> |
| 2874 | main() |
| 2875 | { |
| 2876 | FILE *f=fopen("conftestval", "w"); |
| 2877 | if (!f) exit(1); |
| 2878 | fprintf(f, "%d\n", sizeof(off_t)); |
| 2879 | exit(0); |
| 2880 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2881 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2882 | if { (eval echo configure:2883: \"$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] | 2883 | then |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2884 | ac_cv_sizeof_off_t=`cat conftestval` |
| 2885 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2886 | echo "configure: failed program was:" >&5 |
| 2887 | cat conftest.$ac_ext >&5 |
| 2888 | rm -fr conftest* |
| 2889 | ac_cv_sizeof_off_t=0 |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2890 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2891 | rm -fr conftest* |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2892 | fi |
| 2893 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2894 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2895 | fi |
| 2896 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2897 | echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6 |
| 2898 | cat >> confdefs.h <<EOF |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2899 | #define SIZEOF_OFF_T $ac_cv_sizeof_off_t |
| 2900 | EOF |
| 2901 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2902 | |
| 2903 | echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2904 | echo "configure:2905: checking whether to enable large file support" >&5 |
Guido van Rossum | 96f2eb9 | 1999-04-10 16:02:18 +0000 | [diff] [blame] | 2905 | if test "$have_long_long" = yes -a \ |
| 2906 | "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \ |
| 2907 | "$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] | 2908 | cat >> confdefs.h <<\EOF |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2909 | #define HAVE_LARGEFILE_SUPPORT 1 |
| 2910 | EOF |
| 2911 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2912 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2913 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2914 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2915 | fi |
| 2916 | |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2917 | # AC_CHECK_SIZEOF() doesn't include <time.h>. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2918 | echo $ac_n "checking size of time_t""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2919 | echo "configure:2920: checking size of time_t" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2920 | if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then |
| 2921 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2922 | else |
| 2923 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2924 | ac_cv_sizeof_time_t=4 |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2925 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2926 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2927 | #line 2928 "configure" |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2928 | #include "confdefs.h" |
| 2929 | #include <stdio.h> |
| 2930 | #include <time.h> |
| 2931 | main() |
| 2932 | { |
| 2933 | FILE *f=fopen("conftestval", "w"); |
| 2934 | if (!f) exit(1); |
| 2935 | fprintf(f, "%d\n", sizeof(time_t)); |
| 2936 | exit(0); |
| 2937 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2938 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2939 | if { (eval echo configure:2940: \"$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] | 2940 | then |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2941 | ac_cv_sizeof_time_t=`cat conftestval` |
| 2942 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2943 | echo "configure: failed program was:" >&5 |
| 2944 | cat conftest.$ac_ext >&5 |
| 2945 | rm -fr conftest* |
| 2946 | ac_cv_sizeof_time_t=0 |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2947 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2948 | rm -fr conftest* |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2949 | fi |
| 2950 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2951 | |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2952 | fi |
| 2953 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2954 | echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6 |
| 2955 | cat >> confdefs.h <<EOF |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2956 | #define SIZEOF_TIME_T $ac_cv_sizeof_time_t |
| 2957 | EOF |
| 2958 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2959 | |
| 2960 | |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2961 | # if have pthread_t then define SIZEOF_PTHREAD_T |
Martin v. Löwis | 123cbd2 | 2001-07-19 14:21:10 +0000 | [diff] [blame] | 2962 | ac_save_cc="$CC" |
| 2963 | if test "$ac_cv_kpthread" = "yes" |
| 2964 | then CC="$CC -Kpthread" |
| 2965 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2966 | echo $ac_n "checking for pthread_t""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2967 | echo "configure:2968: checking for pthread_t" >&5 |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2968 | have_pthread_t=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2969 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2970 | #line 2971 "configure" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2971 | #include "confdefs.h" |
| 2972 | #include <pthread.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2973 | int main() { |
Guido van Rossum | 1258049 | 2000-09-24 16:47:19 +0000 | [diff] [blame] | 2974 | pthread_t x; x = *(pthread_t*)0; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2975 | ; return 0; } |
| 2976 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2977 | if { (eval echo configure:2978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2978 | rm -rf conftest* |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2979 | have_pthread_t=yes |
| 2980 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2981 | echo "configure: failed program was:" >&5 |
| 2982 | cat conftest.$ac_ext >&5 |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2983 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2984 | rm -f conftest* |
| 2985 | echo "$ac_t""$have_pthread_t" 1>&6 |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2986 | if test "$have_pthread_t" = yes ; then |
| 2987 | # AC_CHECK_SIZEOF() doesn't include <pthread.h>. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2988 | echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2989 | echo "configure:2990: checking size of pthread_t" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2990 | if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then |
| 2991 | echo $ac_n "(cached) $ac_c" 1>&6 |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2992 | else |
| 2993 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2994 | ac_cv_sizeof_pthread_t=4 |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2995 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2996 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 2997 | #line 2998 "configure" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2998 | #include "confdefs.h" |
| 2999 | #include <stdio.h> |
| 3000 | #include <pthread.h> |
| 3001 | main() |
| 3002 | { |
| 3003 | FILE *f=fopen("conftestval", "w"); |
| 3004 | if (!f) exit(1); |
| 3005 | fprintf(f, "%d\n", sizeof(pthread_t)); |
| 3006 | exit(0); |
| 3007 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3008 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3009 | if { (eval echo configure:3010: \"$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] | 3010 | then |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3011 | ac_cv_sizeof_pthread_t=`cat conftestval` |
| 3012 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3013 | echo "configure: failed program was:" >&5 |
| 3014 | cat conftest.$ac_ext >&5 |
| 3015 | rm -fr conftest* |
| 3016 | ac_cv_sizeof_pthread_t=0 |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3017 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3018 | rm -fr conftest* |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3019 | fi |
| 3020 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3021 | |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3022 | fi |
| 3023 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3024 | echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6 |
| 3025 | cat >> confdefs.h <<EOF |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3026 | #define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t |
| 3027 | EOF |
| 3028 | |
| 3029 | fi |
Martin v. Löwis | 123cbd2 | 2001-07-19 14:21:10 +0000 | [diff] [blame] | 3030 | CC="$ac_save_cc" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3031 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3032 | echo $ac_n "checking for --enable-toolbox-glue""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3033 | echo "configure:3034: checking for --enable-toolbox-glue" >&5 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3034 | # Check whether --enable-toolbox-glue or --disable-toolbox-glue was given. |
| 3035 | if test "${enable_toolbox_glue+set}" = set; then |
| 3036 | enableval="$enable_toolbox_glue" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3037 | : |
| 3038 | fi |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3039 | |
| 3040 | |
| 3041 | if test -z "$enable_toolbox_glue" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3042 | then |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3043 | case $ac_sys_system/$ac_sys_release in |
| 3044 | Darwin/*) |
| 3045 | enable_toolbox_glue="yes";; |
| 3046 | *) |
| 3047 | enable_toolbox_glue="no";; |
| 3048 | esac |
| 3049 | fi |
| 3050 | case "$enable_toolbox_glue" in |
| 3051 | yes) |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 3052 | extra_frameworks="-framework CoreServices -framework Foundation" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3053 | extra_machdep_objs="Python/mactoolboxglue.o" |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3054 | extra_undefs="-u __dummy -u _PyMac_Error" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3055 | cat >> confdefs.h <<\EOF |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3056 | #define USE_TOOLBOX_OBJECT_GLUE 1 |
| 3057 | EOF |
| 3058 | |
| 3059 | ;; |
| 3060 | *) |
| 3061 | extra_frameworks="" |
| 3062 | extra_machdep_objs="" |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3063 | extra_undefs="" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3064 | ;; |
| 3065 | esac |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3066 | echo "$ac_t""$enable_toolbox_glue" 1>&6 |
| 3067 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3068 | |
| 3069 | case $ac_sys_system/$ac_sys_release in |
Jack Jansen | 418c3b1 | 2001-11-14 10:59:57 +0000 | [diff] [blame] | 3070 | Darwin/1.3*) |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 3071 | ns_undef_sym='_environ' |
Jack Jansen | 418c3b1 | 2001-11-14 10:59:57 +0000 | [diff] [blame] | 3072 | LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym" |
| 3073 | LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks" |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 3074 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python' |
| 3075 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 3076 | Darwin/*) |
| 3077 | ns_undef_sym='_environ' |
Jack Jansen | 418c3b1 | 2001-11-14 10:59:57 +0000 | [diff] [blame] | 3078 | LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -flat_namespace -U $ns_undef_sym" |
| 3079 | LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3080 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python' |
| 3081 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3082 | esac |
| 3083 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3084 | echo $ac_n "checking for --enable-framework""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3085 | echo "configure:3086: checking for --enable-framework" >&5 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3086 | if test "$enable_framework" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3087 | then |
Jack Jansen | ca06bc6 | 2001-08-03 15:32:23 +0000 | [diff] [blame] | 3088 | OPT="$OPT -fno-common -dynamic" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3089 | # -U __environ is needed since bundles don't have access |
| 3090 | # to crt0 when built but will always be linked against it |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3091 | # -F. is needed to allow linking to the framework while |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3092 | # in the build location. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3093 | |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 3094 | case $ac_sys_system/$ac_sys_release in |
Jack Jansen | 418c3b1 | 2001-11-14 10:59:57 +0000 | [diff] [blame] | 3095 | Darwin/1.3*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym";; |
| 3096 | Darwin/*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-flat_namespace,-U,$ns_undef_sym";; |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 3097 | esac |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3098 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3099 | #define WITH_NEXT_FRAMEWORK 1 |
| 3100 | EOF |
| 3101 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3102 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3103 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3104 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3105 | fi |
| 3106 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3107 | echo $ac_n "checking for dyld""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3108 | echo "configure:3109: checking for dyld" >&5 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3109 | case $ac_sys_system/$ac_sys_release in |
| 3110 | Darwin/*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3111 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3112 | #define WITH_DYLD 1 |
| 3113 | EOF |
| 3114 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3115 | echo "$ac_t""always on for Darwin" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3116 | ;; |
| 3117 | *) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3118 | echo "$ac_t""no" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3119 | ;; |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3120 | esac |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3121 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3122 | # Set info about shared libraries. |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3123 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3124 | |
| 3125 | |
| 3126 | |
| 3127 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3128 | # SO is the extension of shared libraries `(including the dot!) |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3129 | # -- usually .so, .sl on HP-UX, .dll on Cygwin |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3130 | echo $ac_n "checking SO""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3131 | echo "configure:3132: checking SO" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3132 | if test -z "$SO" |
| 3133 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3134 | case $ac_sys_system in |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 3135 | hp*|HP*) SO=.sl;; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3136 | CYGWIN*) SO=.dll;; |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 3137 | *) SO=.so;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3138 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3139 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3140 | echo "$ac_t""$SO" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3141 | # LDSHARED is the ld *command* used to create shared library |
Martin v. Löwis | 5b718fc | 2001-09-10 15:34:42 +0000 | [diff] [blame] | 3142 | # -- "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] | 3143 | # (Shared libraries in this instance are shared modules to be loaded into |
| 3144 | # Python, as opposed to building Python itself as a shared library.) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3145 | echo $ac_n "checking LDSHARED""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3146 | echo "configure:3147: checking LDSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3147 | if test -z "$LDSHARED" |
| 3148 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3149 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3150 | AIX*) |
| 3151 | BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp" |
Guido van Rossum | ce608b0 | 2001-09-28 15:59:38 +0000 | [diff] [blame] | 3152 | LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp" |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3153 | ;; |
| 3154 | BeOS*) |
| 3155 | BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY" |
Guido van Rossum | ce608b0 | 2001-09-28 15:59:38 +0000 | [diff] [blame] | 3156 | LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY" |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3157 | ;; |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3158 | IRIX/5*) LDSHARED="ld -shared";; |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 3159 | IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3160 | SunOS/4*) LDSHARED="ld";; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3161 | SunOS/5*) |
Greg Ward | 57c9a663 | 2000-05-26 12:22:54 +0000 | [diff] [blame] | 3162 | if test "$GCC" = "yes" |
Neil Schemenauer | 8ba9445 | 2001-02-19 18:18:48 +0000 | [diff] [blame] | 3163 | then LDSHARED='$(CC) -shared' |
Martin v. Löwis | 5b718fc | 2001-09-10 15:34:42 +0000 | [diff] [blame] | 3164 | else LDSHARED="$(CC) -G"; |
Greg Ward | 57c9a663 | 2000-05-26 12:22:54 +0000 | [diff] [blame] | 3165 | fi ;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3166 | hp*|HP*) LDSHARED="ld -b";; |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 3167 | OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";; |
| 3168 | DYNIX/ptx*) LDSHARED="ld -G";; |
Jack Jansen | 418c3b1 | 2001-11-14 10:59:57 +0000 | [diff] [blame] | 3169 | Darwin/1.3*) |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 3170 | LDSHARED='$(CC) $(LDFLAGS) -bundle' |
| 3171 | if test "$enable_framework" ; then |
| 3172 | # Link against the framework. All externals should be defined. |
| 3173 | LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)' |
| 3174 | else |
| 3175 | # No framework. Ignore undefined symbols, assuming they come from Python |
Jack Jansen | 418c3b1 | 2001-11-14 10:59:57 +0000 | [diff] [blame] | 3176 | LDSHARED="$LDSHARED -undefined suppress" |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 3177 | fi ;; |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3178 | Darwin/*) |
| 3179 | LDSHARED='$(CC) $(LDFLAGS) -bundle' |
| 3180 | if test "$enable_framework" ; then |
| 3181 | # Link against the framework. All externals should be defined. |
| 3182 | LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)' |
| 3183 | else |
Michael W. Hudson | 594bc80 | 2002-03-07 09:59:15 +0000 | [diff] [blame] | 3184 | # No framework, use the Python app as bundle-loader |
| 3185 | BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)' |
| 3186 | LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)' |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3187 | fi ;; |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3188 | Linux*|GNU*) LDSHARED="gcc -shared";; |
Guido van Rossum | 3c4bb80 | 1997-12-18 23:55:32 +0000 | [diff] [blame] | 3189 | dgux*) LDSHARED="ld -G";; |
Guido van Rossum | 458e7fa | 1999-09-17 15:40:40 +0000 | [diff] [blame] | 3190 | BSD/OS*/4*) LDSHARED="gcc -shared";; |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame] | 3191 | OpenBSD*|NetBSD*|FreeBSD*) |
Jeremy Hylton | 4bcc7c5 | 2000-08-31 17:45:35 +0000 | [diff] [blame] | 3192 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 3193 | then |
| 3194 | LDSHARED="cc -shared ${LDFLAGS}" |
| 3195 | else |
| 3196 | LDSHARED="ld -Bshareable ${LDFLAGS}" |
| 3197 | fi;; |
Martin v. Löwis | 25ae43b | 2001-10-07 08:39:18 +0000 | [diff] [blame] | 3198 | OpenUNIX*|UnixWare*) |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3199 | if test "$GCC" = "yes" |
| 3200 | then LDSHARED="$(CC) -shared" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3201 | else LDSHARED="$(CC) -G" |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3202 | fi;; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3203 | SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3204 | Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3205 | CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3206 | *) LDSHARED="ld";; |
| 3207 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3208 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3209 | echo "$ac_t""$LDSHARED" 1>&6 |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3210 | BLDSHARED=${BLDSHARED-$LDSHARED} |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3211 | # 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] | 3212 | # library (module) -- this is only needed for a few systems |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3213 | echo $ac_n "checking CCSHARED""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3214 | echo "configure:3215: checking CCSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3215 | if test -z "$CCSHARED" |
| 3216 | then |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3217 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | c761fc8 | 2001-02-19 04:50:49 +0000 | [diff] [blame] | 3218 | SunOS*) if test "$GCC" = yes; |
| 3219 | then CCSHARED="-fPIC"; |
| 3220 | fi;; |
Guido van Rossum | af07a44 | 1995-02-13 19:45:27 +0000 | [diff] [blame] | 3221 | hp*|HP*) if test "$GCC" = yes; |
Martin v. Löwis | 703ad70 | 2001-09-05 08:36:52 +0000 | [diff] [blame] | 3222 | then CCSHARED="-fPIC"; |
Guido van Rossum | af07a44 | 1995-02-13 19:45:27 +0000 | [diff] [blame] | 3223 | else CCSHARED="+z"; |
| 3224 | fi;; |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3225 | Linux*|GNU*) CCSHARED="-fPIC";; |
Guido van Rossum | f5957ea | 1999-10-05 21:59:33 +0000 | [diff] [blame] | 3226 | BSD/OS*/4*) CCSHARED="-fpic";; |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame] | 3227 | FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";; |
Martin v. Löwis | 25ae43b | 2001-10-07 08:39:18 +0000 | [diff] [blame] | 3228 | OpenUNIX*|UnixWare*) |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3229 | if test "$GCC" = "yes" |
| 3230 | then CCSHARED="-fPIC" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3231 | else CCSHARED="-KPIC" |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3232 | fi;; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3233 | SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3234 | Monterey*) CCSHARED="-G";; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3235 | IRIX*/6*) case $CC in |
| 3236 | *gcc*) CCSHARED="-shared";; |
Guido van Rossum | ee21f41 | 1998-04-20 18:51:54 +0000 | [diff] [blame] | 3237 | *) CCSHARED="";; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3238 | esac;; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3239 | CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3240 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3241 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3242 | echo "$ac_t""$CCSHARED" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3243 | # LINKFORSHARED are the flags passed to the $(CC) command that links |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3244 | # the python executable -- this is only needed for a few systems |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3245 | echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3246 | echo "configure:3247: checking LINKFORSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3247 | if test -z "$LINKFORSHARED" |
| 3248 | then |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3249 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3250 | AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';; |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 3251 | hp*|HP*) |
Guido van Rossum | 304dd2d | 1997-10-20 23:10:56 +0000 | [diff] [blame] | 3252 | LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";; |
Guido van Rossum | f5957ea | 1999-10-05 21:59:33 +0000 | [diff] [blame] | 3253 | BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";; |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3254 | Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";; |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3255 | # -u libsys_s pulls in all symbols in libsys |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3256 | Darwin/*) |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3257 | # -u __dummy makes the linker aware of the objc runtime |
| 3258 | # in System.framework; otherwise, __objcInit (referenced in |
| 3259 | # crt1.o) gets erroneously defined as common, which breaks dynamic |
| 3260 | # loading of any modules which reference it in System.framework. |
| 3261 | # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is |
| 3262 | # not used by the core itself but which needs to be in the core so |
| 3263 | # that dynamically loaded extension modules have access to it. |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3264 | LINKFORSHARED="$extra_undefs -framework System" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3265 | if test "$enable_framework" |
| 3266 | then |
| 3267 | LINKFORSHARED="$LINKFORSHARED -framework Python" |
| 3268 | fi |
| 3269 | LINKFORSHARED="$LINKFORSHARED $extra_frameworks";; |
Martin v. Löwis | 25ae43b | 2001-10-07 08:39:18 +0000 | [diff] [blame] | 3270 | OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3271 | SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";; |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3272 | ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3273 | FreeBSD*|NetBSD*|OpenBSD*) |
Guido van Rossum | df69365 | 1999-01-07 21:50:41 +0000 | [diff] [blame] | 3274 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
| 3275 | then |
| 3276 | LINKFORSHARED="-Wl,--export-dynamic" |
| 3277 | fi;; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3278 | SunOS/5*) case $CC in |
| 3279 | *gcc*) |
Guido van Rossum | ff48418 | 2000-02-03 13:50:24 +0000 | [diff] [blame] | 3280 | if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null |
Guido van Rossum | 8f4ceb1 | 1997-12-18 23:42:19 +0000 | [diff] [blame] | 3281 | then |
| 3282 | LINKFORSHARED="-Xlinker --export-dynamic" |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3283 | fi;; |
| 3284 | esac;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3285 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3286 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3287 | echo "$ac_t""$LINKFORSHARED" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3288 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3289 | |
| 3290 | echo $ac_n "checking CFLAGSFORSHARED""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3291 | echo "configure:3292: checking CFLAGSFORSHARED" >&5 |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3292 | if test ! "$LIBRARY" = "$LDLIBRARY" |
| 3293 | then |
Neil Schemenauer | 0c6141f | 2001-01-27 21:40:54 +0000 | [diff] [blame] | 3294 | case $ac_sys_system in |
| 3295 | CYGWIN*) |
| 3296 | # Cygwin needs CCSHARED when building extension DLLs |
| 3297 | # but not when building the interpreter DLL. |
| 3298 | CFLAGSFORSHARED='';; |
| 3299 | *) |
| 3300 | CFLAGSFORSHARED='$(CCSHARED)' |
| 3301 | esac |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3302 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3303 | echo "$ac_t""$CFLAGSFORSHARED" 1>&6 |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3304 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3305 | # checks for libraries |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3306 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3307 | echo "configure:3308: checking for dlopen in -ldl" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3308 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
| 3309 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 3310 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3311 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3312 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3313 | LIBS="-ldl $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3314 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3315 | #line 3316 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3316 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3317 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3318 | /* 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] | 3319 | builtin and then its argument prototype would still apply. */ |
| 3320 | char dlopen(); |
| 3321 | |
| 3322 | int main() { |
| 3323 | dlopen() |
| 3324 | ; return 0; } |
| 3325 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3326 | if { (eval echo configure:3327: \"$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] | 3327 | rm -rf conftest* |
| 3328 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3329 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3330 | echo "configure: failed program was:" >&5 |
| 3331 | cat conftest.$ac_ext >&5 |
| 3332 | rm -rf conftest* |
| 3333 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3334 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3335 | rm -f conftest* |
| 3336 | LIBS="$ac_save_LIBS" |
| 3337 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3338 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3339 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3340 | echo "$ac_t""yes" 1>&6 |
| 3341 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 3342 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
| 3343 | cat >> confdefs.h <<EOF |
| 3344 | #define $ac_tr_lib 1 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3345 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3346 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3347 | LIBS="-ldl $LIBS" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3348 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3349 | else |
| 3350 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3351 | fi |
| 3352 | # Dynamic linking for SunOS/Solaris and SYSV |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3353 | echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3354 | echo "configure:3355: checking for shl_load in -ldld" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3355 | ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` |
| 3356 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 3357 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3358 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3359 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3360 | LIBS="-ldld $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3361 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3362 | #line 3363 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3363 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3364 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3365 | /* 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] | 3366 | builtin and then its argument prototype would still apply. */ |
| 3367 | char shl_load(); |
| 3368 | |
| 3369 | int main() { |
| 3370 | shl_load() |
| 3371 | ; return 0; } |
| 3372 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3373 | if { (eval echo configure:3374: \"$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] | 3374 | rm -rf conftest* |
| 3375 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3376 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3377 | echo "configure: failed program was:" >&5 |
| 3378 | cat conftest.$ac_ext >&5 |
| 3379 | rm -rf conftest* |
| 3380 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3381 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3382 | rm -f conftest* |
| 3383 | LIBS="$ac_save_LIBS" |
| 3384 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3385 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3386 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3387 | echo "$ac_t""yes" 1>&6 |
| 3388 | ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 3389 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
| 3390 | cat >> confdefs.h <<EOF |
| 3391 | #define $ac_tr_lib 1 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3392 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3393 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3394 | LIBS="-ldld $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3395 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3396 | else |
| 3397 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3398 | fi |
| 3399 | # Dynamic linking for HP-UX |
Martin v. Löwis | 41933dd | 2002-03-21 15:10:58 +0000 | [diff] [blame] | 3400 | echo $ac_n "checking for sem_init in -lrt""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3401 | echo "configure:3402: checking for sem_init in -lrt" >&5 |
Martin v. Löwis | 41933dd | 2002-03-21 15:10:58 +0000 | [diff] [blame] | 3402 | ac_lib_var=`echo rt'_'sem_init | sed 'y%./+-%__p_%'` |
| 3403 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 3404 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3405 | else |
| 3406 | ac_save_LIBS="$LIBS" |
| 3407 | LIBS="-lrt $LIBS" |
| 3408 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3409 | #line 3410 "configure" |
Martin v. Löwis | 41933dd | 2002-03-21 15:10:58 +0000 | [diff] [blame] | 3410 | #include "confdefs.h" |
| 3411 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3412 | /* We use char because int might match the return type of a gcc2 |
| 3413 | builtin and then its argument prototype would still apply. */ |
| 3414 | char sem_init(); |
| 3415 | |
| 3416 | int main() { |
| 3417 | sem_init() |
| 3418 | ; return 0; } |
| 3419 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3420 | if { (eval echo configure:3421: \"$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] | 3421 | rm -rf conftest* |
| 3422 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3423 | else |
| 3424 | echo "configure: failed program was:" >&5 |
| 3425 | cat conftest.$ac_ext >&5 |
| 3426 | rm -rf conftest* |
| 3427 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3428 | fi |
| 3429 | rm -f conftest* |
| 3430 | LIBS="$ac_save_LIBS" |
| 3431 | |
| 3432 | fi |
| 3433 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3434 | echo "$ac_t""yes" 1>&6 |
| 3435 | ac_tr_lib=HAVE_LIB`echo rt | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 3436 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
| 3437 | cat >> confdefs.h <<EOF |
| 3438 | #define $ac_tr_lib 1 |
| 3439 | EOF |
| 3440 | |
| 3441 | LIBS="-lrt $LIBS" |
| 3442 | |
| 3443 | else |
| 3444 | echo "$ac_t""no" 1>&6 |
| 3445 | fi |
| 3446 | # 'Real Time' functions on Solaris |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3447 | |
| 3448 | # checks for system dependent C++ extensions support |
| 3449 | case "$ac_sys_system" in |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3450 | AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3451 | echo "configure:3452: checking for genuine AIX C++ extensions support" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3452 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3453 | #line 3454 "configure" |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3454 | #include "confdefs.h" |
| 3455 | #include "/usr/lpp/xlC/include/load.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3456 | int main() { |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3457 | loadAndInit("", 0, "") |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3458 | ; return 0; } |
| 3459 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3460 | if { (eval echo configure:3461: \"$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] | 3461 | rm -rf conftest* |
| 3462 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3463 | #define AIX_GENUINE_CPLUSPLUS 1 |
| 3464 | EOF |
| 3465 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3466 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3467 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3468 | echo "configure: failed program was:" >&5 |
| 3469 | cat conftest.$ac_ext >&5 |
| 3470 | rm -rf conftest* |
| 3471 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3472 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3473 | rm -f conftest*;; |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3474 | *) ;; |
| 3475 | esac |
| 3476 | |
Guido van Rossum | 70c7f48 | 1998-03-26 18:44:10 +0000 | [diff] [blame] | 3477 | # Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl. |
| 3478 | # However on SGI IRIX, these exist but are broken. |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3479 | # BeOS' sockets are stashed in libnet. |
| 3480 | case "$ac_sys_system" in |
| 3481 | IRIX*) ;; |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3482 | *) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3483 | echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3484 | echo "configure:3485: checking for t_open in -lnsl" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3485 | ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'` |
| 3486 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 3487 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3488 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3489 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3490 | LIBS="-lnsl $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3491 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3492 | #line 3493 "configure" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3493 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3494 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3495 | /* 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] | 3496 | builtin and then its argument prototype would still apply. */ |
| 3497 | char t_open(); |
| 3498 | |
| 3499 | int main() { |
| 3500 | t_open() |
| 3501 | ; return 0; } |
| 3502 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3503 | if { (eval echo configure:3504: \"$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] | 3504 | rm -rf conftest* |
| 3505 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3506 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3507 | echo "configure: failed program was:" >&5 |
| 3508 | cat conftest.$ac_ext >&5 |
| 3509 | rm -rf conftest* |
| 3510 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3511 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3512 | rm -f conftest* |
| 3513 | LIBS="$ac_save_LIBS" |
| 3514 | |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3515 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3516 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3517 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3518 | LIBS="-lnsl $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3519 | else |
| 3520 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3521 | fi |
Guido van Rossum | 0ddb028 | 1995-01-17 16:46:14 +0000 | [diff] [blame] | 3522 | # SVR4 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3523 | echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3524 | echo "configure:3525: checking for socket in -lsocket" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3525 | ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` |
| 3526 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 3527 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3528 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3529 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3530 | LIBS="-lsocket $LIBS $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3531 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3532 | #line 3533 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3533 | #include "confdefs.h" |
| 3534 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3535 | /* 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] | 3536 | builtin and then its argument prototype would still apply. */ |
| 3537 | char socket(); |
| 3538 | |
| 3539 | int main() { |
| 3540 | socket() |
| 3541 | ; return 0; } |
| 3542 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3543 | if { (eval echo configure:3544: \"$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] | 3544 | rm -rf conftest* |
| 3545 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3546 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3547 | echo "configure: failed program was:" >&5 |
| 3548 | cat conftest.$ac_ext >&5 |
| 3549 | rm -rf conftest* |
| 3550 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3551 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3552 | rm -f conftest* |
| 3553 | LIBS="$ac_save_LIBS" |
| 3554 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3555 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3556 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3557 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3558 | LIBS="-lsocket $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3559 | else |
| 3560 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3561 | fi |
| 3562 | # SVR4 sockets |
Jeremy Hylton | cb25d5e | 2000-07-27 21:23:28 +0000 | [diff] [blame] | 3563 | ;; |
| 3564 | esac |
| 3565 | case "$ac_sys_system" in |
| 3566 | BeOS*) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3567 | echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3568 | echo "configure:3569: checking for socket in -lnet" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3569 | ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'` |
| 3570 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 3571 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3572 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3573 | ac_save_LIBS="$LIBS" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3574 | LIBS="-lnet $LIBS $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3575 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3576 | #line 3577 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3577 | #include "confdefs.h" |
| 3578 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3579 | /* 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] | 3580 | builtin and then its argument prototype would still apply. */ |
| 3581 | char socket(); |
| 3582 | |
| 3583 | int main() { |
| 3584 | socket() |
| 3585 | ; return 0; } |
| 3586 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3587 | if { (eval echo configure:3588: \"$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] | 3588 | rm -rf conftest* |
| 3589 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3590 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3591 | echo "configure: failed program was:" >&5 |
| 3592 | cat conftest.$ac_ext >&5 |
| 3593 | rm -rf conftest* |
| 3594 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3595 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3596 | rm -f conftest* |
| 3597 | LIBS="$ac_save_LIBS" |
| 3598 | |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3599 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3600 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3601 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3602 | LIBS="-lnet $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3603 | else |
| 3604 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3605 | fi |
| 3606 | # BeOS |
| 3607 | ;; |
| 3608 | esac |
Guido van Rossum | 70c7f48 | 1998-03-26 18:44:10 +0000 | [diff] [blame] | 3609 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3610 | echo $ac_n "checking for --with-libs""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3611 | echo "configure:3612: checking for --with-libs" >&5 |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 3612 | # Check whether --with-libs or --without-libs was given. |
| 3613 | if test "${with_libs+set}" = set; then |
| 3614 | withval="$with_libs" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3615 | |
| 3616 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 3617 | LIBS="$withval $LIBS" |
| 3618 | |
| 3619 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3620 | echo "$ac_t""no" 1>&6 |
| 3621 | fi |
| 3622 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3623 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 3624 | # Determine if signalmodule should be used. |
| 3625 | |
| 3626 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3627 | echo $ac_n "checking for --with-signal-module""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3628 | echo "configure:3629: checking for --with-signal-module" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 3629 | # Check whether --with-signal-module or --without-signal-module was given. |
| 3630 | if test "${with_signal_module+set}" = set; then |
| 3631 | withval="$with_signal_module" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3632 | : |
| 3633 | fi |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 3634 | |
| 3635 | |
| 3636 | if test -z "$with_signal_module" |
| 3637 | then with_signal_module="yes" |
| 3638 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3639 | echo "$ac_t""$with_signal_module" 1>&6 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 3640 | |
| 3641 | if test "${with_signal_module}" = "yes"; then |
| 3642 | USE_SIGNAL_MODULE="" |
| 3643 | SIGNAL_OBJS="" |
| 3644 | else |
| 3645 | USE_SIGNAL_MODULE="#" |
| 3646 | SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o" |
| 3647 | fi |
| 3648 | |
Guido van Rossum | 3d15bd8 | 2001-01-10 18:53:48 +0000 | [diff] [blame] | 3649 | # This is used to generate Setup.config |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 3650 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3651 | USE_THREAD_MODULE="" |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 3652 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3653 | echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3654 | echo "configure:3655: checking for --with-dec-threads" >&5 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3655 | |
| 3656 | # Check whether --with-dec-threads or --without-dec-threads was given. |
| 3657 | if test "${with_dec_threads+set}" = set; then |
| 3658 | withval="$with_dec_threads" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3659 | |
| 3660 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3661 | LDLAST=-threads |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3662 | if test "${with_thread+set}" != set; then |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3663 | with_thread="$withval"; |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3664 | fi |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3665 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3666 | echo "$ac_t""no" 1>&6 |
| 3667 | fi |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3668 | |
| 3669 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3670 | echo $ac_n "checking for --with-threads""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3671 | echo "configure:3672: checking for --with-threads" >&5 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3672 | # Check whether --with-threads or --without-threads was given. |
| 3673 | if test "${with_threads+set}" = set; then |
| 3674 | withval="$with_threads" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3675 | : |
| 3676 | fi |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3677 | |
| 3678 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3679 | # --with-thread is deprecated, but check for it anyway |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3680 | # Check whether --with-thread or --without-thread was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3681 | if test "${with_thread+set}" = set; then |
| 3682 | withval="$with_thread" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3683 | |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 3684 | with_threads=$with_thread |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3685 | fi |
| 3686 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3687 | |
| 3688 | if test -z "$with_threads" |
| 3689 | then with_threads="yes" |
| 3690 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3691 | echo "$ac_t""$with_threads" 1>&6 |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3692 | |
| 3693 | if test "$with_threads" = "no" |
| 3694 | then |
| 3695 | USE_THREAD_MODULE="#" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3696 | elif test "$ac_cv_pthread_is_default" = yes |
| 3697 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3698 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3699 | #define WITH_THREAD 1 |
| 3700 | EOF |
| 3701 | |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3702 | # Defining _REENTRANT on system with POSIX threads should not hurt. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3703 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3704 | #define _REENTRANT 1 |
| 3705 | EOF |
| 3706 | |
| 3707 | posix_threads=yes |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3708 | LIBOBJS="$LIBOBJS thread.o" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3709 | elif test "$ac_cv_kpthread" = "yes" |
| 3710 | then |
| 3711 | CC="$CC -Kpthread" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3712 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 3713 | #define WITH_THREAD 1 |
| 3714 | EOF |
| 3715 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 3716 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3717 | LIBOBJS="$LIBOBJS thread.o" |
| 3718 | else |
| 3719 | if test ! -z "$with_threads" -a -d "$with_threads" |
| 3720 | then LDFLAGS="$LDFLAGS -L$with_threads" |
| 3721 | fi |
| 3722 | if test ! -z "$withval" -a -d "$withval" |
| 3723 | then LDFLAGS="$LDFLAGS -L$withval" |
| 3724 | fi |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3725 | |
| 3726 | # According to the POSIX spec, a pthreads implementation must |
| 3727 | # 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] | 3728 | echo $ac_n "checking for _POSIX_THREADS in unistd.h""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3729 | echo "configure:3730: checking for _POSIX_THREADS in unistd.h" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3730 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3731 | #line 3732 "configure" |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3732 | #include "confdefs.h" |
| 3733 | #include <unistd.h> |
| 3734 | #ifdef _POSIX_THREADS |
| 3735 | yes |
| 3736 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3737 | |
| 3738 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3739 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 3740 | egrep "yes" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3741 | rm -rf conftest* |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3742 | unistd_defines_pthreads=yes |
| 3743 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3744 | rm -rf conftest* |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3745 | unistd_defines_pthreads=no |
| 3746 | fi |
| 3747 | rm -f conftest* |
| 3748 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3749 | echo "$ac_t""$unistd_defines_pthreads" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3750 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3751 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9caf77a | 1996-08-01 00:52:26 +0000 | [diff] [blame] | 3752 | #define _REENTRANT 1 |
| 3753 | EOF |
| 3754 | |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3755 | ac_safe=`echo "cthreads.h" | sed 'y%./+-%__p_%'` |
| 3756 | echo $ac_n "checking for cthreads.h""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3757 | echo "configure:3758: checking for cthreads.h" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3758 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 3759 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3760 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3761 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3762 | #line 3763 "configure" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3763 | #include "confdefs.h" |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3764 | #include <cthreads.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3765 | EOF |
| 3766 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3767 | { (eval echo configure:3768: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3768 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 3769 | if test -z "$ac_err"; then |
| 3770 | rm -rf conftest* |
| 3771 | eval "ac_cv_header_$ac_safe=yes" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3772 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3773 | echo "$ac_err" >&5 |
| 3774 | echo "configure: failed program was:" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3775 | cat conftest.$ac_ext >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3776 | rm -rf conftest* |
| 3777 | eval "ac_cv_header_$ac_safe=no" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3778 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3779 | rm -f conftest* |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3780 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3781 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 3782 | echo "$ac_t""yes" 1>&6 |
| 3783 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3784 | #define WITH_THREAD 1 |
| 3785 | EOF |
| 3786 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3787 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3788 | #define C_THREADS 1 |
| 3789 | EOF |
| 3790 | |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3791 | cat >> confdefs.h <<\EOF |
| 3792 | #define HURD_C_THREADS 1 |
| 3793 | EOF |
| 3794 | |
| 3795 | LIBS="$LIBS -lthreads" |
| 3796 | LIBOBJS="$LIBOBJS thread.o" |
| 3797 | else |
| 3798 | echo "$ac_t""no" 1>&6 |
| 3799 | |
| 3800 | ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'` |
| 3801 | echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3802 | echo "configure:3803: checking for mach/cthreads.h" >&5 |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3803 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 3804 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3805 | else |
| 3806 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3807 | #line 3808 "configure" |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3808 | #include "confdefs.h" |
| 3809 | #include <mach/cthreads.h> |
| 3810 | EOF |
| 3811 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3812 | { (eval echo configure:3813: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 3813 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 3814 | if test -z "$ac_err"; then |
| 3815 | rm -rf conftest* |
| 3816 | eval "ac_cv_header_$ac_safe=yes" |
| 3817 | else |
| 3818 | echo "$ac_err" >&5 |
| 3819 | echo "configure: failed program was:" >&5 |
| 3820 | cat conftest.$ac_ext >&5 |
| 3821 | rm -rf conftest* |
| 3822 | eval "ac_cv_header_$ac_safe=no" |
| 3823 | fi |
| 3824 | rm -f conftest* |
| 3825 | fi |
| 3826 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 3827 | echo "$ac_t""yes" 1>&6 |
| 3828 | cat >> confdefs.h <<\EOF |
| 3829 | #define WITH_THREAD 1 |
| 3830 | EOF |
| 3831 | |
| 3832 | cat >> confdefs.h <<\EOF |
| 3833 | #define C_THREADS 1 |
| 3834 | EOF |
| 3835 | |
| 3836 | cat >> confdefs.h <<\EOF |
| 3837 | #define MACH_C_THREADS 1 |
| 3838 | EOF |
| 3839 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3840 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3841 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3842 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3843 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3844 | echo $ac_n "checking for --with-pth""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3845 | echo "configure:3846: checking for --with-pth" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3846 | # Check whether --with-pth or --without-pth was given. |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3847 | if test "${with_pth+set}" = set; then |
| 3848 | withval="$with_pth" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3849 | |
| 3850 | echo "$ac_t""$withval" 1>&6 |
| 3851 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +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 | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3856 | #define HAVE_PTH 1 |
| 3857 | EOF |
| 3858 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3859 | LIBS="-lpth $LIBS" |
| 3860 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3861 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3862 | |
| 3863 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3864 | |
| 3865 | # Just looking for pthread_create in libpthread is not enough: |
| 3866 | # on HP/UX, pthread.h renames pthread_create to a different symbol name. |
| 3867 | # So we really have to include pthread.h, and then link. |
| 3868 | _libs=$LIBS |
| 3869 | LIBS="$LIBS -lpthread" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3870 | echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3871 | echo "configure:3872: checking for pthread_create in -lpthread" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3872 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3873 | #line 3874 "configure" |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3874 | #include "confdefs.h" |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3875 | #include <pthread.h> |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3876 | |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3877 | void * start_routine (void *arg) { exit (0); } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3878 | int main() { |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3879 | |
| 3880 | pthread_create (NULL, NULL, start_routine, NULL) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3881 | ; return 0; } |
| 3882 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3883 | if { (eval echo configure:3884: \"$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] | 3884 | rm -rf conftest* |
| 3885 | |
| 3886 | echo "$ac_t""yes" 1>&6 |
| 3887 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3888 | #define WITH_THREAD 1 |
| 3889 | EOF |
| 3890 | |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3891 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3892 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3893 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3894 | echo "configure: failed program was:" >&5 |
| 3895 | cat conftest.$ac_ext >&5 |
| 3896 | rm -rf conftest* |
| 3897 | |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3898 | LIBS=$_libs |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3899 | echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3900 | echo "configure:3901: checking for pthread_detach" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3901 | if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then |
| 3902 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3903 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3904 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3905 | #line 3906 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3906 | #include "confdefs.h" |
| 3907 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3908 | which can conflict with char pthread_detach(); below. */ |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3909 | #include <assert.h> |
| 3910 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3911 | /* 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] | 3912 | builtin and then its argument prototype would still apply. */ |
| 3913 | char pthread_detach(); |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3914 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3915 | int main() { |
| 3916 | |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3917 | /* The GNU C library defines this for functions which it implements |
| 3918 | to always fail with ENOSYS. Some functions are actually named |
| 3919 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3920 | #if defined (__stub_pthread_detach) || defined (__stub___pthread_detach) |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3921 | choke me |
| 3922 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3923 | pthread_detach(); |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3924 | #endif |
| 3925 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3926 | ; return 0; } |
| 3927 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3928 | if { (eval echo configure:3929: \"$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] | 3929 | rm -rf conftest* |
| 3930 | eval "ac_cv_func_pthread_detach=yes" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3931 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3932 | echo "configure: failed program was:" >&5 |
| 3933 | cat conftest.$ac_ext >&5 |
| 3934 | rm -rf conftest* |
| 3935 | eval "ac_cv_func_pthread_detach=no" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3936 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3937 | rm -f conftest* |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3938 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3939 | |
| 3940 | if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then |
| 3941 | echo "$ac_t""yes" 1>&6 |
| 3942 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3943 | #define WITH_THREAD 1 |
| 3944 | EOF |
| 3945 | |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3946 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3947 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3948 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3949 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3950 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3951 | ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'` |
| 3952 | echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3953 | echo "configure:3954: checking for kernel/OS.h" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3954 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 3955 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3956 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3957 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3958 | #line 3959 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3959 | #include "confdefs.h" |
| 3960 | #include <kernel/OS.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3961 | EOF |
| 3962 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3963 | { (eval echo configure:3964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3964 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 3965 | if test -z "$ac_err"; then |
| 3966 | rm -rf conftest* |
| 3967 | eval "ac_cv_header_$ac_safe=yes" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3968 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3969 | echo "$ac_err" >&5 |
| 3970 | echo "configure: failed program was:" >&5 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3971 | cat conftest.$ac_ext >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3972 | rm -rf conftest* |
| 3973 | eval "ac_cv_header_$ac_safe=no" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3974 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3975 | rm -f conftest* |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3976 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3977 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 3978 | echo "$ac_t""yes" 1>&6 |
| 3979 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3980 | #define WITH_THREAD 1 |
| 3981 | EOF |
| 3982 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3983 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3984 | #define BEOS_THREADS 1 |
| 3985 | EOF |
| 3986 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3987 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3988 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3989 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3990 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3991 | echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 3992 | echo "configure:3993: checking for pthread_create in -lpthreads" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3993 | ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'` |
| 3994 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 3995 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3996 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3997 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3998 | LIBS="-lpthreads $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3999 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4000 | #line 4001 "configure" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4001 | #include "confdefs.h" |
| 4002 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4003 | /* 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] | 4004 | builtin and then its argument prototype would still apply. */ |
| 4005 | char pthread_create(); |
| 4006 | |
| 4007 | int main() { |
| 4008 | pthread_create() |
| 4009 | ; return 0; } |
| 4010 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4011 | if { (eval echo configure:4012: \"$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] | 4012 | rm -rf conftest* |
| 4013 | eval "ac_cv_lib_$ac_lib_var=yes" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4014 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4015 | echo "configure: failed program was:" >&5 |
| 4016 | cat conftest.$ac_ext >&5 |
| 4017 | rm -rf conftest* |
| 4018 | eval "ac_cv_lib_$ac_lib_var=no" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4019 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4020 | rm -f conftest* |
| 4021 | LIBS="$ac_save_LIBS" |
| 4022 | |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4023 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4024 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4025 | echo "$ac_t""yes" 1>&6 |
| 4026 | cat >> confdefs.h <<\EOF |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4027 | #define WITH_THREAD 1 |
| 4028 | EOF |
| 4029 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4030 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4031 | LIBS="$LIBS -lpthreads" |
| 4032 | LIBOBJS="$LIBOBJS thread.o" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4033 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4034 | echo "$ac_t""no" 1>&6 |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4035 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4036 | echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4037 | echo "configure:4038: checking for pthread_create in -lc_r" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4038 | ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` |
| 4039 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 4040 | echo $ac_n "(cached) $ac_c" 1>&6 |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4041 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4042 | ac_save_LIBS="$LIBS" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4043 | LIBS="-lc_r $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4044 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4045 | #line 4046 "configure" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4046 | #include "confdefs.h" |
| 4047 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4048 | /* 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] | 4049 | builtin and then its argument prototype would still apply. */ |
| 4050 | char pthread_create(); |
| 4051 | |
| 4052 | int main() { |
| 4053 | pthread_create() |
| 4054 | ; return 0; } |
| 4055 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4056 | if { (eval echo configure:4057: \"$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] | 4057 | rm -rf conftest* |
| 4058 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4059 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4060 | echo "configure: failed program was:" >&5 |
| 4061 | cat conftest.$ac_ext >&5 |
| 4062 | rm -rf conftest* |
| 4063 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4064 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4065 | rm -f conftest* |
| 4066 | LIBS="$ac_save_LIBS" |
| 4067 | |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4068 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4069 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4070 | echo "$ac_t""yes" 1>&6 |
| 4071 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4072 | #define WITH_THREAD 1 |
| 4073 | EOF |
| 4074 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4075 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4076 | LIBS="$LIBS -lc_r" |
| 4077 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4078 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4079 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4080 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4081 | echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4082 | echo "configure:4083: checking for __d6_pthread_create in -lthread" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4083 | ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'` |
| 4084 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 4085 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4086 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4087 | ac_save_LIBS="$LIBS" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4088 | LIBS="-lthread $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4089 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4090 | #line 4091 "configure" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4091 | #include "confdefs.h" |
| 4092 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4093 | /* 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] | 4094 | builtin and then its argument prototype would still apply. */ |
| 4095 | char __d6_pthread_create(); |
| 4096 | |
| 4097 | int main() { |
| 4098 | __d6_pthread_create() |
| 4099 | ; return 0; } |
| 4100 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4101 | if { (eval echo configure:4102: \"$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] | 4102 | rm -rf conftest* |
| 4103 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4104 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4105 | echo "configure: failed program was:" >&5 |
| 4106 | cat conftest.$ac_ext >&5 |
| 4107 | rm -rf conftest* |
| 4108 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4109 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4110 | rm -f conftest* |
| 4111 | LIBS="$ac_save_LIBS" |
| 4112 | |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4113 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4114 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4115 | echo "$ac_t""yes" 1>&6 |
| 4116 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4117 | #define WITH_THREAD 1 |
| 4118 | EOF |
| 4119 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4120 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4121 | LIBS="$LIBS -lthread" |
| 4122 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4123 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4124 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4125 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4126 | echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4127 | echo "configure:4128: checking for __pthread_create_system in -lpthread" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4128 | ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'` |
| 4129 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 4130 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4131 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4132 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4133 | LIBS="-lpthread $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4134 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4135 | #line 4136 "configure" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4136 | #include "confdefs.h" |
| 4137 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4138 | /* 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] | 4139 | builtin and then its argument prototype would still apply. */ |
| 4140 | char __pthread_create_system(); |
| 4141 | |
| 4142 | int main() { |
| 4143 | __pthread_create_system() |
| 4144 | ; return 0; } |
| 4145 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4146 | if { (eval echo configure:4147: \"$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] | 4147 | rm -rf conftest* |
| 4148 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4149 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4150 | echo "configure: failed program was:" >&5 |
| 4151 | cat conftest.$ac_ext >&5 |
| 4152 | rm -rf conftest* |
| 4153 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4154 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4155 | rm -f conftest* |
| 4156 | LIBS="$ac_save_LIBS" |
| 4157 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4158 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4159 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4160 | echo "$ac_t""yes" 1>&6 |
| 4161 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4162 | #define WITH_THREAD 1 |
| 4163 | EOF |
| 4164 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4165 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4166 | LIBS="$LIBS -lpthread" |
| 4167 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4168 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4169 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4170 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4171 | echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4172 | echo "configure:4173: checking for pthread_create in -lcma" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4173 | ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'` |
| 4174 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 4175 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4176 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4177 | ac_save_LIBS="$LIBS" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4178 | LIBS="-lcma $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4179 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4180 | #line 4181 "configure" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4181 | #include "confdefs.h" |
| 4182 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4183 | /* 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] | 4184 | builtin and then its argument prototype would still apply. */ |
| 4185 | char pthread_create(); |
| 4186 | |
| 4187 | int main() { |
| 4188 | pthread_create() |
| 4189 | ; return 0; } |
| 4190 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4191 | if { (eval echo configure:4192: \"$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] | 4192 | rm -rf conftest* |
| 4193 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4194 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4195 | echo "configure: failed program was:" >&5 |
| 4196 | cat conftest.$ac_ext >&5 |
| 4197 | rm -rf conftest* |
| 4198 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4199 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4200 | rm -f conftest* |
| 4201 | LIBS="$ac_save_LIBS" |
| 4202 | |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4203 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4204 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4205 | echo "$ac_t""yes" 1>&6 |
| 4206 | cat >> confdefs.h <<\EOF |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4207 | #define WITH_THREAD 1 |
| 4208 | EOF |
| 4209 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4210 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4211 | LIBS="$LIBS -lcma" |
| 4212 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4213 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4214 | echo "$ac_t""no" 1>&6 |
Thomas Wouters | 0db2b2b | 2000-08-26 11:33:43 +0000 | [diff] [blame] | 4215 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4216 | USE_THREAD_MODULE="#" |
Guido van Rossum | 2d38f91 | 1996-06-26 19:47:01 +0000 | [diff] [blame] | 4217 | fi |
| 4218 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4219 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4220 | fi |
| 4221 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 4222 | fi |
| 4223 | |
Guido van Rossum | 0be3e49 | 1997-05-22 20:33:33 +0000 | [diff] [blame] | 4224 | fi |
| 4225 | |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4226 | fi |
| 4227 | |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4228 | fi |
| 4229 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 4230 | fi |
| 4231 | |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 4232 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4233 | rm -f conftest* |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4234 | fi |
| 4235 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4236 | fi |
| 4237 | |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 4238 | fi |
| 4239 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4240 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4241 | if test "$posix_threads" = "yes"; then |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4242 | if test "$unistd_defines_pthreads" = "no"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4243 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4244 | #define _POSIX_THREADS 1 |
| 4245 | EOF |
| 4246 | |
| 4247 | fi |
| 4248 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4249 | echo $ac_n "checking if PTHREAD_SCOPE_SYSTEM is supported""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4250 | echo "configure:4251: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4251 | if eval "test \"`echo '$''{'ac_cv_pthread_system_supported'+set}'`\" = set"; then |
| 4252 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4253 | else |
| 4254 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 4255 | ac_cv_pthread_system_supported=no |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4256 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4257 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4258 | #line 4259 "configure" |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4259 | #include "confdefs.h" |
| 4260 | #include <pthread.h> |
| 4261 | void *foo(void *parm) { |
| 4262 | return NULL; |
| 4263 | } |
| 4264 | main() { |
| 4265 | pthread_attr_t attr; |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame] | 4266 | pthread_t id; |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4267 | if (pthread_attr_init(&attr)) exit(-1); |
| 4268 | if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1); |
Martin v. Löwis | a82d347 | 2002-02-24 16:05:05 +0000 | [diff] [blame] | 4269 | if (pthread_create(&id, &attr, foo, NULL)) exit(-1); |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4270 | exit(0); |
| 4271 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4272 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4273 | if { (eval echo configure:4274: \"$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] | 4274 | then |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4275 | ac_cv_pthread_system_supported=yes |
| 4276 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4277 | echo "configure: failed program was:" >&5 |
| 4278 | cat conftest.$ac_ext >&5 |
| 4279 | rm -fr conftest* |
| 4280 | ac_cv_pthread_system_supported=no |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4281 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4282 | rm -fr conftest* |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4283 | fi |
| 4284 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4285 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4286 | fi |
| 4287 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4288 | echo "$ac_t""$ac_cv_pthread_system_supported" 1>&6 |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4289 | if test "$ac_cv_pthread_system_supported" = "yes"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4290 | cat >> confdefs.h <<\EOF |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4291 | #define PTHREAD_SYSTEM_SCHED_SUPPORTED 1 |
| 4292 | EOF |
| 4293 | |
| 4294 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4295 | for ac_func in pthread_sigmask |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4296 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4297 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4298 | echo "configure:4299: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4299 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 4300 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4301 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4302 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4303 | #line 4304 "configure" |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4304 | #include "confdefs.h" |
| 4305 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4306 | which can conflict with char $ac_func(); below. */ |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4307 | #include <assert.h> |
| 4308 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4309 | /* 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] | 4310 | builtin and then its argument prototype would still apply. */ |
| 4311 | char $ac_func(); |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4312 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4313 | int main() { |
| 4314 | |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4315 | /* The GNU C library defines this for functions which it implements |
| 4316 | to always fail with ENOSYS. Some functions are actually named |
| 4317 | something starting with __ and the normal name is an alias. */ |
| 4318 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 4319 | choke me |
| 4320 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4321 | $ac_func(); |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4322 | #endif |
| 4323 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4324 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 4325 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4326 | if { (eval echo configure:4327: \"$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] | 4327 | rm -rf conftest* |
| 4328 | eval "ac_cv_func_$ac_func=yes" |
| 4329 | else |
| 4330 | echo "configure: failed program was:" >&5 |
| 4331 | cat conftest.$ac_ext >&5 |
| 4332 | rm -rf conftest* |
| 4333 | eval "ac_cv_func_$ac_func=no" |
| 4334 | fi |
| 4335 | rm -f conftest* |
| 4336 | fi |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4337 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4338 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4339 | echo "$ac_t""yes" 1>&6 |
| 4340 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4341 | cat >> confdefs.h <<EOF |
| 4342 | #define $ac_tr_func 1 |
| 4343 | EOF |
| 4344 | |
| 4345 | else |
| 4346 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4347 | fi |
| 4348 | done |
| 4349 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4350 | fi |
| 4351 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4352 | echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4353 | echo "configure:4354: checking for usconfig in -lmpc" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4354 | ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'` |
| 4355 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 4356 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4357 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4358 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4359 | LIBS="-lmpc $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4360 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4361 | #line 4362 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4362 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4363 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4364 | /* 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] | 4365 | builtin and then its argument prototype would still apply. */ |
| 4366 | char usconfig(); |
| 4367 | |
| 4368 | int main() { |
| 4369 | usconfig() |
| 4370 | ; return 0; } |
| 4371 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4372 | if { (eval echo configure:4373: \"$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] | 4373 | rm -rf conftest* |
| 4374 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4375 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4376 | echo "configure: failed program was:" >&5 |
| 4377 | cat conftest.$ac_ext >&5 |
| 4378 | rm -rf conftest* |
| 4379 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4380 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4381 | rm -f conftest* |
| 4382 | LIBS="$ac_save_LIBS" |
| 4383 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4384 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4385 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4386 | echo "$ac_t""yes" 1>&6 |
| 4387 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4388 | #define WITH_THREAD 1 |
| 4389 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4390 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4391 | LIBS="$LIBS -lmpc" |
| 4392 | LIBOBJS="$LIBOBJS thread.o" |
| 4393 | USE_THREAD_MODULE="" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4394 | else |
| 4395 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4396 | fi |
| 4397 | |
Martin v. Löwis | 3d2b549 | 2002-03-15 13:48:21 +0000 | [diff] [blame] | 4398 | |
| 4399 | if test $posix_threads != "yes"; then |
| 4400 | echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4401 | echo "configure:4402: checking for thr_create in -lthread" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4402 | ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'` |
| 4403 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 4404 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4405 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4406 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4407 | LIBS="-lthread $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4408 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4409 | #line 4410 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4410 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4411 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4412 | /* 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] | 4413 | builtin and then its argument prototype would still apply. */ |
| 4414 | char thr_create(); |
| 4415 | |
| 4416 | int main() { |
| 4417 | thr_create() |
| 4418 | ; return 0; } |
| 4419 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4420 | if { (eval echo configure:4421: \"$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] | 4421 | rm -rf conftest* |
| 4422 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4423 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4424 | echo "configure: failed program was:" >&5 |
| 4425 | cat conftest.$ac_ext >&5 |
| 4426 | rm -rf conftest* |
| 4427 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4428 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4429 | rm -f conftest* |
| 4430 | LIBS="$ac_save_LIBS" |
| 4431 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4432 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4433 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4434 | echo "$ac_t""yes" 1>&6 |
| 4435 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4436 | #define WITH_THREAD 1 |
| 4437 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4438 | |
Martin v. Löwis | 3d2b549 | 2002-03-15 13:48:21 +0000 | [diff] [blame] | 4439 | LIBS="$LIBS -lthread" |
| 4440 | LIBOBJS="$LIBOBJS thread.o" |
| 4441 | USE_THREAD_MODULE="" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4442 | else |
| 4443 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4444 | fi |
| 4445 | |
Martin v. Löwis | 3d2b549 | 2002-03-15 13:48:21 +0000 | [diff] [blame] | 4446 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4447 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4448 | if test "$USE_THREAD_MODULE" != "#" |
| 4449 | then |
| 4450 | # If the above checks didn't disable threads, (at least) OSF1 |
| 4451 | # needs this '-threads' argument during linking. |
| 4452 | case $ac_sys_system in |
| 4453 | OSF1) LDLAST=-threads;; |
| 4454 | esac |
Jeremy Hylton | 1a2ca86 | 2000-10-16 16:59:12 +0000 | [diff] [blame] | 4455 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4456 | fi |
| 4457 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4458 | # Check for enable-ipv6 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4459 | echo $ac_n "checking if --enable-ipv6 is specified""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4460 | echo "configure:4461: checking if --enable-ipv6 is specified" >&5 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4461 | # Check whether --enable-ipv6 or --disable-ipv6 was given. |
| 4462 | if test "${enable_ipv6+set}" = set; then |
| 4463 | enableval="$enable_ipv6" |
| 4464 | case "$enableval" in |
| 4465 | no) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4466 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4467 | ipv6=no |
| 4468 | ;; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4469 | *) echo "$ac_t""yes" 1>&6 |
| 4470 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4471 | #define ENABLE_IPV6 1 |
| 4472 | EOF |
| 4473 | |
| 4474 | ipv6=yes |
| 4475 | ;; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4476 | esac |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4477 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4478 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4479 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4480 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4481 | ipv6=no |
| 4482 | |
| 4483 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4484 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4485 | #line 4486 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4486 | #include "confdefs.h" |
| 4487 | /* AF_INET6 available check */ |
| 4488 | #include <sys/types.h> |
| 4489 | #include <sys/socket.h> |
| 4490 | main() |
| 4491 | { |
| 4492 | if (socket(AF_INET6, SOCK_STREAM, 0) < 0) |
| 4493 | exit(1); |
| 4494 | else |
| 4495 | exit(0); |
| 4496 | } |
| 4497 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4498 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4499 | if { (eval echo configure:4500: \"$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] | 4500 | then |
| 4501 | echo "$ac_t""yes" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4502 | ipv6=yes |
| 4503 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4504 | echo "configure: failed program was:" >&5 |
| 4505 | cat conftest.$ac_ext >&5 |
| 4506 | rm -fr conftest* |
| 4507 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4508 | ipv6=no |
| 4509 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4510 | rm -fr conftest* |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4511 | fi |
| 4512 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4513 | |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4514 | if test "$ipv6" = "yes"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4515 | echo $ac_n "checking if RFC2553 API is available""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4516 | echo "configure:4517: checking if RFC2553 API is available" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4517 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4518 | #line 4519 "configure" |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4519 | #include "confdefs.h" |
| 4520 | #include <sys/types.h> |
| 4521 | #include <netinet/in.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4522 | int main() { |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4523 | struct sockaddr_in6 x; |
| 4524 | x.sin6_scope_id; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4525 | ; return 0; } |
| 4526 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4527 | if { (eval echo configure:4528: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4528 | rm -rf conftest* |
| 4529 | echo "$ac_t""yes" 1>&6 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4530 | ipv6=yes |
| 4531 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4532 | echo "configure: failed program was:" >&5 |
| 4533 | cat conftest.$ac_ext >&5 |
| 4534 | rm -rf conftest* |
| 4535 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4536 | ipv6=no |
| 4537 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4538 | rm -f conftest* |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4539 | fi |
| 4540 | |
| 4541 | if test "$ipv6" = "yes"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4542 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4543 | #define ENABLE_IPV6 1 |
| 4544 | EOF |
| 4545 | |
| 4546 | fi |
| 4547 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4548 | fi |
| 4549 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4550 | |
| 4551 | ipv6type=unknown |
| 4552 | ipv6lib=none |
| 4553 | ipv6trylibc=no |
| 4554 | |
| 4555 | if test "$ipv6" = "yes"; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4556 | echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4557 | echo "configure:4558: checking ipv6 stack type" >&5 |
Guido van Rossum | b855216 | 2001-09-05 14:58:11 +0000 | [diff] [blame] | 4558 | for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta; |
| 4559 | do |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4560 | case $i in |
| 4561 | inria) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4562 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4563 | #line 4564 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4564 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4565 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4566 | #include <netinet/in.h> |
| 4567 | #ifdef IPV6_INRIA_VERSION |
| 4568 | yes |
| 4569 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4570 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4571 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4572 | egrep "yes" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4573 | rm -rf conftest* |
Martin v. Löwis | 44ddbde | 2001-12-02 10:15:37 +0000 | [diff] [blame] | 4574 | ipv6type=$i |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4575 | fi |
| 4576 | rm -f conftest* |
| 4577 | |
| 4578 | ;; |
| 4579 | kame) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4580 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4581 | #line 4582 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4582 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4583 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4584 | #include <netinet/in.h> |
| 4585 | #ifdef __KAME__ |
| 4586 | yes |
| 4587 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4588 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4589 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4590 | egrep "yes" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4591 | rm -rf conftest* |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4592 | ipv6type=$i; |
| 4593 | ipv6lib=inet6 |
| 4594 | ipv6libdir=/usr/local/v6/lib |
| 4595 | ipv6trylibc=yes |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4596 | fi |
| 4597 | rm -f conftest* |
| 4598 | |
| 4599 | ;; |
| 4600 | linux-glibc) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4601 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4602 | #line 4603 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4603 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4604 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4605 | #include <features.h> |
| 4606 | #if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)) |
| 4607 | yes |
| 4608 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4609 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4610 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4611 | egrep "yes" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4612 | rm -rf conftest* |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4613 | ipv6type=$i; |
| 4614 | ipv6trylibc=yes |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4615 | fi |
| 4616 | rm -f conftest* |
| 4617 | |
| 4618 | ;; |
| 4619 | linux-inet6) |
| 4620 | if test -d /usr/inet6; then |
| 4621 | ipv6type=$i |
| 4622 | ipv6lib=inet6 |
| 4623 | ipv6libdir=/usr/inet6/lib |
Martin v. Löwis | 44ddbde | 2001-12-02 10:15:37 +0000 | [diff] [blame] | 4624 | OPT="-I/usr/inet6/include $OPT" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4625 | fi |
| 4626 | ;; |
| 4627 | solaris) |
| 4628 | if test -f /etc/netconfig; then |
| 4629 | if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then |
| 4630 | ipv6type=$i |
| 4631 | ipv6trylibc=yes |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4632 | fi |
| 4633 | fi |
| 4634 | ;; |
| 4635 | toshiba) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4636 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4637 | #line 4638 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4638 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4639 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4640 | #include <sys/param.h> |
| 4641 | #ifdef _TOSHIBA_INET6 |
| 4642 | yes |
| 4643 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4644 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4645 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4646 | egrep "yes" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4647 | rm -rf conftest* |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4648 | ipv6type=$i; |
| 4649 | ipv6lib=inet6; |
Martin v. Löwis | 44ddbde | 2001-12-02 10:15:37 +0000 | [diff] [blame] | 4650 | ipv6libdir=/usr/local/v6/lib |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4651 | fi |
| 4652 | rm -f conftest* |
| 4653 | |
| 4654 | ;; |
| 4655 | v6d) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4656 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4657 | #line 4658 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4658 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4659 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4660 | #include </usr/local/v6/include/sys/v6config.h> |
| 4661 | #ifdef __V6D__ |
| 4662 | yes |
| 4663 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4664 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4665 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4666 | egrep "yes" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4667 | rm -rf conftest* |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4668 | ipv6type=$i; |
| 4669 | ipv6lib=v6; |
| 4670 | ipv6libdir=/usr/local/v6/lib; |
| 4671 | OPT="-I/usr/local/v6/include $OPT" |
| 4672 | fi |
| 4673 | rm -f conftest* |
| 4674 | |
| 4675 | ;; |
| 4676 | zeta) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4677 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4678 | #line 4679 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4679 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4680 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4681 | #include <sys/param.h> |
| 4682 | #ifdef _ZETA_MINAMI_INET6 |
| 4683 | yes |
| 4684 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4685 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4686 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4687 | egrep "yes" >/dev/null 2>&1; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4688 | rm -rf conftest* |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4689 | ipv6type=$i; |
| 4690 | ipv6lib=inet6; |
Martin v. Löwis | 44ddbde | 2001-12-02 10:15:37 +0000 | [diff] [blame] | 4691 | ipv6libdir=/usr/local/v6/lib |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4692 | fi |
| 4693 | rm -f conftest* |
| 4694 | |
| 4695 | ;; |
| 4696 | esac |
| 4697 | if test "$ipv6type" != "unknown"; then |
| 4698 | break |
| 4699 | fi |
| 4700 | done |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4701 | echo "$ac_t""$ipv6type" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4702 | fi |
| 4703 | |
| 4704 | if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then |
| 4705 | if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then |
| 4706 | LIBS="-L$ipv6libdir -l$ipv6lib $LIBS" |
| 4707 | echo "using lib$ipv6lib" |
| 4708 | else |
| 4709 | if test $ipv6trylibc = "yes"; then |
| 4710 | echo "using libc" |
| 4711 | else |
| 4712 | echo 'Fatal: no $ipv6lib library found. cannot continue.' |
| 4713 | echo "You need to fetch lib$ipv6lib.a from appropriate" |
| 4714 | echo 'ipv6 kit and compile beforehand.' |
| 4715 | exit 1 |
| 4716 | fi |
| 4717 | fi |
| 4718 | fi |
| 4719 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4720 | # Check for GC support |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4721 | echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4722 | echo "configure:4723: checking for --with-cycle-gc" >&5 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4723 | # Check whether --with-cycle-gc or --without-cycle-gc was given. |
| 4724 | if test "${with_cycle_gc+set}" = set; then |
| 4725 | withval="$with_cycle_gc" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4726 | : |
| 4727 | fi |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4728 | |
| 4729 | |
| 4730 | if test -z "$with_cycle_gc" |
| 4731 | then with_cycle_gc="yes" |
| 4732 | fi |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame] | 4733 | if test "$with_cycle_gc" != "no" |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4734 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4735 | cat >> confdefs.h <<\EOF |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4736 | #define WITH_CYCLE_GC 1 |
| 4737 | EOF |
| 4738 | |
| 4739 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4740 | echo "$ac_t""$with_cycle_gc" 1>&6 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4741 | |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 4742 | # Check for Python-specific malloc support |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4743 | echo $ac_n "checking for --with-pymalloc""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4744 | echo "configure:4745: checking for --with-pymalloc" >&5 |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 4745 | # Check whether --with-pymalloc or --without-pymalloc was given. |
| 4746 | if test "${with_pymalloc+set}" = set; then |
| 4747 | withval="$with_pymalloc" |
Neil Schemenauer | 16c2297 | 2002-03-22 15:34:49 +0000 | [diff] [blame] | 4748 | : |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4749 | fi |
| 4750 | |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 4751 | |
Neil Schemenauer | 16c2297 | 2002-03-22 15:34:49 +0000 | [diff] [blame] | 4752 | if test -z "$with_pymalloc" |
| 4753 | then with_pymalloc="yes" |
| 4754 | fi |
| 4755 | if test "$with_pymalloc" != "no" |
| 4756 | then |
| 4757 | cat >> confdefs.h <<\EOF |
| 4758 | #define WITH_PYMALLOC 1 |
| 4759 | EOF |
| 4760 | |
| 4761 | fi |
| 4762 | echo "$ac_t""$with_pymalloc" 1>&6 |
| 4763 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4764 | # Check for --with-wctype-functions |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4765 | echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4766 | echo "configure:4767: checking for --with-wctype-functions" >&5 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4767 | # Check whether --with-wctype-functions or --without-wctype-functions was given. |
| 4768 | if test "${with_wctype_functions+set}" = set; then |
| 4769 | withval="$with_wctype_functions" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4770 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4771 | if test "$withval" != no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4772 | then cat >> confdefs.h <<\EOF |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4773 | #define WANT_WCTYPE_FUNCTIONS 1 |
| 4774 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4775 | echo "$ac_t""yes" 1>&6 |
| 4776 | else echo "$ac_t""no" 1>&6 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4777 | fi |
| 4778 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4779 | echo "$ac_t""no" 1>&6 |
| 4780 | fi |
| 4781 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4782 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4783 | # -I${DLINCLDIR} is added to the compile rule for importdl.o |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4784 | |
Guido van Rossum | 98935bf | 2001-09-05 19:13:16 +0000 | [diff] [blame] | 4785 | DLINCLDIR=. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4786 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4787 | echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4788 | echo "configure:4789: checking for --with-sgi-dl" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4789 | # Check whether --with-sgi-dl or --without-sgi-dl was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4790 | if test "${with_sgi_dl+set}" = set; then |
| 4791 | withval="$with_sgi_dl" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4792 | |
| 4793 | echo "$ac_t""$withval" 1>&6 |
| 4794 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4795 | #define WITH_SGI_DL 1 |
| 4796 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4797 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4798 | DYNLOADFILE="dynload_dl.o" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4799 | dldir=$withval |
Guido van Rossum | 4095101 | 2000-10-07 16:21:27 +0000 | [diff] [blame] | 4800 | if test ! -z "$dldir" -a -d "$dldir" |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 4801 | then LDFLAGS="$LDFLAGS -L$dldir" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4802 | 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] | 4803 | fi |
| 4804 | DLINCLDIR=${dldir} |
| 4805 | LIBS="$LIBS -ldl -lmld" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4806 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4807 | echo "$ac_t""no" 1>&6 |
| 4808 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4809 | |
| 4810 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4811 | echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4812 | echo "configure:4813: checking for --with-dl-dld" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4813 | # Check whether --with-dl-dld or --without-dl-dld was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4814 | if test "${with_dl_dld+set}" = set; then |
| 4815 | withval="$with_dl_dld" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4816 | |
| 4817 | echo "$ac_t""$withval" 1>&6 |
| 4818 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4819 | #define WITH_DL_DLD 1 |
| 4820 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4821 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4822 | DYNLOADFILE="dynload_dl.o" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4823 | dldir=`echo "$withval" | sed 's/,.*//'` |
| 4824 | dlddir=`echo "$withval" | sed 's/.*,//'` |
Barry Warsaw | 7d1219d | 2000-10-05 18:45:53 +0000 | [diff] [blame] | 4825 | 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] | 4826 | then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4827 | 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] | 4828 | fi |
| 4829 | DLINCLDIR=${dldir} |
| 4830 | LIBS="$LIBS -ldl -ldld" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4831 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4832 | echo "$ac_t""no" 1>&6 |
| 4833 | fi |
| 4834 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4835 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4836 | # the dlopen() function means we might want to use dynload_shlib.o. some |
| 4837 | # 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] | 4838 | for ac_func in dlopen |
| 4839 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4840 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4841 | echo "configure:4842: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4842 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 4843 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4844 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4845 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4846 | #line 4847 "configure" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4847 | #include "confdefs.h" |
| 4848 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4849 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4850 | #include <assert.h> |
| 4851 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4852 | /* 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] | 4853 | builtin and then its argument prototype would still apply. */ |
| 4854 | char $ac_func(); |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4855 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4856 | int main() { |
| 4857 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4858 | /* The GNU C library defines this for functions which it implements |
| 4859 | to always fail with ENOSYS. Some functions are actually named |
| 4860 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4861 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4862 | choke me |
| 4863 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4864 | $ac_func(); |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4865 | #endif |
| 4866 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4867 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 4868 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4869 | if { (eval echo configure:4870: \"$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] | 4870 | rm -rf conftest* |
| 4871 | eval "ac_cv_func_$ac_func=yes" |
| 4872 | else |
| 4873 | echo "configure: failed program was:" >&5 |
| 4874 | cat conftest.$ac_ext >&5 |
| 4875 | rm -rf conftest* |
| 4876 | eval "ac_cv_func_$ac_func=no" |
| 4877 | fi |
| 4878 | rm -f conftest* |
| 4879 | fi |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4880 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4881 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4882 | echo "$ac_t""yes" 1>&6 |
| 4883 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4884 | cat >> confdefs.h <<EOF |
| 4885 | #define $ac_tr_func 1 |
| 4886 | EOF |
| 4887 | |
| 4888 | else |
| 4889 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4890 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4891 | done |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4892 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4893 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4894 | # DYNLOADFILE specifies which dynload_*.o file we will use for dynamic |
| 4895 | # loading of modules. |
| 4896 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4897 | echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4898 | echo "configure:4899: checking DYNLOADFILE" >&5 |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4899 | if test -z "$DYNLOADFILE" |
| 4900 | then |
| 4901 | case $ac_sys_system/$ac_sys_release in |
| 4902 | AIX*) DYNLOADFILE="dynload_aix.o";; |
| 4903 | BeOS*) DYNLOADFILE="dynload_beos.o";; |
| 4904 | hp*|HP*) DYNLOADFILE="dynload_hpux.o";; |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 4905 | Darwin/*) DYNLOADFILE="dynload_next.o";; |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4906 | *) |
| 4907 | # use dynload_shlib.c and dlopen() if we have it; otherwise stub |
| 4908 | # out any dynamic loading |
| 4909 | if test "$ac_cv_func_dlopen" = yes |
| 4910 | then DYNLOADFILE="dynload_shlib.o" |
| 4911 | else DYNLOADFILE="dynload_stub.o" |
| 4912 | fi |
| 4913 | ;; |
| 4914 | esac |
| 4915 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4916 | echo "$ac_t""$DYNLOADFILE" 1>&6 |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4917 | if test "$DYNLOADFILE" != "dynload_stub.o" |
| 4918 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4919 | cat >> confdefs.h <<\EOF |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4920 | #define HAVE_DYNAMIC_LOADING 1 |
| 4921 | EOF |
| 4922 | |
| 4923 | fi |
| 4924 | |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4925 | # MACHDEP_OBJS can be set to platform-specific object files needed by Python |
| 4926 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4927 | |
| 4928 | echo $ac_n "checking MACHDEP_OBJS""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4929 | echo "configure:4930: checking MACHDEP_OBJS" >&5 |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4930 | if test -z "$MACHDEP_OBJS" |
| 4931 | then |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 4932 | MACHDEP_OBJS=$extra_machdep_objs |
| 4933 | else |
| 4934 | MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs" |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4935 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4936 | echo "$ac_t""MACHDEP_OBJS" 1>&6 |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4937 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4938 | # checks for library functions |
Martin v. Löwis | 244edc8 | 2001-10-04 22:44:26 +0000 | [diff] [blame] | 4939 | 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] | 4940 | flock fork fsync fdatasync fpathconf ftime ftruncate \ |
Martin v. Löwis | f95dd0a | 2001-08-15 17:14:33 +0000 | [diff] [blame] | 4941 | gai_strerror getgroups getlogin getpeername getpid getpwent getwd \ |
Martin v. Löwis | b2c92f4 | 2002-02-16 23:35:41 +0000 | [diff] [blame] | 4942 | hstrerror inet_pton kill killpg link lstat mkfifo mktime mremap \ |
Andrew M. Kuchling | 5821b77 | 2000-08-25 01:14:08 +0000 | [diff] [blame] | 4943 | nice pathconf pause plock poll pthread_init \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 4944 | putenv readlink \ |
Martin v. Löwis | 61c5edf | 2001-10-18 04:06:00 +0000 | [diff] [blame] | 4945 | select setegid seteuid setgid setgroups \ |
Martin v. Löwis | 791bfda | 2001-07-24 06:33:08 +0000 | [diff] [blame] | 4946 | setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 4947 | sigaction siginterrupt sigrelse strftime strptime symlink sysconf \ |
Fred Drake | 89143df | 1999-12-09 22:03:25 +0000 | [diff] [blame] | 4948 | tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ |
Guido van Rossum | c524d95 | 2001-10-19 01:31:59 +0000 | [diff] [blame] | 4949 | truncate uname unsetenv waitpid _getpty getpriority |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4950 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4951 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4952 | echo "configure:4953: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4953 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 4954 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4955 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4956 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4957 | #line 4958 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4958 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4959 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4960 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4961 | #include <assert.h> |
| 4962 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4963 | /* 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] | 4964 | builtin and then its argument prototype would still apply. */ |
| 4965 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4966 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4967 | int main() { |
| 4968 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4969 | /* The GNU C library defines this for functions which it implements |
| 4970 | to always fail with ENOSYS. Some functions are actually named |
| 4971 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4972 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4973 | choke me |
| 4974 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4975 | $ac_func(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4976 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4977 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4978 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 4979 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 4980 | if { (eval echo configure:4981: \"$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] | 4981 | rm -rf conftest* |
| 4982 | eval "ac_cv_func_$ac_func=yes" |
| 4983 | else |
| 4984 | echo "configure: failed program was:" >&5 |
| 4985 | cat conftest.$ac_ext >&5 |
| 4986 | rm -rf conftest* |
| 4987 | eval "ac_cv_func_$ac_func=no" |
| 4988 | fi |
| 4989 | rm -f conftest* |
| 4990 | fi |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4991 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4992 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4993 | echo "$ac_t""yes" 1>&6 |
| 4994 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4995 | cat >> confdefs.h <<EOF |
| 4996 | #define $ac_tr_func 1 |
| 4997 | EOF |
| 4998 | |
| 4999 | else |
| 5000 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 5001 | fi |
| 5002 | done |
| 5003 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5004 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 5005 | # check for openpty and forkpty |
| 5006 | |
| 5007 | for ac_func in openpty |
| 5008 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5009 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5010 | echo "configure:5011: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5011 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5012 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 5013 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5014 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5015 | #line 5016 "configure" |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 5016 | #include "confdefs.h" |
| 5017 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5018 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 5019 | #include <assert.h> |
| 5020 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5021 | /* 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] | 5022 | builtin and then its argument prototype would still apply. */ |
| 5023 | char $ac_func(); |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 5024 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5025 | int main() { |
| 5026 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 5027 | /* The GNU C library defines this for functions which it implements |
| 5028 | to always fail with ENOSYS. Some functions are actually named |
| 5029 | something starting with __ and the normal name is an alias. */ |
| 5030 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5031 | choke me |
| 5032 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5033 | $ac_func(); |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 5034 | #endif |
| 5035 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5036 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5037 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5038 | if { (eval echo configure:5039: \"$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] | 5039 | rm -rf conftest* |
| 5040 | eval "ac_cv_func_$ac_func=yes" |
| 5041 | else |
| 5042 | echo "configure: failed program was:" >&5 |
| 5043 | cat conftest.$ac_ext >&5 |
| 5044 | rm -rf conftest* |
| 5045 | eval "ac_cv_func_$ac_func=no" |
| 5046 | fi |
| 5047 | rm -f conftest* |
| 5048 | fi |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 5049 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5050 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5051 | echo "$ac_t""yes" 1>&6 |
| 5052 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5053 | cat >> confdefs.h <<EOF |
| 5054 | #define $ac_tr_func 1 |
| 5055 | EOF |
| 5056 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 5057 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5058 | echo "$ac_t""no" 1>&6 |
| 5059 | echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5060 | echo "configure:5061: checking for openpty in -lutil" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5061 | ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'` |
| 5062 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 5063 | echo $ac_n "(cached) $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5064 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5065 | ac_save_LIBS="$LIBS" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5066 | LIBS="-lutil $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5067 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5068 | #line 5069 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5069 | #include "confdefs.h" |
| 5070 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5071 | /* 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] | 5072 | builtin and then its argument prototype would still apply. */ |
| 5073 | char openpty(); |
| 5074 | |
| 5075 | int main() { |
| 5076 | openpty() |
| 5077 | ; return 0; } |
| 5078 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5079 | if { (eval echo configure:5080: \"$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] | 5080 | rm -rf conftest* |
| 5081 | eval "ac_cv_lib_$ac_lib_var=yes" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5082 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5083 | echo "configure: failed program was:" >&5 |
| 5084 | cat conftest.$ac_ext >&5 |
| 5085 | rm -rf conftest* |
| 5086 | eval "ac_cv_lib_$ac_lib_var=no" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5087 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5088 | rm -f conftest* |
| 5089 | LIBS="$ac_save_LIBS" |
| 5090 | |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5091 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5092 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 5093 | echo "$ac_t""yes" 1>&6 |
| 5094 | cat >> confdefs.h <<\EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5095 | #define HAVE_OPENPTY 1 |
| 5096 | EOF |
| 5097 | LIBS="$LIBS -lutil" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5098 | else |
| 5099 | echo "$ac_t""no" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5100 | fi |
| 5101 | |
| 5102 | fi |
| 5103 | done |
| 5104 | |
| 5105 | for ac_func in forkpty |
| 5106 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5107 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5108 | echo "configure:5109: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5109 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5110 | echo $ac_n "(cached) $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5111 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5112 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5113 | #line 5114 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5114 | #include "confdefs.h" |
| 5115 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5116 | which can conflict with char $ac_func(); below. */ |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5117 | #include <assert.h> |
| 5118 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5119 | /* 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] | 5120 | builtin and then its argument prototype would still apply. */ |
| 5121 | char $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5122 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5123 | int main() { |
| 5124 | |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5125 | /* The GNU C library defines this for functions which it implements |
| 5126 | to always fail with ENOSYS. Some functions are actually named |
| 5127 | something starting with __ and the normal name is an alias. */ |
| 5128 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5129 | choke me |
| 5130 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5131 | $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5132 | #endif |
| 5133 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5134 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5135 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5136 | if { (eval echo configure:5137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5137 | rm -rf conftest* |
| 5138 | eval "ac_cv_func_$ac_func=yes" |
| 5139 | else |
| 5140 | echo "configure: failed program was:" >&5 |
| 5141 | cat conftest.$ac_ext >&5 |
| 5142 | rm -rf conftest* |
| 5143 | eval "ac_cv_func_$ac_func=no" |
| 5144 | fi |
| 5145 | rm -f conftest* |
| 5146 | fi |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5147 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5148 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5149 | echo "$ac_t""yes" 1>&6 |
| 5150 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5151 | cat >> confdefs.h <<EOF |
| 5152 | #define $ac_tr_func 1 |
| 5153 | EOF |
| 5154 | |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5155 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5156 | echo "$ac_t""no" 1>&6 |
| 5157 | echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5158 | echo "configure:5159: checking for forkpty in -lutil" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5159 | ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'` |
| 5160 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 5161 | echo $ac_n "(cached) $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5162 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5163 | ac_save_LIBS="$LIBS" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5164 | LIBS="-lutil $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5165 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5166 | #line 5167 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5167 | #include "confdefs.h" |
| 5168 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5169 | /* 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] | 5170 | builtin and then its argument prototype would still apply. */ |
| 5171 | char forkpty(); |
| 5172 | |
| 5173 | int main() { |
| 5174 | forkpty() |
| 5175 | ; return 0; } |
| 5176 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5177 | if { (eval echo configure:5178: \"$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] | 5178 | rm -rf conftest* |
| 5179 | eval "ac_cv_lib_$ac_lib_var=yes" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5180 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5181 | echo "configure: failed program was:" >&5 |
| 5182 | cat conftest.$ac_ext >&5 |
| 5183 | rm -rf conftest* |
| 5184 | eval "ac_cv_lib_$ac_lib_var=no" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5185 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5186 | rm -f conftest* |
| 5187 | LIBS="$ac_save_LIBS" |
| 5188 | |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5189 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5190 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 5191 | echo "$ac_t""yes" 1>&6 |
| 5192 | cat >> confdefs.h <<\EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5193 | #define HAVE_FORKPTY 1 |
| 5194 | EOF |
| 5195 | LIBS="$LIBS -lutil" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5196 | else |
| 5197 | echo "$ac_t""no" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5198 | fi |
| 5199 | |
| 5200 | fi |
| 5201 | done |
| 5202 | |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5203 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5204 | # check for long file support functions |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5205 | for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs |
| 5206 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5207 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5208 | echo "configure:5209: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5209 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5210 | echo $ac_n "(cached) $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5211 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5212 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5213 | #line 5214 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5214 | #include "confdefs.h" |
| 5215 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5216 | which can conflict with char $ac_func(); below. */ |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5217 | #include <assert.h> |
| 5218 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5219 | /* We use char because int might match the return type of a gcc2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5220 | builtin and then its argument prototype would still apply. */ |
| 5221 | char $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5222 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5223 | int main() { |
| 5224 | |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5225 | /* The GNU C library defines this for functions which it implements |
| 5226 | to always fail with ENOSYS. Some functions are actually named |
| 5227 | something starting with __ and the normal name is an alias. */ |
| 5228 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5229 | choke me |
| 5230 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5231 | $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5232 | #endif |
| 5233 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5234 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5235 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5236 | if { (eval echo configure:5237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5237 | rm -rf conftest* |
| 5238 | eval "ac_cv_func_$ac_func=yes" |
| 5239 | else |
| 5240 | echo "configure: failed program was:" >&5 |
| 5241 | cat conftest.$ac_ext >&5 |
| 5242 | rm -rf conftest* |
| 5243 | eval "ac_cv_func_$ac_func=no" |
| 5244 | fi |
| 5245 | rm -f conftest* |
| 5246 | fi |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5247 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5248 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5249 | echo "$ac_t""yes" 1>&6 |
| 5250 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5251 | cat >> confdefs.h <<EOF |
| 5252 | #define $ac_tr_func 1 |
| 5253 | EOF |
| 5254 | |
| 5255 | else |
| 5256 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5257 | fi |
| 5258 | done |
| 5259 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5260 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5261 | for ac_func in dup2 getcwd strdup strerror memmove |
| 5262 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5263 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5264 | echo "configure:5265: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5265 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5266 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5267 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5268 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5269 | #line 5270 "configure" |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5270 | #include "confdefs.h" |
| 5271 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5272 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5273 | #include <assert.h> |
| 5274 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5275 | /* We use char because int might match the return type of a gcc2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5276 | builtin and then its argument prototype would still apply. */ |
| 5277 | char $ac_func(); |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5278 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5279 | int main() { |
| 5280 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5281 | /* The GNU C library defines this for functions which it implements |
| 5282 | to always fail with ENOSYS. Some functions are actually named |
| 5283 | something starting with __ and the normal name is an alias. */ |
| 5284 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5285 | choke me |
| 5286 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5287 | $ac_func(); |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5288 | #endif |
| 5289 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5290 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5291 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5292 | if { (eval echo configure:5293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5293 | rm -rf conftest* |
| 5294 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5295 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5296 | echo "configure: failed program was:" >&5 |
| 5297 | cat conftest.$ac_ext >&5 |
| 5298 | rm -rf conftest* |
| 5299 | eval "ac_cv_func_$ac_func=no" |
| 5300 | fi |
| 5301 | rm -f conftest* |
| 5302 | fi |
| 5303 | |
| 5304 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5305 | echo "$ac_t""yes" 1>&6 |
| 5306 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5307 | cat >> confdefs.h <<EOF |
| 5308 | #define $ac_tr_func 1 |
| 5309 | EOF |
| 5310 | |
| 5311 | else |
| 5312 | echo "$ac_t""no" 1>&6 |
| 5313 | LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5314 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5315 | done |
| 5316 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5317 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5318 | for ac_func in getpgrp |
| 5319 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5320 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5321 | echo "configure:5322: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5322 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5323 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5324 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5325 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5326 | #line 5327 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5327 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5328 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5329 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5330 | #include <assert.h> |
| 5331 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5332 | /* We use char because int might match the return type of a gcc2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5333 | builtin and then its argument prototype would still apply. */ |
| 5334 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5335 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5336 | int main() { |
| 5337 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5338 | /* The GNU C library defines this for functions which it implements |
| 5339 | to always fail with ENOSYS. Some functions are actually named |
| 5340 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5341 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5342 | choke me |
| 5343 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5344 | $ac_func(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5345 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5346 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5347 | ; return 0; } |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5348 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5349 | if { (eval echo configure:5350: \"$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] | 5350 | rm -rf conftest* |
| 5351 | eval "ac_cv_func_$ac_func=yes" |
| 5352 | else |
| 5353 | echo "configure: failed program was:" >&5 |
| 5354 | cat conftest.$ac_ext >&5 |
| 5355 | rm -rf conftest* |
| 5356 | eval "ac_cv_func_$ac_func=no" |
| 5357 | fi |
| 5358 | rm -f conftest* |
| 5359 | fi |
| 5360 | |
| 5361 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5362 | echo "$ac_t""yes" 1>&6 |
| 5363 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5364 | cat >> confdefs.h <<EOF |
| 5365 | #define $ac_tr_func 1 |
| 5366 | EOF |
| 5367 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5368 | #line 5369 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5369 | #include "confdefs.h" |
| 5370 | #include <unistd.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5371 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5372 | getpgrp(0); |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5373 | ; return 0; } |
| 5374 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5375 | if { (eval echo configure:5376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5376 | rm -rf conftest* |
| 5377 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5378 | #define GETPGRP_HAVE_ARG 1 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5379 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5380 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5381 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5382 | echo "configure: failed program was:" >&5 |
| 5383 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5384 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5385 | rm -f conftest* |
| 5386 | else |
| 5387 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5388 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5389 | done |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5390 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5391 | for ac_func in setpgrp |
| 5392 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5393 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5394 | echo "configure:5395: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5395 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5396 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5397 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5398 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5399 | #line 5400 "configure" |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5400 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5401 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5402 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5403 | #include <assert.h> |
| 5404 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5405 | /* 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] | 5406 | builtin and then its argument prototype would still apply. */ |
| 5407 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5408 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5409 | int main() { |
| 5410 | |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5411 | /* The GNU C library defines this for functions which it implements |
| 5412 | to always fail with ENOSYS. Some functions are actually named |
| 5413 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5414 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5415 | choke me |
| 5416 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5417 | $ac_func(); |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5418 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5419 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5420 | ; return 0; } |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5421 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5422 | if { (eval echo configure:5423: \"$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] | 5423 | rm -rf conftest* |
| 5424 | eval "ac_cv_func_$ac_func=yes" |
| 5425 | else |
| 5426 | echo "configure: failed program was:" >&5 |
| 5427 | cat conftest.$ac_ext >&5 |
| 5428 | rm -rf conftest* |
| 5429 | eval "ac_cv_func_$ac_func=no" |
| 5430 | fi |
| 5431 | rm -f conftest* |
| 5432 | fi |
| 5433 | |
| 5434 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5435 | echo "$ac_t""yes" 1>&6 |
| 5436 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5437 | cat >> confdefs.h <<EOF |
| 5438 | #define $ac_tr_func 1 |
| 5439 | EOF |
| 5440 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5441 | #line 5442 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5442 | #include "confdefs.h" |
| 5443 | #include <unistd.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5444 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5445 | setpgrp(0,0); |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5446 | ; return 0; } |
| 5447 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5448 | if { (eval echo configure:5449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5449 | rm -rf conftest* |
| 5450 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5451 | #define SETPGRP_HAVE_ARG 1 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5452 | EOF |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5453 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5454 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5455 | echo "configure: failed program was:" >&5 |
| 5456 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5457 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5458 | rm -f conftest* |
| 5459 | else |
| 5460 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5461 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5462 | done |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5463 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5464 | for ac_func in gettimeofday |
| 5465 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5466 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5467 | echo "configure:5468: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5468 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5469 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5470 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5471 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5472 | #line 5473 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5473 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5474 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5475 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5476 | #include <assert.h> |
| 5477 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5478 | /* 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] | 5479 | builtin and then its argument prototype would still apply. */ |
| 5480 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5481 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5482 | int main() { |
| 5483 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5484 | /* The GNU C library defines this for functions which it implements |
| 5485 | to always fail with ENOSYS. Some functions are actually named |
| 5486 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5487 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5488 | choke me |
| 5489 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5490 | $ac_func(); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5491 | #endif |
| 5492 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5493 | ; return 0; } |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5494 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5495 | if { (eval echo configure:5496: \"$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] | 5496 | rm -rf conftest* |
| 5497 | eval "ac_cv_func_$ac_func=yes" |
| 5498 | else |
| 5499 | echo "configure: failed program was:" >&5 |
| 5500 | cat conftest.$ac_ext >&5 |
| 5501 | rm -rf conftest* |
| 5502 | eval "ac_cv_func_$ac_func=no" |
| 5503 | fi |
| 5504 | rm -f conftest* |
| 5505 | fi |
| 5506 | |
| 5507 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5508 | echo "$ac_t""yes" 1>&6 |
| 5509 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5510 | cat >> confdefs.h <<EOF |
| 5511 | #define $ac_tr_func 1 |
| 5512 | EOF |
| 5513 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5514 | #line 5515 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5515 | #include "confdefs.h" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5516 | #include <sys/time.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5517 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5518 | gettimeofday((struct timeval*)0,(struct timezone*)0); |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5519 | ; return 0; } |
| 5520 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5521 | if { (eval echo configure:5522: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5522 | : |
| 5523 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5524 | echo "configure: failed program was:" >&5 |
| 5525 | cat conftest.$ac_ext >&5 |
| 5526 | rm -rf conftest* |
| 5527 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5528 | #define GETTIMEOFDAY_NO_TZ 1 |
| 5529 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5530 | |
| 5531 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5532 | rm -f conftest* |
| 5533 | else |
| 5534 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5535 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5536 | done |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5537 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5538 | |
| 5539 | |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 5540 | # On OSF/1 V5.1, getaddrinfo is available, but a define |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5541 | # for [no]getaddrinfo in netdb.h. |
| 5542 | echo $ac_n "checking for getaddrinfo""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5543 | echo "configure:5544: checking for getaddrinfo" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5544 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5545 | #line 5546 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5546 | #include "confdefs.h" |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 5547 | |
Martin v. Löwis | c010b6d | 2001-11-09 17:50:52 +0000 | [diff] [blame] | 5548 | #include <sys/types.h> |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 5549 | #include <sys/socket.h> |
| 5550 | #include <netdb.h> |
Martin v. Löwis | c010b6d | 2001-11-09 17:50:52 +0000 | [diff] [blame] | 5551 | #include <stdio.h> |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5552 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5553 | int main() { |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5554 | |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 5555 | getaddrinfo(NULL, NULL, NULL, NULL); |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5556 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5557 | ; return 0; } |
| 5558 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5559 | if { (eval echo configure:5560: \"$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] | 5560 | rm -rf conftest* |
| 5561 | |
| 5562 | echo "$ac_t""yes" 1>&6 |
| 5563 | echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5564 | echo "configure:5565: checking getaddrinfo bug" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5565 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5566 | echo "$ac_t""buggy" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5567 | buggygetaddrinfo=yes |
| 5568 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5569 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5570 | #line 5571 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5571 | #include "confdefs.h" |
| 5572 | |
| 5573 | #include <sys/types.h> |
| 5574 | #include <netdb.h> |
| 5575 | #include <string.h> |
| 5576 | #include <sys/socket.h> |
| 5577 | #include <netinet/in.h> |
| 5578 | |
| 5579 | main() |
| 5580 | { |
| 5581 | int passive, gaierr, inet4 = 0, inet6 = 0; |
| 5582 | struct addrinfo hints, *ai, *aitop; |
| 5583 | char straddr[INET6_ADDRSTRLEN], strport[16]; |
| 5584 | |
| 5585 | for (passive = 0; passive <= 1; passive++) { |
| 5586 | memset(&hints, 0, sizeof(hints)); |
| 5587 | hints.ai_family = AF_UNSPEC; |
| 5588 | hints.ai_flags = passive ? AI_PASSIVE : 0; |
| 5589 | hints.ai_socktype = SOCK_STREAM; |
| 5590 | if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) { |
| 5591 | (void)gai_strerror(gaierr); |
| 5592 | goto bad; |
| 5593 | } |
| 5594 | for (ai = aitop; ai; ai = ai->ai_next) { |
| 5595 | if (ai->ai_addr == NULL || |
| 5596 | ai->ai_addrlen == 0 || |
| 5597 | getnameinfo(ai->ai_addr, ai->ai_addrlen, |
| 5598 | straddr, sizeof(straddr), strport, sizeof(strport), |
| 5599 | NI_NUMERICHOST|NI_NUMERICSERV) != 0) { |
| 5600 | goto bad; |
| 5601 | } |
| 5602 | switch (ai->ai_family) { |
| 5603 | case AF_INET: |
| 5604 | if (strcmp(strport, "54321") != 0) { |
| 5605 | goto bad; |
| 5606 | } |
| 5607 | if (passive) { |
| 5608 | if (strcmp(straddr, "0.0.0.0") != 0) { |
| 5609 | goto bad; |
| 5610 | } |
| 5611 | } else { |
| 5612 | if (strcmp(straddr, "127.0.0.1") != 0) { |
| 5613 | goto bad; |
| 5614 | } |
| 5615 | } |
| 5616 | inet4++; |
| 5617 | break; |
| 5618 | case AF_INET6: |
| 5619 | if (strcmp(strport, "54321") != 0) { |
| 5620 | goto bad; |
| 5621 | } |
| 5622 | if (passive) { |
| 5623 | if (strcmp(straddr, "::") != 0) { |
| 5624 | goto bad; |
| 5625 | } |
| 5626 | } else { |
| 5627 | if (strcmp(straddr, "::1") != 0) { |
| 5628 | goto bad; |
| 5629 | } |
| 5630 | } |
| 5631 | inet6++; |
| 5632 | break; |
| 5633 | case AF_UNSPEC: |
| 5634 | goto bad; |
| 5635 | break; |
| 5636 | default: |
| 5637 | /* another family support? */ |
| 5638 | break; |
| 5639 | } |
| 5640 | } |
| 5641 | } |
| 5642 | |
| 5643 | if (!(inet4 == 0 || inet4 == 2)) |
| 5644 | goto bad; |
| 5645 | if (!(inet6 == 0 || inet6 == 2)) |
| 5646 | goto bad; |
| 5647 | |
| 5648 | if (aitop) |
| 5649 | freeaddrinfo(aitop); |
| 5650 | exit(0); |
| 5651 | |
| 5652 | bad: |
| 5653 | if (aitop) |
| 5654 | freeaddrinfo(aitop); |
| 5655 | exit(1); |
| 5656 | } |
| 5657 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5658 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5659 | if { (eval echo configure:5660: \"$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] | 5660 | then |
| 5661 | echo "$ac_t""good" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5662 | buggygetaddrinfo=no |
| 5663 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5664 | echo "configure: failed program was:" >&5 |
| 5665 | cat conftest.$ac_ext >&5 |
| 5666 | rm -fr conftest* |
| 5667 | echo "$ac_t""buggy" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5668 | buggygetaddrinfo=yes |
| 5669 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5670 | rm -fr conftest* |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5671 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5672 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5673 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5674 | echo "configure: failed program was:" >&5 |
| 5675 | cat conftest.$ac_ext >&5 |
| 5676 | rm -rf conftest* |
| 5677 | |
| 5678 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5679 | buggygetaddrinfo=yes |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5680 | |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 5681 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5682 | rm -f conftest* |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5683 | |
| 5684 | if test "$buggygetaddrinfo" = "yes"; then |
| 5685 | if test "$ipv6" = "yes"; then |
| 5686 | echo 'Fatal: You must get working getaddrinfo() function.' |
| 5687 | echo ' or you can specify "--disable-ipv6"'. |
| 5688 | exit 1 |
| 5689 | fi |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 5690 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5691 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 5692 | #define HAVE_GETADDRINFO 1 |
| 5693 | EOF |
| 5694 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5695 | fi |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5696 | for ac_func in getnameinfo |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5697 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5698 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5699 | echo "configure:5700: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5700 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5701 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5702 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5703 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5704 | #line 5705 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5705 | #include "confdefs.h" |
| 5706 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5707 | which can conflict with char $ac_func(); below. */ |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5708 | #include <assert.h> |
| 5709 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5710 | /* 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] | 5711 | builtin and then its argument prototype would still apply. */ |
| 5712 | char $ac_func(); |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5713 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5714 | int main() { |
| 5715 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5716 | /* The GNU C library defines this for functions which it implements |
| 5717 | to always fail with ENOSYS. Some functions are actually named |
| 5718 | something starting with __ and the normal name is an alias. */ |
| 5719 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5720 | choke me |
| 5721 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5722 | $ac_func(); |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5723 | #endif |
| 5724 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5725 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5726 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5727 | if { (eval echo configure:5728: \"$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] | 5728 | rm -rf conftest* |
| 5729 | eval "ac_cv_func_$ac_func=yes" |
| 5730 | else |
| 5731 | echo "configure: failed program was:" >&5 |
| 5732 | cat conftest.$ac_ext >&5 |
| 5733 | rm -rf conftest* |
| 5734 | eval "ac_cv_func_$ac_func=no" |
| 5735 | fi |
| 5736 | rm -f conftest* |
| 5737 | fi |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5738 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5739 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5740 | echo "$ac_t""yes" 1>&6 |
| 5741 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5742 | cat >> confdefs.h <<EOF |
| 5743 | #define $ac_tr_func 1 |
| 5744 | EOF |
| 5745 | |
| 5746 | else |
| 5747 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5748 | fi |
| 5749 | done |
| 5750 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5751 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5752 | # checks for structures |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5753 | echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5754 | echo "configure:5755: 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] | 5755 | if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then |
| 5756 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5757 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5758 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5759 | #line 5760 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5760 | #include "confdefs.h" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5761 | #include <sys/types.h> |
| 5762 | #include <sys/time.h> |
| 5763 | #include <time.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5764 | int main() { |
| 5765 | struct tm *tp; |
| 5766 | ; return 0; } |
| 5767 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5768 | if { (eval echo configure:5769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5769 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5770 | ac_cv_header_time=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5771 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5772 | echo "configure: failed program was:" >&5 |
| 5773 | cat conftest.$ac_ext >&5 |
| 5774 | rm -rf conftest* |
| 5775 | ac_cv_header_time=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5776 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5777 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5778 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5779 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5780 | echo "$ac_t""$ac_cv_header_time" 1>&6 |
| 5781 | if test $ac_cv_header_time = yes; then |
| 5782 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5783 | #define TIME_WITH_SYS_TIME 1 |
| 5784 | EOF |
| 5785 | |
| 5786 | fi |
| 5787 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5788 | echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5789 | echo "configure:5790: 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] | 5790 | if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then |
| 5791 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5792 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5793 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5794 | #line 5795 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5795 | #include "confdefs.h" |
| 5796 | #include <sys/types.h> |
| 5797 | #include <time.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5798 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5799 | struct tm *tp; tp->tm_sec; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5800 | ; return 0; } |
| 5801 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5802 | if { (eval echo configure:5803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5803 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5804 | ac_cv_struct_tm=time.h |
| 5805 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5806 | echo "configure: failed program was:" >&5 |
| 5807 | cat conftest.$ac_ext >&5 |
| 5808 | rm -rf conftest* |
| 5809 | ac_cv_struct_tm=sys/time.h |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5810 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5811 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5812 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5813 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5814 | echo "$ac_t""$ac_cv_struct_tm" 1>&6 |
| 5815 | if test $ac_cv_struct_tm = sys/time.h; then |
| 5816 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5817 | #define TM_IN_SYS_TIME 1 |
| 5818 | EOF |
| 5819 | |
| 5820 | fi |
| 5821 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5822 | echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5823 | echo "configure:5824: checking for tm_zone in struct tm" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5824 | if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then |
| 5825 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5826 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5827 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5828 | #line 5829 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5829 | #include "confdefs.h" |
| 5830 | #include <sys/types.h> |
| 5831 | #include <$ac_cv_struct_tm> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5832 | int main() { |
| 5833 | struct tm tm; tm.tm_zone; |
| 5834 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5835 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5836 | if { (eval echo configure:5837: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5837 | rm -rf conftest* |
| 5838 | ac_cv_struct_tm_zone=yes |
| 5839 | else |
| 5840 | echo "configure: failed program was:" >&5 |
| 5841 | cat conftest.$ac_ext >&5 |
| 5842 | rm -rf conftest* |
| 5843 | ac_cv_struct_tm_zone=no |
| 5844 | fi |
| 5845 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5846 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5847 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5848 | echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6 |
| 5849 | if test "$ac_cv_struct_tm_zone" = yes; then |
| 5850 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5851 | #define HAVE_TM_ZONE 1 |
| 5852 | EOF |
| 5853 | |
| 5854 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5855 | echo $ac_n "checking for tzname""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5856 | echo "configure:5857: checking for tzname" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5857 | if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then |
| 5858 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5859 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5860 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5861 | #line 5862 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5862 | #include "confdefs.h" |
| 5863 | #include <time.h> |
| 5864 | #ifndef tzname /* For SGI. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5865 | extern char *tzname[]; /* RS6000 and others reject char **tzname. */ |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5866 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5867 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5868 | atoi(*tzname); |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5869 | ; return 0; } |
| 5870 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5871 | if { (eval echo configure:5872: \"$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] | 5872 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5873 | ac_cv_var_tzname=yes |
| 5874 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5875 | echo "configure: failed program was:" >&5 |
| 5876 | cat conftest.$ac_ext >&5 |
| 5877 | rm -rf conftest* |
| 5878 | ac_cv_var_tzname=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5879 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5880 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5881 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5882 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5883 | echo "$ac_t""$ac_cv_var_tzname" 1>&6 |
| 5884 | if test $ac_cv_var_tzname = yes; then |
| 5885 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5886 | #define HAVE_TZNAME 1 |
| 5887 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5888 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5889 | fi |
| 5890 | fi |
| 5891 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5892 | echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5893 | echo "configure:5894: checking for st_rdev in struct stat" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5894 | if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then |
| 5895 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5896 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5897 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5898 | #line 5899 "configure" |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5899 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5900 | #include <sys/types.h> |
| 5901 | #include <sys/stat.h> |
| 5902 | int main() { |
| 5903 | struct stat s; s.st_rdev; |
| 5904 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5905 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5906 | if { (eval echo configure:5907: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5907 | rm -rf conftest* |
| 5908 | ac_cv_struct_st_rdev=yes |
| 5909 | else |
| 5910 | echo "configure: failed program was:" >&5 |
| 5911 | cat conftest.$ac_ext >&5 |
| 5912 | rm -rf conftest* |
| 5913 | ac_cv_struct_st_rdev=no |
| 5914 | fi |
| 5915 | rm -f conftest* |
| 5916 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5917 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5918 | echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6 |
| 5919 | if test $ac_cv_struct_st_rdev = yes; then |
| 5920 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5921 | #define HAVE_ST_RDEV 1 |
| 5922 | EOF |
| 5923 | |
| 5924 | fi |
| 5925 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5926 | echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5927 | echo "configure:5928: checking for st_blksize in struct stat" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5928 | if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then |
| 5929 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5930 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5931 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5932 | #line 5933 "configure" |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5933 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5934 | #include <sys/types.h> |
| 5935 | #include <sys/stat.h> |
| 5936 | int main() { |
| 5937 | struct stat s; s.st_blksize; |
| 5938 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5939 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5940 | if { (eval echo configure:5941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5941 | rm -rf conftest* |
| 5942 | ac_cv_struct_st_blksize=yes |
| 5943 | else |
| 5944 | echo "configure: failed program was:" >&5 |
| 5945 | cat conftest.$ac_ext >&5 |
| 5946 | rm -rf conftest* |
| 5947 | ac_cv_struct_st_blksize=no |
| 5948 | fi |
| 5949 | rm -f conftest* |
| 5950 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5951 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5952 | echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6 |
| 5953 | if test $ac_cv_struct_st_blksize = yes; then |
| 5954 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5955 | #define HAVE_ST_BLKSIZE 1 |
| 5956 | EOF |
| 5957 | |
| 5958 | fi |
| 5959 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5960 | echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5961 | echo "configure:5962: checking for st_blocks in struct stat" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5962 | if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then |
| 5963 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5964 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5965 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5966 | #line 5967 "configure" |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5967 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5968 | #include <sys/types.h> |
| 5969 | #include <sys/stat.h> |
| 5970 | int main() { |
| 5971 | struct stat s; s.st_blocks; |
| 5972 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5973 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5974 | if { (eval echo configure:5975: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5975 | rm -rf conftest* |
| 5976 | ac_cv_struct_st_blocks=yes |
| 5977 | else |
| 5978 | echo "configure: failed program was:" >&5 |
| 5979 | cat conftest.$ac_ext >&5 |
| 5980 | rm -rf conftest* |
| 5981 | ac_cv_struct_st_blocks=no |
| 5982 | fi |
| 5983 | rm -f conftest* |
| 5984 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 5985 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5986 | echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6 |
| 5987 | if test $ac_cv_struct_st_blocks = yes; then |
| 5988 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5989 | #define HAVE_ST_BLOCKS 1 |
| 5990 | EOF |
| 5991 | |
| 5992 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5993 | LIBOBJS="$LIBOBJS fileblocks.${ac_objext}" |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5994 | fi |
| 5995 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5996 | |
| 5997 | echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 5998 | echo "configure:5999: checking for time.h that defines altzone" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 5999 | if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then |
| 6000 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6001 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6002 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6003 | #line 6004 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6004 | #include "confdefs.h" |
| 6005 | #include <time.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6006 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6007 | return altzone; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6008 | ; return 0; } |
| 6009 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6010 | if { (eval echo configure:6011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6011 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6012 | ac_cv_header_time_altzone=yes |
| 6013 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6014 | echo "configure: failed program was:" >&5 |
| 6015 | cat conftest.$ac_ext >&5 |
| 6016 | rm -rf conftest* |
| 6017 | ac_cv_header_time_altzone=no |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6018 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6019 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6020 | fi |
| 6021 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6022 | echo "$ac_t""$ac_cv_header_time_altzone" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6023 | if test $ac_cv_header_time_altzone = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6024 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6025 | #define HAVE_ALTZONE 1 |
| 6026 | EOF |
| 6027 | |
| 6028 | fi |
| 6029 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6030 | was_it_defined=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6031 | echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6032 | echo "configure:6033: 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] | 6033 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6034 | #line 6035 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6035 | #include "confdefs.h" |
| 6036 | |
| 6037 | #include <sys/types.h> |
| 6038 | #include <sys/select.h> |
| 6039 | #include <sys/time.h> |
| 6040 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6041 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6042 | ; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6043 | ; return 0; } |
| 6044 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6045 | if { (eval echo configure:6046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6046 | rm -rf conftest* |
| 6047 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6048 | #define SYS_SELECT_WITH_SYS_TIME 1 |
| 6049 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6050 | was_it_defined=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6051 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6052 | echo "configure: failed program was:" >&5 |
| 6053 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6054 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6055 | rm -f conftest* |
| 6056 | echo "$ac_t""$was_it_defined" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6057 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6058 | echo $ac_n "checking for addrinfo""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6059 | echo "configure:6060: checking for addrinfo" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6060 | if eval "test \"`echo '$''{'ac_cv_struct_addrinfo'+set}'`\" = set"; then |
| 6061 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6062 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6063 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6064 | #line 6065 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6065 | #include "confdefs.h" |
| 6066 | |
| 6067 | # include <netdb.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6068 | int main() { |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6069 | struct addrinfo a |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6070 | ; return 0; } |
| 6071 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6072 | if { (eval echo configure:6073: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6073 | rm -rf conftest* |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6074 | ac_cv_struct_addrinfo=yes |
| 6075 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6076 | echo "configure: failed program was:" >&5 |
| 6077 | cat conftest.$ac_ext >&5 |
| 6078 | rm -rf conftest* |
| 6079 | ac_cv_struct_addrinfo=no |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6080 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6081 | rm -f conftest* |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6082 | fi |
| 6083 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6084 | echo "$ac_t""$ac_cv_struct_addrinfo" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6085 | if test $ac_cv_struct_addrinfo = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6086 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6087 | #define HAVE_ADDRINFO 1 |
| 6088 | EOF |
| 6089 | |
| 6090 | fi |
| 6091 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6092 | echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6093 | echo "configure:6094: checking for sockaddr_storage" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6094 | if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then |
| 6095 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6096 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6097 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6098 | #line 6099 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6099 | #include "confdefs.h" |
| 6100 | |
| 6101 | # include <sys/types.h> |
| 6102 | # include <sys/socket.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6103 | int main() { |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6104 | struct sockaddr_storage s |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6105 | ; return 0; } |
| 6106 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6107 | if { (eval echo configure:6108: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6108 | rm -rf conftest* |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6109 | ac_cv_struct_sockaddr_storage=yes |
| 6110 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6111 | echo "configure: failed program was:" >&5 |
| 6112 | cat conftest.$ac_ext >&5 |
| 6113 | rm -rf conftest* |
| 6114 | ac_cv_struct_sockaddr_storage=no |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6115 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6116 | rm -f conftest* |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6117 | fi |
| 6118 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6119 | echo "$ac_t""$ac_cv_struct_sockaddr_storage" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6120 | if test $ac_cv_struct_sockaddr_storage = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6121 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6122 | #define HAVE_SOCKADDR_STORAGE 1 |
| 6123 | EOF |
| 6124 | |
| 6125 | fi |
| 6126 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6127 | # checks for compiler characteristics |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6128 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6129 | echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6130 | echo "configure:6131: checking whether char is unsigned" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6131 | if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then |
| 6132 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6133 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6134 | if test "$GCC" = yes; then |
| 6135 | # GCC predefines this symbol on systems where it applies. |
| 6136 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6137 | #line 6138 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6138 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6139 | #ifdef __CHAR_UNSIGNED__ |
| 6140 | yes |
| 6141 | #endif |
| 6142 | |
| 6143 | EOF |
| 6144 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 6145 | egrep "yes" >/dev/null 2>&1; then |
| 6146 | rm -rf conftest* |
| 6147 | ac_cv_c_char_unsigned=yes |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 6148 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6149 | rm -rf conftest* |
| 6150 | ac_cv_c_char_unsigned=no |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6151 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6152 | rm -f conftest* |
| 6153 | |
| 6154 | else |
| 6155 | if test "$cross_compiling" = yes; then |
| 6156 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 6157 | else |
| 6158 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6159 | #line 6160 "configure" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6160 | #include "confdefs.h" |
| 6161 | /* volatile prevents gcc2 from optimizing the test away on sparcs. */ |
| 6162 | #if !defined(__STDC__) || __STDC__ != 1 |
| 6163 | #define volatile |
| 6164 | #endif |
| 6165 | main() { |
| 6166 | volatile char c = 255; exit(c < 0); |
| 6167 | } |
| 6168 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6169 | if { (eval echo configure:6170: \"$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] | 6170 | then |
| 6171 | ac_cv_c_char_unsigned=yes |
| 6172 | else |
| 6173 | echo "configure: failed program was:" >&5 |
| 6174 | cat conftest.$ac_ext >&5 |
| 6175 | rm -fr conftest* |
| 6176 | ac_cv_c_char_unsigned=no |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6177 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6178 | rm -fr conftest* |
| 6179 | fi |
| 6180 | |
| 6181 | fi |
| 6182 | fi |
| 6183 | |
| 6184 | echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6185 | 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] | 6186 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6187 | #define __CHAR_UNSIGNED__ 1 |
| 6188 | EOF |
| 6189 | |
| 6190 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6191 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6192 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6193 | echo "configure:6194: checking for working const" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6194 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
| 6195 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6196 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6197 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6198 | #line 6199 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6199 | #include "confdefs.h" |
| 6200 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6201 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6202 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6203 | /* Ultrix mips cc rejects this. */ |
| 6204 | typedef int charset[2]; const charset x; |
| 6205 | /* SunOS 4.1.1 cc rejects this. */ |
| 6206 | char const *const *ccp; |
| 6207 | char **p; |
| 6208 | /* NEC SVR4.0.2 mips cc rejects this. */ |
| 6209 | struct point {int x, y;}; |
| 6210 | static struct point const zero = {0,0}; |
| 6211 | /* AIX XL C 1.02.0.0 rejects this. |
| 6212 | It does not let you subtract one const X* pointer from another in an arm |
| 6213 | of an if-expression whose if-part is not a constant expression */ |
| 6214 | const char *g = "string"; |
| 6215 | ccp = &g + (g ? g-g : 0); |
| 6216 | /* HPUX 7.0 cc rejects these. */ |
| 6217 | ++ccp; |
| 6218 | p = (char**) ccp; |
| 6219 | ccp = (char const *const *) p; |
| 6220 | { /* SCO 3.2v4 cc rejects this. */ |
| 6221 | char *t; |
| 6222 | char const *s = 0 ? (char *) 0 : (char const *) 0; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6223 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6224 | *t++ = 0; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6225 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6226 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ |
| 6227 | int x[] = {25, 17}; |
| 6228 | const int *foo = &x[0]; |
| 6229 | ++foo; |
| 6230 | } |
| 6231 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ |
| 6232 | typedef const int *iptr; |
| 6233 | iptr p = 0; |
| 6234 | ++p; |
| 6235 | } |
| 6236 | { /* AIX XL C 1.02.0.0 rejects this saying |
| 6237 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ |
| 6238 | struct s { int j; const int *ap[3]; }; |
| 6239 | struct s *b; b->j = 5; |
| 6240 | } |
| 6241 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ |
| 6242 | const int foo = 10; |
| 6243 | } |
| 6244 | |
| 6245 | ; return 0; } |
| 6246 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6247 | if { (eval echo configure:6248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6248 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6249 | ac_cv_c_const=yes |
| 6250 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6251 | echo "configure: failed program was:" >&5 |
| 6252 | cat conftest.$ac_ext >&5 |
| 6253 | rm -rf conftest* |
| 6254 | ac_cv_c_const=no |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6255 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6256 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6257 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6258 | |
| 6259 | echo "$ac_t""$ac_cv_c_const" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6260 | if test $ac_cv_c_const = no; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6261 | cat >> confdefs.h <<\EOF |
| 6262 | #define const |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6263 | EOF |
| 6264 | |
| 6265 | fi |
| 6266 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6267 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6268 | works=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6269 | echo $ac_n "checking for working volatile""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6270 | echo "configure:6271: checking for working volatile" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6271 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6272 | #line 6273 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6273 | #include "confdefs.h" |
| 6274 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6275 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6276 | volatile int x; x = 0; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6277 | ; return 0; } |
| 6278 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6279 | if { (eval echo configure:6280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6280 | rm -rf conftest* |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6281 | works=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6282 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6283 | echo "configure: failed program was:" >&5 |
| 6284 | cat conftest.$ac_ext >&5 |
| 6285 | rm -rf conftest* |
| 6286 | cat >> confdefs.h <<\EOF |
| 6287 | #define volatile |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6288 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6289 | |
| 6290 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6291 | rm -f conftest* |
| 6292 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6293 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6294 | works=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6295 | echo $ac_n "checking for working signed char""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6296 | echo "configure:6297: checking for working signed char" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6297 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6298 | #line 6299 "configure" |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 6299 | #include "confdefs.h" |
| 6300 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6301 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6302 | signed char c; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6303 | ; return 0; } |
| 6304 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6305 | if { (eval echo configure:6306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6306 | rm -rf conftest* |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6307 | works=yes |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 6308 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6309 | echo "configure: failed program was:" >&5 |
| 6310 | cat conftest.$ac_ext >&5 |
| 6311 | rm -rf conftest* |
| 6312 | cat >> confdefs.h <<\EOF |
| 6313 | #define signed |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6314 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6315 | |
| 6316 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6317 | rm -f conftest* |
| 6318 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6319 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6320 | have_prototypes=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6321 | echo $ac_n "checking for prototypes""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6322 | echo "configure:6323: checking for prototypes" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6323 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6324 | #line 6325 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6325 | #include "confdefs.h" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6326 | int foo(int x) { return 0; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6327 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6328 | return foo(10); |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6329 | ; return 0; } |
| 6330 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6331 | if { (eval echo configure:6332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6332 | rm -rf conftest* |
| 6333 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6334 | #define HAVE_PROTOTYPES 1 |
| 6335 | EOF |
| 6336 | have_prototypes=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6337 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6338 | echo "configure: failed program was:" >&5 |
| 6339 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6340 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6341 | rm -f conftest* |
| 6342 | echo "$ac_t""$have_prototypes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6343 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6344 | works=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6345 | echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6346 | echo "configure:6347: checking for variable length prototypes and stdarg.h" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6347 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6348 | #line 6349 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6349 | #include "confdefs.h" |
| 6350 | |
| 6351 | #include <stdarg.h> |
Guido van Rossum | 90eea07 | 1996-08-30 20:58:57 +0000 | [diff] [blame] | 6352 | int foo(int x, ...) { |
| 6353 | va_list va; |
| 6354 | va_start(va, x); |
| 6355 | va_arg(va, int); |
| 6356 | va_arg(va, char *); |
| 6357 | va_arg(va, double); |
| 6358 | return 0; |
| 6359 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6360 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6361 | int main() { |
Guido van Rossum | 90eea07 | 1996-08-30 20:58:57 +0000 | [diff] [blame] | 6362 | return foo(10, "", 3.14); |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6363 | ; return 0; } |
| 6364 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6365 | if { (eval echo configure:6366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6366 | rm -rf conftest* |
| 6367 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6368 | #define HAVE_STDARG_PROTOTYPES 1 |
| 6369 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6370 | works=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6371 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6372 | echo "configure: failed program was:" >&5 |
| 6373 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6374 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6375 | rm -f conftest* |
| 6376 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6377 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6378 | if test "$have_prototypes" = yes; then |
| 6379 | bad_prototypes=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6380 | echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6381 | echo "configure:6382: checking for bad exec* prototypes" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6382 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6383 | #line 6384 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6384 | #include "confdefs.h" |
| 6385 | #include <unistd.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6386 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6387 | char **t;execve("@",t,t); |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6388 | ; return 0; } |
| 6389 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6390 | if { (eval echo configure:6391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6391 | : |
| 6392 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6393 | echo "configure: failed program was:" >&5 |
| 6394 | cat conftest.$ac_ext >&5 |
| 6395 | rm -rf conftest* |
| 6396 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6397 | #define BAD_EXEC_PROTOTYPES 1 |
| 6398 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6399 | bad_prototypes=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6400 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6401 | rm -f conftest* |
| 6402 | echo "$ac_t""$bad_prototypes" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6403 | fi |
| 6404 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6405 | # check if sockaddr has sa_len member |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6406 | echo $ac_n "checking if sockaddr has sa_len member""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6407 | echo "configure:6408: checking if sockaddr has sa_len member" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6408 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6409 | #line 6410 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6410 | #include "confdefs.h" |
| 6411 | #include <sys/types.h> |
| 6412 | #include <sys/socket.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6413 | int main() { |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6414 | struct sockaddr x; |
| 6415 | x.sa_len = 0; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6416 | ; return 0; } |
| 6417 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6418 | if { (eval echo configure:6419: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6419 | rm -rf conftest* |
| 6420 | echo "$ac_t""yes" 1>&6 |
| 6421 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6422 | #define HAVE_SOCKADDR_SA_LEN 1 |
| 6423 | EOF |
| 6424 | |
| 6425 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6426 | echo "configure: failed program was:" >&5 |
| 6427 | cat conftest.$ac_ext >&5 |
| 6428 | rm -rf conftest* |
| 6429 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6430 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6431 | rm -f conftest* |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6432 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6433 | echo $ac_n "checking for bad static forward""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6434 | echo "configure:6435: checking for bad static forward" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6435 | if eval "test \"`echo '$''{'ac_cv_bad_static_forward'+set}'`\" = set"; then |
| 6436 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6437 | else |
| 6438 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 6439 | ac_cv_bad_static_forward=no |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6440 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6441 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6442 | #line 6443 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6443 | #include "confdefs.h" |
| 6444 | |
| 6445 | struct s { int a; int b; }; |
| 6446 | static struct s foo; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6447 | int foobar() { |
| 6448 | static int random; |
| 6449 | random = (int) &foo; |
| 6450 | return random; |
| 6451 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6452 | static struct s foo = { 1, 2 }; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6453 | main() { |
| 6454 | exit(!((int)&foo == foobar())); |
| 6455 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6456 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6457 | if { (eval echo configure:6458: \"$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] | 6458 | then |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6459 | ac_cv_bad_static_forward=no |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6460 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6461 | echo "configure: failed program was:" >&5 |
| 6462 | cat conftest.$ac_ext >&5 |
| 6463 | rm -fr conftest* |
| 6464 | ac_cv_bad_static_forward=yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6465 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6466 | rm -fr conftest* |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6467 | fi |
| 6468 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6469 | fi |
| 6470 | |
| 6471 | echo "$ac_t""$ac_cv_bad_static_forward" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6472 | if test "$ac_cv_bad_static_forward" = yes |
| 6473 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6474 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6475 | #define BAD_STATIC_FORWARD 1 |
| 6476 | EOF |
| 6477 | |
| 6478 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6479 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6480 | va_list_is_array=no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6481 | echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6482 | echo "configure:6483: checking whether va_list is an array" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6483 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6484 | #line 6485 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6485 | #include "confdefs.h" |
| 6486 | |
| 6487 | #ifdef HAVE_STDARG_PROTOTYPES |
| 6488 | #include <stdarg.h> |
| 6489 | #else |
| 6490 | #include <varargs.h> |
| 6491 | #endif |
| 6492 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6493 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6494 | va_list list1, list2; list1 = list2; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6495 | ; return 0; } |
| 6496 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6497 | if { (eval echo configure:6498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6498 | : |
| 6499 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6500 | echo "configure: failed program was:" >&5 |
| 6501 | cat conftest.$ac_ext >&5 |
| 6502 | rm -rf conftest* |
| 6503 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6504 | #define VA_LIST_IS_ARRAY 1 |
| 6505 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6506 | va_list_is_array=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6507 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6508 | rm -f conftest* |
| 6509 | echo "$ac_t""$va_list_is_array" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6510 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6511 | # 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] | 6512 | echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6513 | echo "configure:6514: checking for gethostbyname_r" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6514 | if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then |
| 6515 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6516 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6517 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6518 | #line 6519 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6519 | #include "confdefs.h" |
| 6520 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6521 | which can conflict with char gethostbyname_r(); below. */ |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6522 | #include <assert.h> |
| 6523 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6524 | /* 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] | 6525 | builtin and then its argument prototype would still apply. */ |
| 6526 | char gethostbyname_r(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6527 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6528 | int main() { |
| 6529 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6530 | /* The GNU C library defines this for functions which it implements |
| 6531 | to always fail with ENOSYS. Some functions are actually named |
| 6532 | something starting with __ and the normal name is an alias. */ |
| 6533 | #if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r) |
| 6534 | choke me |
| 6535 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6536 | gethostbyname_r(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6537 | #endif |
| 6538 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6539 | ; return 0; } |
| 6540 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6541 | if { (eval echo configure:6542: \"$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] | 6542 | rm -rf conftest* |
| 6543 | eval "ac_cv_func_gethostbyname_r=yes" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6544 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6545 | echo "configure: failed program was:" >&5 |
| 6546 | cat conftest.$ac_ext >&5 |
| 6547 | rm -rf conftest* |
| 6548 | eval "ac_cv_func_gethostbyname_r=no" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6549 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6550 | rm -f conftest* |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6551 | fi |
| 6552 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6553 | if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then |
| 6554 | echo "$ac_t""yes" 1>&6 |
| 6555 | |
| 6556 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6557 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6558 | EOF |
| 6559 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6560 | echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6561 | echo "configure:6562: checking gethostbyname_r with 6 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6562 | OLD_CFLAGS=$CFLAGS |
| 6563 | CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6564 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6565 | #line 6566 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6566 | #include "confdefs.h" |
| 6567 | |
| 6568 | # include <netdb.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6569 | |
| 6570 | int main() { |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6571 | |
| 6572 | char *name; |
| 6573 | struct hostent *he, *res; |
| 6574 | char buffer[2048]; |
| 6575 | int buflen = 2048; |
| 6576 | int h_errnop; |
| 6577 | |
| 6578 | (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6579 | |
| 6580 | ; return 0; } |
| 6581 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6582 | if { (eval echo configure:6583: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6583 | rm -rf conftest* |
| 6584 | |
| 6585 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6586 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6587 | EOF |
| 6588 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6589 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6590 | #define HAVE_GETHOSTBYNAME_R_6_ARG 1 |
| 6591 | EOF |
| 6592 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6593 | echo "$ac_t""yes" 1>&6 |
| 6594 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6595 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6596 | echo "configure: failed program was:" >&5 |
| 6597 | cat conftest.$ac_ext >&5 |
| 6598 | rm -rf conftest* |
| 6599 | |
| 6600 | echo "$ac_t""no" 1>&6 |
| 6601 | echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6602 | echo "configure:6603: checking gethostbyname_r with 5 args" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6603 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6604 | #line 6605 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6605 | #include "confdefs.h" |
| 6606 | |
| 6607 | # include <netdb.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6608 | |
| 6609 | int main() { |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6610 | |
| 6611 | char *name; |
| 6612 | struct hostent *he; |
| 6613 | char buffer[2048]; |
| 6614 | int buflen = 2048; |
| 6615 | int h_errnop; |
| 6616 | |
| 6617 | (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6618 | |
| 6619 | ; return 0; } |
| 6620 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6621 | if { (eval echo configure:6622: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6622 | rm -rf conftest* |
| 6623 | |
| 6624 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6625 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6626 | EOF |
| 6627 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6628 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6629 | #define HAVE_GETHOSTBYNAME_R_5_ARG 1 |
| 6630 | EOF |
| 6631 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6632 | echo "$ac_t""yes" 1>&6 |
| 6633 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6634 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6635 | echo "configure: failed program was:" >&5 |
| 6636 | cat conftest.$ac_ext >&5 |
| 6637 | rm -rf conftest* |
| 6638 | |
| 6639 | echo "$ac_t""no" 1>&6 |
| 6640 | echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6641 | echo "configure:6642: checking gethostbyname_r with 3 args" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6642 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6643 | #line 6644 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6644 | #include "confdefs.h" |
| 6645 | |
| 6646 | # include <netdb.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6647 | |
| 6648 | int main() { |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6649 | |
| 6650 | char *name; |
| 6651 | struct hostent *he; |
| 6652 | struct hostent_data data; |
| 6653 | |
| 6654 | (void) gethostbyname_r(name, he, &data); |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6655 | |
| 6656 | ; return 0; } |
| 6657 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6658 | if { (eval echo configure:6659: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6659 | rm -rf conftest* |
| 6660 | |
| 6661 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6662 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6663 | EOF |
| 6664 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6665 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6666 | #define HAVE_GETHOSTBYNAME_R_3_ARG 1 |
| 6667 | EOF |
| 6668 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6669 | echo "$ac_t""yes" 1>&6 |
| 6670 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6671 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6672 | echo "configure: failed program was:" >&5 |
| 6673 | cat conftest.$ac_ext >&5 |
| 6674 | rm -rf conftest* |
| 6675 | |
| 6676 | echo "$ac_t""no" 1>&6 |
| 6677 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6678 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6679 | rm -f conftest* |
| 6680 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6681 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6682 | rm -f conftest* |
| 6683 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6684 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6685 | rm -f conftest* |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6686 | CFLAGS=$OLD_CFLAGS |
| 6687 | |
| 6688 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6689 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6690 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6691 | for ac_func in gethostbyname |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6692 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6693 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6694 | echo "configure:6695: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6695 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 6696 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6697 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6698 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6699 | #line 6700 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6700 | #include "confdefs.h" |
| 6701 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6702 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6703 | #include <assert.h> |
| 6704 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6705 | /* 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] | 6706 | builtin and then its argument prototype would still apply. */ |
| 6707 | char $ac_func(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6708 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6709 | int main() { |
| 6710 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6711 | /* The GNU C library defines this for functions which it implements |
| 6712 | to always fail with ENOSYS. Some functions are actually named |
| 6713 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6714 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6715 | choke me |
| 6716 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6717 | $ac_func(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6718 | #endif |
| 6719 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6720 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 6721 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6722 | if { (eval echo configure:6723: \"$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] | 6723 | rm -rf conftest* |
| 6724 | eval "ac_cv_func_$ac_func=yes" |
| 6725 | else |
| 6726 | echo "configure: failed program was:" >&5 |
| 6727 | cat conftest.$ac_ext >&5 |
| 6728 | rm -rf conftest* |
| 6729 | eval "ac_cv_func_$ac_func=no" |
| 6730 | fi |
| 6731 | rm -f conftest* |
| 6732 | fi |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6733 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6734 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 6735 | echo "$ac_t""yes" 1>&6 |
| 6736 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 6737 | cat >> confdefs.h <<EOF |
| 6738 | #define $ac_tr_func 1 |
| 6739 | EOF |
| 6740 | |
| 6741 | else |
| 6742 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6743 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6744 | done |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6745 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6746 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6747 | fi |
| 6748 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6749 | |
| 6750 | |
| 6751 | |
| 6752 | |
| 6753 | |
| 6754 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6755 | # checks for system services |
| 6756 | # (none yet) |
| 6757 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6758 | # Linux requires this for correct f.p. operations |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6759 | echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6760 | echo "configure:6761: checking for __fpu_control" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6761 | if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then |
| 6762 | echo $ac_n "(cached) $ac_c" 1>&6 |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6763 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6764 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6765 | #line 6766 "configure" |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6766 | #include "confdefs.h" |
| 6767 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6768 | which can conflict with char __fpu_control(); below. */ |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6769 | #include <assert.h> |
| 6770 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6771 | /* 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] | 6772 | builtin and then its argument prototype would still apply. */ |
| 6773 | char __fpu_control(); |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6774 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6775 | int main() { |
| 6776 | |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6777 | /* The GNU C library defines this for functions which it implements |
| 6778 | to always fail with ENOSYS. Some functions are actually named |
| 6779 | something starting with __ and the normal name is an alias. */ |
| 6780 | #if defined (__stub___fpu_control) || defined (__stub_____fpu_control) |
| 6781 | choke me |
| 6782 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6783 | __fpu_control(); |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6784 | #endif |
| 6785 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6786 | ; return 0; } |
| 6787 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6788 | if { (eval echo configure:6789: \"$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] | 6789 | rm -rf conftest* |
| 6790 | eval "ac_cv_func___fpu_control=yes" |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6791 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6792 | echo "configure: failed program was:" >&5 |
| 6793 | cat conftest.$ac_ext >&5 |
| 6794 | rm -rf conftest* |
| 6795 | eval "ac_cv_func___fpu_control=no" |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6796 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6797 | rm -f conftest* |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6798 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6799 | |
| 6800 | if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then |
| 6801 | echo "$ac_t""yes" 1>&6 |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6802 | : |
| 6803 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6804 | echo "$ac_t""no" 1>&6 |
| 6805 | echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6806 | echo "configure:6807: checking for __fpu_control in -lieee" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6807 | ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'` |
| 6808 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 6809 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6810 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6811 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6812 | LIBS="-lieee $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6813 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6814 | #line 6815 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6815 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6816 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6817 | /* 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] | 6818 | builtin and then its argument prototype would still apply. */ |
| 6819 | char __fpu_control(); |
| 6820 | |
| 6821 | int main() { |
| 6822 | __fpu_control() |
| 6823 | ; return 0; } |
| 6824 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6825 | if { (eval echo configure:6826: \"$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] | 6826 | rm -rf conftest* |
| 6827 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6828 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6829 | echo "configure: failed program was:" >&5 |
| 6830 | cat conftest.$ac_ext >&5 |
| 6831 | rm -rf conftest* |
| 6832 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6833 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6834 | rm -f conftest* |
| 6835 | LIBS="$ac_save_LIBS" |
| 6836 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6837 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6838 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 6839 | echo "$ac_t""yes" 1>&6 |
| 6840 | ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 6841 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
| 6842 | cat >> confdefs.h <<EOF |
| 6843 | #define $ac_tr_lib 1 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6844 | EOF |
| 6845 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6846 | LIBS="-lieee $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6847 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6848 | else |
| 6849 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6850 | fi |
| 6851 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6852 | |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6853 | fi |
| 6854 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6855 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6856 | # Check for --with-fpectl |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6857 | echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6858 | echo "configure:6859: checking for --with-fpectl" >&5 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6859 | # Check whether --with-fpectl or --without-fpectl was given. |
| 6860 | if test "${with_fpectl+set}" = set; then |
| 6861 | withval="$with_fpectl" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6862 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6863 | if test "$withval" != no |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6864 | then cat >> confdefs.h <<\EOF |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6865 | #define WANT_SIGFPE_HANDLER 1 |
| 6866 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6867 | echo "$ac_t""yes" 1>&6 |
| 6868 | else echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6869 | fi |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6870 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6871 | echo "$ac_t""no" 1>&6 |
| 6872 | fi |
| 6873 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6874 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6875 | # check for --with-libm=... |
| 6876 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 6877 | case $ac_sys_system in |
Guido van Rossum | 3dc0a51 | 2000-10-05 18:00:06 +0000 | [diff] [blame] | 6878 | Darwin) ;; |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 6879 | BeOS) ;; |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 6880 | *) LIBM=-lm |
| 6881 | esac |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6882 | echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6883 | echo "configure:6884: checking for --with-libm=STRING" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6884 | # Check whether --with-libm or --without-libm was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6885 | if test "${with_libm+set}" = set; then |
| 6886 | withval="$with_libm" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6887 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6888 | if test "$withval" = no |
| 6889 | then LIBM= |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6890 | echo "$ac_t""force LIBM empty" 1>&6 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6891 | elif test "$withval" != yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6892 | then LIBM=$withval |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6893 | echo "$ac_t""set LIBM=\"$withval\"" 1>&6 |
| 6894 | 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] | 6895 | fi |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6896 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6897 | echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6 |
| 6898 | fi |
| 6899 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6900 | |
| 6901 | # check for --with-libc=... |
| 6902 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6903 | echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6904 | echo "configure:6905: checking for --with-libc=STRING" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6905 | # Check whether --with-libc or --without-libc was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6906 | if test "${with_libc+set}" = set; then |
| 6907 | withval="$with_libc" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6908 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6909 | if test "$withval" = no |
| 6910 | then LIBC= |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6911 | echo "$ac_t""force LIBC empty" 1>&6 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6912 | elif test "$withval" != yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6913 | then LIBC=$withval |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6914 | echo "$ac_t""set LIBC=\"$withval\"" 1>&6 |
| 6915 | 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] | 6916 | fi |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6917 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6918 | echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6 |
| 6919 | fi |
| 6920 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6921 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6922 | # check for hypot() in math library |
| 6923 | LIBS_SAVE=$LIBS |
| 6924 | LIBS="$LIBS $LIBM" |
| 6925 | for ac_func in hypot |
| 6926 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6927 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6928 | echo "configure:6929: checking for $ac_func" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6929 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 6930 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6931 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6932 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6933 | #line 6934 "configure" |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6934 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6935 | /* System header to define __stub macros and hopefully few prototypes, |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6936 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6937 | #include <assert.h> |
| 6938 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6939 | /* 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] | 6940 | builtin and then its argument prototype would still apply. */ |
| 6941 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6942 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6943 | int main() { |
| 6944 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6945 | /* The GNU C library defines this for functions which it implements |
| 6946 | to always fail with ENOSYS. Some functions are actually named |
| 6947 | something starting with __ and the normal name is an alias. */ |
| 6948 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 6949 | choke me |
| 6950 | #else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6951 | $ac_func(); |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6952 | #endif |
| 6953 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6954 | ; return 0; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 6955 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6956 | if { (eval echo configure:6957: \"$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] | 6957 | rm -rf conftest* |
| 6958 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6959 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6960 | echo "configure: failed program was:" >&5 |
| 6961 | cat conftest.$ac_ext >&5 |
| 6962 | rm -rf conftest* |
| 6963 | eval "ac_cv_func_$ac_func=no" |
| 6964 | fi |
| 6965 | rm -f conftest* |
| 6966 | fi |
| 6967 | |
| 6968 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 6969 | echo "$ac_t""yes" 1>&6 |
| 6970 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 6971 | cat >> confdefs.h <<EOF |
| 6972 | #define $ac_tr_func 1 |
| 6973 | EOF |
| 6974 | |
| 6975 | else |
| 6976 | echo "$ac_t""no" 1>&6 |
| 6977 | LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6978 | fi |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6979 | done |
| 6980 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6981 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6982 | LIBS=$LIBS_SAVE |
| 6983 | |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6984 | # check whether malloc(0) returns NULL or not |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6985 | echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6986 | echo "configure:6987: checking what malloc(0) returns" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6987 | if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then |
| 6988 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6989 | else |
| 6990 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 6991 | ac_cv_malloc_zero=nonnull |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6992 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 6993 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 6994 | #line 6995 "configure" |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6995 | #include "confdefs.h" |
| 6996 | #include <stdio.h> |
| 6997 | #ifdef HAVE_STDLIB |
| 6998 | #include <stdlib.h> |
| 6999 | #else |
| 7000 | char *malloc(), *realloc(); |
| 7001 | int *free(); |
| 7002 | #endif |
| 7003 | main() { |
| 7004 | char *p; |
| 7005 | p = malloc(0); |
| 7006 | if (p == NULL) exit(1); |
| 7007 | p = realloc(p, 0); |
| 7008 | if (p == NULL) exit(1); |
| 7009 | free(p); |
| 7010 | exit(0); |
| 7011 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7012 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 7013 | if { (eval echo configure:7014: \"$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] | 7014 | then |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 7015 | ac_cv_malloc_zero=nonnull |
| 7016 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7017 | echo "configure: failed program was:" >&5 |
| 7018 | cat conftest.$ac_ext >&5 |
| 7019 | rm -fr conftest* |
| 7020 | ac_cv_malloc_zero=null |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 7021 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7022 | rm -fr conftest* |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 7023 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7024 | |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 7025 | fi |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 7026 | # XXX arm cross-compile? |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7027 | echo "$ac_t""$ac_cv_malloc_zero" 1>&6 |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 7028 | if test "$ac_cv_malloc_zero" = null |
| 7029 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7030 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 7031 | #define MALLOC_ZERO_RETURNS_NULL 1 |
| 7032 | EOF |
| 7033 | |
| 7034 | fi |
| 7035 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7036 | # check for wchar.h |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7037 | ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'` |
| 7038 | echo $ac_n "checking for wchar.h""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 7039 | echo "configure:7040: checking for wchar.h" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7040 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 7041 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7042 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7043 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 7044 | #line 7045 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7045 | #include "confdefs.h" |
| 7046 | #include <wchar.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7047 | EOF |
| 7048 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 7049 | { (eval echo configure:7050: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7050 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 7051 | if test -z "$ac_err"; then |
| 7052 | rm -rf conftest* |
| 7053 | eval "ac_cv_header_$ac_safe=yes" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7054 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7055 | echo "$ac_err" >&5 |
| 7056 | echo "configure: failed program was:" >&5 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7057 | cat conftest.$ac_ext >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7058 | rm -rf conftest* |
| 7059 | eval "ac_cv_header_$ac_safe=no" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7060 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7061 | rm -f conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7062 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7063 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 7064 | echo "$ac_t""yes" 1>&6 |
| 7065 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7066 | #define HAVE_WCHAR_H 1 |
| 7067 | EOF |
| 7068 | wchar_h="yes" |
| 7069 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7070 | echo "$ac_t""no" 1>&6 |
| 7071 | wchar_h="no" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7072 | |
| 7073 | fi |
| 7074 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7075 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7076 | # determine wchar_t size |
| 7077 | if test "$wchar_h" = yes |
| 7078 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7079 | echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 7080 | echo "configure:7081: checking size of wchar_t" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7081 | if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then |
| 7082 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7083 | else |
| 7084 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7085 | ac_cv_sizeof_wchar_t=4 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +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 | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 7088 | #line 7089 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7089 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7090 | #include <stdio.h> |
| 7091 | main() |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7092 | { |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7093 | FILE *f=fopen("conftestval", "w"); |
| 7094 | if (!f) exit(1); |
| 7095 | fprintf(f, "%d\n", sizeof(wchar_t)); |
| 7096 | exit(0); |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7097 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7098 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 7099 | if { (eval echo configure:7100: \"$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] | 7100 | then |
| 7101 | ac_cv_sizeof_wchar_t=`cat conftestval` |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7102 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7103 | echo "configure: failed program was:" >&5 |
| 7104 | cat conftest.$ac_ext >&5 |
| 7105 | rm -fr conftest* |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7106 | ac_cv_sizeof_wchar_t=0 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7107 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7108 | rm -fr conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7109 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7110 | |
| 7111 | fi |
| 7112 | echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 |
| 7113 | cat >> confdefs.h <<EOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7114 | #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t |
| 7115 | EOF |
| 7116 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7117 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7118 | fi |
| 7119 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7120 | echo $ac_n "checking what type to use for unicode""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 7121 | echo "configure:7122: checking what type to use for unicode" >&5 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7122 | # Check whether --enable-unicode or --disable-unicode was given. |
| 7123 | if test "${enable_unicode+set}" = set; then |
| 7124 | enableval="$enable_unicode" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7125 | : |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7126 | else |
| 7127 | enable_unicode=yes |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7128 | fi |
| 7129 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7130 | |
| 7131 | if test $enable_unicode = yes |
| 7132 | then |
Martin v. Löwis | fd91779 | 2001-06-27 20:22:04 +0000 | [diff] [blame] | 7133 | # Without any arguments, Py_UNICODE defaults to two-byte mode |
| 7134 | enable_unicode="ucs2" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7135 | fi |
| 7136 | |
| 7137 | case "$enable_unicode" in |
| 7138 | ucs2) unicode_size="2" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7139 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7140 | #define Py_UNICODE_SIZE 2 |
| 7141 | EOF |
| 7142 | |
| 7143 | ;; |
| 7144 | ucs4) unicode_size="4" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7145 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7146 | #define Py_UNICODE_SIZE 4 |
| 7147 | EOF |
| 7148 | |
| 7149 | ;; |
| 7150 | esac |
| 7151 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7152 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7153 | if test "$enable_unicode" = "no" |
| 7154 | then |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 7155 | UNICODE_OBJS="" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7156 | echo "$ac_t""not used" 1>&6 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7157 | else |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 7158 | UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7159 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7160 | #define Py_USING_UNICODE 1 |
| 7161 | EOF |
| 7162 | |
| 7163 | if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" |
| 7164 | then |
| 7165 | PY_UNICODE_TYPE="wchar_t" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7166 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7167 | #define HAVE_USABLE_WCHAR_T 1 |
| 7168 | EOF |
| 7169 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7170 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7171 | #define PY_UNICODE_TYPE wchar_t |
| 7172 | EOF |
| 7173 | |
| 7174 | elif test "$ac_cv_sizeof_short" = "$unicode_size" |
| 7175 | then |
| 7176 | PY_UNICODE_TYPE="unsigned short" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7177 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7178 | #define PY_UNICODE_TYPE unsigned short |
| 7179 | EOF |
| 7180 | |
| 7181 | elif test "$ac_cv_sizeof_long" = "$unicode_size" |
| 7182 | then |
| 7183 | PY_UNICODE_TYPE="unsigned long" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7184 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7185 | #define PY_UNICODE_TYPE unsigned long |
| 7186 | EOF |
| 7187 | |
| 7188 | else |
| 7189 | PY_UNICODE_TYPE="no type found" |
| 7190 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7191 | echo "$ac_t""$PY_UNICODE_TYPE" 1>&6 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7192 | fi |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7193 | |
| 7194 | # check for endianness |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7195 | echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 7196 | echo "configure:7197: checking whether byte ordering is bigendian" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7197 | if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then |
| 7198 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7199 | else |
| 7200 | ac_cv_c_bigendian=unknown |
| 7201 | # See if sys/param.h defines the BYTE_ORDER macro. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7202 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 7203 | #line 7204 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7204 | #include "confdefs.h" |
| 7205 | #include <sys/types.h> |
| 7206 | #include <sys/param.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7207 | int main() { |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7208 | |
| 7209 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN |
| 7210 | bogus endian macros |
| 7211 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7212 | ; return 0; } |
| 7213 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 7214 | if { (eval echo configure:7215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7215 | rm -rf conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7216 | # 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] | 7217 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 7218 | #line 7219 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7219 | #include "confdefs.h" |
| 7220 | #include <sys/types.h> |
| 7221 | #include <sys/param.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7222 | int main() { |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7223 | |
| 7224 | #if BYTE_ORDER != BIG_ENDIAN |
| 7225 | not big endian |
| 7226 | #endif |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7227 | ; return 0; } |
| 7228 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 7229 | if { (eval echo configure:7230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7230 | rm -rf conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7231 | ac_cv_c_bigendian=yes |
| 7232 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7233 | echo "configure: failed program was:" >&5 |
| 7234 | cat conftest.$ac_ext >&5 |
| 7235 | rm -rf conftest* |
| 7236 | ac_cv_c_bigendian=no |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7237 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7238 | rm -f conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7239 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7240 | echo "configure: failed program was:" >&5 |
| 7241 | cat conftest.$ac_ext >&5 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7242 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7243 | rm -f conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7244 | if test $ac_cv_c_bigendian = unknown; then |
| 7245 | if test "$cross_compiling" = yes; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7246 | { 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] | 7247 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7248 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 7249 | #line 7250 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7250 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7251 | main () { |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7252 | /* Are we little or big endian? From Harbison&Steele. */ |
| 7253 | union |
| 7254 | { |
| 7255 | long l; |
| 7256 | char c[sizeof (long)]; |
| 7257 | } u; |
| 7258 | u.l = 1; |
| 7259 | exit (u.c[sizeof (long) - 1] == 1); |
| 7260 | } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7261 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 7262 | if { (eval echo configure:7263: \"$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] | 7263 | then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7264 | ac_cv_c_bigendian=no |
| 7265 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7266 | echo "configure: failed program was:" >&5 |
| 7267 | cat conftest.$ac_ext >&5 |
| 7268 | rm -fr conftest* |
| 7269 | ac_cv_c_bigendian=yes |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7270 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7271 | rm -fr conftest* |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7272 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7273 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7274 | fi |
| 7275 | fi |
| 7276 | |
| 7277 | echo "$ac_t""$ac_cv_c_bigendian" 1>&6 |
| 7278 | if test $ac_cv_c_bigendian = yes; then |
| 7279 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7280 | #define WORDS_BIGENDIAN 1 |
| 7281 | EOF |
| 7282 | |
| 7283 | fi |
| 7284 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7285 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7286 | # Check whether right shifting a negative integer extends the sign bit |
| 7287 | # 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] | 7288 | echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 7289 | echo "configure:7290: checking whether right shift extends the sign bit" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7290 | if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then |
| 7291 | echo $ac_n "(cached) $ac_c" 1>&6 |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 7292 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7293 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7294 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 7295 | ac_cv_rshift_extends_sign=yes |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7296 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7297 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 7298 | #line 7299 "configure" |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7299 | #include "confdefs.h" |
| 7300 | |
| 7301 | int main() |
| 7302 | { |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 7303 | exit(((-1)>>3 == -1) ? 0 : 1); |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7304 | } |
| 7305 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7306 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 7307 | if { (eval echo configure:7308: \"$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] | 7308 | then |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 7309 | ac_cv_rshift_extends_sign=yes |
| 7310 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7311 | echo "configure: failed program was:" >&5 |
| 7312 | cat conftest.$ac_ext >&5 |
| 7313 | rm -fr conftest* |
| 7314 | ac_cv_rshift_extends_sign=no |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 7315 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7316 | rm -fr conftest* |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 7317 | fi |
| 7318 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7319 | fi |
| 7320 | |
| 7321 | echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6 |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 7322 | if test "$ac_cv_rshift_extends_sign" = no |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7323 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7324 | cat >> confdefs.h <<\EOF |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7325 | #define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1 |
| 7326 | EOF |
| 7327 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7328 | fi |
| 7329 | |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7330 | # check for getc_unlocked and related locking functions |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7331 | echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 7332 | echo "configure:7333: checking for getc_unlocked() and friends" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7333 | if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then |
| 7334 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7335 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7336 | |
| 7337 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 7338 | #line 7339 "configure" |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7339 | #include "confdefs.h" |
| 7340 | #include <stdio.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7341 | int main() { |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7342 | |
| 7343 | FILE *f = fopen("/dev/null", "r"); |
| 7344 | flockfile(f); |
| 7345 | getc_unlocked(f); |
| 7346 | funlockfile(f); |
| 7347 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7348 | ; return 0; } |
| 7349 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 7350 | if { (eval echo configure:7351: \"$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] | 7351 | rm -rf conftest* |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7352 | ac_cv_have_getc_unlocked=yes |
| 7353 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7354 | echo "configure: failed program was:" >&5 |
| 7355 | cat conftest.$ac_ext >&5 |
| 7356 | rm -rf conftest* |
| 7357 | ac_cv_have_getc_unlocked=no |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7358 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7359 | rm -f conftest* |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7360 | fi |
| 7361 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7362 | echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6 |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7363 | if test "$ac_cv_have_getc_unlocked" = yes |
| 7364 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7365 | cat >> confdefs.h <<\EOF |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7366 | #define HAVE_GETC_UNLOCKED 1 |
| 7367 | EOF |
| 7368 | |
| 7369 | fi |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7370 | |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7371 | # check for readline 4.0 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7372 | echo $ac_n "checking for rl_pre_input_hook in -lreadline""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 7373 | echo "configure:7374: checking for rl_pre_input_hook in -lreadline" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7374 | ac_lib_var=`echo readline'_'rl_pre_input_hook | sed 'y%./+-%__p_%'` |
| 7375 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 7376 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7377 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7378 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7379 | LIBS="-lreadline -ltermcap $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7380 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 7381 | #line 7382 "configure" |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7382 | #include "confdefs.h" |
| 7383 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 7384 | /* 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] | 7385 | builtin and then its argument prototype would still apply. */ |
| 7386 | char rl_pre_input_hook(); |
| 7387 | |
| 7388 | int main() { |
| 7389 | rl_pre_input_hook() |
| 7390 | ; return 0; } |
| 7391 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 7392 | if { (eval echo configure:7393: \"$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] | 7393 | rm -rf conftest* |
| 7394 | eval "ac_cv_lib_$ac_lib_var=yes" |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7395 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7396 | echo "configure: failed program was:" >&5 |
| 7397 | cat conftest.$ac_ext >&5 |
| 7398 | rm -rf conftest* |
| 7399 | eval "ac_cv_lib_$ac_lib_var=no" |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7400 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7401 | rm -f conftest* |
| 7402 | LIBS="$ac_save_LIBS" |
| 7403 | |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7404 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7405 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 7406 | echo "$ac_t""yes" 1>&6 |
| 7407 | cat >> confdefs.h <<\EOF |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7408 | #define HAVE_RL_PRE_INPUT_HOOK 1 |
| 7409 | EOF |
| 7410 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7411 | else |
| 7412 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7413 | fi |
| 7414 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7415 | |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7416 | # check for readline 4.2 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7417 | echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 7418 | echo "configure:7419: checking for rl_completion_matches in -lreadline" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7419 | ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'` |
| 7420 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 7421 | echo $ac_n "(cached) $ac_c" 1>&6 |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7422 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7423 | ac_save_LIBS="$LIBS" |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7424 | LIBS="-lreadline -ltermcap $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7425 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 7426 | #line 7427 "configure" |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7427 | #include "confdefs.h" |
| 7428 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 7429 | /* 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] | 7430 | builtin and then its argument prototype would still apply. */ |
| 7431 | char rl_completion_matches(); |
| 7432 | |
| 7433 | int main() { |
| 7434 | rl_completion_matches() |
| 7435 | ; return 0; } |
| 7436 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 7437 | if { (eval echo configure:7438: \"$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] | 7438 | rm -rf conftest* |
| 7439 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7440 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7441 | echo "configure: failed program was:" >&5 |
| 7442 | cat conftest.$ac_ext >&5 |
| 7443 | rm -rf conftest* |
| 7444 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7445 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7446 | rm -f conftest* |
| 7447 | LIBS="$ac_save_LIBS" |
| 7448 | |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7449 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7450 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 7451 | echo "$ac_t""yes" 1>&6 |
| 7452 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7453 | #define HAVE_RL_COMPLETION_MATCHES 1 |
| 7454 | EOF |
| 7455 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7456 | else |
| 7457 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7458 | fi |
| 7459 | |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7460 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7461 | echo $ac_n "checking for broken nice()""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 7462 | echo "configure:7463: checking for broken nice()" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7463 | if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then |
| 7464 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 7465 | else |
| 7466 | |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7467 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 7468 | ac_cv_broken_nice=no |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7469 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7470 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 7471 | #line 7472 "configure" |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7472 | #include "confdefs.h" |
| 7473 | |
| 7474 | int main() |
| 7475 | { |
| 7476 | int val1 = nice(1); |
| 7477 | if (val1 != -1 && val1 == nice(2)) |
| 7478 | exit(0); |
| 7479 | exit(1); |
| 7480 | } |
| 7481 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7482 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 7483 | if { (eval echo configure:7484: \"$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] | 7484 | then |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7485 | ac_cv_broken_nice=yes |
| 7486 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7487 | echo "configure: failed program was:" >&5 |
| 7488 | cat conftest.$ac_ext >&5 |
| 7489 | rm -fr conftest* |
| 7490 | ac_cv_broken_nice=no |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7491 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7492 | rm -fr conftest* |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7493 | fi |
| 7494 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7495 | fi |
| 7496 | |
| 7497 | echo "$ac_t""$ac_cv_broken_nice" 1>&6 |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7498 | if test "$ac_cv_broken_nice" = yes |
| 7499 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7500 | cat >> confdefs.h <<\EOF |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7501 | #define HAVE_BROKEN_NICE 1 |
| 7502 | EOF |
| 7503 | |
| 7504 | fi |
| 7505 | |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7506 | # 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] | 7507 | echo $ac_n "checking whether mvwdelch is an expression""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 7508 | echo "configure:7509: checking whether mvwdelch is an expression" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7509 | if eval "test \"`echo '$''{'ac_cv_mvwdelch_is_expression'+set}'`\" = set"; then |
| 7510 | echo $ac_n "(cached) $ac_c" 1>&6 |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7511 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7512 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 7513 | #line 7514 "configure" |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7514 | #include "confdefs.h" |
| 7515 | #include <curses.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7516 | int main() { |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7517 | |
| 7518 | int rtn; |
| 7519 | rtn = mvwdelch(0,0,0); |
| 7520 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7521 | ; return 0; } |
| 7522 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 7523 | if { (eval echo configure:7524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7524 | rm -rf conftest* |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7525 | ac_cv_mvwdelch_is_expression=yes |
| 7526 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7527 | echo "configure: failed program was:" >&5 |
| 7528 | cat conftest.$ac_ext >&5 |
| 7529 | rm -rf conftest* |
| 7530 | ac_cv_mvwdelch_is_expression=no |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7531 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7532 | rm -f conftest* |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7533 | fi |
| 7534 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7535 | echo "$ac_t""$ac_cv_mvwdelch_is_expression" 1>&6 |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7536 | |
| 7537 | if test "$ac_cv_mvwdelch_is_expression" = yes |
| 7538 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7539 | cat >> confdefs.h <<\EOF |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7540 | #define MVWDELCH_IS_EXPRESSION 1 |
| 7541 | EOF |
| 7542 | |
| 7543 | fi |
| 7544 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7545 | echo $ac_n "checking whether WINDOW has _flags""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 7546 | echo "configure:7547: checking whether WINDOW has _flags" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7547 | if eval "test \"`echo '$''{'ac_cv_window_has_flags'+set}'`\" = set"; then |
| 7548 | echo $ac_n "(cached) $ac_c" 1>&6 |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7549 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7550 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 7551 | #line 7552 "configure" |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7552 | #include "confdefs.h" |
| 7553 | #include <curses.h> |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7554 | int main() { |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7555 | |
| 7556 | WINDOW *w; |
| 7557 | w->_flags = 0; |
| 7558 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7559 | ; return 0; } |
| 7560 | EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 7561 | if { (eval echo configure:7562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7562 | rm -rf conftest* |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7563 | ac_cv_window_has_flags=yes |
| 7564 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7565 | echo "configure: failed program was:" >&5 |
| 7566 | cat conftest.$ac_ext >&5 |
| 7567 | rm -rf conftest* |
| 7568 | ac_cv_window_has_flags=no |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7569 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7570 | rm -f conftest* |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7571 | fi |
| 7572 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7573 | echo "$ac_t""$ac_cv_window_has_flags" 1>&6 |
| 7574 | |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7575 | |
| 7576 | if test "$ac_cv_window_has_flags" = yes |
| 7577 | then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7578 | cat >> confdefs.h <<\EOF |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 7579 | #define WINDOW_HAS_FLAGS 1 |
| 7580 | EOF |
| 7581 | |
| 7582 | fi |
| 7583 | |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7584 | # THIS MUST BE LAST, IT CAN BREAK OTHER TESTS! |
| 7585 | # Add sys/socket.h to confdefs.h |
| 7586 | cat >> confdefs.h <<\EOF |
| 7587 | #ifdef HAVE_SYS_SOCKET_H |
| 7588 | #include <sys/socket.h> |
| 7589 | #endif |
| 7590 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7591 | echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 7592 | echo "configure:7593: checking for socklen_t" >&5 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7593 | if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then |
| 7594 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7595 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7596 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 7597 | #line 7598 "configure" |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7598 | #include "confdefs.h" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7599 | #include <sys/types.h> |
| 7600 | #if STDC_HEADERS |
| 7601 | #include <stdlib.h> |
| 7602 | #include <stddef.h> |
| 7603 | #endif |
| 7604 | EOF |
| 7605 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 7606 | egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
| 7607 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7608 | ac_cv_type_socklen_t=yes |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7609 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7610 | rm -rf conftest* |
| 7611 | ac_cv_type_socklen_t=no |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7612 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7613 | rm -f conftest* |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7614 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7615 | fi |
| 7616 | echo "$ac_t""$ac_cv_type_socklen_t" 1>&6 |
| 7617 | if test $ac_cv_type_socklen_t = no; then |
| 7618 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7619 | #define socklen_t int |
| 7620 | EOF |
| 7621 | |
| 7622 | fi |
| 7623 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7624 | |
Neil Schemenauer | f25cf6c | 2001-03-04 06:39:33 +0000 | [diff] [blame] | 7625 | # Add Python/ prefix to LIBOBJS |
| 7626 | libobjs=$LIBOBJS |
| 7627 | LIBOBJS= |
| 7628 | for obj in $libobjs; do |
| 7629 | LIBOBJS="$LIBOBJS Python/$obj" |
| 7630 | done |
| 7631 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7632 | #AC_MSG_CHECKING(for Modules/Setup) |
| 7633 | #if test ! -f Modules/Setup ; then |
| 7634 | # if test ! -d Modules ; then |
| 7635 | # mkdir Modules |
| 7636 | # fi |
| 7637 | # cp "$srcdir/Modules/Setup.dist" Modules/Setup |
| 7638 | # AC_MSG_RESULT(creating) |
| 7639 | #else |
| 7640 | # AC_MSG_RESULT(already exists) |
| 7641 | #fi |
| 7642 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7643 | |
| 7644 | |
Martin v. Löwis | 06f15bb | 2001-12-02 13:02:32 +0000 | [diff] [blame] | 7645 | for h in `(cd $srcdir;echo Python/thread_*.h)` |
| 7646 | do |
| 7647 | THREADHEADERS="$THREADHEADERS \$(srcdir)/$h" |
| 7648 | done |
| 7649 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7650 | |
Neil Schemenauer | acbf9ef | 2001-02-27 02:15:14 +0000 | [diff] [blame] | 7651 | SRCDIRS="Parser Grammar Objects Python Modules" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7652 | echo $ac_n "checking for build directories""... $ac_c" 1>&6 |
Martin v. Löwis | 2e64c34 | 2002-03-27 18:49:02 +0000 | [diff] [blame] | 7653 | echo "configure:7654: checking for build directories" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7654 | for dir in $SRCDIRS; do |
| 7655 | if test ! -d $dir; then |
| 7656 | mkdir $dir |
Guido van Rossum | 262cf20 | 2000-11-02 19:33:53 +0000 | [diff] [blame] | 7657 | fi |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7658 | done |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7659 | echo "$ac_t""done" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 7660 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7661 | # generate output files |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7662 | trap '' 1 2 15 |
| 7663 | cat > confcache <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7664 | # This file is a shell script that caches the results of configure |
| 7665 | # 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] | 7666 | # scripts and configure runs. It is not useful on other systems. |
| 7667 | # 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] | 7668 | # |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7669 | # By default, configure uses ./config.cache as the cache file, |
| 7670 | # creating it if it does not exist already. You can give configure |
| 7671 | # the --cache-file=FILE option to use a different cache file; that is |
| 7672 | # what configure does when it calls configure scripts in |
| 7673 | # subdirectories, so they share the cache. |
| 7674 | # Giving --cache-file=/dev/null disables caching, for debugging configure. |
| 7675 | # config.status only pays attention to the cache file if you give it the |
| 7676 | # --recheck option to rerun configure. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7677 | # |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7678 | EOF |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7679 | # The following way of writing the cache mishandles newlines in values, |
| 7680 | # but we know of no workaround that is simple, portable, and efficient. |
| 7681 | # So, don't put newlines in cache variables' values. |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7682 | # Ultrix sh set writes to stderr and can't be redirected directly, |
| 7683 | # 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] | 7684 | (set) 2>&1 | |
| 7685 | case `(ac_space=' '; set | grep ac_space) 2>&1` in |
| 7686 | *ac_space=\ *) |
| 7687 | # `set' does not quote correctly, so add quotes (double-quote substitution |
| 7688 | # turns \\\\ into \\, and sed turns \\ into \). |
| 7689 | sed -n \ |
| 7690 | -e "s/'/'\\\\''/g" \ |
| 7691 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" |
| 7692 | ;; |
| 7693 | *) |
| 7694 | # `set' quotes correctly as required by POSIX, so do not add quotes. |
| 7695 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' |
| 7696 | ;; |
| 7697 | esac >> confcache |
| 7698 | if cmp -s $cache_file confcache; then |
| 7699 | : |
| 7700 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7701 | if test -w $cache_file; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7702 | echo "updating cache $cache_file" |
| 7703 | cat confcache > $cache_file |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7704 | else |
| 7705 | echo "not updating unwritable cache $cache_file" |
| 7706 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7707 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7708 | rm -f confcache |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7709 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7710 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 |
| 7711 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7712 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
| 7713 | # Let make expand exec_prefix. |
| 7714 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7715 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7716 | # Any assignment to VPATH causes Sun make to only execute |
| 7717 | # the first set of double-colon rules, so remove it if not needed. |
| 7718 | # 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] | 7719 | if test "x$srcdir" = x.; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7720 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7721 | fi |
| 7722 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7723 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 |
| 7724 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7725 | DEFS=-DHAVE_CONFIG_H |
| 7726 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7727 | # Without the "./", some shells look in PATH for config.status. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7728 | : ${CONFIG_STATUS=./config.status} |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7729 | |
| 7730 | echo creating $CONFIG_STATUS |
| 7731 | rm -f $CONFIG_STATUS |
| 7732 | cat > $CONFIG_STATUS <<EOF |
| 7733 | #! /bin/sh |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7734 | # Generated automatically by configure. |
| 7735 | # Run this file to recreate the current configuration. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7736 | # This directory was configured as follows, |
| 7737 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: |
| 7738 | # |
| 7739 | # $0 $ac_configure_args |
| 7740 | # |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7741 | # Compiler output produced by configure, useful for debugging |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7742 | # configure, is in ./config.log if it exists. |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7743 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7744 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" |
| 7745 | for ac_option |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7746 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7747 | case "\$ac_option" in |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7748 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7749 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" |
| 7750 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; |
| 7751 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) |
| 7752 | echo "$CONFIG_STATUS generated by autoconf version 2.13" |
| 7753 | exit 0 ;; |
| 7754 | -help | --help | --hel | --he | --h) |
| 7755 | echo "\$ac_cs_usage"; exit 0 ;; |
| 7756 | *) echo "\$ac_cs_usage"; exit 1 ;; |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7757 | esac |
| 7758 | done |
| 7759 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7760 | ac_given_srcdir=$srcdir |
| 7761 | ac_given_INSTALL="$INSTALL" |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7762 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7763 | 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] | 7764 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7765 | cat >> $CONFIG_STATUS <<EOF |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7766 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7767 | # Protect against being on the right side of a sed subst in config.status. |
| 7768 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; |
| 7769 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF |
| 7770 | $ac_vpsub |
| 7771 | $extrasub |
| 7772 | s%@SHELL@%$SHELL%g |
| 7773 | s%@CFLAGS@%$CFLAGS%g |
| 7774 | s%@CPPFLAGS@%$CPPFLAGS%g |
| 7775 | s%@CXXFLAGS@%$CXXFLAGS%g |
| 7776 | s%@FFLAGS@%$FFLAGS%g |
| 7777 | s%@DEFS@%$DEFS%g |
| 7778 | s%@LDFLAGS@%$LDFLAGS%g |
| 7779 | s%@LIBS@%$LIBS%g |
| 7780 | s%@exec_prefix@%$exec_prefix%g |
| 7781 | s%@prefix@%$prefix%g |
| 7782 | s%@program_transform_name@%$program_transform_name%g |
| 7783 | s%@bindir@%$bindir%g |
| 7784 | s%@sbindir@%$sbindir%g |
| 7785 | s%@libexecdir@%$libexecdir%g |
| 7786 | s%@datadir@%$datadir%g |
| 7787 | s%@sysconfdir@%$sysconfdir%g |
| 7788 | s%@sharedstatedir@%$sharedstatedir%g |
| 7789 | s%@localstatedir@%$localstatedir%g |
| 7790 | s%@libdir@%$libdir%g |
| 7791 | s%@includedir@%$includedir%g |
| 7792 | s%@oldincludedir@%$oldincludedir%g |
| 7793 | s%@infodir@%$infodir%g |
| 7794 | s%@mandir@%$mandir%g |
| 7795 | s%@VERSION@%$VERSION%g |
| 7796 | s%@CONFIG_ARGS@%$CONFIG_ARGS%g |
| 7797 | s%@PYTHONFRAMEWORK@%$PYTHONFRAMEWORK%g |
| 7798 | s%@PYTHONFRAMEWORKDIR@%$PYTHONFRAMEWORKDIR%g |
| 7799 | s%@PYTHONFRAMEWORKPREFIX@%$PYTHONFRAMEWORKPREFIX%g |
| 7800 | s%@PYTHONFRAMEWORKINSTALLDIR@%$PYTHONFRAMEWORKINSTALLDIR%g |
| 7801 | s%@MACHDEP@%$MACHDEP%g |
| 7802 | s%@SGI_ABI@%$SGI_ABI%g |
| 7803 | s%@CXX@%$CXX%g |
| 7804 | s%@MAINOBJ@%$MAINOBJ%g |
| 7805 | s%@CC@%$CC%g |
| 7806 | s%@CPP@%$CPP%g |
| 7807 | s%@EXEEXT@%$EXEEXT%g |
| 7808 | s%@BUILDEXEEXT@%$BUILDEXEEXT%g |
| 7809 | s%@LIBRARY@%$LIBRARY%g |
| 7810 | s%@LDLIBRARY@%$LDLIBRARY%g |
| 7811 | s%@DLLLIBRARY@%$DLLLIBRARY%g |
| 7812 | s%@BLDLIBRARY@%$BLDLIBRARY%g |
| 7813 | s%@LDLIBRARYDIR@%$LDLIBRARYDIR%g |
| 7814 | s%@LINKCC@%$LINKCC%g |
| 7815 | s%@RANLIB@%$RANLIB%g |
| 7816 | s%@AR@%$AR%g |
| 7817 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
| 7818 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g |
| 7819 | s%@INSTALL_DATA@%$INSTALL_DATA%g |
| 7820 | s%@LN@%$LN%g |
| 7821 | s%@OPT@%$OPT%g |
| 7822 | s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g |
| 7823 | s%@SO@%$SO%g |
| 7824 | s%@LDSHARED@%$LDSHARED%g |
| 7825 | s%@BLDSHARED@%$BLDSHARED%g |
| 7826 | s%@CCSHARED@%$CCSHARED%g |
| 7827 | s%@LINKFORSHARED@%$LINKFORSHARED%g |
| 7828 | s%@CFLAGSFORSHARED@%$CFLAGSFORSHARED%g |
| 7829 | s%@USE_SIGNAL_MODULE@%$USE_SIGNAL_MODULE%g |
| 7830 | s%@SIGNAL_OBJS@%$SIGNAL_OBJS%g |
| 7831 | s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g |
| 7832 | s%@LDLAST@%$LDLAST%g |
| 7833 | s%@DLINCLDIR@%$DLINCLDIR%g |
| 7834 | s%@DYNLOADFILE@%$DYNLOADFILE%g |
| 7835 | s%@MACHDEP_OBJS@%$MACHDEP_OBJS%g |
| 7836 | s%@LIBOBJS@%$LIBOBJS%g |
| 7837 | s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g |
| 7838 | s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g |
| 7839 | s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g |
| 7840 | s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g |
| 7841 | s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g |
| 7842 | s%@LIBM@%$LIBM%g |
| 7843 | s%@LIBC@%$LIBC%g |
| 7844 | s%@UNICODE_OBJS@%$UNICODE_OBJS%g |
| 7845 | s%@THREADHEADERS@%$THREADHEADERS%g |
| 7846 | s%@SRCDIRS@%$SRCDIRS%g |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7847 | |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7848 | CEOF |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7849 | EOF |
| 7850 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7851 | cat >> $CONFIG_STATUS <<\EOF |
| 7852 | |
| 7853 | # Split the substitutions into bite-sized pieces for seds with |
| 7854 | # small command number limits, like on Digital OSF/1 and HP-UX. |
| 7855 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. |
| 7856 | ac_file=1 # Number of current file. |
| 7857 | ac_beg=1 # First line for current file. |
| 7858 | ac_end=$ac_max_sed_cmds # Line after last line for current file. |
| 7859 | ac_more_lines=: |
| 7860 | ac_sed_cmds="" |
| 7861 | while $ac_more_lines; do |
| 7862 | if test $ac_beg -gt 1; then |
| 7863 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file |
| 7864 | else |
| 7865 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7866 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7867 | if test ! -s conftest.s$ac_file; then |
| 7868 | ac_more_lines=false |
| 7869 | rm -f conftest.s$ac_file |
| 7870 | else |
| 7871 | if test -z "$ac_sed_cmds"; then |
| 7872 | ac_sed_cmds="sed -f conftest.s$ac_file" |
| 7873 | else |
| 7874 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" |
| 7875 | fi |
| 7876 | ac_file=`expr $ac_file + 1` |
| 7877 | ac_beg=$ac_end |
| 7878 | ac_end=`expr $ac_end + $ac_max_sed_cmds` |
| 7879 | fi |
| 7880 | done |
| 7881 | if test -z "$ac_sed_cmds"; then |
| 7882 | ac_sed_cmds=cat |
| 7883 | fi |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7884 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7885 | |
| 7886 | cat >> $CONFIG_STATUS <<EOF |
| 7887 | |
| 7888 | CONFIG_FILES=\${CONFIG_FILES-"Makefile.pre Modules/Setup.config"} |
| 7889 | EOF |
| 7890 | cat >> $CONFIG_STATUS <<\EOF |
| 7891 | 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] | 7892 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7893 | case "$ac_file" in |
| 7894 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
| 7895 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
| 7896 | *) ac_file_in="${ac_file}.in" ;; |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 7897 | esac |
| 7898 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7899 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. |
| 7900 | |
| 7901 | # Remove last slash and all that follows it. Not all systems have dirname. |
| 7902 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7903 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7904 | # The file is in a subdirectory. |
| 7905 | test ! -d "$ac_dir" && mkdir "$ac_dir" |
| 7906 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7907 | # A "../" for each directory in $ac_dir_suffix. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7908 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7909 | else |
| 7910 | ac_dir_suffix= ac_dots= |
| 7911 | fi |
| 7912 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7913 | case "$ac_given_srcdir" in |
| 7914 | .) srcdir=. |
| 7915 | if test -z "$ac_dots"; then top_srcdir=. |
| 7916 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; |
| 7917 | /*) 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] | 7918 | *) # Relative path. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7919 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" |
| 7920 | top_srcdir="$ac_dots$ac_given_srcdir" ;; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7921 | esac |
| 7922 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7923 | case "$ac_given_INSTALL" in |
| 7924 | [/$]*) INSTALL="$ac_given_INSTALL" ;; |
| 7925 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7926 | esac |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7927 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7928 | echo creating "$ac_file" |
| 7929 | rm -f "$ac_file" |
| 7930 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." |
| 7931 | case "$ac_file" in |
| 7932 | *Makefile*) ac_comsub="1i\\ |
| 7933 | # $configure_input" ;; |
| 7934 | *) ac_comsub= ;; |
| 7935 | esac |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7936 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7937 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
| 7938 | sed -e "$ac_comsub |
| 7939 | s%@configure_input@%$configure_input%g |
| 7940 | s%@srcdir@%$srcdir%g |
| 7941 | s%@top_srcdir@%$top_srcdir%g |
| 7942 | s%@INSTALL@%$INSTALL%g |
| 7943 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file |
| 7944 | fi; done |
| 7945 | rm -f conftest.s* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7946 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7947 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where |
| 7948 | # 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] | 7949 | # |
| 7950 | # ac_d sets the value in "#define NAME VALUE" lines. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7951 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' |
| 7952 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' |
| 7953 | ac_dC='\3' |
| 7954 | ac_dD='%g' |
| 7955 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". |
| 7956 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
| 7957 | ac_uB='\([ ]\)%\1#\2define\3' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7958 | ac_uC=' ' |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7959 | ac_uD='\4%g' |
| 7960 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". |
| 7961 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
| 7962 | ac_eB='$%\1#\2define\3' |
| 7963 | ac_eC=' ' |
| 7964 | ac_eD='%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7965 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7966 | if test "${CONFIG_HEADERS+set}" != set; then |
| 7967 | EOF |
| 7968 | cat >> $CONFIG_STATUS <<EOF |
| 7969 | CONFIG_HEADERS="pyconfig.h" |
| 7970 | EOF |
| 7971 | cat >> $CONFIG_STATUS <<\EOF |
| 7972 | fi |
| 7973 | 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] | 7974 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7975 | case "$ac_file" in |
| 7976 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
| 7977 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
| 7978 | *) ac_file_in="${ac_file}.in" ;; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7979 | esac |
| 7980 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7981 | echo creating $ac_file |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7982 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7983 | rm -f conftest.frag conftest.in conftest.out |
| 7984 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
| 7985 | cat $ac_file_inputs > conftest.in |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7986 | |
| 7987 | EOF |
| 7988 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7989 | # Transform confdefs.h into a sed script conftest.vals that substitutes |
| 7990 | # the proper values into config.h.in to produce config.h. And first: |
| 7991 | # Protect against being on the right side of a sed subst in config.status. |
| 7992 | # Protect against being in an unquoted here document in config.status. |
| 7993 | rm -f conftest.vals |
| 7994 | cat > conftest.hdr <<\EOF |
| 7995 | s/[\\&%]/\\&/g |
| 7996 | s%[\\$`]%\\&%g |
| 7997 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp |
| 7998 | s%ac_d%ac_u%gp |
| 7999 | s%ac_u%ac_e%gp |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8000 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8001 | sed -n -f conftest.hdr confdefs.h > conftest.vals |
| 8002 | rm -f conftest.hdr |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8003 | |
| 8004 | # This sed command replaces #undef with comments. This is necessary, for |
| 8005 | # example, in the case of _POSIX_SOURCE, which is predefined and required |
| 8006 | # on some systems where configure will not decide to define it. |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8007 | cat >> conftest.vals <<\EOF |
| 8008 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8009 | EOF |
| 8010 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8011 | # Break up conftest.vals because some shells have a limit on |
| 8012 | # 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] | 8013 | |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 8014 | rm -f conftest.tail |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8015 | while : |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 8016 | do |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8017 | ac_lines=`grep -c . conftest.vals` |
| 8018 | # grep -c gives empty output for an empty file on some AIX systems. |
| 8019 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi |
| 8020 | # Write a limited-size here document to conftest.frag. |
| 8021 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS |
| 8022 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 8023 | echo 'CEOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8024 | sed -f conftest.frag conftest.in > conftest.out |
| 8025 | rm -f conftest.in |
| 8026 | mv conftest.out conftest.in |
| 8027 | ' >> $CONFIG_STATUS |
| 8028 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail |
| 8029 | rm -f conftest.vals |
| 8030 | mv conftest.tail conftest.vals |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 8031 | done |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8032 | rm -f conftest.vals |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 8033 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8034 | cat >> $CONFIG_STATUS <<\EOF |
| 8035 | rm -f conftest.frag conftest.h |
| 8036 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h |
| 8037 | cat conftest.in >> conftest.h |
| 8038 | rm -f conftest.in |
| 8039 | if cmp -s $ac_file conftest.h 2>/dev/null; then |
| 8040 | echo "$ac_file is unchanged" |
| 8041 | rm -f conftest.h |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 8042 | else |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8043 | # Remove last slash and all that follows it. Not all systems have dirname. |
| 8044 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 8045 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8046 | # The file is in a subdirectory. |
| 8047 | test ! -d "$ac_dir" && mkdir "$ac_dir" |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 8048 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8049 | rm -f $ac_file |
| 8050 | mv conftest.h $ac_file |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 8051 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8052 | fi; done |
| 8053 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 8054 | EOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8055 | cat >> $CONFIG_STATUS <<EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 8056 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8057 | EOF |
| 8058 | cat >> $CONFIG_STATUS <<\EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 8059 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8060 | exit 0 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 8061 | EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8062 | chmod +x $CONFIG_STATUS |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8063 | rm -fr confdefs* $ac_clean_files |
| 8064 | 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] | 8065 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 8066 | |
| 8067 | echo "creating Setup" |
| 8068 | if test ! -f Modules/Setup |
| 8069 | then |
| 8070 | cp $srcdir/Modules/Setup.dist Modules/Setup |
| 8071 | fi |
| 8072 | |
| 8073 | echo "creating Setup.local" |
| 8074 | if test ! -f Modules/Setup.local |
| 8075 | then |
| 8076 | echo "# Edit this file for local setup changes" >Modules/Setup.local |
| 8077 | fi |
| 8078 | |
| 8079 | echo "creating Makefile" |
| 8080 | $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \ |
| 8081 | -s Modules Modules/Setup.config \ |
Neil Schemenauer | f8b71c5 | 2001-04-21 17:41:16 +0000 | [diff] [blame] | 8082 | Modules/Setup.local Modules/Setup |
Neil Schemenauer | c761fc8 | 2001-02-19 04:50:49 +0000 | [diff] [blame] | 8083 | mv config.c Modules |