Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1 | #! /bin/sh |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2 | |
Andrew M. Kuchling | 22c6934 | 2000-06-18 15:07:40 +0000 | [diff] [blame] | 3 | # From configure.in Revision: 1.125 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +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. |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 6 | # Generated automatically using autoconf version 2.14.1 |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 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 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 12 | # Defaults: |
| 13 | ac_help= |
| 14 | ac_default_prefix=/usr/local |
| 15 | # Any additions from configure.in: |
| 16 | ac_help="$ac_help |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 17 | --with-next-archs='arch1 arch2 ..' build MAB binary" |
| 18 | ac_help="$ac_help |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 19 | --with-next-framework Build (OpenStep|Rhapsody|MacOS10) framework" |
| 20 | ac_help="$ac_help |
| 21 | --with-dyld Use (OpenStep|Rhapsody|MacOS10) dynamic linker" |
| 22 | ac_help="$ac_help |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 23 | --without-gcc never use gcc" |
| 24 | ac_help="$ac_help |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 25 | --with-cxx=<compiler> enable C++ support" |
| 26 | ac_help="$ac_help |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 27 | --with-libs='lib1 ...' link against additional libs" |
| 28 | ac_help="$ac_help |
Guido van Rossum | b06df27 | 1997-08-05 21:50:20 +0000 | [diff] [blame] | 29 | --with(out)-readline obsolete, edit Modules/Setup instead" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 30 | ac_help="$ac_help |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 31 | --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries" |
| 32 | ac_help="$ac_help |
| 33 | --with-threads alias for --with-thread" |
| 34 | ac_help="$ac_help |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 35 | --with-thread[=DIRECTORY] make interpreter thread-safe" |
| 36 | ac_help="$ac_help |
| 37 | --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking" |
| 38 | ac_help="$ac_help |
| 39 | --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking" |
| 40 | ac_help="$ac_help |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 41 | --with-fpectl enable SIGFPE catching" |
| 42 | ac_help="$ac_help |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 43 | --with-libm=STRING math library" |
| 44 | ac_help="$ac_help |
| 45 | --with-libc=STRING C library" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 46 | ac_help="$ac_help |
| 47 | --with-wctype-functions use wctype.h functions" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 48 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 49 | # Initialize some variables set by options. |
| 50 | # The variables have the same names as the options, with |
| 51 | # dashes changed to underlines. |
| 52 | build=NONE |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 53 | cache_file=./config.cache |
| 54 | exec_prefix=NONE |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 55 | host=NONE |
| 56 | no_create= |
| 57 | nonopt=NONE |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 58 | no_recursion= |
| 59 | prefix=NONE |
| 60 | program_prefix=NONE |
| 61 | program_suffix=NONE |
| 62 | program_transform_name=s,x,x, |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 63 | silent= |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 64 | site= |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 65 | srcdir= |
| 66 | target=NONE |
| 67 | verbose= |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 68 | x_includes=NONE |
| 69 | x_libraries=NONE |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 70 | bindir='${exec_prefix}/bin' |
| 71 | sbindir='${exec_prefix}/sbin' |
| 72 | libexecdir='${exec_prefix}/libexec' |
| 73 | datadir='${prefix}/share' |
| 74 | sysconfdir='${prefix}/etc' |
| 75 | sharedstatedir='${prefix}/com' |
| 76 | localstatedir='${prefix}/var' |
| 77 | libdir='${exec_prefix}/lib' |
| 78 | includedir='${prefix}/include' |
| 79 | oldincludedir='/usr/include' |
| 80 | infodir='${prefix}/info' |
| 81 | mandir='${prefix}/man' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 82 | |
| 83 | # Initialize some other variables. |
| 84 | subdirs= |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 85 | MFLAGS= MAKEFLAGS= |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 86 | SHELL=${CONFIG_SHELL-/bin/sh} |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 87 | # Maximum number of lines to put in a shell here document. |
| 88 | ac_max_here_lines=12 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 89 | |
| 90 | ac_prev= |
| 91 | for ac_option |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 92 | do |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 93 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 94 | # If the previous option needs an argument, assign it. |
| 95 | if test -n "$ac_prev"; then |
| 96 | eval "$ac_prev=\$ac_option" |
| 97 | ac_prev= |
| 98 | continue |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 99 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 100 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 101 | case "$ac_option" in |
| 102 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; |
| 103 | *) ac_optarg= ;; |
| 104 | esac |
| 105 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 106 | # Accept the important Cygnus configure options, so we can diagnose typos. |
| 107 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 108 | case "$ac_option" in |
| 109 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 110 | -bindir | --bindir | --bindi | --bind | --bin | --bi) |
| 111 | ac_prev=bindir ;; |
| 112 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) |
| 113 | bindir="$ac_optarg" ;; |
| 114 | |
| 115 | -build | --build | --buil | --bui | --bu) |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 116 | ac_prev=build ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 117 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 118 | build="$ac_optarg" ;; |
| 119 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 120 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
| 121 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) |
| 122 | ac_prev=cache_file ;; |
| 123 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ |
| 124 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) |
| 125 | cache_file="$ac_optarg" ;; |
| 126 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 127 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) |
| 128 | ac_prev=datadir ;; |
| 129 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ |
| 130 | | --da=*) |
| 131 | datadir="$ac_optarg" ;; |
| 132 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 133 | -disable-* | --disable-*) |
| 134 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 135 | # Reject names that are not valid shell variable names. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 136 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 137 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 138 | fi |
| 139 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` |
| 140 | eval "enable_${ac_feature}=no" ;; |
| 141 | |
| 142 | -enable-* | --enable-*) |
| 143 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 144 | # Reject names that are not valid shell variable names. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 145 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 146 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 147 | fi |
| 148 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` |
| 149 | case "$ac_option" in |
| 150 | *=*) ;; |
| 151 | *) ac_optarg=yes ;; |
| 152 | esac |
| 153 | eval "enable_${ac_feature}='$ac_optarg'" ;; |
| 154 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 155 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ |
| 156 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ |
| 157 | | --exec | --exe | --ex) |
| 158 | ac_prev=exec_prefix ;; |
| 159 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ |
| 160 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ |
| 161 | | --exec=* | --exe=* | --ex=*) |
| 162 | exec_prefix="$ac_optarg" ;; |
| 163 | |
| 164 | -gas | --gas | --ga | --g) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 165 | # Obsolete; use --with-gas. |
| 166 | with_gas=yes ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 167 | |
| 168 | -help | --help | --hel | --he) |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 169 | # Omit some internal or obsolete options to make the list less imposing. |
| 170 | # This message is too long to be a string in the A/UX 3.1 sh. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 171 | cat << EOF |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 172 | Usage: configure [options] [host] |
| 173 | Options: [defaults in brackets after descriptions] |
| 174 | Configuration: |
| 175 | --cache-file=FILE cache test results in FILE |
| 176 | --help print this message |
| 177 | --no-create do not create output files |
| 178 | --quiet, --silent do not print \`checking...' messages |
| 179 | --version print the version of autoconf that created configure |
| 180 | Directory and file names: |
| 181 | --prefix=PREFIX install architecture-independent files in PREFIX |
| 182 | [$ac_default_prefix] |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 183 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 184 | [same as prefix] |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 185 | --bindir=DIR user executables in DIR [EPREFIX/bin] |
| 186 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] |
| 187 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] |
| 188 | --datadir=DIR read-only architecture-independent data in DIR |
| 189 | [PREFIX/share] |
| 190 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] |
| 191 | --sharedstatedir=DIR modifiable architecture-independent data in DIR |
| 192 | [PREFIX/com] |
| 193 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] |
| 194 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] |
| 195 | --includedir=DIR C header files in DIR [PREFIX/include] |
| 196 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] |
| 197 | --infodir=DIR info documentation in DIR [PREFIX/info] |
| 198 | --mandir=DIR man documentation in DIR [PREFIX/man] |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 199 | --srcdir=DIR find the sources in DIR [configure dir or ..] |
| 200 | --program-prefix=PREFIX prepend PREFIX to installed program names |
| 201 | --program-suffix=SUFFIX append SUFFIX to installed program names |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 202 | --program-transform-name=PROGRAM |
| 203 | run sed PROGRAM on installed program names |
| 204 | EOF |
| 205 | cat << EOF |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 206 | Host type: |
| 207 | --build=BUILD configure for building on BUILD [BUILD=HOST] |
| 208 | --host=HOST configure for HOST [guessed] |
| 209 | --target=TARGET configure for TARGET [TARGET=HOST] |
| 210 | Features and packages: |
| 211 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) |
| 212 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] |
| 213 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] |
| 214 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) |
| 215 | --x-includes=DIR X include files are in DIR |
| 216 | --x-libraries=DIR X library files are in DIR |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 217 | EOF |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 218 | if test -n "$ac_help"; then |
| 219 | echo "--enable and --with options recognized:$ac_help" |
| 220 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 221 | exit 0 ;; |
| 222 | |
| 223 | -host | --host | --hos | --ho) |
| 224 | ac_prev=host ;; |
| 225 | -host=* | --host=* | --hos=* | --ho=*) |
| 226 | host="$ac_optarg" ;; |
| 227 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 228 | -includedir | --includedir | --includedi | --included | --include \ |
| 229 | | --includ | --inclu | --incl | --inc) |
| 230 | ac_prev=includedir ;; |
| 231 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ |
| 232 | | --includ=* | --inclu=* | --incl=* | --inc=*) |
| 233 | includedir="$ac_optarg" ;; |
| 234 | |
| 235 | -infodir | --infodir | --infodi | --infod | --info | --inf) |
| 236 | ac_prev=infodir ;; |
| 237 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) |
| 238 | infodir="$ac_optarg" ;; |
| 239 | |
| 240 | -libdir | --libdir | --libdi | --libd) |
| 241 | ac_prev=libdir ;; |
| 242 | -libdir=* | --libdir=* | --libdi=* | --libd=*) |
| 243 | libdir="$ac_optarg" ;; |
| 244 | |
| 245 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ |
| 246 | | --libexe | --libex | --libe) |
| 247 | ac_prev=libexecdir ;; |
| 248 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ |
| 249 | | --libexe=* | --libex=* | --libe=*) |
| 250 | libexecdir="$ac_optarg" ;; |
| 251 | |
| 252 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
| 253 | | --localstate | --localstat | --localsta | --localst \ |
| 254 | | --locals | --local | --loca | --loc | --lo) |
| 255 | ac_prev=localstatedir ;; |
| 256 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ |
| 257 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ |
| 258 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) |
| 259 | localstatedir="$ac_optarg" ;; |
| 260 | |
| 261 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) |
| 262 | ac_prev=mandir ;; |
| 263 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) |
| 264 | mandir="$ac_optarg" ;; |
| 265 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 266 | -nfp | --nfp | --nf) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 267 | # Obsolete; use --without-fp. |
| 268 | with_fp=no ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 269 | |
| 270 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ |
| 271 | | --no-cr | --no-c) |
| 272 | no_create=yes ;; |
| 273 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 274 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ |
| 275 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) |
| 276 | no_recursion=yes ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 277 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 278 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ |
| 279 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ |
| 280 | | --oldin | --oldi | --old | --ol | --o) |
| 281 | ac_prev=oldincludedir ;; |
| 282 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ |
| 283 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ |
| 284 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) |
| 285 | oldincludedir="$ac_optarg" ;; |
| 286 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 287 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
| 288 | ac_prev=prefix ;; |
| 289 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) |
| 290 | prefix="$ac_optarg" ;; |
| 291 | |
| 292 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ |
| 293 | | --program-pre | --program-pr | --program-p) |
| 294 | ac_prev=program_prefix ;; |
| 295 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ |
| 296 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) |
| 297 | program_prefix="$ac_optarg" ;; |
| 298 | |
| 299 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ |
| 300 | | --program-suf | --program-su | --program-s) |
| 301 | ac_prev=program_suffix ;; |
| 302 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ |
| 303 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) |
| 304 | program_suffix="$ac_optarg" ;; |
| 305 | |
| 306 | -program-transform-name | --program-transform-name \ |
| 307 | | --program-transform-nam | --program-transform-na \ |
| 308 | | --program-transform-n | --program-transform- \ |
| 309 | | --program-transform | --program-transfor \ |
| 310 | | --program-transfo | --program-transf \ |
| 311 | | --program-trans | --program-tran \ |
| 312 | | --progr-tra | --program-tr | --program-t) |
| 313 | ac_prev=program_transform_name ;; |
| 314 | -program-transform-name=* | --program-transform-name=* \ |
| 315 | | --program-transform-nam=* | --program-transform-na=* \ |
| 316 | | --program-transform-n=* | --program-transform-=* \ |
| 317 | | --program-transform=* | --program-transfor=* \ |
| 318 | | --program-transfo=* | --program-transf=* \ |
| 319 | | --program-trans=* | --program-tran=* \ |
| 320 | | --progr-tra=* | --program-tr=* | --program-t=*) |
| 321 | program_transform_name="$ac_optarg" ;; |
| 322 | |
| 323 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
| 324 | | -silent | --silent | --silen | --sile | --sil) |
| 325 | silent=yes ;; |
| 326 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 327 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) |
| 328 | ac_prev=sbindir ;; |
| 329 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ |
| 330 | | --sbi=* | --sb=*) |
| 331 | sbindir="$ac_optarg" ;; |
| 332 | |
| 333 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ |
| 334 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ |
| 335 | | --sharedst | --shareds | --shared | --share | --shar \ |
| 336 | | --sha | --sh) |
| 337 | ac_prev=sharedstatedir ;; |
| 338 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ |
| 339 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ |
| 340 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ |
| 341 | | --sha=* | --sh=*) |
| 342 | sharedstatedir="$ac_optarg" ;; |
| 343 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 344 | -site | --site | --sit) |
| 345 | ac_prev=site ;; |
| 346 | -site=* | --site=* | --sit=*) |
| 347 | site="$ac_optarg" ;; |
| 348 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 349 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
| 350 | ac_prev=srcdir ;; |
| 351 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) |
| 352 | srcdir="$ac_optarg" ;; |
| 353 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 354 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ |
| 355 | | --syscon | --sysco | --sysc | --sys | --sy) |
| 356 | ac_prev=sysconfdir ;; |
| 357 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ |
| 358 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) |
| 359 | sysconfdir="$ac_optarg" ;; |
| 360 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 361 | -target | --target | --targe | --targ | --tar | --ta | --t) |
| 362 | ac_prev=target ;; |
| 363 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
| 364 | target="$ac_optarg" ;; |
| 365 | |
| 366 | -v | -verbose | --verbose | --verbos | --verbo | --verb) |
| 367 | verbose=yes ;; |
| 368 | |
| 369 | -version | --version | --versio | --versi | --vers) |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 370 | echo "configure generated by autoconf version 2.14.1" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 371 | exit 0 ;; |
| 372 | |
| 373 | -with-* | --with-*) |
| 374 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 375 | # Reject names that are not valid shell variable names. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 376 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 377 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 378 | fi |
| 379 | ac_package=`echo $ac_package| sed 's/-/_/g'` |
| 380 | case "$ac_option" in |
| 381 | *=*) ;; |
| 382 | *) ac_optarg=yes ;; |
| 383 | esac |
| 384 | eval "with_${ac_package}='$ac_optarg'" ;; |
| 385 | |
| 386 | -without-* | --without-*) |
| 387 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 388 | # Reject names that are not valid shell variable names. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 389 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 390 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 391 | fi |
| 392 | ac_package=`echo $ac_package| sed 's/-/_/g'` |
| 393 | eval "with_${ac_package}=no" ;; |
| 394 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 395 | --x) |
| 396 | # Obsolete; use --with-x. |
| 397 | with_x=yes ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 398 | |
| 399 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ |
| 400 | | --x-incl | --x-inc | --x-in | --x-i) |
| 401 | ac_prev=x_includes ;; |
| 402 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ |
| 403 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) |
| 404 | x_includes="$ac_optarg" ;; |
| 405 | |
| 406 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ |
| 407 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) |
| 408 | ac_prev=x_libraries ;; |
| 409 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ |
| 410 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) |
| 411 | x_libraries="$ac_optarg" ;; |
| 412 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 413 | -*) { 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] | 414 | ;; |
| 415 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 416 | *) |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 417 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 418 | echo "configure: warning: $ac_option: invalid host type" 1>&2 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 419 | fi |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 420 | if test "x$nonopt" != xNONE; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 421 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 422 | fi |
| 423 | nonopt="$ac_option" |
| 424 | ;; |
| 425 | |
| 426 | esac |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 427 | done |
| 428 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 429 | if test -n "$ac_prev"; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 430 | { 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] | 431 | fi |
| 432 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 433 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 434 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 435 | # File descriptor usage: |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 436 | # 0 standard input |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 437 | # 1 file creation |
| 438 | # 2 errors and warnings |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 439 | # 3 some systems may open it to /dev/tty |
| 440 | # 4 used on the Kubota Titan |
| 441 | # 6 checking for... messages and results |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 442 | # 5 compiler messages saved in config.log |
| 443 | if test "$silent" = yes; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 444 | exec 6>/dev/null |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 445 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 446 | exec 6>&1 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 447 | fi |
| 448 | exec 5>./config.log |
| 449 | |
| 450 | echo "\ |
| 451 | This file contains any messages produced by compilers while |
| 452 | running configure, to aid debugging if configure makes a mistake. |
| 453 | " 1>&5 |
| 454 | |
| 455 | # Strip out --no-create and --no-recursion so they do not pile up. |
| 456 | # Also quote any args containing shell metacharacters. |
| 457 | ac_configure_args= |
| 458 | for ac_arg |
| 459 | do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 460 | case "$ac_arg" in |
| 461 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ |
| 462 | | --no-cr | --no-c) ;; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 463 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ |
| 464 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; |
| 465 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) |
| 466 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; |
| 467 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 468 | esac |
| 469 | done |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 470 | |
| 471 | # NLS nuisances. |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 472 | # Only set these to C if already set. These must not be set unconditionally |
| 473 | # because not all systems understand e.g. LANG=C (notably SCO). |
| 474 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! |
| 475 | # Non-C LC_CTYPE values break the ctype check. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 476 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 477 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi |
| 478 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi |
| 479 | 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] | 480 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 481 | # confdefs.h avoids OS command line length limits that DEFS can exceed. |
| 482 | rm -rf conftest* confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 483 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. |
| 484 | echo > confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 485 | |
| 486 | # A filename unique to this package, relative to the directory that |
| 487 | # configure is in, which we can look for to find out if srcdir is correct. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 488 | ac_unique_file=Include/object.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 489 | |
| 490 | # Find the source files, if location was not specified. |
| 491 | if test -z "$srcdir"; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 492 | ac_srcdir_defaulted=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 493 | # Try the directory containing this script, then its parent. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 494 | ac_prog=$0 |
| 495 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` |
| 496 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. |
| 497 | srcdir=$ac_confdir |
| 498 | if test ! -r $srcdir/$ac_unique_file; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 499 | srcdir=.. |
| 500 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 501 | else |
| 502 | ac_srcdir_defaulted=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 503 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 504 | if test ! -r $srcdir/$ac_unique_file; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 505 | if test "$ac_srcdir_defaulted" = yes; then |
| 506 | { 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] | 507 | else |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 508 | { 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] | 509 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 510 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 511 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` |
| 512 | |
| 513 | # Prefer explicitly selected file to automatically selected ones. |
| 514 | if test -z "$CONFIG_SITE"; then |
| 515 | if test "x$prefix" != xNONE; then |
| 516 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" |
| 517 | else |
| 518 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" |
| 519 | fi |
| 520 | fi |
| 521 | for ac_site_file in $CONFIG_SITE; do |
| 522 | if test -r "$ac_site_file"; then |
| 523 | echo "loading site script $ac_site_file" |
| 524 | . "$ac_site_file" |
| 525 | fi |
| 526 | done |
| 527 | |
| 528 | if test -r "$cache_file"; then |
| 529 | echo "loading cache $cache_file" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 530 | test -f "$cache_file" && . $cache_file |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 531 | else |
| 532 | echo "creating cache $cache_file" |
| 533 | > $cache_file |
| 534 | fi |
| 535 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 536 | ac_ext=c |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 537 | # 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] | 538 | ac_cpp='$CPP $CPPFLAGS' |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 539 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 540 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 541 | cross_compiling=$ac_cv_prog_cc_cross |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 542 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 543 | ac_exeext= |
| 544 | ac_objext=o |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 545 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then |
| 546 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. |
| 547 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then |
| 548 | ac_n= ac_c=' |
| 549 | ' ac_t=' ' |
| 550 | else |
| 551 | ac_n=-n ac_c= ac_t= |
| 552 | fi |
| 553 | else |
| 554 | ac_n= ac_c='\c' ac_t= |
| 555 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 556 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 557 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 558 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 559 | |
Guido van Rossum | 1fd74a7 | 1997-07-19 19:36:02 +0000 | [diff] [blame] | 560 | # Set VERSION so we only need to edit in one place (i.e., here) |
| 561 | |
Guido van Rossum | 6a6a77c | 2000-03-31 15:15:17 +0000 | [diff] [blame] | 562 | VERSION=1.6 |
Guido van Rossum | 1fd74a7 | 1997-07-19 19:36:02 +0000 | [diff] [blame] | 563 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 564 | # NEXTSTEP stuff |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 565 | if test -f /usr/lib/NextStep/software_version -o -f /System/Library/CoreServices/software_version ; then |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 566 | |
| 567 | echo $ac_n "checking for --with-next-archs""... $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 568 | echo "configure:569: checking for --with-next-archs" >&5 |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 569 | # Check whether --with-next-archs or --without-next-archs was given. |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 570 | if test "${with_next_archs+set}" = set; then |
| 571 | withval="$with_next_archs" |
| 572 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 573 | if test -n "$withval"; then |
| 574 | ac_arch_flags=`/usr/lib/arch_tool -archify_list $withval` |
| 575 | # GCC does not currently support multi archs on the NeXT |
| 576 | with_gcc=no |
| 577 | fi |
| 578 | echo "$ac_t""$with_next_archs" 1>&6 |
| 579 | |
| 580 | else |
| 581 | echo "$ac_t""none: using `arch`" 1>&6 |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 582 | fi |
| 583 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 584 | |
| 585 | if test -z "$MACHDEP" |
| 586 | then |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 587 | set X `hostinfo | egrep '(NeXT Mach|Kernel Release).*:' | \ |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 588 | sed -e 's/://' -e 's/\./_/'` && \ |
| 589 | ac_sys_system=next && ac_sys_release=$4 |
| 590 | |
Guido van Rossum | b97ef17 | 1997-09-28 05:44:03 +0000 | [diff] [blame] | 591 | MACHDEP="$ac_sys_system$ac_sys_release" |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 592 | fi |
| 593 | fi |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 594 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 595 | # Check whether --with-next-framework or --without-next-framework was given. |
| 596 | if test "${with_next_framework+set}" = set; then |
| 597 | withval="$with_next_framework" |
| 598 | : |
| 599 | fi |
| 600 | |
| 601 | # Check whether --with-dyld or --without-dyld was given. |
| 602 | if test "${with_dyld+set}" = set; then |
| 603 | withval="$with_dyld" |
| 604 | : |
| 605 | fi |
| 606 | |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 607 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 608 | # Set name for machine-dependent library files |
| 609 | |
| 610 | echo $ac_n "checking MACHDEP""... $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 611 | echo "configure:612: checking MACHDEP" >&5 |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 612 | if test -z "$MACHDEP" |
| 613 | then |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 614 | ac_sys_system=`uname -s` |
| 615 | if test "$ac_sys_system" = "AIX" ; then |
| 616 | ac_sys_release=`uname -v` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 617 | else |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 618 | ac_sys_release=`uname -r` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 619 | fi |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 620 | ac_md_system=`echo $ac_sys_system | |
| 621 | tr -d '/ ' | tr '[A-Z]' '[a-z]'` |
| 622 | ac_md_release=`echo $ac_sys_release | |
| 623 | tr -d '/ ' | sed 's/\..*//'` |
Guido van Rossum | b97ef17 | 1997-09-28 05:44:03 +0000 | [diff] [blame] | 624 | MACHDEP="$ac_md_system$ac_md_release" |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 625 | |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 626 | case $MACHDEP in |
Guido van Rossum | b97ef17 | 1997-09-28 05:44:03 +0000 | [diff] [blame] | 627 | '') MACHDEP="unknown";; |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 628 | esac |
| 629 | fi |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 630 | |
| 631 | # |
| 632 | # SGI compilers allow the specification of the both the ABI and the |
| 633 | # ISA on the command line. Depending on the values of these switches, |
| 634 | # different and often incompatable code will be generated. |
| 635 | # |
| 636 | # The SGI_ABI variable can be used to modify the CC and LDFLAGS and |
| 637 | # thus supply support for various ABI/ISA combinations. The MACHDEP |
| 638 | # variable is also adjusted. |
| 639 | # |
| 640 | |
| 641 | if test ! -z "$SGI_ABI" |
| 642 | then |
| 643 | CC="cc $SGI_ABI" |
| 644 | LDFLAGS="$SGI_ABI $LDFLAGS" |
| 645 | MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'` |
| 646 | fi |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 647 | echo "$ac_t""$MACHDEP" 1>&6 |
| 648 | |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 649 | # |
| 650 | # CCC is the command that compiles C++ programs |
| 651 | # |
| 652 | # Not all make programs have this predefined. |
| 653 | # |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 654 | #AC_SUBST(SET_CCC) |
| 655 | #AC_MSG_CHECKING(CCC) |
| 656 | #if test -z "$CCC" |
| 657 | #then |
| 658 | # case $ac_sys_system in |
| 659 | # IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";; |
| 660 | # Linux*) SET_CCC="CCC= g++";; |
| 661 | # *) SET_CCC="" |
| 662 | # esac |
| 663 | #else |
| 664 | # SET_CCC="CCC= ${CCC}" |
| 665 | #fi |
| 666 | #AC_MSG_RESULT($SET_CCC) |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 667 | |
| 668 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 669 | # checks for alternative programs |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 670 | echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 671 | echo "configure:672: checking for --without-gcc" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 672 | # Check whether --with-gcc or --without-gcc was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 673 | if test "${with_gcc+set}" = set; then |
| 674 | withval="$with_gcc" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 675 | |
| 676 | case $withval in |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 677 | no) CC=cc |
| 678 | without_gcc=yes;; |
| 679 | yes) CC=gcc |
| 680 | without_gcc=no;; |
| 681 | *) CC=$withval |
| 682 | without_gcc=$withval;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 683 | esac |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 684 | else |
Guido van Rossum | e77438c | 1995-09-13 18:59:59 +0000 | [diff] [blame] | 685 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 686 | case $ac_sys_system in |
Guido van Rossum | e77438c | 1995-09-13 18:59:59 +0000 | [diff] [blame] | 687 | OSF1) CC=cc |
| 688 | without_gcc=;; |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 689 | BeOS*) |
| 690 | # Dunno if it's a good idea to get this over with all at once, or |
| 691 | # to handle it in with the other goodies. |
| 692 | MACHDEP=beos |
| 693 | |
| 694 | case $BE_HOST_CPU in |
| 695 | ppc) |
Guido van Rossum | 8137680 | 1999-04-06 15:50:51 +0000 | [diff] [blame] | 696 | CC="mwcc -I$PWD/BeOS -nodup" |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 697 | without_gcc=yes |
Guido van Rossum | 6b9da45 | 1999-03-24 17:48:12 +0000 | [diff] [blame] | 698 | case `uname -r` in |
| 699 | 4.0*) OPT="-DUSE_DL_EXPORT -O7 -opt schedule604 -export pragma" ;; |
| 700 | *) OPT="-DUSE_DL_EXPORT -O2 -proc 604e -export pragma" ;; |
| 701 | esac |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 702 | CCSHARED=-UUSE_DL_EXPORT |
| 703 | LDFLAGS="$LDFLAGS -nodup" |
| 704 | |
| 705 | AR="$PWD/BeOS/ar-fake" |
| 706 | RANLIB=: |
| 707 | |
| 708 | cat >> confdefs.h <<\EOF |
| 709 | #define DL_EXPORT_HEADER "dl_export.h" |
| 710 | EOF |
| 711 | |
| 712 | ;; |
| 713 | x86) |
| 714 | CC="gcc -I$PWD/BeOS" |
| 715 | without_gcc=no |
Guido van Rossum | 32000e8 | 2000-05-22 21:31:50 +0000 | [diff] [blame] | 716 | OPT="-DUSE_DL_EXPORT -O" |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 717 | CCSHARED=-UUSE_DL_EXPORT |
| 718 | |
| 719 | AR="$PWD/BeOS/ar-fake" |
| 720 | RANLIB=: |
| 721 | |
| 722 | cat >> confdefs.h <<\EOF |
| 723 | #define DL_EXPORT_HEADER "dl_export.h" |
| 724 | EOF |
| 725 | |
| 726 | ;; |
| 727 | *) |
| 728 | { echo "configure: error: Your BeOS system isn't PowerPC or x86... neat" 1>&2; exit 1; } |
| 729 | ;; |
| 730 | esac |
| 731 | ;; |
Guido van Rossum | e77438c | 1995-09-13 18:59:59 +0000 | [diff] [blame] | 732 | *) without_gcc=no;; |
| 733 | esac |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 734 | fi |
| 735 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 736 | echo "$ac_t""$without_gcc" 1>&6 |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 737 | |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 738 | |
| 739 | |
| 740 | MAINOBJ=python.o |
| 741 | echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 742 | echo "configure:743: checking for --with-cxx=<compiler>" >&5 |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 743 | # Check whether --with-cxx or --without-cxx was given. |
| 744 | if test "${with_cxx+set}" = set; then |
| 745 | withval="$with_cxx" |
| 746 | |
| 747 | case $withval in |
| 748 | no) CXX= |
| 749 | with_cxx=no;; |
| 750 | *) CXX=$withval |
| 751 | MAINOBJ=ccpython.o |
| 752 | with_cxx=$withval;; |
| 753 | esac |
| 754 | else |
| 755 | |
| 756 | with_cxx=no |
| 757 | |
| 758 | fi |
| 759 | |
| 760 | echo "$ac_t""$with_cxx" 1>&6 |
| 761 | SET_CXX="CXX = $CXX" |
| 762 | |
| 763 | #AC_MSG_CHECKING(CCC) |
| 764 | #if test -z "$CCC" |
| 765 | #then |
| 766 | # case $ac_sys_system in |
| 767 | # IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";; |
| 768 | # Linux*) SET_CCC="CCC= g++";; |
| 769 | # *) SET_CCC="" |
| 770 | # esac |
| 771 | #else |
| 772 | # SET_CCC="CCC= ${CCC}" |
| 773 | #fi |
| 774 | #AC_MSG_RESULT($SET_CCC) |
| 775 | |
Guido van Rossum | 8b131c5 | 1995-03-09 14:10:13 +0000 | [diff] [blame] | 776 | # If the user switches compilers, we can't believe the cache |
| 777 | if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC" |
| 778 | then |
| 779 | { echo "configure: error: cached CC is different -- throw away $cache_file |
| 780 | (it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; } |
| 781 | fi |
| 782 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 783 | # Extract the first word of "gcc", so it can be a program name with args. |
| 784 | set dummy gcc; ac_word=$2 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 785 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 786 | echo "configure:787: checking for $ac_word" >&5 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 787 | if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 788 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 789 | else |
| 790 | if test -n "$CC"; then |
| 791 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 792 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 793 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 794 | ac_dummy="$PATH" |
| 795 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 796 | test -z "$ac_dir" && ac_dir=. |
| 797 | if test -f $ac_dir/$ac_word; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 798 | ac_cv_prog_CC="gcc" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 799 | break |
| 800 | fi |
| 801 | done |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 802 | IFS="$ac_save_ifs" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 803 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 804 | fi |
| 805 | CC="$ac_cv_prog_CC" |
| 806 | if test -n "$CC"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 807 | echo "$ac_t""$CC" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 808 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 809 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 810 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 811 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 812 | if test -z "$CC"; then |
| 813 | # Extract the first word of "cc", so it can be a program name with args. |
| 814 | set dummy cc; ac_word=$2 |
| 815 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 816 | echo "configure:817: checking for $ac_word" >&5 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 817 | if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 818 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 819 | else |
| 820 | if test -n "$CC"; then |
| 821 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 822 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 823 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 824 | ac_prog_rejected=no |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 825 | ac_dummy="$PATH" |
| 826 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 827 | test -z "$ac_dir" && ac_dir=. |
| 828 | if test -f $ac_dir/$ac_word; then |
| 829 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then |
| 830 | ac_prog_rejected=yes |
| 831 | continue |
| 832 | fi |
| 833 | ac_cv_prog_CC="cc" |
| 834 | break |
| 835 | fi |
| 836 | done |
| 837 | IFS="$ac_save_ifs" |
| 838 | if test $ac_prog_rejected = yes; then |
| 839 | # We found a bogon in the path, so make sure we never use it. |
| 840 | set dummy $ac_cv_prog_CC |
| 841 | shift |
| 842 | if test $# -gt 0; then |
| 843 | # We chose a different compiler from the bogus one. |
| 844 | # However, it has the same basename, so the bogon will be chosen |
| 845 | # first if we set CC to just the basename; use the full file name. |
| 846 | shift |
| 847 | set dummy "$ac_dir/$ac_word" "$@" |
| 848 | shift |
| 849 | ac_cv_prog_CC="$@" |
| 850 | fi |
| 851 | fi |
| 852 | fi |
| 853 | fi |
| 854 | CC="$ac_cv_prog_CC" |
| 855 | if test -n "$CC"; then |
| 856 | echo "$ac_t""$CC" 1>&6 |
| 857 | else |
| 858 | echo "$ac_t""no" 1>&6 |
| 859 | fi |
| 860 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 861 | if test -z "$CC"; then |
| 862 | case "`uname -s`" in |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 863 | *win32* | *WIN32* | *CYGWIN*) |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 864 | # Extract the first word of "cl", so it can be a program name with args. |
| 865 | set dummy cl; ac_word=$2 |
| 866 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 867 | echo "configure:868: checking for $ac_word" >&5 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 868 | if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 869 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 870 | else |
| 871 | if test -n "$CC"; then |
| 872 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 873 | else |
| 874 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 875 | ac_dummy="$PATH" |
| 876 | for ac_dir in $ac_dummy; do |
| 877 | test -z "$ac_dir" && ac_dir=. |
| 878 | if test -f $ac_dir/$ac_word; then |
| 879 | ac_cv_prog_CC="cl" |
| 880 | break |
| 881 | fi |
| 882 | done |
| 883 | IFS="$ac_save_ifs" |
| 884 | fi |
| 885 | fi |
| 886 | CC="$ac_cv_prog_CC" |
| 887 | if test -n "$CC"; then |
| 888 | echo "$ac_t""$CC" 1>&6 |
| 889 | else |
| 890 | echo "$ac_t""no" 1>&6 |
| 891 | fi |
| 892 | ;; |
| 893 | esac |
| 894 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 895 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } |
| 896 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 897 | |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 898 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
| 899 | echo "configure:900: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 900 | |
| 901 | ac_ext=c |
| 902 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 903 | ac_cpp='$CPP $CPPFLAGS' |
| 904 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 905 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 906 | cross_compiling=$ac_cv_prog_cc_cross |
| 907 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 908 | cat > conftest.$ac_ext << EOF |
| 909 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 910 | #line 911 "configure" |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 911 | #include "confdefs.h" |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 912 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 913 | main(){return(0);} |
| 914 | EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 915 | if { (eval echo configure:916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 916 | ac_cv_prog_cc_works=yes |
| 917 | # If we can't run a trivial program, we are probably using a cross compiler. |
| 918 | if (./conftest; exit) 2>/dev/null; then |
| 919 | ac_cv_prog_cc_cross=no |
| 920 | else |
| 921 | ac_cv_prog_cc_cross=yes |
| 922 | fi |
| 923 | else |
| 924 | echo "configure: failed program was:" >&5 |
| 925 | cat conftest.$ac_ext >&5 |
| 926 | ac_cv_prog_cc_works=no |
| 927 | fi |
| 928 | rm -fr conftest* |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 929 | ac_ext=c |
| 930 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 931 | ac_cpp='$CPP $CPPFLAGS' |
| 932 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 933 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 934 | cross_compiling=$ac_cv_prog_cc_cross |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 935 | |
| 936 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 |
| 937 | if test $ac_cv_prog_cc_works = no; then |
| 938 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } |
| 939 | fi |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 940 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 |
| 941 | echo "configure:942: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 942 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
| 943 | cross_compiling=$ac_cv_prog_cc_cross |
| 944 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 945 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 946 | echo "configure:947: checking whether we are using GNU C" >&5 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 947 | if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 948 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 949 | else |
| 950 | cat > conftest.c <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 951 | #ifdef __GNUC__ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 952 | yes; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 953 | #endif |
| 954 | EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 955 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:956: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 956 | ac_cv_prog_gcc=yes |
| 957 | else |
| 958 | ac_cv_prog_gcc=no |
| 959 | fi |
| 960 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 961 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 962 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 963 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 964 | if test $ac_cv_prog_gcc = yes; then |
| 965 | GCC=yes |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 966 | else |
| 967 | GCC= |
| 968 | fi |
| 969 | |
| 970 | ac_test_CFLAGS="${CFLAGS+set}" |
| 971 | ac_save_CFLAGS="$CFLAGS" |
| 972 | CFLAGS= |
| 973 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 974 | echo "configure:975: checking whether ${CC-cc} accepts -g" >&5 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 975 | if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 976 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 977 | else |
| 978 | echo 'void f(){}' > conftest.c |
| 979 | 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] | 980 | ac_cv_prog_cc_g=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 981 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 982 | ac_cv_prog_cc_g=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 983 | fi |
| 984 | rm -f conftest* |
| 985 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 986 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 987 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 988 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 989 | if test "$ac_test_CFLAGS" = set; then |
| 990 | CFLAGS="$ac_save_CFLAGS" |
| 991 | elif test $ac_cv_prog_cc_g = yes; then |
| 992 | if test "$GCC" = yes; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 993 | CFLAGS="-g -O2" |
| 994 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 995 | CFLAGS="-g" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 996 | fi |
| 997 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 998 | if test "$GCC" = yes; then |
| 999 | CFLAGS="-O2" |
| 1000 | else |
| 1001 | CFLAGS= |
| 1002 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1003 | fi |
| 1004 | |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1005 | |
Guido van Rossum | dd997f7 | 1998-10-07 19:58:26 +0000 | [diff] [blame] | 1006 | case $MACHDEP in |
| 1007 | bsdos*) |
| 1008 | case $CC in |
| 1009 | gcc) CC="$CC -D_HAVE_BSDI";; |
| 1010 | esac;; |
| 1011 | esac |
| 1012 | |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1013 | case $ac_sys_system in |
| 1014 | hp*|HP*) |
| 1015 | case $CC in |
| 1016 | cc|*/cc) CC="$CC -Aa -D_HPUX_SOURCE";; |
| 1017 | esac;; |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 1018 | BeOS*) |
| 1019 | case $CC in |
| 1020 | cc) CC=cc;; |
| 1021 | esac;; |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1022 | esac |
| 1023 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1024 | # LDLIBRARY is the name of the library to link against (as opposed to the |
| 1025 | # name of the library into which to insert object files). On systems |
| 1026 | # without shared libraries, LDLIBRARY is the same as LIBRARY (defined in |
| 1027 | # the Makefiles). |
| 1028 | |
| 1029 | |
| 1030 | LDLIBRARY='' |
| 1031 | |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1032 | # LINKCC is the command that links the python executable -- default is $(CC). |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 1033 | # This is altered for AIX and BeOS in order to build the export list before |
| 1034 | # linking. |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1035 | |
| 1036 | echo $ac_n "checking LINKCC""... $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1037 | echo "configure:1038: checking LINKCC" >&5 |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 1038 | if test -z "$LINKCC" -a ! -z "$CXX" |
| 1039 | then |
| 1040 | LINKCC="$CXX" |
| 1041 | fi |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1042 | if test -z "$LINKCC" |
| 1043 | then |
| 1044 | case $ac_sys_system in |
| 1045 | AIX*) |
Guido van Rossum | 45140f9 | 1997-08-29 18:44:06 +0000 | [diff] [blame] | 1046 | LINKCC="\$(srcdir)/makexp_aix python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";; |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 1047 | BeOS*) |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 1048 | LINKCC="\$(srcdir)/../BeOS/linkcc \$(LIBRARY) \$(PURIFY) \$(CC) \$(OPT)" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1049 | LDLIBRARY='libpython$(VERSION).so';; |
Guido van Rossum | 3c4bb80 | 1997-12-18 23:55:32 +0000 | [diff] [blame] | 1050 | dgux*) |
| 1051 | LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";; |
Guido van Rossum | 25f9303 | 1997-08-18 16:00:04 +0000 | [diff] [blame] | 1052 | *) LINKCC="\$(PURIFY) \$(CC)";; |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1053 | esac |
| 1054 | fi |
| 1055 | echo "$ac_t""$LINKCC" 1>&6 |
| 1056 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1057 | echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1058 | echo "configure:1059: checking LDLIBRARY" >&5 |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1059 | |
| 1060 | # NeXT framework builds require that the 'ar' library be converted into |
| 1061 | # a bundle using libtool. |
| 1062 | if test "$with_next_framework" |
| 1063 | then |
| 1064 | LDLIBRARY='libpython$(VERSION).dylib' |
| 1065 | fi |
| 1066 | |
| 1067 | # DG/UX requires some fancy ld contortions to produce a .so from an .a |
| 1068 | if test "$MACHDEP" = "dguxR4" |
| 1069 | then |
| 1070 | LDLIBRARY='libpython$(VERSION).so' |
| 1071 | OPT="$OPT -pic" |
| 1072 | fi |
| 1073 | echo "$ac_t""$LDLIBRARY" 1>&6 |
| 1074 | |
| 1075 | # If LDLIBRARY is different from LIBRARY, emit a rule to build it. |
| 1076 | if test -z "$LDLIBRARY" |
| 1077 | then |
| 1078 | LDLIBRARY='libpython$(VERSION).a' |
| 1079 | MAKE_LDLIBRARY="true" |
| 1080 | else |
| 1081 | MAKE_LDLIBRARY='$(MAKE) $(LDLIBRARY)' |
| 1082 | fi |
| 1083 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1084 | # Extract the first word of "ranlib", so it can be a program name with args. |
| 1085 | set dummy ranlib; ac_word=$2 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1086 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1087 | echo "configure:1088: checking for $ac_word" >&5 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 1088 | if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1089 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1090 | else |
| 1091 | if test -n "$RANLIB"; then |
| 1092 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. |
| 1093 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1094 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 1095 | ac_dummy="$PATH" |
| 1096 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1097 | test -z "$ac_dir" && ac_dir=. |
| 1098 | if test -f $ac_dir/$ac_word; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1099 | ac_cv_prog_RANLIB="ranlib" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1100 | break |
| 1101 | fi |
| 1102 | done |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1103 | IFS="$ac_save_ifs" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1104 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1105 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1106 | fi |
| 1107 | RANLIB="$ac_cv_prog_RANLIB" |
| 1108 | if test -n "$RANLIB"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1109 | echo "$ac_t""$RANLIB" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1110 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1111 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1112 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1113 | |
| 1114 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1115 | for ac_prog in ar aal |
| 1116 | do |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1117 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
| 1118 | set dummy $ac_prog; ac_word=$2 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1119 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1120 | echo "configure:1121: checking for $ac_word" >&5 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 1121 | if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1122 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1123 | else |
| 1124 | if test -n "$AR"; then |
| 1125 | ac_cv_prog_AR="$AR" # Let the user override the test. |
| 1126 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1127 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 1128 | ac_dummy="$PATH" |
| 1129 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1130 | test -z "$ac_dir" && ac_dir=. |
| 1131 | if test -f $ac_dir/$ac_word; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1132 | ac_cv_prog_AR="$ac_prog" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1133 | break |
| 1134 | fi |
| 1135 | done |
| 1136 | IFS="$ac_save_ifs" |
| 1137 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1138 | fi |
| 1139 | AR="$ac_cv_prog_AR" |
| 1140 | if test -n "$AR"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1141 | echo "$ac_t""$AR" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1142 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1143 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1144 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1145 | |
| 1146 | test -n "$AR" && break |
| 1147 | done |
| 1148 | test -n "$AR" || AR="ar" |
| 1149 | |
| 1150 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 1151 | |
| 1152 | |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1153 | # Install just never works :-( |
| 1154 | if test -z "$INSTALL" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 1155 | then |
| 1156 | INSTALL=cp |
| 1157 | INSTALL_PROGRAM=cp |
| 1158 | INSTALL_DATA=cp |
| 1159 | else |
| 1160 | INSTALL_PROGRAM="$INSTALL" |
| 1161 | INSTALL_DATA="$INSTALL -m 644" |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1162 | fi |
| 1163 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 1164 | # Not every filesystem supports hard links |
| 1165 | |
| 1166 | if test -z "$LN" ; then |
| 1167 | case $ac_sys_system in |
| 1168 | BeOS*) LN="ln -s";; |
| 1169 | *) LN=ln;; |
| 1170 | esac |
| 1171 | fi |
| 1172 | |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1173 | # Optimizer/debugger flags passed between Makefiles |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1174 | |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1175 | if test -z "$OPT" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1176 | then |
Guido van Rossum | edca74a | 1997-07-18 23:29:40 +0000 | [diff] [blame] | 1177 | case $GCC in |
| 1178 | yes) |
| 1179 | case $ac_cv_prog_cc_g in |
| 1180 | yes) OPT="-g -O2";; |
| 1181 | *) OPT="-O2";; |
| 1182 | esac |
| 1183 | ;; |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1184 | *) OPT="-O";; |
| 1185 | esac |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1186 | fi |
| 1187 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 1188 | if test "$ac_arch_flags" |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 1189 | then |
| 1190 | OPT="$OPT $ac_arch_flags" |
| 1191 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1192 | # checks for UNIX variants that set C preprocessor variables |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1193 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1194 | echo "configure:1195: checking how to run the C preprocessor" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1195 | # On Suns, sometimes $CPP names a directory. |
| 1196 | if test -n "$CPP" && test -d "$CPP"; then |
| 1197 | CPP= |
| 1198 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1199 | if test -z "$CPP"; then |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 1200 | if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1201 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1202 | else |
| 1203 | # This must be in double quotes, not single quotes, because CPP may get |
| 1204 | # substituted into the Makefile and "${CC-cc}" will confuse make. |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1205 | CPP="${CC-cc} -E" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1206 | # On the NeXT, cc -E runs the code through the compiler's parser, |
| 1207 | # not just through cpp. |
| 1208 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1209 | #line 1210 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1210 | #include "confdefs.h" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1211 | #include <assert.h> |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1212 | Syntax Error |
| 1213 | EOF |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1214 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1215 | { (eval echo configure:1216: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1216 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1217 | if test -z "$ac_err"; then |
| 1218 | : |
| 1219 | else |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1220 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1221 | echo "configure: failed program was:" >&5 |
| 1222 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1223 | rm -rf conftest* |
| 1224 | CPP="${CC-cc} -E -traditional-cpp" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1225 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1226 | #line 1227 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1227 | #include "confdefs.h" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1228 | #include <assert.h> |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1229 | Syntax Error |
| 1230 | EOF |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1231 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1232 | { (eval echo configure:1233: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1233 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1234 | if test -z "$ac_err"; then |
| 1235 | : |
| 1236 | else |
| 1237 | echo "$ac_err" >&5 |
| 1238 | echo "configure: failed program was:" >&5 |
| 1239 | cat conftest.$ac_ext >&5 |
| 1240 | rm -rf conftest* |
| 1241 | CPP="${CC-cc} -nologo -E" |
| 1242 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1243 | #line 1244 "configure" |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1244 | #include "confdefs.h" |
| 1245 | #include <assert.h> |
| 1246 | Syntax Error |
| 1247 | EOF |
| 1248 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1249 | { (eval echo configure:1250: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1250 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1251 | if test -z "$ac_err"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1252 | : |
| 1253 | else |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1254 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1255 | echo "configure: failed program was:" >&5 |
| 1256 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1257 | rm -rf conftest* |
| 1258 | CPP=/lib/cpp |
| 1259 | fi |
| 1260 | rm -f conftest* |
| 1261 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1262 | rm -f conftest* |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1263 | fi |
| 1264 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1265 | ac_cv_prog_CPP="$CPP" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1266 | fi |
Guido van Rossum | e77438c | 1995-09-13 18:59:59 +0000 | [diff] [blame] | 1267 | CPP="$ac_cv_prog_CPP" |
| 1268 | else |
| 1269 | ac_cv_prog_CPP="$CPP" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1270 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1271 | echo "$ac_t""$CPP" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1272 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1273 | echo $ac_n "checking for AIX""... $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1274 | echo "configure:1275: checking for AIX" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1275 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1276 | #line 1277 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1277 | #include "confdefs.h" |
| 1278 | #ifdef _AIX |
| 1279 | yes |
| 1280 | #endif |
| 1281 | |
| 1282 | EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1283 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1284 | egrep "yes" >/dev/null 2>&1; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1285 | rm -rf conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1286 | echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1287 | #define _ALL_SOURCE 1 |
| 1288 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1289 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1290 | else |
| 1291 | rm -rf conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1292 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1293 | fi |
| 1294 | rm -f conftest* |
| 1295 | |
| 1296 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1297 | ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1298 | echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1299 | echo "configure:1300: checking for minix/config.h" >&5 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 1300 | if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1301 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1302 | else |
| 1303 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1304 | #line 1305 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1305 | #include "confdefs.h" |
| 1306 | #include <minix/config.h> |
| 1307 | EOF |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1308 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1309 | { (eval echo configure:1310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1310 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1311 | if test -z "$ac_err"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1312 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1313 | eval "ac_cv_header_$ac_safe=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1314 | else |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1315 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1316 | echo "configure: failed program was:" >&5 |
| 1317 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1318 | rm -rf conftest* |
| 1319 | eval "ac_cv_header_$ac_safe=no" |
| 1320 | fi |
| 1321 | rm -f conftest* |
| 1322 | fi |
| 1323 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1324 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1325 | MINIX=yes |
| 1326 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1327 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1328 | MINIX= |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1329 | fi |
| 1330 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1331 | if test "$MINIX" = yes; then |
| 1332 | cat >> confdefs.h <<\EOF |
| 1333 | #define _POSIX_SOURCE 1 |
| 1334 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1335 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1336 | cat >> confdefs.h <<\EOF |
| 1337 | #define _POSIX_1_SOURCE 2 |
| 1338 | EOF |
| 1339 | |
| 1340 | cat >> confdefs.h <<\EOF |
| 1341 | #define _MINIX 1 |
| 1342 | EOF |
| 1343 | |
| 1344 | fi |
| 1345 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 1346 | |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1347 | echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1348 | echo "configure:1349: checking whether $CC accepts -OPT:Olimit=0" >&5 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 1349 | if eval "test \"\${ac_cv_opt_olimit_ok+set}\" = set"; then |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1350 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1351 | else |
| 1352 | ac_save_cc="$CC" |
| 1353 | CC="$CC -OPT:Olimit=0" |
| 1354 | if test "$cross_compiling" = yes; then |
| 1355 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 1356 | else |
| 1357 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1358 | #line 1359 "configure" |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1359 | #include "confdefs.h" |
| 1360 | int main() { return 0; } |
| 1361 | EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1362 | if { (eval echo configure:1363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1363 | then |
| 1364 | ac_cv_opt_olimit_ok=yes |
| 1365 | else |
| 1366 | echo "configure: failed program was:" >&5 |
| 1367 | cat conftest.$ac_ext >&5 |
| 1368 | rm -fr conftest* |
| 1369 | ac_cv_opt_olimit_ok=no |
| 1370 | fi |
| 1371 | rm -fr conftest* |
| 1372 | fi |
| 1373 | |
| 1374 | CC="$ac_save_cc" |
| 1375 | fi |
| 1376 | |
| 1377 | echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6 |
Guido van Rossum | 2efa34b | 1997-10-23 17:43:11 +0000 | [diff] [blame] | 1378 | if test $ac_cv_opt_olimit_ok = yes; then |
Guido van Rossum | 304dd2d | 1997-10-20 23:10:56 +0000 | [diff] [blame] | 1379 | OPT="$OPT -OPT:Olimit=0" |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1380 | else |
| 1381 | echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1382 | echo "configure:1383: checking whether $CC accepts -Olimit 1500" >&5 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 1383 | if eval "test \"\${ac_cv_olimit_ok+set}\" = set"; then |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1384 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1385 | else |
| 1386 | ac_save_cc="$CC" |
| 1387 | CC="$CC -Olimit 1500" |
| 1388 | if test "$cross_compiling" = yes; then |
| 1389 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 1390 | else |
| 1391 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1392 | #line 1393 "configure" |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1393 | #include "confdefs.h" |
| 1394 | int main() { return 0; } |
| 1395 | EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1396 | if { (eval echo configure:1397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1397 | then |
| 1398 | ac_cv_olimit_ok=yes |
| 1399 | else |
| 1400 | echo "configure: failed program was:" >&5 |
| 1401 | cat conftest.$ac_ext >&5 |
| 1402 | rm -fr conftest* |
| 1403 | ac_cv_olimit_ok=no |
Guido van Rossum | 201afe5 | 1997-05-14 21:14:44 +0000 | [diff] [blame] | 1404 | fi |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1405 | rm -fr conftest* |
| 1406 | fi |
| 1407 | |
| 1408 | CC="$ac_save_cc" |
| 1409 | fi |
| 1410 | |
| 1411 | echo "$ac_t""$ac_cv_olimit_ok" 1>&6 |
| 1412 | if test $ac_cv_olimit_ok = yes; then |
| 1413 | OPT="$OPT -Olimit 1500" |
| 1414 | fi |
| 1415 | fi |
| 1416 | |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 1417 | # check for ANSI or K&R ("traditional") preprocessor |
| 1418 | echo $ac_n "checking for C preprocessor type""... $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1419 | echo "configure:1420: checking for C preprocessor type" >&5 |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 1420 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1421 | #line 1422 "configure" |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 1422 | #include "confdefs.h" |
| 1423 | |
| 1424 | #define spam(name, doc) {#name, &name, #name "() -- " doc} |
| 1425 | int foo; |
| 1426 | struct {char *name; int *addr; char *doc;} desc = spam(foo, "something"); |
| 1427 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1428 | int main() { |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 1429 | ; |
| 1430 | ; return 0; } |
| 1431 | EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1432 | if { (eval echo configure:1433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 1433 | rm -rf conftest* |
| 1434 | cpp_type=ansi |
| 1435 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1436 | echo "configure: failed program was:" >&5 |
| 1437 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 1438 | rm -rf conftest* |
| 1439 | cat >> confdefs.h <<\EOF |
| 1440 | #define HAVE_OLD_CPP 1 |
| 1441 | EOF |
| 1442 | cpp_type=traditional |
| 1443 | fi |
| 1444 | rm -f conftest* |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 1445 | echo "$ac_t""$cpp_type" 1>&6 |
| 1446 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1447 | # checks for header files |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1448 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1449 | echo "configure:1450: checking for ANSI C header files" >&5 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 1450 | if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1451 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1452 | else |
| 1453 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1454 | #line 1455 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1455 | #include "confdefs.h" |
| 1456 | #include <stdlib.h> |
| 1457 | #include <stdarg.h> |
| 1458 | #include <string.h> |
| 1459 | #include <float.h> |
| 1460 | EOF |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1461 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1462 | { (eval echo configure:1463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1463 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1464 | if test -z "$ac_err"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1465 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1466 | ac_cv_header_stdc=yes |
| 1467 | else |
| 1468 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1469 | echo "configure: failed program was:" >&5 |
| 1470 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1471 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1472 | ac_cv_header_stdc=no |
| 1473 | fi |
| 1474 | rm -f conftest* |
| 1475 | |
| 1476 | if test $ac_cv_header_stdc = yes; then |
| 1477 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. |
| 1478 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1479 | #line 1480 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1480 | #include "confdefs.h" |
| 1481 | #include <string.h> |
| 1482 | EOF |
| 1483 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1484 | egrep "memchr" >/dev/null 2>&1; then |
| 1485 | : |
| 1486 | else |
| 1487 | rm -rf conftest* |
| 1488 | ac_cv_header_stdc=no |
| 1489 | fi |
| 1490 | rm -f conftest* |
| 1491 | |
| 1492 | fi |
| 1493 | |
| 1494 | if test $ac_cv_header_stdc = yes; then |
| 1495 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. |
| 1496 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1497 | #line 1498 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1498 | #include "confdefs.h" |
| 1499 | #include <stdlib.h> |
| 1500 | EOF |
| 1501 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1502 | egrep "free" >/dev/null 2>&1; then |
| 1503 | : |
| 1504 | else |
| 1505 | rm -rf conftest* |
| 1506 | ac_cv_header_stdc=no |
| 1507 | fi |
| 1508 | rm -f conftest* |
| 1509 | |
| 1510 | fi |
| 1511 | |
| 1512 | if test $ac_cv_header_stdc = yes; then |
| 1513 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. |
| 1514 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1515 | : |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1516 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1517 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1518 | #line 1519 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1519 | #include "confdefs.h" |
| 1520 | #include <ctype.h> |
| 1521 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') |
| 1522 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1523 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1524 | int main () { int i; for (i = 0; i < 256; i++) |
| 1525 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); |
| 1526 | exit (0); } |
| 1527 | |
| 1528 | EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1529 | if { (eval echo configure:1530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1530 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1531 | : |
| 1532 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1533 | echo "configure: failed program was:" >&5 |
| 1534 | cat conftest.$ac_ext >&5 |
| 1535 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1536 | ac_cv_header_stdc=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1537 | fi |
| 1538 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1539 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1540 | |
| 1541 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1542 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1543 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1544 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1545 | if test $ac_cv_header_stdc = yes; then |
| 1546 | cat >> confdefs.h <<\EOF |
| 1547 | #define STDC_HEADERS 1 |
| 1548 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1549 | |
| 1550 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1551 | |
Guido van Rossum | 9601315 | 1997-10-08 22:47:52 +0000 | [diff] [blame] | 1552 | for ac_hdr in dlfcn.h fcntl.h limits.h locale.h ncurses.h pthread.h \ |
Guido van Rossum | 2d38f91 | 1996-06-26 19:47:01 +0000 | [diff] [blame] | 1553 | signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h \ |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 1554 | sys/audioio.h sys/file.h sys/lock.h \ |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 1555 | sys/param.h sys/select.h sys/socket.h sys/time.h sys/times.h \ |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 1556 | sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1557 | do |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1558 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1559 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1560 | echo "configure:1561: checking for $ac_hdr" >&5 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 1561 | if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1562 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1563 | else |
| 1564 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1565 | #line 1566 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1566 | #include "confdefs.h" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1567 | #include <$ac_hdr> |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1568 | EOF |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1569 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1570 | { (eval echo configure:1571: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1571 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1572 | if test -z "$ac_err"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1573 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1574 | eval "ac_cv_header_$ac_safe=yes" |
| 1575 | else |
| 1576 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1577 | echo "configure: failed program was:" >&5 |
| 1578 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1579 | rm -rf conftest* |
| 1580 | eval "ac_cv_header_$ac_safe=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1581 | fi |
| 1582 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1583 | fi |
| 1584 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1585 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1586 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1587 | cat >> confdefs.h <<EOF |
| 1588 | #define $ac_tr_hdr 1 |
| 1589 | EOF |
| 1590 | |
| 1591 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1592 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1593 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1594 | done |
| 1595 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1596 | ac_header_dirent=no |
| 1597 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h |
| 1598 | do |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1599 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1600 | echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1601 | echo "configure:1602: checking for $ac_hdr that defines DIR" >&5 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 1602 | if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1603 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1604 | else |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1605 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1606 | #line 1607 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1607 | #include "confdefs.h" |
| 1608 | #include <sys/types.h> |
| 1609 | #include <$ac_hdr> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1610 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1611 | DIR *dirp = 0; |
| 1612 | ; return 0; } |
| 1613 | EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1614 | if { (eval echo configure:1615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1615 | rm -rf conftest* |
| 1616 | eval "ac_cv_header_dirent_$ac_safe=yes" |
| 1617 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1618 | echo "configure: failed program was:" >&5 |
| 1619 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1620 | rm -rf conftest* |
| 1621 | eval "ac_cv_header_dirent_$ac_safe=no" |
| 1622 | fi |
| 1623 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1624 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1625 | if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1626 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1627 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1628 | cat >> confdefs.h <<EOF |
| 1629 | #define $ac_tr_hdr 1 |
| 1630 | EOF |
| 1631 | ac_header_dirent=$ac_hdr; break |
| 1632 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1633 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1634 | fi |
| 1635 | done |
| 1636 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. |
| 1637 | if test $ac_header_dirent = dirent.h; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1638 | echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1639 | echo "configure:1640: checking for opendir in -ldir" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1640 | ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 1641 | if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1642 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1643 | else |
| 1644 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1645 | LIBS="-ldir $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1646 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1647 | #line 1648 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1648 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1649 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 1650 | /* We use char because int might match the return type of a gcc2 |
| 1651 | builtin and then its argument prototype would still apply. */ |
| 1652 | char opendir(); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1653 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1654 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1655 | opendir() |
| 1656 | ; return 0; } |
| 1657 | EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1658 | if { (eval echo configure:1659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1659 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1660 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1661 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1662 | echo "configure: failed program was:" >&5 |
| 1663 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1664 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1665 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1666 | fi |
| 1667 | rm -f conftest* |
| 1668 | LIBS="$ac_save_LIBS" |
| 1669 | |
| 1670 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1671 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1672 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1673 | LIBS="$LIBS -ldir" |
| 1674 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1675 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1676 | fi |
| 1677 | |
| 1678 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1679 | echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1680 | echo "configure:1681: checking for opendir in -lx" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1681 | ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 1682 | if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1683 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1684 | else |
| 1685 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1686 | LIBS="-lx $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1687 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1688 | #line 1689 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1689 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1690 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 1691 | /* We use char because int might match the return type of a gcc2 |
| 1692 | builtin and then its argument prototype would still apply. */ |
| 1693 | char opendir(); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1694 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1695 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1696 | opendir() |
| 1697 | ; return 0; } |
| 1698 | EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1699 | if { (eval echo configure:1700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1700 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1701 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1702 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1703 | echo "configure: failed program was:" >&5 |
| 1704 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1705 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1706 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1707 | fi |
| 1708 | rm -f conftest* |
| 1709 | LIBS="$ac_save_LIBS" |
| 1710 | |
| 1711 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1712 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1713 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1714 | LIBS="$LIBS -lx" |
| 1715 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1716 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1717 | fi |
| 1718 | |
| 1719 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1720 | |
| 1721 | |
| 1722 | # checks for typedefs |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 1723 | was_it_defined=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1724 | echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1725 | echo "configure:1726: checking for clock_t in time.h" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1726 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1727 | #line 1728 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1728 | #include "confdefs.h" |
| 1729 | #include <time.h> |
| 1730 | EOF |
| 1731 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1732 | egrep "clock_t" >/dev/null 2>&1; then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 1733 | rm -rf conftest* |
| 1734 | was_it_defined=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1735 | else |
| 1736 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1737 | cat >> confdefs.h <<\EOF |
| 1738 | #define clock_t long |
| 1739 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1740 | |
| 1741 | fi |
| 1742 | rm -f conftest* |
| 1743 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1744 | echo "$ac_t""$was_it_defined" 1>&6 |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 1745 | |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 1746 | # Add some code to confdefs.h so that the test for off_t works on SCO |
| 1747 | cat >> confdefs.h <<\EOF |
| 1748 | #if defined(SCO_DS) |
| 1749 | #undef _OFF_T |
| 1750 | #endif |
| 1751 | EOF |
| 1752 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1753 | # Type availability checks |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1754 | echo $ac_n "checking for mode_t""... $ac_c" 1>&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1755 | echo "configure:1756: checking for mode_t" >&5 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 1756 | if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1757 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1758 | else |
| 1759 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1760 | #line 1761 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1761 | #include "confdefs.h" |
| 1762 | #include <sys/types.h> |
| 1763 | #if STDC_HEADERS |
| 1764 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1765 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1766 | #endif |
| 1767 | EOF |
| 1768 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1769 | egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1770 | rm -rf conftest* |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 1771 | eval "ac_cv_type_mode_t=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1772 | else |
| 1773 | rm -rf conftest* |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 1774 | eval "ac_cv_type_mode_t=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1775 | fi |
| 1776 | rm -f conftest* |
| 1777 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1778 | fi |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 1779 | if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then |
| 1780 | echo "$ac_t""yes" 1>&6 |
| 1781 | else |
| 1782 | echo "$ac_t""no" 1>&6 |
| 1783 | cat >> confdefs.h <<EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1784 | #define mode_t int |
| 1785 | EOF |
| 1786 | |
| 1787 | fi |
| 1788 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1789 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 1790 | echo "configure:1791: checking for off_t" >&5 |
| 1791 | if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1792 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1793 | else |
| 1794 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 1795 | #line 1796 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1796 | #include "confdefs.h" |
| 1797 | #include <sys/types.h> |
| 1798 | #if STDC_HEADERS |
| 1799 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1800 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1801 | #endif |
| 1802 | EOF |
| 1803 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1804 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1805 | rm -rf conftest* |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 1806 | eval "ac_cv_type_off_t=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1807 | else |
| 1808 | rm -rf conftest* |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 1809 | eval "ac_cv_type_off_t=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1810 | fi |
| 1811 | rm -f conftest* |
| 1812 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1813 | fi |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 1814 | if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then |
| 1815 | echo "$ac_t""yes" 1>&6 |
| 1816 | else |
| 1817 | echo "$ac_t""no" 1>&6 |
| 1818 | cat >> confdefs.h <<EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1819 | #define off_t long |
| 1820 | EOF |
| 1821 | |
| 1822 | fi |
| 1823 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1824 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 1825 | echo "configure:1826: checking for pid_t" >&5 |
| 1826 | if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1827 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1828 | else |
| 1829 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 1830 | #line 1831 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1831 | #include "confdefs.h" |
| 1832 | #include <sys/types.h> |
| 1833 | #if STDC_HEADERS |
| 1834 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1835 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1836 | #endif |
| 1837 | EOF |
| 1838 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1839 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1840 | rm -rf conftest* |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 1841 | eval "ac_cv_type_pid_t=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1842 | else |
| 1843 | rm -rf conftest* |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 1844 | eval "ac_cv_type_pid_t=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1845 | fi |
| 1846 | rm -f conftest* |
| 1847 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1848 | fi |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 1849 | if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then |
| 1850 | echo "$ac_t""yes" 1>&6 |
| 1851 | else |
| 1852 | echo "$ac_t""no" 1>&6 |
| 1853 | cat >> confdefs.h <<EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1854 | #define pid_t int |
| 1855 | EOF |
| 1856 | |
| 1857 | fi |
| 1858 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1859 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 1860 | echo "configure:1861: checking return type of signal handlers" >&5 |
| 1861 | if eval "test \"\${ac_cv_type_signal+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1862 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1863 | else |
| 1864 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 1865 | #line 1866 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1866 | #include "confdefs.h" |
| 1867 | #include <sys/types.h> |
| 1868 | #include <signal.h> |
| 1869 | #ifdef signal |
| 1870 | #undef signal |
| 1871 | #endif |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1872 | #ifdef __cplusplus |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1873 | extern "C" void (*signal (int, void (*)(int)))(int); |
| 1874 | #else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1875 | void (*signal ()) (); |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1876 | #endif |
| 1877 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1878 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1879 | int i; |
| 1880 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1881 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 1882 | if { (eval echo configure:1883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1883 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1884 | ac_cv_type_signal=void |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1885 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1886 | echo "configure: failed program was:" >&5 |
| 1887 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1888 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1889 | ac_cv_type_signal=int |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1890 | fi |
| 1891 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1892 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1893 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1894 | echo "$ac_t""$ac_cv_type_signal" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1895 | cat >> confdefs.h <<EOF |
| 1896 | #define RETSIGTYPE $ac_cv_type_signal |
| 1897 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1898 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1899 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1900 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 1901 | echo "configure:1902: checking for size_t" >&5 |
| 1902 | if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1903 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1904 | else |
| 1905 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 1906 | #line 1907 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1907 | #include "confdefs.h" |
| 1908 | #include <sys/types.h> |
| 1909 | #if STDC_HEADERS |
| 1910 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1911 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1912 | #endif |
| 1913 | EOF |
| 1914 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1915 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1916 | rm -rf conftest* |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 1917 | eval "ac_cv_type_size_t=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1918 | else |
| 1919 | rm -rf conftest* |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 1920 | eval "ac_cv_type_size_t=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1921 | fi |
| 1922 | rm -f conftest* |
| 1923 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1924 | fi |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 1925 | if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then |
| 1926 | echo "$ac_t""yes" 1>&6 |
| 1927 | else |
| 1928 | echo "$ac_t""no" 1>&6 |
| 1929 | cat >> confdefs.h <<EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1930 | #define size_t unsigned |
| 1931 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1932 | |
| 1933 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1934 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1935 | echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 1936 | echo "configure:1937: checking for uid_t in sys/types.h" >&5 |
| 1937 | if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1938 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1939 | else |
| 1940 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 1941 | #line 1942 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1942 | #include "confdefs.h" |
| 1943 | #include <sys/types.h> |
| 1944 | EOF |
| 1945 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1946 | egrep "uid_t" >/dev/null 2>&1; then |
| 1947 | rm -rf conftest* |
| 1948 | ac_cv_type_uid_t=yes |
| 1949 | else |
| 1950 | rm -rf conftest* |
| 1951 | ac_cv_type_uid_t=no |
| 1952 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1953 | rm -f conftest* |
| 1954 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1955 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1956 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1957 | echo "$ac_t""$ac_cv_type_uid_t" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1958 | if test $ac_cv_type_uid_t = no; then |
| 1959 | cat >> confdefs.h <<\EOF |
| 1960 | #define uid_t int |
| 1961 | EOF |
| 1962 | |
| 1963 | cat >> confdefs.h <<\EOF |
| 1964 | #define gid_t int |
| 1965 | EOF |
| 1966 | |
| 1967 | fi |
| 1968 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1969 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1970 | # Sizes of various common basic types |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 1971 | echo $ac_n "checking size of int""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 1972 | echo "configure:1973: checking size of int" >&5 |
| 1973 | if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 1974 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1975 | else |
| 1976 | if test "$cross_compiling" = yes; then |
| 1977 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 1978 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1979 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 1980 | #line 1981 "configure" |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 1981 | #include "confdefs.h" |
| 1982 | #include <stdio.h> |
| 1983 | main() |
| 1984 | { |
| 1985 | FILE *f=fopen("conftestval", "w"); |
| 1986 | if (!f) exit(1); |
| 1987 | fprintf(f, "%d\n", sizeof(int)); |
| 1988 | exit(0); |
| 1989 | } |
| 1990 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 1991 | if { (eval echo configure:1992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1992 | then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 1993 | ac_cv_sizeof_int=`cat conftestval` |
| 1994 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1995 | echo "configure: failed program was:" >&5 |
| 1996 | cat conftest.$ac_ext >&5 |
| 1997 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 1998 | ac_cv_sizeof_int=0 |
| 1999 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2000 | rm -fr conftest* |
| 2001 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2002 | |
| 2003 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2004 | echo "$ac_t""$ac_cv_sizeof_int" 1>&6 |
| 2005 | cat >> confdefs.h <<EOF |
| 2006 | #define SIZEOF_INT $ac_cv_sizeof_int |
| 2007 | EOF |
| 2008 | |
| 2009 | |
| 2010 | echo $ac_n "checking size of long""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2011 | echo "configure:2012: checking size of long" >&5 |
| 2012 | if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2013 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2014 | else |
| 2015 | if test "$cross_compiling" = yes; then |
| 2016 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2017 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2018 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2019 | #line 2020 "configure" |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2020 | #include "confdefs.h" |
| 2021 | #include <stdio.h> |
| 2022 | main() |
| 2023 | { |
| 2024 | FILE *f=fopen("conftestval", "w"); |
| 2025 | if (!f) exit(1); |
| 2026 | fprintf(f, "%d\n", sizeof(long)); |
| 2027 | exit(0); |
| 2028 | } |
| 2029 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2030 | if { (eval echo configure:2031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2031 | then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2032 | ac_cv_sizeof_long=`cat conftestval` |
| 2033 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2034 | echo "configure: failed program was:" >&5 |
| 2035 | cat conftest.$ac_ext >&5 |
| 2036 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2037 | ac_cv_sizeof_long=0 |
| 2038 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2039 | rm -fr conftest* |
| 2040 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2041 | |
| 2042 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2043 | echo "$ac_t""$ac_cv_sizeof_long" 1>&6 |
| 2044 | cat >> confdefs.h <<EOF |
| 2045 | #define SIZEOF_LONG $ac_cv_sizeof_long |
| 2046 | EOF |
| 2047 | |
| 2048 | |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2049 | echo $ac_n "checking size of void *""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2050 | echo "configure:2051: checking size of void *" >&5 |
| 2051 | if eval "test \"\${ac_cv_sizeof_void_p+set}\" = set"; then |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2052 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2053 | else |
| 2054 | if test "$cross_compiling" = yes; then |
| 2055 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2056 | else |
| 2057 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2058 | #line 2059 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2059 | #include "confdefs.h" |
| 2060 | #include <stdio.h> |
| 2061 | main() |
| 2062 | { |
| 2063 | FILE *f=fopen("conftestval", "w"); |
| 2064 | if (!f) exit(1); |
| 2065 | fprintf(f, "%d\n", sizeof(void *)); |
| 2066 | exit(0); |
| 2067 | } |
| 2068 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2069 | if { (eval echo configure:2070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2070 | then |
| 2071 | ac_cv_sizeof_void_p=`cat conftestval` |
| 2072 | else |
| 2073 | echo "configure: failed program was:" >&5 |
| 2074 | cat conftest.$ac_ext >&5 |
| 2075 | rm -fr conftest* |
| 2076 | ac_cv_sizeof_void_p=0 |
| 2077 | fi |
| 2078 | rm -fr conftest* |
| 2079 | fi |
| 2080 | |
| 2081 | fi |
| 2082 | echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6 |
| 2083 | cat >> confdefs.h <<EOF |
| 2084 | #define SIZEOF_VOID_P $ac_cv_sizeof_void_p |
| 2085 | EOF |
| 2086 | |
| 2087 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2088 | echo $ac_n "checking size of char""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2089 | echo "configure:2090: checking size of char" >&5 |
| 2090 | if eval "test \"\${ac_cv_sizeof_char+set}\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2091 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2092 | else |
| 2093 | if test "$cross_compiling" = yes; then |
| 2094 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2095 | else |
| 2096 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2097 | #line 2098 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2098 | #include "confdefs.h" |
| 2099 | #include <stdio.h> |
| 2100 | main() |
| 2101 | { |
| 2102 | FILE *f=fopen("conftestval", "w"); |
| 2103 | if (!f) exit(1); |
| 2104 | fprintf(f, "%d\n", sizeof(char)); |
| 2105 | exit(0); |
| 2106 | } |
| 2107 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2108 | if { (eval echo configure:2109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2109 | then |
| 2110 | ac_cv_sizeof_char=`cat conftestval` |
| 2111 | else |
| 2112 | echo "configure: failed program was:" >&5 |
| 2113 | cat conftest.$ac_ext >&5 |
| 2114 | rm -fr conftest* |
| 2115 | ac_cv_sizeof_char=0 |
| 2116 | fi |
| 2117 | rm -fr conftest* |
| 2118 | fi |
| 2119 | |
| 2120 | fi |
| 2121 | echo "$ac_t""$ac_cv_sizeof_char" 1>&6 |
| 2122 | cat >> confdefs.h <<EOF |
| 2123 | #define SIZEOF_CHAR $ac_cv_sizeof_char |
| 2124 | EOF |
| 2125 | |
| 2126 | |
| 2127 | echo $ac_n "checking size of short""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2128 | echo "configure:2129: checking size of short" >&5 |
| 2129 | if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2130 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2131 | else |
| 2132 | if test "$cross_compiling" = yes; then |
| 2133 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2134 | else |
| 2135 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2136 | #line 2137 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2137 | #include "confdefs.h" |
| 2138 | #include <stdio.h> |
| 2139 | main() |
| 2140 | { |
| 2141 | FILE *f=fopen("conftestval", "w"); |
| 2142 | if (!f) exit(1); |
| 2143 | fprintf(f, "%d\n", sizeof(short)); |
| 2144 | exit(0); |
| 2145 | } |
| 2146 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2147 | if { (eval echo configure:2148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2148 | then |
| 2149 | ac_cv_sizeof_short=`cat conftestval` |
| 2150 | else |
| 2151 | echo "configure: failed program was:" >&5 |
| 2152 | cat conftest.$ac_ext >&5 |
| 2153 | rm -fr conftest* |
| 2154 | ac_cv_sizeof_short=0 |
| 2155 | fi |
| 2156 | rm -fr conftest* |
| 2157 | fi |
| 2158 | |
| 2159 | fi |
| 2160 | echo "$ac_t""$ac_cv_sizeof_short" 1>&6 |
| 2161 | cat >> confdefs.h <<EOF |
| 2162 | #define SIZEOF_SHORT $ac_cv_sizeof_short |
| 2163 | EOF |
| 2164 | |
| 2165 | |
| 2166 | echo $ac_n "checking size of float""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2167 | echo "configure:2168: checking size of float" >&5 |
| 2168 | if eval "test \"\${ac_cv_sizeof_float+set}\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2169 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2170 | else |
| 2171 | if test "$cross_compiling" = yes; then |
| 2172 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2173 | else |
| 2174 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2175 | #line 2176 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2176 | #include "confdefs.h" |
| 2177 | #include <stdio.h> |
| 2178 | main() |
| 2179 | { |
| 2180 | FILE *f=fopen("conftestval", "w"); |
| 2181 | if (!f) exit(1); |
| 2182 | fprintf(f, "%d\n", sizeof(float)); |
| 2183 | exit(0); |
| 2184 | } |
| 2185 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2186 | if { (eval echo configure:2187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2187 | then |
| 2188 | ac_cv_sizeof_float=`cat conftestval` |
| 2189 | else |
| 2190 | echo "configure: failed program was:" >&5 |
| 2191 | cat conftest.$ac_ext >&5 |
| 2192 | rm -fr conftest* |
| 2193 | ac_cv_sizeof_float=0 |
| 2194 | fi |
| 2195 | rm -fr conftest* |
| 2196 | fi |
| 2197 | |
| 2198 | fi |
| 2199 | echo "$ac_t""$ac_cv_sizeof_float" 1>&6 |
| 2200 | cat >> confdefs.h <<EOF |
| 2201 | #define SIZEOF_FLOAT $ac_cv_sizeof_float |
| 2202 | EOF |
| 2203 | |
| 2204 | |
| 2205 | echo $ac_n "checking size of double""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2206 | echo "configure:2207: checking size of double" >&5 |
| 2207 | if eval "test \"\${ac_cv_sizeof_double+set}\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2208 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2209 | else |
| 2210 | if test "$cross_compiling" = yes; then |
| 2211 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2212 | else |
| 2213 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2214 | #line 2215 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2215 | #include "confdefs.h" |
| 2216 | #include <stdio.h> |
| 2217 | main() |
| 2218 | { |
| 2219 | FILE *f=fopen("conftestval", "w"); |
| 2220 | if (!f) exit(1); |
| 2221 | fprintf(f, "%d\n", sizeof(double)); |
| 2222 | exit(0); |
| 2223 | } |
| 2224 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2225 | if { (eval echo configure:2226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2226 | then |
| 2227 | ac_cv_sizeof_double=`cat conftestval` |
| 2228 | else |
| 2229 | echo "configure: failed program was:" >&5 |
| 2230 | cat conftest.$ac_ext >&5 |
| 2231 | rm -fr conftest* |
| 2232 | ac_cv_sizeof_double=0 |
| 2233 | fi |
| 2234 | rm -fr conftest* |
| 2235 | fi |
| 2236 | |
| 2237 | fi |
| 2238 | echo "$ac_t""$ac_cv_sizeof_double" 1>&6 |
| 2239 | cat >> confdefs.h <<EOF |
| 2240 | #define SIZEOF_DOUBLE $ac_cv_sizeof_double |
| 2241 | EOF |
| 2242 | |
| 2243 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2244 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2245 | echo $ac_n "checking for long long support""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2246 | echo "configure:2247: checking for long long support" >&5 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2247 | have_long_long=no |
| 2248 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2249 | #line 2250 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2250 | #include "confdefs.h" |
| 2251 | |
| 2252 | int main() { |
| 2253 | long long x; x = (long long)0; |
| 2254 | ; return 0; } |
| 2255 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2256 | if { (eval echo configure:2257: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2257 | rm -rf conftest* |
| 2258 | cat >> confdefs.h <<\EOF |
| 2259 | #define HAVE_LONG_LONG 1 |
| 2260 | EOF |
| 2261 | have_long_long=yes |
| 2262 | else |
| 2263 | echo "configure: failed program was:" >&5 |
| 2264 | cat conftest.$ac_ext >&5 |
| 2265 | fi |
| 2266 | rm -f conftest* |
| 2267 | echo "$ac_t""$have_long_long" 1>&6 |
Guido van Rossum | 96f2eb9 | 1999-04-10 16:02:18 +0000 | [diff] [blame] | 2268 | if test "$have_long_long" = yes ; then |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2269 | echo $ac_n "checking size of long long""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2270 | echo "configure:2271: checking size of long long" >&5 |
| 2271 | if eval "test \"\${ac_cv_sizeof_long_long+set}\" = set"; then |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2272 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2273 | else |
| 2274 | if test "$cross_compiling" = yes; then |
| 2275 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2276 | else |
| 2277 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2278 | #line 2279 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2279 | #include "confdefs.h" |
| 2280 | #include <stdio.h> |
| 2281 | main() |
| 2282 | { |
| 2283 | FILE *f=fopen("conftestval", "w"); |
| 2284 | if (!f) exit(1); |
| 2285 | fprintf(f, "%d\n", sizeof(long long)); |
| 2286 | exit(0); |
| 2287 | } |
| 2288 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2289 | if { (eval echo configure:2290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2290 | then |
| 2291 | ac_cv_sizeof_long_long=`cat conftestval` |
| 2292 | else |
| 2293 | echo "configure: failed program was:" >&5 |
| 2294 | cat conftest.$ac_ext >&5 |
| 2295 | rm -fr conftest* |
| 2296 | ac_cv_sizeof_long_long=0 |
| 2297 | fi |
| 2298 | rm -fr conftest* |
| 2299 | fi |
| 2300 | |
| 2301 | fi |
| 2302 | echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 |
| 2303 | cat >> confdefs.h <<EOF |
| 2304 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long |
| 2305 | EOF |
| 2306 | |
| 2307 | |
| 2308 | fi |
| 2309 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2310 | # Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>. |
| 2311 | echo $ac_n "checking size of off_t""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2312 | echo "configure:2313: checking size of off_t" >&5 |
| 2313 | if eval "test \"\${ac_cv_sizeof_off_t+set}\" = set"; then |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2314 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2315 | else |
| 2316 | if test "$cross_compiling" = yes; then |
| 2317 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2318 | else |
| 2319 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2320 | #line 2321 "configure" |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2321 | #include "confdefs.h" |
| 2322 | #include <stdio.h> |
| 2323 | #include <sys/types.h> |
| 2324 | main() |
| 2325 | { |
| 2326 | FILE *f=fopen("conftestval", "w"); |
| 2327 | if (!f) exit(1); |
| 2328 | fprintf(f, "%d\n", sizeof(off_t)); |
| 2329 | exit(0); |
| 2330 | } |
| 2331 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2332 | if { (eval echo configure:2333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2333 | then |
| 2334 | ac_cv_sizeof_off_t=`cat conftestval` |
| 2335 | else |
| 2336 | echo "configure: failed program was:" >&5 |
| 2337 | cat conftest.$ac_ext >&5 |
| 2338 | rm -fr conftest* |
| 2339 | ac_cv_sizeof_off_t=0 |
| 2340 | fi |
| 2341 | rm -fr conftest* |
| 2342 | fi |
| 2343 | |
| 2344 | |
| 2345 | fi |
| 2346 | |
| 2347 | echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6 |
| 2348 | cat >> confdefs.h <<EOF |
| 2349 | #define SIZEOF_OFF_T $ac_cv_sizeof_off_t |
| 2350 | EOF |
| 2351 | |
| 2352 | |
| 2353 | echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2354 | echo "configure:2355: checking whether to enable large file support" >&5 |
Guido van Rossum | 96f2eb9 | 1999-04-10 16:02:18 +0000 | [diff] [blame] | 2355 | if test "$have_long_long" = yes -a \ |
| 2356 | "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \ |
| 2357 | "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2358 | cat >> confdefs.h <<\EOF |
| 2359 | #define HAVE_LARGEFILE_SUPPORT 1 |
| 2360 | EOF |
| 2361 | |
| 2362 | echo "$ac_t""yes" 1>&6 |
| 2363 | else |
| 2364 | echo "$ac_t""no" 1>&6 |
| 2365 | fi |
| 2366 | |
| 2367 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2368 | # Minor variations in building a framework between NextStep versions 4 and 5 |
| 2369 | |
| 2370 | case $ac_sys_system/$ac_sys_release in |
| 2371 | next/4*) |
| 2372 | ns_undef_sym='__environ' |
| 2373 | LIBTOOL_CRUFT="-U $ns_undef_sym" ;; |
| 2374 | next/5*) |
| 2375 | ns_undef_sym='_environ' |
| 2376 | LIBTOOL_CRUFT="-lcc_dynamic -U $ns_undef_sym" ;; |
| 2377 | esac |
| 2378 | |
| 2379 | echo $ac_n "checking for --with-next-framework""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2380 | echo "configure:2381: checking for --with-next-framework" >&5 |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2381 | if test "$with_next_framework" |
| 2382 | then |
| 2383 | OPT="$OPT -fno-common" |
| 2384 | # -U __environ is needed since bundles don't have access |
| 2385 | # to crt0 when built but will always be linked against it |
| 2386 | LDFLAGS="$LDFLAGS -Wl,-U,$ns_undef_sym" |
| 2387 | cat >> confdefs.h <<\EOF |
| 2388 | #define WITH_NEXT_FRAMEWORK 1 |
| 2389 | EOF |
| 2390 | |
| 2391 | echo "$ac_t""yes" 1>&6 |
| 2392 | else |
| 2393 | echo "$ac_t""no" 1>&6 |
| 2394 | fi |
| 2395 | |
| 2396 | echo $ac_n "checking for --with-dyld""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2397 | echo "configure:2398: checking for --with-dyld" >&5 |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2398 | if test "$with_next_framework" -o "$with_dyld" |
| 2399 | then |
| 2400 | if test "$with_dyld" |
| 2401 | then |
| 2402 | echo "$ac_t""yes" 1>&6 |
| 2403 | else |
| 2404 | echo "$ac_t""required for framework build" 1>&6 |
| 2405 | fi |
| 2406 | cat >> confdefs.h <<\EOF |
| 2407 | #define WITH_DYLD 1 |
| 2408 | EOF |
| 2409 | |
| 2410 | ns_dyld='set' |
| 2411 | else |
| 2412 | echo "$ac_t""no" 1>&6 |
| 2413 | fi |
| 2414 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2415 | # Set info about shared libraries. |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2416 | |
| 2417 | |
| 2418 | |
| 2419 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2420 | # SO is the extension of shared libraries `(including the dot!) |
| 2421 | # -- usually .so, .sl on HP-UX |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2422 | echo $ac_n "checking SO""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2423 | echo "configure:2424: checking SO" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2424 | if test -z "$SO" |
| 2425 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2426 | case $ac_sys_system in |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 2427 | hp*|HP*) SO=.sl;; |
| 2428 | *) SO=.so;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2429 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2430 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2431 | echo "$ac_t""$SO" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2432 | # LDSHARED is the ld *command* used to create shared library |
| 2433 | # -- "ld" on SunOS 4.x.x, "ld -G" on SunOS 5.x, "ld -shared" on IRIX 5 |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2434 | # (Shared libraries in this instance are shared modules to be loaded into |
| 2435 | # Python, as opposed to building Python itself as a shared library.) |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2436 | echo $ac_n "checking LDSHARED""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2437 | echo "configure:2438: checking LDSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2438 | if test -z "$LDSHARED" |
| 2439 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2440 | case $ac_sys_system/$ac_sys_release in |
Guido van Rossum | 45140f9 | 1997-08-29 18:44:06 +0000 | [diff] [blame] | 2441 | AIX*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";; |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2442 | BeOS*) LDSHARED="\$(srcdir)/../BeOS/linkmodule -L.. -lpython\$(VERSION)";; |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 2443 | IRIX/5*) LDSHARED="ld -shared";; |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 2444 | IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2445 | SunOS/4*) LDSHARED="ld";; |
Greg Ward | 57c9a66 | 2000-05-26 12:22:54 +0000 | [diff] [blame] | 2446 | SunOS/5*) |
| 2447 | if test "$GCC" = "yes" |
| 2448 | then LDSHARED='$(CC) -G' |
| 2449 | else LDSHARED="ld -G"; |
| 2450 | fi ;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2451 | hp*|HP*) LDSHARED="ld -b";; |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2452 | OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";; |
| 2453 | DYNIX/ptx*) LDSHARED="ld -G";; |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2454 | next/*) |
| 2455 | if test "$ns_dyld" |
| 2456 | then LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind' |
| 2457 | else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r'; |
| 2458 | fi |
| 2459 | if test "$with_next_framework" ; then |
| 2460 | LDSHARED="$LDSHARED \$(LDLIBRARY)" |
| 2461 | fi ;; |
Guido van Rossum | 81652ab | 1996-07-21 02:53:27 +0000 | [diff] [blame] | 2462 | Linux*) LDSHARED="gcc -shared";; |
Guido van Rossum | 3c4bb80 | 1997-12-18 23:55:32 +0000 | [diff] [blame] | 2463 | dgux*) LDSHARED="ld -G";; |
Guido van Rossum | 458e7fa | 1999-09-17 15:40:40 +0000 | [diff] [blame] | 2464 | BSD/OS*/4*) LDSHARED="gcc -shared";; |
Guido van Rossum | a8acf72 | 1999-04-27 22:06:08 +0000 | [diff] [blame] | 2465 | FreeBSD*/[34]*) LDSHARED="gcc -shared";; |
Guido van Rossum | df69365 | 1999-01-07 21:50:41 +0000 | [diff] [blame] | 2466 | FreeBSD*|OpenBSD*) LDSHARED="ld -Bshareable";; |
| 2467 | NetBSD*) |
| 2468 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
| 2469 | then |
| 2470 | LDSHARED="cc -shared" |
| 2471 | else |
| 2472 | LDSHARED="ld -Bshareable" |
| 2473 | fi;; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 2474 | SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2475 | *) LDSHARED="ld";; |
| 2476 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2477 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2478 | echo "$ac_t""$LDSHARED" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2479 | # 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] | 2480 | # library (module) -- this is only needed for a few systems |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2481 | echo $ac_n "checking CCSHARED""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2482 | echo "configure:2483: checking CCSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2483 | if test -z "$CCSHARED" |
| 2484 | then |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 2485 | case $ac_sys_system/$ac_sys_release in |
Guido van Rossum | af07a44 | 1995-02-13 19:45:27 +0000 | [diff] [blame] | 2486 | hp*|HP*) if test "$GCC" = yes; |
| 2487 | then CCSHARED="-fpic"; |
| 2488 | else CCSHARED="+z"; |
| 2489 | fi;; |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2490 | Linux*) CCSHARED="-fpic";; |
Guido van Rossum | f5957ea | 1999-10-05 21:59:33 +0000 | [diff] [blame] | 2491 | BSD/OS*/4*) CCSHARED="-fpic";; |
Guido van Rossum | df69365 | 1999-01-07 21:50:41 +0000 | [diff] [blame] | 2492 | FreeBSD*|OpenBSD*) CCSHARED="-fpic";; |
| 2493 | NetBSD*) CCSHARED="-fPIC";; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 2494 | SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 2495 | IRIX*/6*) case $CC in |
| 2496 | *gcc*) CCSHARED="-shared";; |
Guido van Rossum | ee21f41 | 1998-04-20 18:51:54 +0000 | [diff] [blame] | 2497 | *) CCSHARED="";; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 2498 | esac;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2499 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2500 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2501 | echo "$ac_t""$CCSHARED" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2502 | # LINKFORSHARED are the flags passed to the $(CC) command that links |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2503 | # the python executable -- this is only needed for a few systems |
| 2504 | echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2505 | echo "configure:2506: checking LINKFORSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2506 | if test -z "$LINKFORSHARED" |
| 2507 | then |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 2508 | case $ac_sys_system/$ac_sys_release in |
Guido van Rossum | 69f6580 | 1998-03-03 21:47:00 +0000 | [diff] [blame] | 2509 | AIX*) LINKFORSHARED='-Wl,-bE:python.exp -lld';; |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2510 | hp*|HP*) |
Guido van Rossum | 304dd2d | 1997-10-20 23:10:56 +0000 | [diff] [blame] | 2511 | LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";; |
Guido van Rossum | f5957ea | 1999-10-05 21:59:33 +0000 | [diff] [blame] | 2512 | BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";; |
Guido van Rossum | a8acf72 | 1999-04-27 22:06:08 +0000 | [diff] [blame] | 2513 | FreeBSD/[34]*) LINKFORSHARED="-Xlinker -export-dynamic";; |
Guido van Rossum | 2d9feed | 1997-11-24 17:36:21 +0000 | [diff] [blame] | 2514 | Linux*) LINKFORSHARED="-Xlinker -export-dynamic";; |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2515 | # -u libsys_s pulls in all symbols in libsys |
| 2516 | next/2*|next/3*) LINKFORSHARED="-u libsys_s";; |
| 2517 | # -u __dummy makes the linker aware of the objc runtime |
| 2518 | # in System.framework; otherwise, __objcInit (referenced in |
| 2519 | # crt1.o) gets erroneously defined as common, which breaks dynamic |
| 2520 | # loading of any modules which reference it in System.framework |
| 2521 | next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System" ;; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 2522 | SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";; |
Guido van Rossum | df69365 | 1999-01-07 21:50:41 +0000 | [diff] [blame] | 2523 | NetBSD*) |
| 2524 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
| 2525 | then |
| 2526 | LINKFORSHARED="-Wl,--export-dynamic" |
| 2527 | fi;; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 2528 | SunOS/5*) case $CC in |
| 2529 | *gcc*) |
Guido van Rossum | ff48418 | 2000-02-03 13:50:24 +0000 | [diff] [blame] | 2530 | if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null |
Guido van Rossum | 8f4ceb1 | 1997-12-18 23:42:19 +0000 | [diff] [blame] | 2531 | then |
| 2532 | LINKFORSHARED="-Xlinker --export-dynamic" |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 2533 | fi;; |
| 2534 | esac;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2535 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2536 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2537 | echo "$ac_t""$LINKFORSHARED" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2538 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2539 | # checks for libraries |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2540 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2541 | echo "configure:2542: checking for dlopen in -ldl" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2542 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2543 | if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2544 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2545 | else |
| 2546 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2547 | LIBS="-ldl $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2548 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2549 | #line 2550 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2550 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2551 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 2552 | /* We use char because int might match the return type of a gcc2 |
| 2553 | builtin and then its argument prototype would still apply. */ |
| 2554 | char dlopen(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2555 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2556 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2557 | dlopen() |
| 2558 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2559 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2560 | if { (eval echo configure:2561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2561 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2562 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2563 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2564 | echo "configure: failed program was:" >&5 |
| 2565 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2566 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2567 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2568 | fi |
| 2569 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2570 | LIBS="$ac_save_LIBS" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2571 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2572 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2573 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2574 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2575 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 2576 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2577 | cat >> confdefs.h <<EOF |
| 2578 | #define $ac_tr_lib 1 |
| 2579 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2580 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2581 | LIBS="-ldl $LIBS" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 2582 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2583 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2584 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2585 | fi |
| 2586 | # Dynamic linking for SunOS/Solaris and SYSV |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2587 | echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2588 | echo "configure:2589: checking for shl_load in -ldld" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2589 | ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2590 | if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2591 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2592 | else |
| 2593 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2594 | LIBS="-ldld $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2595 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2596 | #line 2597 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2597 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2598 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 2599 | /* We use char because int might match the return type of a gcc2 |
| 2600 | builtin and then its argument prototype would still apply. */ |
| 2601 | char shl_load(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2602 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2603 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2604 | shl_load() |
| 2605 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2606 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2607 | if { (eval echo configure:2608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2608 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2609 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2610 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2611 | echo "configure: failed program was:" >&5 |
| 2612 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2613 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2614 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2615 | fi |
| 2616 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2617 | LIBS="$ac_save_LIBS" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2618 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2619 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2620 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2621 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2622 | ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 2623 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2624 | cat >> confdefs.h <<EOF |
| 2625 | #define $ac_tr_lib 1 |
| 2626 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2627 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2628 | LIBS="-ldld $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2629 | |
| 2630 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2631 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2632 | fi |
| 2633 | # Dynamic linking for HP-UX |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 2634 | |
| 2635 | # checks for system dependent C++ extensions support |
| 2636 | case "$ac_sys_system" in |
| 2637 | AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2638 | echo "configure:2639: checking for genuine AIX C++ extensions support" >&5 |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 2639 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2640 | #line 2641 "configure" |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 2641 | #include "confdefs.h" |
| 2642 | #include "/usr/lpp/xlC/include/load.h" |
| 2643 | int main() { |
| 2644 | loadAndInit("", 0, "") |
| 2645 | ; return 0; } |
| 2646 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2647 | if { (eval echo configure:2648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 2648 | rm -rf conftest* |
| 2649 | cat >> confdefs.h <<\EOF |
| 2650 | #define AIX_GENUINE_CPLUSPLUS 1 |
| 2651 | EOF |
| 2652 | |
| 2653 | echo "$ac_t""yes" 1>&6 |
| 2654 | else |
| 2655 | echo "configure: failed program was:" >&5 |
| 2656 | cat conftest.$ac_ext >&5 |
| 2657 | rm -rf conftest* |
| 2658 | echo "$ac_t""no" 1>&6 |
| 2659 | fi |
| 2660 | rm -f conftest*;; |
| 2661 | *) ;; |
| 2662 | esac |
| 2663 | |
Guido van Rossum | 70c7f48 | 1998-03-26 18:44:10 +0000 | [diff] [blame] | 2664 | # Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl. |
| 2665 | # However on SGI IRIX, these exist but are broken. |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2666 | # BeOS' sockets are stashed in libnet. |
| 2667 | case "$ac_sys_system" in |
| 2668 | IRIX*) ;; |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 2669 | *) |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2670 | echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2671 | echo "configure:2672: checking for t_open in -lnsl" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2672 | ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'` |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2673 | if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2674 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 2675 | else |
| 2676 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2677 | LIBS="-lnsl $LIBS" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 2678 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2679 | #line 2680 "configure" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 2680 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2681 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 2682 | /* We use char because int might match the return type of a gcc2 |
| 2683 | builtin and then its argument prototype would still apply. */ |
| 2684 | char t_open(); |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 2685 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2686 | int main() { |
Guido van Rossum | 0ddb028 | 1995-01-17 16:46:14 +0000 | [diff] [blame] | 2687 | t_open() |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 2688 | ; return 0; } |
| 2689 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2690 | if { (eval echo configure:2691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 2691 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2692 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 2693 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2694 | echo "configure: failed program was:" >&5 |
| 2695 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 2696 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2697 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 2698 | fi |
| 2699 | rm -f conftest* |
| 2700 | LIBS="$ac_save_LIBS" |
| 2701 | |
| 2702 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2703 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2704 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 2705 | LIBS="-lnsl $LIBS" |
| 2706 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2707 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 2708 | fi |
Guido van Rossum | 0ddb028 | 1995-01-17 16:46:14 +0000 | [diff] [blame] | 2709 | # SVR4 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2710 | echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2711 | echo "configure:2712: checking for socket in -lsocket" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2712 | ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2713 | if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2714 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2715 | else |
| 2716 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2717 | LIBS="-lsocket $LIBS $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2718 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2719 | #line 2720 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2720 | #include "confdefs.h" |
| 2721 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 2722 | /* We use char because int might match the return type of a gcc2 |
| 2723 | builtin and then its argument prototype would still apply. */ |
| 2724 | char socket(); |
| 2725 | |
| 2726 | int main() { |
| 2727 | socket() |
| 2728 | ; return 0; } |
| 2729 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2730 | if { (eval echo configure:2731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2731 | rm -rf conftest* |
| 2732 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 2733 | else |
| 2734 | echo "configure: failed program was:" >&5 |
| 2735 | cat conftest.$ac_ext >&5 |
| 2736 | rm -rf conftest* |
| 2737 | eval "ac_cv_lib_$ac_lib_var=no" |
| 2738 | fi |
| 2739 | rm -f conftest* |
| 2740 | LIBS="$ac_save_LIBS" |
| 2741 | |
| 2742 | fi |
| 2743 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 2744 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2745 | LIBS="-lsocket $LIBS" |
| 2746 | else |
| 2747 | echo "$ac_t""no" 1>&6 |
| 2748 | fi |
| 2749 | # SVR4 sockets |
| 2750 | echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2751 | echo "configure:2752: checking for socket in -lnet" >&5 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2752 | ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'` |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2753 | if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2754 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2755 | else |
| 2756 | ac_save_LIBS="$LIBS" |
| 2757 | LIBS="-lnet $LIBS $LIBS" |
| 2758 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2759 | #line 2760 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2760 | #include "confdefs.h" |
| 2761 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 2762 | /* We use char because int might match the return type of a gcc2 |
| 2763 | builtin and then its argument prototype would still apply. */ |
| 2764 | char socket(); |
| 2765 | |
| 2766 | int main() { |
| 2767 | socket() |
| 2768 | ; return 0; } |
| 2769 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2770 | if { (eval echo configure:2771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2771 | rm -rf conftest* |
| 2772 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 2773 | else |
| 2774 | echo "configure: failed program was:" >&5 |
| 2775 | cat conftest.$ac_ext >&5 |
| 2776 | rm -rf conftest* |
| 2777 | eval "ac_cv_lib_$ac_lib_var=no" |
| 2778 | fi |
| 2779 | rm -f conftest* |
| 2780 | LIBS="$ac_save_LIBS" |
| 2781 | |
| 2782 | fi |
| 2783 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 2784 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2785 | LIBS="-lnet $LIBS" |
| 2786 | else |
| 2787 | echo "$ac_t""no" 1>&6 |
| 2788 | fi |
| 2789 | # BeOS |
| 2790 | ;; |
| 2791 | esac |
Guido van Rossum | 70c7f48 | 1998-03-26 18:44:10 +0000 | [diff] [blame] | 2792 | |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 2793 | echo $ac_n "checking for --with-libs""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2794 | echo "configure:2795: checking for --with-libs" >&5 |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 2795 | # Check whether --with-libs or --without-libs was given. |
| 2796 | if test "${with_libs+set}" = set; then |
| 2797 | withval="$with_libs" |
| 2798 | |
| 2799 | echo "$ac_t""$withval" 1>&6 |
| 2800 | LIBS="$withval $LIBS" |
| 2801 | |
| 2802 | else |
| 2803 | echo "$ac_t""no" 1>&6 |
| 2804 | fi |
| 2805 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 2806 | |
Guido van Rossum | 3c83bb4 | 1996-12-31 22:35:16 +0000 | [diff] [blame] | 2807 | echo $ac_n "checking for --with(out)-readline""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2808 | echo "configure:2809: checking for --with(out)-readline" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2809 | # Check whether --with-readline or --without-readline was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2810 | if test "${with_readline+set}" = set; then |
| 2811 | withval="$with_readline" |
Guido van Rossum | b06df27 | 1997-08-05 21:50:20 +0000 | [diff] [blame] | 2812 | echo "$ac_t""$withval" 1>&6 |
| 2813 | { echo "configure: error: --with(out)-readline is obsolete" 1>&2; exit 1; } |
Guido van Rossum | 3c83bb4 | 1996-12-31 22:35:16 +0000 | [diff] [blame] | 2814 | else |
Guido van Rossum | b06df27 | 1997-08-05 21:50:20 +0000 | [diff] [blame] | 2815 | echo "$ac_t""not specified." 1>&6 |
Guido van Rossum | 3c83bb4 | 1996-12-31 22:35:16 +0000 | [diff] [blame] | 2816 | fi |
| 2817 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 2818 | |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 2819 | |
| 2820 | USE_THREAD_MODULE="#" |
| 2821 | |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 2822 | echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2823 | echo "configure:2824: checking for --with-dec-threads" >&5 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 2824 | |
| 2825 | # Check whether --with-dec-threads or --without-dec-threads was given. |
| 2826 | if test "${with_dec_threads+set}" = set; then |
| 2827 | withval="$with_dec_threads" |
| 2828 | echo "$ac_t""$withval" 1>&6 |
| 2829 | LDLAST=-threads |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2830 | if test "${with_thread+set}" != set; then |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 2831 | with_thread="$withval"; |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2832 | fi |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 2833 | else |
| 2834 | echo "$ac_t""no" 1>&6 |
| 2835 | fi |
| 2836 | |
| 2837 | |
| 2838 | echo $ac_n "checking for --with-threads""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2839 | echo "configure:2840: checking for --with-threads" >&5 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 2840 | # Check whether --with-threads or --without-threads was given. |
| 2841 | if test "${with_threads+set}" = set; then |
| 2842 | withval="$with_threads" |
| 2843 | echo "$ac_t""$withval" 1>&6 |
| 2844 | if test "${with_thread+set}" != set; then |
| 2845 | with_thread="$withval"; |
| 2846 | fi |
| 2847 | else |
| 2848 | echo "$ac_t""no" 1>&6 |
| 2849 | fi |
| 2850 | |
| 2851 | |
| 2852 | echo $ac_n "checking for --with-thread""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2853 | echo "configure:2854: checking for --with-thread" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2854 | # Check whether --with-thread or --without-thread was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2855 | if test "${with_thread+set}" = set; then |
| 2856 | withval="$with_thread" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 2857 | |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 2858 | USE_THREAD_MODULE= |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2859 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 2860 | if test -d "$withval" |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 2861 | then LDFLAGS="$LDFLAGS -L$withval" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 2862 | fi |
Guido van Rossum | 9caf77a | 1996-08-01 00:52:26 +0000 | [diff] [blame] | 2863 | cat >> confdefs.h <<\EOF |
| 2864 | #define _REENTRANT 1 |
| 2865 | EOF |
| 2866 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2867 | ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 2868 | echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2869 | echo "configure:2870: checking for mach/cthreads.h" >&5 |
| 2870 | if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 2871 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2872 | else |
| 2873 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2874 | #line 2875 "configure" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 2875 | #include "confdefs.h" |
| 2876 | #include <mach/cthreads.h> |
| 2877 | EOF |
| 2878 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2879 | { (eval echo configure:2880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 2880 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 2881 | if test -z "$ac_err"; then |
| 2882 | rm -rf conftest* |
| 2883 | eval "ac_cv_header_$ac_safe=yes" |
| 2884 | else |
| 2885 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2886 | echo "configure: failed program was:" >&5 |
| 2887 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 2888 | rm -rf conftest* |
| 2889 | eval "ac_cv_header_$ac_safe=no" |
| 2890 | fi |
| 2891 | rm -f conftest* |
| 2892 | fi |
| 2893 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 2894 | echo "$ac_t""yes" 1>&6 |
| 2895 | cat >> confdefs.h <<\EOF |
| 2896 | #define WITH_THREAD 1 |
| 2897 | EOF |
| 2898 | |
| 2899 | cat >> confdefs.h <<\EOF |
| 2900 | #define C_THREADS 1 |
| 2901 | EOF |
| 2902 | |
| 2903 | LIBOBJS="$LIBOBJS thread.o" |
| 2904 | else |
| 2905 | echo "$ac_t""no" 1>&6 |
| 2906 | |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 2907 | echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2908 | echo "configure:2909: checking for pth_init in -lpth" >&5 |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 2909 | ac_lib_var=`echo pth'_'pth_init | sed 'y%./+-%__p_%'` |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2910 | if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 2911 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2912 | else |
| 2913 | ac_save_LIBS="$LIBS" |
| 2914 | LIBS="-lpth $LIBS" |
| 2915 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2916 | #line 2917 "configure" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 2917 | #include "confdefs.h" |
| 2918 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 2919 | /* We use char because int might match the return type of a gcc2 |
| 2920 | builtin and then its argument prototype would still apply. */ |
| 2921 | char pth_init(); |
| 2922 | |
| 2923 | int main() { |
| 2924 | pth_init() |
| 2925 | ; return 0; } |
| 2926 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2927 | if { (eval echo configure:2928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 2928 | rm -rf conftest* |
| 2929 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 2930 | else |
| 2931 | echo "configure: failed program was:" >&5 |
| 2932 | cat conftest.$ac_ext >&5 |
| 2933 | rm -rf conftest* |
| 2934 | eval "ac_cv_lib_$ac_lib_var=no" |
| 2935 | fi |
| 2936 | rm -f conftest* |
| 2937 | LIBS="$ac_save_LIBS" |
| 2938 | |
| 2939 | fi |
| 2940 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 2941 | echo "$ac_t""yes" 1>&6 |
| 2942 | cat >> confdefs.h <<\EOF |
| 2943 | #define WITH_THREAD 1 |
| 2944 | EOF |
| 2945 | |
| 2946 | cat >> confdefs.h <<\EOF |
| 2947 | #define _GNU_PTH 1 |
| 2948 | EOF |
| 2949 | |
| 2950 | LIBS="-lpth $LIBS" |
| 2951 | LIBOBJS="$LIBOBJS thread.o" |
| 2952 | else |
| 2953 | echo "$ac_t""no" 1>&6 |
| 2954 | |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 2955 | echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2956 | echo "configure:2957: checking for pthread_create in -lpthread" >&5 |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 2957 | ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2958 | if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 2959 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2960 | else |
| 2961 | ac_save_LIBS="$LIBS" |
| 2962 | LIBS="-lpthread $LIBS" |
| 2963 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2964 | #line 2965 "configure" |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 2965 | #include "confdefs.h" |
| 2966 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 2967 | /* We use char because int might match the return type of a gcc2 |
| 2968 | builtin and then its argument prototype would still apply. */ |
| 2969 | char pthread_create(); |
| 2970 | |
| 2971 | int main() { |
| 2972 | pthread_create() |
| 2973 | ; return 0; } |
| 2974 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 2975 | if { (eval echo configure:2976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 2976 | rm -rf conftest* |
| 2977 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 2978 | else |
| 2979 | echo "configure: failed program was:" >&5 |
| 2980 | cat conftest.$ac_ext >&5 |
| 2981 | rm -rf conftest* |
| 2982 | eval "ac_cv_lib_$ac_lib_var=no" |
| 2983 | fi |
| 2984 | rm -f conftest* |
| 2985 | LIBS="$ac_save_LIBS" |
| 2986 | |
| 2987 | fi |
| 2988 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 2989 | echo "$ac_t""yes" 1>&6 |
| 2990 | cat >> confdefs.h <<\EOF |
| 2991 | #define WITH_THREAD 1 |
| 2992 | EOF |
| 2993 | |
| 2994 | cat >> confdefs.h <<\EOF |
| 2995 | #define _POSIX_THREADS 1 |
| 2996 | EOF |
| 2997 | |
| 2998 | LIBS="-lpthread $LIBS" |
| 2999 | LIBOBJS="$LIBOBJS thread.o" |
| 3000 | else |
| 3001 | echo "$ac_t""no" 1>&6 |
| 3002 | |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3003 | echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3004 | echo "configure:3005: checking for pthread_detach" >&5 |
| 3005 | if eval "test \"\${ac_cv_func_pthread_detach+set}\" = set"; then |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3006 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3007 | else |
| 3008 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3009 | #line 3010 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3010 | #include "confdefs.h" |
| 3011 | /* System header to define __stub macros and hopefully few prototypes, |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3012 | which can conflict with char pthread_detach(); below. */ |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3013 | #include <assert.h> |
| 3014 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3015 | /* We use char because int might match the return type of a gcc2 |
| 3016 | builtin and then its argument prototype would still apply. */ |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3017 | char pthread_detach(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3018 | char (*f)(); |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3019 | |
| 3020 | int main() { |
| 3021 | |
| 3022 | /* The GNU C library defines this for functions which it implements |
| 3023 | to always fail with ENOSYS. Some functions are actually named |
| 3024 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3025 | #if defined (__stub_pthread_detach) || defined (__stub___pthread_detach) |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3026 | choke me |
| 3027 | #else |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3028 | f = pthread_detach; |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3029 | #endif |
| 3030 | |
| 3031 | ; return 0; } |
| 3032 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3033 | if { (eval echo configure:3034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3034 | rm -rf conftest* |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3035 | eval "ac_cv_func_pthread_detach=yes" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3036 | else |
| 3037 | echo "configure: failed program was:" >&5 |
| 3038 | cat conftest.$ac_ext >&5 |
| 3039 | rm -rf conftest* |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3040 | eval "ac_cv_func_pthread_detach=no" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3041 | fi |
| 3042 | rm -f conftest* |
| 3043 | fi |
| 3044 | |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3045 | if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3046 | echo "$ac_t""yes" 1>&6 |
| 3047 | cat >> confdefs.h <<\EOF |
| 3048 | #define WITH_THREAD 1 |
| 3049 | EOF |
| 3050 | |
| 3051 | cat >> confdefs.h <<\EOF |
| 3052 | #define _POSIX_THREADS 1 |
| 3053 | EOF |
| 3054 | |
| 3055 | LIBOBJS="$LIBOBJS thread.o" |
| 3056 | else |
| 3057 | echo "$ac_t""no" 1>&6 |
| 3058 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3059 | ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'` |
| 3060 | echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3061 | echo "configure:3062: checking for kernel/OS.h" >&5 |
| 3062 | if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3063 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3064 | else |
| 3065 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3066 | #line 3067 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3067 | #include "confdefs.h" |
| 3068 | #include <kernel/OS.h> |
| 3069 | EOF |
| 3070 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3071 | { (eval echo configure:3072: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 3072 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3073 | if test -z "$ac_err"; then |
| 3074 | rm -rf conftest* |
| 3075 | eval "ac_cv_header_$ac_safe=yes" |
| 3076 | else |
| 3077 | echo "$ac_err" >&5 |
| 3078 | echo "configure: failed program was:" >&5 |
| 3079 | cat conftest.$ac_ext >&5 |
| 3080 | rm -rf conftest* |
| 3081 | eval "ac_cv_header_$ac_safe=no" |
| 3082 | fi |
| 3083 | rm -f conftest* |
| 3084 | fi |
| 3085 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 3086 | echo "$ac_t""yes" 1>&6 |
| 3087 | cat >> confdefs.h <<\EOF |
| 3088 | #define WITH_THREAD 1 |
| 3089 | EOF |
| 3090 | |
| 3091 | cat >> confdefs.h <<\EOF |
| 3092 | #define BEOS_THREADS 1 |
| 3093 | EOF |
| 3094 | |
| 3095 | LIBOBJS="$LIBOBJS thread.o" |
| 3096 | else |
| 3097 | echo "$ac_t""no" 1>&6 |
| 3098 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3099 | echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3100 | echo "configure:3101: checking for pthread_create in -lpthreads" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3101 | ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'` |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3102 | if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3103 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3104 | else |
| 3105 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3106 | LIBS="-lpthreads $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3107 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3108 | #line 3109 "configure" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 3109 | #include "confdefs.h" |
| 3110 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3111 | /* We use char because int might match the return type of a gcc2 |
| 3112 | builtin and then its argument prototype would still apply. */ |
| 3113 | char pthread_create(); |
| 3114 | |
| 3115 | int main() { |
| 3116 | pthread_create() |
| 3117 | ; return 0; } |
| 3118 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3119 | if { (eval echo configure:3120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 3120 | rm -rf conftest* |
| 3121 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3122 | else |
| 3123 | echo "configure: failed program was:" >&5 |
| 3124 | cat conftest.$ac_ext >&5 |
| 3125 | rm -rf conftest* |
| 3126 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3127 | fi |
| 3128 | rm -f conftest* |
| 3129 | LIBS="$ac_save_LIBS" |
| 3130 | |
| 3131 | fi |
| 3132 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3133 | echo "$ac_t""yes" 1>&6 |
| 3134 | cat >> confdefs.h <<\EOF |
| 3135 | #define WITH_THREAD 1 |
| 3136 | EOF |
| 3137 | |
| 3138 | cat >> confdefs.h <<\EOF |
| 3139 | #define _POSIX_THREADS 1 |
| 3140 | EOF |
| 3141 | |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3142 | LIBS="$LIBS -lpthreads" |
| 3143 | LIBOBJS="$LIBOBJS thread.o" |
| 3144 | else |
| 3145 | echo "$ac_t""no" 1>&6 |
| 3146 | |
| 3147 | echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3148 | echo "configure:3149: checking for pthread_create in -lc_r" >&5 |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3149 | ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3150 | if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3151 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3152 | else |
| 3153 | ac_save_LIBS="$LIBS" |
| 3154 | LIBS="-lc_r $LIBS" |
| 3155 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3156 | #line 3157 "configure" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3157 | #include "confdefs.h" |
| 3158 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3159 | /* We use char because int might match the return type of a gcc2 |
| 3160 | builtin and then its argument prototype would still apply. */ |
| 3161 | char pthread_create(); |
| 3162 | |
| 3163 | int main() { |
| 3164 | pthread_create() |
| 3165 | ; return 0; } |
| 3166 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3167 | if { (eval echo configure:3168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3168 | rm -rf conftest* |
| 3169 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3170 | else |
| 3171 | echo "configure: failed program was:" >&5 |
| 3172 | cat conftest.$ac_ext >&5 |
| 3173 | rm -rf conftest* |
| 3174 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3175 | fi |
| 3176 | rm -f conftest* |
| 3177 | LIBS="$ac_save_LIBS" |
| 3178 | |
| 3179 | fi |
| 3180 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3181 | echo "$ac_t""yes" 1>&6 |
| 3182 | cat >> confdefs.h <<\EOF |
| 3183 | #define WITH_THREAD 1 |
| 3184 | EOF |
| 3185 | |
| 3186 | cat >> confdefs.h <<\EOF |
| 3187 | #define _POSIX_THREADS 1 |
| 3188 | EOF |
| 3189 | |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 3190 | LIBS="$LIBS -lc_r" |
| 3191 | LIBOBJS="$LIBOBJS thread.o" |
| 3192 | else |
| 3193 | echo "$ac_t""no" 1>&6 |
| 3194 | |
Guido van Rossum | 0be3e49 | 1997-05-22 20:33:33 +0000 | [diff] [blame] | 3195 | echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3196 | echo "configure:3197: checking for __d6_pthread_create in -lthread" >&5 |
Guido van Rossum | 0be3e49 | 1997-05-22 20:33:33 +0000 | [diff] [blame] | 3197 | ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'` |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3198 | if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then |
Guido van Rossum | 0be3e49 | 1997-05-22 20:33:33 +0000 | [diff] [blame] | 3199 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3200 | else |
| 3201 | ac_save_LIBS="$LIBS" |
| 3202 | LIBS="-lthread $LIBS" |
| 3203 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3204 | #line 3205 "configure" |
Guido van Rossum | 0be3e49 | 1997-05-22 20:33:33 +0000 | [diff] [blame] | 3205 | #include "confdefs.h" |
| 3206 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3207 | /* We use char because int might match the return type of a gcc2 |
| 3208 | builtin and then its argument prototype would still apply. */ |
| 3209 | char __d6_pthread_create(); |
| 3210 | |
| 3211 | int main() { |
| 3212 | __d6_pthread_create() |
| 3213 | ; return 0; } |
| 3214 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3215 | if { (eval echo configure:3216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 0be3e49 | 1997-05-22 20:33:33 +0000 | [diff] [blame] | 3216 | rm -rf conftest* |
| 3217 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3218 | else |
| 3219 | echo "configure: failed program was:" >&5 |
| 3220 | cat conftest.$ac_ext >&5 |
| 3221 | rm -rf conftest* |
| 3222 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3223 | fi |
| 3224 | rm -f conftest* |
| 3225 | LIBS="$ac_save_LIBS" |
| 3226 | |
| 3227 | fi |
| 3228 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3229 | echo "$ac_t""yes" 1>&6 |
| 3230 | cat >> confdefs.h <<\EOF |
| 3231 | #define WITH_THREAD 1 |
| 3232 | EOF |
| 3233 | |
| 3234 | cat >> confdefs.h <<\EOF |
| 3235 | #define _POSIX_THREADS 1 |
| 3236 | EOF |
| 3237 | |
| 3238 | LIBS="$LIBS -lthread" |
| 3239 | LIBOBJS="$LIBOBJS thread.o" |
| 3240 | else |
| 3241 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3242 | |
| 3243 | echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3244 | echo "configure:3245: checking for pthread_create in -lcma" >&5 |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3245 | ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'` |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3246 | if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3247 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3248 | else |
| 3249 | ac_save_LIBS="$LIBS" |
| 3250 | LIBS="-lcma $LIBS" |
| 3251 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3252 | #line 3253 "configure" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3253 | #include "confdefs.h" |
| 3254 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3255 | /* We use char because int might match the return type of a gcc2 |
| 3256 | builtin and then its argument prototype would still apply. */ |
| 3257 | char pthread_create(); |
| 3258 | |
| 3259 | int main() { |
| 3260 | pthread_create() |
| 3261 | ; return 0; } |
| 3262 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3263 | if { (eval echo configure:3264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3264 | rm -rf conftest* |
| 3265 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3266 | else |
| 3267 | echo "configure: failed program was:" >&5 |
| 3268 | cat conftest.$ac_ext >&5 |
| 3269 | rm -rf conftest* |
| 3270 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3271 | fi |
| 3272 | rm -f conftest* |
| 3273 | LIBS="$ac_save_LIBS" |
| 3274 | |
| 3275 | fi |
| 3276 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3277 | echo "$ac_t""yes" 1>&6 |
| 3278 | cat >> confdefs.h <<\EOF |
| 3279 | #define WITH_THREAD 1 |
| 3280 | EOF |
| 3281 | |
| 3282 | cat >> confdefs.h <<\EOF |
| 3283 | #define _POSIX_THREADS 1 |
| 3284 | EOF |
| 3285 | |
| 3286 | LIBS="$LIBS -lcma" |
| 3287 | LIBOBJS="$LIBOBJS thread.o" |
| 3288 | else |
| 3289 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 2d38f91 | 1996-06-26 19:47:01 +0000 | [diff] [blame] | 3290 | fi |
| 3291 | |
| 3292 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3293 | fi |
| 3294 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3295 | fi |
| 3296 | |
Guido van Rossum | 0be3e49 | 1997-05-22 20:33:33 +0000 | [diff] [blame] | 3297 | fi |
| 3298 | |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 3299 | fi |
| 3300 | |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3301 | fi |
| 3302 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3303 | fi |
| 3304 | |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3305 | fi |
| 3306 | |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3307 | fi |
| 3308 | |
Guido van Rossum | 0be3e49 | 1997-05-22 20:33:33 +0000 | [diff] [blame] | 3309 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3310 | echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3311 | echo "configure:3312: checking for usconfig in -lmpc" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3312 | ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'` |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3313 | if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3314 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3315 | else |
| 3316 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3317 | LIBS="-lmpc $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3318 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3319 | #line 3320 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3320 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3321 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3322 | /* We use char because int might match the return type of a gcc2 |
| 3323 | builtin and then its argument prototype would still apply. */ |
| 3324 | char usconfig(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3325 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3326 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3327 | usconfig() |
| 3328 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3329 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3330 | if { (eval echo configure:3331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3331 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3332 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3333 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3334 | echo "configure: failed program was:" >&5 |
| 3335 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3336 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3337 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3338 | fi |
| 3339 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3340 | LIBS="$ac_save_LIBS" |
| 3341 | |
| 3342 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3343 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3344 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3345 | cat >> confdefs.h <<\EOF |
| 3346 | #define WITH_THREAD 1 |
| 3347 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3348 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3349 | LIBS="$LIBS -lmpc" |
| 3350 | LIBOBJS="$LIBOBJS thread.o" |
| 3351 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3352 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3353 | fi |
| 3354 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3355 | echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3356 | echo "configure:3357: checking for thr_create in -lthread" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3357 | ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'` |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3358 | if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3359 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3360 | else |
| 3361 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3362 | LIBS="-lthread $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3363 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3364 | #line 3365 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3365 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3366 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3367 | /* We use char because int might match the return type of a gcc2 |
| 3368 | builtin and then its argument prototype would still apply. */ |
| 3369 | char thr_create(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3370 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3371 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3372 | thr_create() |
| 3373 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3374 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3375 | if { (eval echo configure:3376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3376 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3377 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3378 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3379 | echo "configure: failed program was:" >&5 |
| 3380 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3381 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3382 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3383 | fi |
| 3384 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3385 | LIBS="$ac_save_LIBS" |
| 3386 | |
| 3387 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3388 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3389 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3390 | cat >> confdefs.h <<\EOF |
| 3391 | #define WITH_THREAD 1 |
| 3392 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3393 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3394 | LIBS="$LIBS -lthread" |
| 3395 | LIBOBJS="$LIBOBJS thread.o" |
| 3396 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3397 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3398 | fi |
| 3399 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3400 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 3401 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3402 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3403 | fi |
| 3404 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3405 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3406 | # -I${DLINCLDIR} is added to the compile rule for importdl.o |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3407 | |
| 3408 | DLINCLDIR=/ |
| 3409 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3410 | echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3411 | echo "configure:3412: checking for --with-sgi-dl" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3412 | # Check whether --with-sgi-dl or --without-sgi-dl was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3413 | if test "${with_sgi_dl+set}" = set; then |
| 3414 | withval="$with_sgi_dl" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3415 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3416 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3417 | cat >> confdefs.h <<\EOF |
| 3418 | #define WITH_SGI_DL 1 |
| 3419 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3420 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 3421 | DYNLOADFILE="dynload_dl.o" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3422 | dldir=$withval |
| 3423 | if test -d "$dldir" |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3424 | then LDFLAGS="$LDFLAGS -L$dldir" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3425 | 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] | 3426 | fi |
| 3427 | DLINCLDIR=${dldir} |
| 3428 | LIBS="$LIBS -ldl -lmld" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 3429 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3430 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3431 | fi |
| 3432 | |
| 3433 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3434 | echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3435 | echo "configure:3436: checking for --with-dl-dld" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3436 | # Check whether --with-dl-dld or --without-dl-dld was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3437 | if test "${with_dl_dld+set}" = set; then |
| 3438 | withval="$with_dl_dld" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3439 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3440 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3441 | cat >> confdefs.h <<\EOF |
| 3442 | #define WITH_DL_DLD 1 |
| 3443 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3444 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 3445 | DYNLOADFILE="dynload_dl.o" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3446 | dldir=`echo "$withval" | sed 's/,.*//'` |
| 3447 | dlddir=`echo "$withval" | sed 's/.*,//'` |
| 3448 | if test -d "$dldir" -a -d "$dlddir" |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3449 | then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3450 | 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] | 3451 | fi |
| 3452 | DLINCLDIR=${dldir} |
| 3453 | LIBS="$LIBS -ldl -ldld" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 3454 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3455 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3456 | fi |
| 3457 | |
| 3458 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 3459 | # the dlopen() function means we might want to use dynload_shlib.o. some |
| 3460 | # platforms, such as AIX, have dlopen(), but don't want to use it. |
| 3461 | echo $ac_n "checking for dlopen""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3462 | echo "configure:3463: checking for dlopen" >&5 |
| 3463 | if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 3464 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3465 | else |
| 3466 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3467 | #line 3468 "configure" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 3468 | #include "confdefs.h" |
| 3469 | /* System header to define __stub macros and hopefully few prototypes, |
| 3470 | which can conflict with char dlopen(); below. */ |
| 3471 | #include <assert.h> |
| 3472 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3473 | /* We use char because int might match the return type of a gcc2 |
| 3474 | builtin and then its argument prototype would still apply. */ |
| 3475 | char dlopen(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3476 | char (*f)(); |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 3477 | |
| 3478 | int main() { |
| 3479 | |
| 3480 | /* The GNU C library defines this for functions which it implements |
| 3481 | to always fail with ENOSYS. Some functions are actually named |
| 3482 | something starting with __ and the normal name is an alias. */ |
| 3483 | #if defined (__stub_dlopen) || defined (__stub___dlopen) |
| 3484 | choke me |
| 3485 | #else |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3486 | f = dlopen; |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 3487 | #endif |
| 3488 | |
| 3489 | ; return 0; } |
| 3490 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3491 | if { (eval echo configure:3492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 3492 | rm -rf conftest* |
| 3493 | eval "ac_cv_func_dlopen=yes" |
| 3494 | else |
| 3495 | echo "configure: failed program was:" >&5 |
| 3496 | cat conftest.$ac_ext >&5 |
| 3497 | rm -rf conftest* |
| 3498 | eval "ac_cv_func_dlopen=no" |
| 3499 | fi |
| 3500 | rm -f conftest* |
| 3501 | fi |
| 3502 | |
| 3503 | if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then |
| 3504 | echo "$ac_t""yes" 1>&6 |
| 3505 | : |
| 3506 | else |
| 3507 | echo "$ac_t""no" 1>&6 |
| 3508 | fi |
| 3509 | |
| 3510 | |
| 3511 | # DYNLOADFILE specifies which dynload_*.o file we will use for dynamic |
| 3512 | # loading of modules. |
| 3513 | |
| 3514 | echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3515 | echo "configure:3516: checking DYNLOADFILE" >&5 |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 3516 | if test -z "$DYNLOADFILE" |
| 3517 | then |
| 3518 | case $ac_sys_system/$ac_sys_release in |
| 3519 | AIX*) DYNLOADFILE="dynload_aix.o";; |
| 3520 | BeOS*) DYNLOADFILE="dynload_beos.o";; |
| 3521 | hp*|HP*) DYNLOADFILE="dynload_hpux.o";; |
| 3522 | next/*) DYNLOADFILE="dynload_next.o";; |
| 3523 | *) |
| 3524 | # use dynload_shlib.c and dlopen() if we have it; otherwise stub |
| 3525 | # out any dynamic loading |
| 3526 | if test "$ac_cv_func_dlopen" = yes |
| 3527 | then DYNLOADFILE="dynload_shlib.o" |
| 3528 | else DYNLOADFILE="dynload_stub.o" |
| 3529 | fi |
| 3530 | ;; |
| 3531 | esac |
| 3532 | fi |
| 3533 | echo "$ac_t""$DYNLOADFILE" 1>&6 |
| 3534 | if test "$DYNLOADFILE" != "dynload_stub.o" |
| 3535 | then |
| 3536 | cat >> confdefs.h <<\EOF |
| 3537 | #define HAVE_DYNAMIC_LOADING 1 |
| 3538 | EOF |
| 3539 | |
| 3540 | fi |
| 3541 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3542 | # checks for library functions |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 3543 | for ac_func in alarm chown clock confstr ctermid ctermid_r dlopen execv \ |
| 3544 | flock fork fsync fdatasync fpathconf ftime ftruncate \ |
Fred Drake | f581db1 | 1999-12-14 21:11:47 +0000 | [diff] [blame] | 3545 | getgroups getlogin getpeername getpgrp getpid getpwent gettimeofday getwd \ |
Andrew M. Kuchling | 22c6934 | 2000-06-18 15:07:40 +0000 | [diff] [blame] | 3546 | kill link lstat mkfifo mktime mremap \ |
| 3547 | nice pathconf pause plock pthread_init \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 3548 | putenv readlink \ |
Guido van Rossum | 9601315 | 1997-10-08 22:47:52 +0000 | [diff] [blame] | 3549 | select setgid setlocale setuid setsid setpgid setpgrp setvbuf \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 3550 | sigaction siginterrupt sigrelse strftime strptime symlink sysconf \ |
Fred Drake | 89143df | 1999-12-09 22:03:25 +0000 | [diff] [blame] | 3551 | tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ |
| 3552 | truncate uname waitpid |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3553 | do |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3554 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3555 | echo "configure:3556: checking for $ac_func" >&5 |
| 3556 | if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3557 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3558 | else |
| 3559 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3560 | #line 3561 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3561 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3562 | /* System header to define __stub macros and hopefully few prototypes, |
| 3563 | which can conflict with char $ac_func(); below. */ |
| 3564 | #include <assert.h> |
| 3565 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3566 | /* We use char because int might match the return type of a gcc2 |
| 3567 | builtin and then its argument prototype would still apply. */ |
| 3568 | char $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3569 | char (*f)(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3570 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3571 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3572 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3573 | /* The GNU C library defines this for functions which it implements |
| 3574 | to always fail with ENOSYS. Some functions are actually named |
| 3575 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3576 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3577 | choke me |
| 3578 | #else |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3579 | f = $ac_func; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3580 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3581 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3582 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3583 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3584 | if { (eval echo configure:3585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3585 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3586 | eval "ac_cv_func_$ac_func=yes" |
| 3587 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3588 | echo "configure: failed program was:" >&5 |
| 3589 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3590 | rm -rf conftest* |
| 3591 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3592 | fi |
| 3593 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3594 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3595 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3596 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3597 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3598 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3599 | cat >> confdefs.h <<EOF |
| 3600 | #define $ac_tr_func 1 |
| 3601 | EOF |
| 3602 | |
| 3603 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3604 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3605 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3606 | done |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3607 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 3608 | |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3609 | # check for openpty and forkpty |
| 3610 | |
| 3611 | for ac_func in openpty |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3612 | do |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3613 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3614 | echo "configure:3615: checking for $ac_func" >&5 |
| 3615 | if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3616 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3617 | else |
| 3618 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3619 | #line 3620 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3620 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3621 | /* System header to define __stub macros and hopefully few prototypes, |
| 3622 | which can conflict with char $ac_func(); below. */ |
| 3623 | #include <assert.h> |
| 3624 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3625 | /* We use char because int might match the return type of a gcc2 |
| 3626 | builtin and then its argument prototype would still apply. */ |
| 3627 | char $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3628 | char (*f)(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3629 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3630 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3631 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3632 | /* The GNU C library defines this for functions which it implements |
| 3633 | to always fail with ENOSYS. Some functions are actually named |
| 3634 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3635 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3636 | choke me |
| 3637 | #else |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3638 | f = $ac_func; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3639 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3640 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3641 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3642 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3643 | if { (eval echo configure:3644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| 3644 | rm -rf conftest* |
| 3645 | eval "ac_cv_func_$ac_func=yes" |
| 3646 | else |
| 3647 | echo "configure: failed program was:" >&5 |
| 3648 | cat conftest.$ac_ext >&5 |
| 3649 | rm -rf conftest* |
| 3650 | eval "ac_cv_func_$ac_func=no" |
| 3651 | fi |
| 3652 | rm -f conftest* |
| 3653 | fi |
| 3654 | |
| 3655 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 3656 | echo "$ac_t""yes" 1>&6 |
| 3657 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 3658 | cat >> confdefs.h <<EOF |
| 3659 | #define $ac_tr_func 1 |
| 3660 | EOF |
| 3661 | |
| 3662 | else |
| 3663 | echo "$ac_t""no" 1>&6 |
| 3664 | echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6 |
| 3665 | echo "configure:3666: checking for openpty in -lutil" >&5 |
| 3666 | ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'` |
| 3667 | if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then |
| 3668 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3669 | else |
| 3670 | ac_save_LIBS="$LIBS" |
| 3671 | LIBS="-lutil $LIBS" |
| 3672 | cat > conftest.$ac_ext <<EOF |
| 3673 | #line 3674 "configure" |
| 3674 | #include "confdefs.h" |
| 3675 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3676 | /* We use char because int might match the return type of a gcc2 |
| 3677 | builtin and then its argument prototype would still apply. */ |
| 3678 | char openpty(); |
| 3679 | |
| 3680 | int main() { |
| 3681 | openpty() |
| 3682 | ; return 0; } |
| 3683 | EOF |
| 3684 | if { (eval echo configure:3685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| 3685 | rm -rf conftest* |
| 3686 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3687 | else |
| 3688 | echo "configure: failed program was:" >&5 |
| 3689 | cat conftest.$ac_ext >&5 |
| 3690 | rm -rf conftest* |
| 3691 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3692 | fi |
| 3693 | rm -f conftest* |
| 3694 | LIBS="$ac_save_LIBS" |
| 3695 | |
| 3696 | fi |
| 3697 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3698 | echo "$ac_t""yes" 1>&6 |
| 3699 | cat >> confdefs.h <<\EOF |
| 3700 | #define HAVE_OPENPTY 1 |
| 3701 | EOF |
| 3702 | LIBS="$LIBS -lutil" |
| 3703 | else |
| 3704 | echo "$ac_t""no" 1>&6 |
| 3705 | fi |
| 3706 | |
| 3707 | fi |
| 3708 | done |
| 3709 | |
| 3710 | for ac_func in forkpty |
| 3711 | do |
| 3712 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
| 3713 | echo "configure:3714: checking for $ac_func" >&5 |
| 3714 | if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then |
| 3715 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3716 | else |
| 3717 | cat > conftest.$ac_ext <<EOF |
| 3718 | #line 3719 "configure" |
| 3719 | #include "confdefs.h" |
| 3720 | /* System header to define __stub macros and hopefully few prototypes, |
| 3721 | which can conflict with char $ac_func(); below. */ |
| 3722 | #include <assert.h> |
| 3723 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3724 | /* We use char because int might match the return type of a gcc2 |
| 3725 | builtin and then its argument prototype would still apply. */ |
| 3726 | char $ac_func(); |
| 3727 | char (*f)(); |
| 3728 | |
| 3729 | int main() { |
| 3730 | |
| 3731 | /* The GNU C library defines this for functions which it implements |
| 3732 | to always fail with ENOSYS. Some functions are actually named |
| 3733 | something starting with __ and the normal name is an alias. */ |
| 3734 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 3735 | choke me |
| 3736 | #else |
| 3737 | f = $ac_func; |
| 3738 | #endif |
| 3739 | |
| 3740 | ; return 0; } |
| 3741 | EOF |
| 3742 | if { (eval echo configure:3743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| 3743 | rm -rf conftest* |
| 3744 | eval "ac_cv_func_$ac_func=yes" |
| 3745 | else |
| 3746 | echo "configure: failed program was:" >&5 |
| 3747 | cat conftest.$ac_ext >&5 |
| 3748 | rm -rf conftest* |
| 3749 | eval "ac_cv_func_$ac_func=no" |
| 3750 | fi |
| 3751 | rm -f conftest* |
| 3752 | fi |
| 3753 | |
| 3754 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 3755 | echo "$ac_t""yes" 1>&6 |
| 3756 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 3757 | cat >> confdefs.h <<EOF |
| 3758 | #define $ac_tr_func 1 |
| 3759 | EOF |
| 3760 | |
| 3761 | else |
| 3762 | echo "$ac_t""no" 1>&6 |
| 3763 | echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6 |
| 3764 | echo "configure:3765: checking for forkpty in -lutil" >&5 |
| 3765 | ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'` |
| 3766 | if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then |
| 3767 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3768 | else |
| 3769 | ac_save_LIBS="$LIBS" |
| 3770 | LIBS="-lutil $LIBS" |
| 3771 | cat > conftest.$ac_ext <<EOF |
| 3772 | #line 3773 "configure" |
| 3773 | #include "confdefs.h" |
| 3774 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3775 | /* We use char because int might match the return type of a gcc2 |
| 3776 | builtin and then its argument prototype would still apply. */ |
| 3777 | char forkpty(); |
| 3778 | |
| 3779 | int main() { |
| 3780 | forkpty() |
| 3781 | ; return 0; } |
| 3782 | EOF |
| 3783 | if { (eval echo configure:3784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| 3784 | rm -rf conftest* |
| 3785 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3786 | else |
| 3787 | echo "configure: failed program was:" >&5 |
| 3788 | cat conftest.$ac_ext >&5 |
| 3789 | rm -rf conftest* |
| 3790 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3791 | fi |
| 3792 | rm -f conftest* |
| 3793 | LIBS="$ac_save_LIBS" |
| 3794 | |
| 3795 | fi |
| 3796 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3797 | echo "$ac_t""yes" 1>&6 |
| 3798 | cat >> confdefs.h <<\EOF |
| 3799 | #define HAVE_FORKPTY 1 |
| 3800 | EOF |
| 3801 | LIBS="$LIBS -lutil" |
| 3802 | else |
| 3803 | echo "$ac_t""no" 1>&6 |
| 3804 | fi |
| 3805 | |
| 3806 | fi |
| 3807 | done |
| 3808 | |
| 3809 | |
| 3810 | # check for long file support functions |
| 3811 | for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs |
| 3812 | do |
| 3813 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
| 3814 | echo "configure:3815: checking for $ac_func" >&5 |
| 3815 | if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then |
| 3816 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3817 | else |
| 3818 | cat > conftest.$ac_ext <<EOF |
| 3819 | #line 3820 "configure" |
| 3820 | #include "confdefs.h" |
| 3821 | /* System header to define __stub macros and hopefully few prototypes, |
| 3822 | which can conflict with char $ac_func(); below. */ |
| 3823 | #include <assert.h> |
| 3824 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3825 | /* We use char because int might match the return type of a gcc2 |
| 3826 | builtin and then its argument prototype would still apply. */ |
| 3827 | char $ac_func(); |
| 3828 | char (*f)(); |
| 3829 | |
| 3830 | int main() { |
| 3831 | |
| 3832 | /* The GNU C library defines this for functions which it implements |
| 3833 | to always fail with ENOSYS. Some functions are actually named |
| 3834 | something starting with __ and the normal name is an alias. */ |
| 3835 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 3836 | choke me |
| 3837 | #else |
| 3838 | f = $ac_func; |
| 3839 | #endif |
| 3840 | |
| 3841 | ; return 0; } |
| 3842 | EOF |
| 3843 | if { (eval echo configure:3844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 3844 | rm -rf conftest* |
| 3845 | eval "ac_cv_func_$ac_func=yes" |
| 3846 | else |
| 3847 | echo "configure: failed program was:" >&5 |
| 3848 | cat conftest.$ac_ext >&5 |
| 3849 | rm -rf conftest* |
| 3850 | eval "ac_cv_func_$ac_func=no" |
| 3851 | fi |
| 3852 | rm -f conftest* |
| 3853 | fi |
| 3854 | |
| 3855 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 3856 | echo "$ac_t""yes" 1>&6 |
| 3857 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 3858 | cat >> confdefs.h <<EOF |
| 3859 | #define $ac_tr_func 1 |
| 3860 | EOF |
| 3861 | |
| 3862 | else |
| 3863 | echo "$ac_t""no" 1>&6 |
| 3864 | fi |
| 3865 | done |
| 3866 | |
| 3867 | |
| 3868 | for ac_func in dup2 getcwd strdup strerror memmove |
| 3869 | do |
| 3870 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3871 | echo "configure:3872: checking for $ac_func" >&5 |
| 3872 | if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 3873 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3874 | else |
| 3875 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3876 | #line 3877 "configure" |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 3877 | #include "confdefs.h" |
| 3878 | /* System header to define __stub macros and hopefully few prototypes, |
| 3879 | which can conflict with char $ac_func(); below. */ |
| 3880 | #include <assert.h> |
| 3881 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3882 | /* We use char because int might match the return type of a gcc2 |
| 3883 | builtin and then its argument prototype would still apply. */ |
| 3884 | char $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3885 | char (*f)(); |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 3886 | |
| 3887 | int main() { |
| 3888 | |
| 3889 | /* The GNU C library defines this for functions which it implements |
| 3890 | to always fail with ENOSYS. Some functions are actually named |
| 3891 | something starting with __ and the normal name is an alias. */ |
| 3892 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 3893 | choke me |
| 3894 | #else |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3895 | f = $ac_func; |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 3896 | #endif |
| 3897 | |
| 3898 | ; return 0; } |
| 3899 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3900 | if { (eval echo configure:3901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3901 | rm -rf conftest* |
| 3902 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3903 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3904 | echo "configure: failed program was:" >&5 |
| 3905 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3906 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3907 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3908 | fi |
| 3909 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3910 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3911 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3912 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3913 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3914 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 3915 | cat >> confdefs.h <<EOF |
| 3916 | #define $ac_tr_func 1 |
| 3917 | EOF |
| 3918 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3919 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3920 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 3921 | LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3922 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3923 | done |
| 3924 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3925 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3926 | echo $ac_n "checking for getpgrp""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3927 | echo "configure:3928: checking for getpgrp" >&5 |
| 3928 | if eval "test \"\${ac_cv_func_getpgrp+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3929 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3930 | else |
| 3931 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3932 | #line 3933 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3933 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3934 | /* System header to define __stub macros and hopefully few prototypes, |
| 3935 | which can conflict with char getpgrp(); below. */ |
| 3936 | #include <assert.h> |
| 3937 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3938 | /* We use char because int might match the return type of a gcc2 |
| 3939 | builtin and then its argument prototype would still apply. */ |
| 3940 | char getpgrp(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3941 | char (*f)(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3942 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3943 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3944 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3945 | /* The GNU C library defines this for functions which it implements |
| 3946 | to always fail with ENOSYS. Some functions are actually named |
| 3947 | something starting with __ and the normal name is an alias. */ |
| 3948 | #if defined (__stub_getpgrp) || defined (__stub___getpgrp) |
| 3949 | choke me |
| 3950 | #else |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3951 | f = getpgrp; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3952 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3953 | |
| 3954 | ; return 0; } |
| 3955 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3956 | if { (eval echo configure:3957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3957 | rm -rf conftest* |
| 3958 | eval "ac_cv_func_getpgrp=yes" |
| 3959 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3960 | echo "configure: failed program was:" >&5 |
| 3961 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3962 | rm -rf conftest* |
| 3963 | eval "ac_cv_func_getpgrp=no" |
| 3964 | fi |
| 3965 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3966 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3967 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3968 | if eval "test \"`echo '$ac_cv_func_'getpgrp`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3969 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3970 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3971 | #line 3972 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3972 | #include "confdefs.h" |
| 3973 | #include <unistd.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3974 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3975 | getpgrp(0); |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3976 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3977 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3978 | if { (eval echo configure:3979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3979 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3980 | cat >> confdefs.h <<\EOF |
| 3981 | #define GETPGRP_HAVE_ARG 1 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3982 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3983 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3984 | else |
| 3985 | echo "configure: failed program was:" >&5 |
| 3986 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3987 | fi |
| 3988 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3989 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3990 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3991 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3992 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3993 | echo $ac_n "checking for setpgrp""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3994 | echo "configure:3995: checking for setpgrp" >&5 |
| 3995 | if eval "test \"\${ac_cv_func_setpgrp+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3996 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3997 | else |
| 3998 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3999 | #line 4000 "configure" |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 4000 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4001 | /* System header to define __stub macros and hopefully few prototypes, |
| 4002 | which can conflict with char setpgrp(); below. */ |
| 4003 | #include <assert.h> |
| 4004 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4005 | /* We use char because int might match the return type of a gcc2 |
| 4006 | builtin and then its argument prototype would still apply. */ |
| 4007 | char setpgrp(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4008 | char (*f)(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4009 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4010 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4011 | |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 4012 | /* The GNU C library defines this for functions which it implements |
| 4013 | to always fail with ENOSYS. Some functions are actually named |
| 4014 | something starting with __ and the normal name is an alias. */ |
| 4015 | #if defined (__stub_setpgrp) || defined (__stub___setpgrp) |
| 4016 | choke me |
| 4017 | #else |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4018 | f = setpgrp; |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 4019 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4020 | |
| 4021 | ; return 0; } |
| 4022 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4023 | if { (eval echo configure:4024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4024 | rm -rf conftest* |
| 4025 | eval "ac_cv_func_setpgrp=yes" |
| 4026 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4027 | echo "configure: failed program was:" >&5 |
| 4028 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4029 | rm -rf conftest* |
| 4030 | eval "ac_cv_func_setpgrp=no" |
| 4031 | fi |
| 4032 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4033 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4034 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4035 | if eval "test \"`echo '$ac_cv_func_'setpgrp`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4036 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4037 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4038 | #line 4039 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4039 | #include "confdefs.h" |
| 4040 | #include <unistd.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4041 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4042 | setpgrp(0,0); |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 4043 | ; return 0; } |
| 4044 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4045 | if { (eval echo configure:4046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 4046 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4047 | cat >> confdefs.h <<\EOF |
| 4048 | #define SETPGRP_HAVE_ARG 1 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 4049 | EOF |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 4050 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4051 | else |
| 4052 | echo "configure: failed program was:" >&5 |
| 4053 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 4054 | fi |
| 4055 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4056 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4057 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 4058 | fi |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 4059 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4060 | echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4061 | echo "configure:4062: checking for gettimeofday" >&5 |
| 4062 | if eval "test \"\${ac_cv_func_gettimeofday+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4063 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4064 | else |
| 4065 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4066 | #line 4067 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4067 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4068 | /* System header to define __stub macros and hopefully few prototypes, |
| 4069 | which can conflict with char gettimeofday(); below. */ |
| 4070 | #include <assert.h> |
| 4071 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4072 | /* We use char because int might match the return type of a gcc2 |
| 4073 | builtin and then its argument prototype would still apply. */ |
| 4074 | char gettimeofday(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4075 | char (*f)(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4076 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4077 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4078 | |
| 4079 | /* The GNU C library defines this for functions which it implements |
| 4080 | to always fail with ENOSYS. Some functions are actually named |
| 4081 | something starting with __ and the normal name is an alias. */ |
| 4082 | #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday) |
| 4083 | choke me |
| 4084 | #else |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4085 | f = gettimeofday; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4086 | #endif |
| 4087 | |
| 4088 | ; return 0; } |
| 4089 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4090 | if { (eval echo configure:4091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4091 | rm -rf conftest* |
| 4092 | eval "ac_cv_func_gettimeofday=yes" |
| 4093 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4094 | echo "configure: failed program was:" >&5 |
| 4095 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4096 | rm -rf conftest* |
| 4097 | eval "ac_cv_func_gettimeofday=no" |
| 4098 | fi |
| 4099 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4100 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4101 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4102 | if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4103 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4104 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4105 | #line 4106 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4106 | #include "confdefs.h" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4107 | #include <sys/time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4108 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4109 | gettimeofday((struct timeval*)0,(struct timezone*)0); |
| 4110 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4111 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4112 | if { (eval echo configure:4113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4113 | : |
| 4114 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4115 | echo "configure: failed program was:" >&5 |
| 4116 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4117 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4118 | cat >> confdefs.h <<\EOF |
| 4119 | #define GETTIMEOFDAY_NO_TZ 1 |
| 4120 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4121 | |
| 4122 | fi |
| 4123 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4124 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4125 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4126 | fi |
| 4127 | |
| 4128 | |
| 4129 | # checks for structures |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4130 | echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4131 | echo "configure:4132: checking whether time.h and sys/time.h may both be included" >&5 |
| 4132 | if eval "test \"\${ac_cv_header_time+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4133 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4134 | else |
| 4135 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4136 | #line 4137 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4137 | #include "confdefs.h" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4138 | #include <sys/types.h> |
| 4139 | #include <sys/time.h> |
| 4140 | #include <time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4141 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4142 | struct tm *tp; |
| 4143 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4144 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4145 | if { (eval echo configure:4146: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4146 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4147 | ac_cv_header_time=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4148 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4149 | echo "configure: failed program was:" >&5 |
| 4150 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4151 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4152 | ac_cv_header_time=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4153 | fi |
| 4154 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4155 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4156 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4157 | echo "$ac_t""$ac_cv_header_time" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4158 | if test $ac_cv_header_time = yes; then |
| 4159 | cat >> confdefs.h <<\EOF |
| 4160 | #define TIME_WITH_SYS_TIME 1 |
| 4161 | EOF |
| 4162 | |
| 4163 | fi |
| 4164 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4165 | echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4166 | echo "configure:4167: checking whether struct tm is in sys/time.h or time.h" >&5 |
| 4167 | if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4168 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4169 | else |
| 4170 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4171 | #line 4172 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4172 | #include "confdefs.h" |
| 4173 | #include <sys/types.h> |
| 4174 | #include <time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4175 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4176 | struct tm *tp; tp->tm_sec; |
| 4177 | ; return 0; } |
| 4178 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4179 | if { (eval echo configure:4180: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4180 | rm -rf conftest* |
| 4181 | ac_cv_struct_tm=time.h |
| 4182 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4183 | echo "configure: failed program was:" >&5 |
| 4184 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4185 | rm -rf conftest* |
| 4186 | ac_cv_struct_tm=sys/time.h |
| 4187 | fi |
| 4188 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4189 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4190 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4191 | echo "$ac_t""$ac_cv_struct_tm" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4192 | if test $ac_cv_struct_tm = sys/time.h; then |
| 4193 | cat >> confdefs.h <<\EOF |
| 4194 | #define TM_IN_SYS_TIME 1 |
| 4195 | EOF |
| 4196 | |
| 4197 | fi |
| 4198 | |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4199 | echo $ac_n "checking for member tm_zone in aggregate type struct tm""... $ac_c" 1>&6 |
| 4200 | echo "configure:4201: checking for member tm_zone in aggregate type struct tm" >&5 |
| 4201 | if eval "test \"\${ac_cv_c_struct_member_tm_zone+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4202 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4203 | else |
| 4204 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4205 | #line 4206 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4206 | #include "confdefs.h" |
| 4207 | #include <sys/types.h> |
| 4208 | #include <$ac_cv_struct_tm> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4209 | int main() { |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4210 | struct tm foo; foo.tm_zone; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4211 | ; return 0; } |
| 4212 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4213 | if { (eval echo configure:4214: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4214 | rm -rf conftest* |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4215 | ac_cv_c_struct_member_tm_zone=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4216 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4217 | echo "configure: failed program was:" >&5 |
| 4218 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4219 | rm -rf conftest* |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4220 | ac_cv_c_struct_member_tm_zone=no |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4221 | fi |
| 4222 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4223 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4224 | |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4225 | echo "$ac_t""$ac_cv_c_struct_member_tm_zone" 1>&6 |
| 4226 | tm_zone="$ac_cv_c_struct_member_tm_zone" |
| 4227 | if test "$ac_cv_c_struct_member_tm_zone" = yes; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4228 | cat >> confdefs.h <<\EOF |
| 4229 | #define HAVE_TM_ZONE 1 |
| 4230 | EOF |
| 4231 | |
| 4232 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4233 | echo $ac_n "checking for tzname""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4234 | echo "configure:4235: checking for tzname" >&5 |
| 4235 | if eval "test \"\${ac_cv_var_tzname+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4236 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4237 | else |
| 4238 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4239 | #line 4240 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4240 | #include "confdefs.h" |
| 4241 | #include <time.h> |
| 4242 | #ifndef tzname /* For SGI. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4243 | extern char *tzname[]; /* RS6000 and others reject char **tzname. */ |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4244 | #endif |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4245 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4246 | atoi(*tzname); |
| 4247 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4248 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4249 | if { (eval echo configure:4250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4250 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4251 | ac_cv_var_tzname=yes |
| 4252 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4253 | echo "configure: failed program was:" >&5 |
| 4254 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4255 | rm -rf conftest* |
| 4256 | ac_cv_var_tzname=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4257 | fi |
| 4258 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4259 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4260 | |
| 4261 | echo "$ac_t""$ac_cv_var_tzname" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4262 | if test $ac_cv_var_tzname = yes; then |
| 4263 | cat >> confdefs.h <<\EOF |
| 4264 | #define HAVE_TZNAME 1 |
| 4265 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4266 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4267 | fi |
| 4268 | fi |
| 4269 | |
| 4270 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4271 | echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4272 | echo "configure:4273: checking for time.h that defines altzone" >&5 |
| 4273 | if eval "test \"\${ac_cv_header_time_altzone+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4274 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4275 | else |
| 4276 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4277 | #line 4278 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4278 | #include "confdefs.h" |
| 4279 | #include <time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4280 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4281 | return altzone; |
| 4282 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4283 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4284 | if { (eval echo configure:4285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4285 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4286 | ac_cv_header_time_altzone=yes |
| 4287 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4288 | echo "configure: failed program was:" >&5 |
| 4289 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4290 | rm -rf conftest* |
| 4291 | ac_cv_header_time_altzone=no |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4292 | fi |
| 4293 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4294 | fi |
| 4295 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4296 | echo "$ac_t""$ac_cv_header_time_altzone" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4297 | if test $ac_cv_header_time_altzone = yes; then |
| 4298 | cat >> confdefs.h <<\EOF |
| 4299 | #define HAVE_ALTZONE 1 |
| 4300 | EOF |
| 4301 | |
| 4302 | fi |
| 4303 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4304 | was_it_defined=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4305 | echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4306 | echo "configure:4307: checking whether sys/select.h and sys/time.h may both be included" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4307 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4308 | #line 4309 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4309 | #include "confdefs.h" |
| 4310 | |
| 4311 | #include <sys/types.h> |
| 4312 | #include <sys/select.h> |
| 4313 | #include <sys/time.h> |
| 4314 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4315 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4316 | ; |
| 4317 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4318 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4319 | if { (eval echo configure:4320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4320 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4321 | cat >> confdefs.h <<\EOF |
| 4322 | #define SYS_SELECT_WITH_SYS_TIME 1 |
| 4323 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4324 | was_it_defined=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4325 | else |
| 4326 | echo "configure: failed program was:" >&5 |
| 4327 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4328 | fi |
| 4329 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4330 | echo "$ac_t""$was_it_defined" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4331 | |
| 4332 | # checks for compiler characteristics |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4333 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4334 | echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4335 | echo "configure:4336: checking whether char is unsigned" >&5 |
| 4336 | if eval "test \"\${ac_cv_c_char_unsigned+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4337 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4338 | else |
| 4339 | if test "$GCC" = yes; then |
| 4340 | # GCC predefines this symbol on systems where it applies. |
| 4341 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4342 | #line 4343 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4343 | #include "confdefs.h" |
| 4344 | #ifdef __CHAR_UNSIGNED__ |
| 4345 | yes |
| 4346 | #endif |
| 4347 | |
| 4348 | EOF |
| 4349 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4350 | egrep "yes" >/dev/null 2>&1; then |
| 4351 | rm -rf conftest* |
| 4352 | ac_cv_c_char_unsigned=yes |
| 4353 | else |
| 4354 | rm -rf conftest* |
| 4355 | ac_cv_c_char_unsigned=no |
| 4356 | fi |
| 4357 | rm -f conftest* |
| 4358 | |
| 4359 | else |
| 4360 | if test "$cross_compiling" = yes; then |
| 4361 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 4362 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4363 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4364 | #line 4365 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4365 | #include "confdefs.h" |
| 4366 | /* volatile prevents gcc2 from optimizing the test away on sparcs. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4367 | #if !defined(__STDC__) || __STDC__ != 1 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4368 | #define volatile |
| 4369 | #endif |
| 4370 | main() { |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4371 | volatile char c = 255; exit(c < 0); |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4372 | } |
| 4373 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4374 | if { (eval echo configure:4375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4375 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4376 | ac_cv_c_char_unsigned=yes |
| 4377 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4378 | echo "configure: failed program was:" >&5 |
| 4379 | cat conftest.$ac_ext >&5 |
| 4380 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4381 | ac_cv_c_char_unsigned=no |
| 4382 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4383 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4384 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4385 | |
| 4386 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4387 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4388 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4389 | echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4390 | if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then |
| 4391 | cat >> confdefs.h <<\EOF |
| 4392 | #define __CHAR_UNSIGNED__ 1 |
| 4393 | EOF |
| 4394 | |
| 4395 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4396 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4397 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4398 | echo "configure:4399: checking for working const" >&5 |
| 4399 | if eval "test \"\${ac_cv_c_const+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4400 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4401 | else |
| 4402 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4403 | #line 4404 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4404 | #include "confdefs.h" |
| 4405 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4406 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4407 | |
| 4408 | /* Ultrix mips cc rejects this. */ |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4409 | typedef int charset[2]; const charset x; |
| 4410 | /* SunOS 4.1.1 cc rejects this. */ |
| 4411 | char const *const *ccp; |
| 4412 | char **p; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4413 | /* NEC SVR4.0.2 mips cc rejects this. */ |
| 4414 | struct point {int x, y;}; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4415 | static struct point const zero = {0,0}; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4416 | /* AIX XL C 1.02.0.0 rejects this. |
| 4417 | It does not let you subtract one const X* pointer from another in an arm |
| 4418 | of an if-expression whose if-part is not a constant expression */ |
| 4419 | const char *g = "string"; |
| 4420 | ccp = &g + (g ? g-g : 0); |
| 4421 | /* HPUX 7.0 cc rejects these. */ |
| 4422 | ++ccp; |
| 4423 | p = (char**) ccp; |
| 4424 | ccp = (char const *const *) p; |
| 4425 | { /* SCO 3.2v4 cc rejects this. */ |
| 4426 | char *t; |
| 4427 | char const *s = 0 ? (char *) 0 : (char const *) 0; |
| 4428 | |
| 4429 | *t++ = 0; |
| 4430 | } |
| 4431 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4432 | int x[] = {25, 17}; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4433 | const int *foo = &x[0]; |
| 4434 | ++foo; |
| 4435 | } |
| 4436 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ |
| 4437 | typedef const int *iptr; |
| 4438 | iptr p = 0; |
| 4439 | ++p; |
| 4440 | } |
| 4441 | { /* AIX XL C 1.02.0.0 rejects this saying |
| 4442 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ |
| 4443 | struct s { int j; const int *ap[3]; }; |
| 4444 | struct s *b; b->j = 5; |
| 4445 | } |
| 4446 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ |
| 4447 | const int foo = 10; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4448 | } |
| 4449 | |
| 4450 | ; return 0; } |
| 4451 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4452 | if { (eval echo configure:4453: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4453 | rm -rf conftest* |
| 4454 | ac_cv_c_const=yes |
| 4455 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4456 | echo "configure: failed program was:" >&5 |
| 4457 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4458 | rm -rf conftest* |
| 4459 | ac_cv_c_const=no |
| 4460 | fi |
| 4461 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4462 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4463 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4464 | echo "$ac_t""$ac_cv_c_const" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4465 | if test $ac_cv_c_const = no; then |
| 4466 | cat >> confdefs.h <<\EOF |
| 4467 | #define const |
| 4468 | EOF |
| 4469 | |
| 4470 | fi |
| 4471 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 4472 | echo $ac_n "checking for inline""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4473 | echo "configure:4474: checking for inline" >&5 |
| 4474 | if eval "test \"\${ac_cv_c_inline+set}\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 4475 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4476 | else |
| 4477 | ac_cv_c_inline=no |
| 4478 | for ac_kw in inline __inline__ __inline; do |
| 4479 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4480 | #line 4481 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 4481 | #include "confdefs.h" |
| 4482 | |
| 4483 | int main() { |
| 4484 | } $ac_kw foo() { |
| 4485 | ; return 0; } |
| 4486 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4487 | if { (eval echo configure:4488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 4488 | rm -rf conftest* |
| 4489 | ac_cv_c_inline=$ac_kw; break |
| 4490 | else |
| 4491 | echo "configure: failed program was:" >&5 |
| 4492 | cat conftest.$ac_ext >&5 |
| 4493 | fi |
| 4494 | rm -f conftest* |
| 4495 | done |
| 4496 | |
| 4497 | fi |
| 4498 | |
| 4499 | echo "$ac_t""$ac_cv_c_inline" 1>&6 |
| 4500 | case "$ac_cv_c_inline" in |
| 4501 | inline | yes) ;; |
| 4502 | no) cat >> confdefs.h <<\EOF |
| 4503 | #define inline |
| 4504 | EOF |
| 4505 | ;; |
| 4506 | *) cat >> confdefs.h <<EOF |
| 4507 | #define inline $ac_cv_c_inline |
| 4508 | EOF |
| 4509 | ;; |
| 4510 | esac |
| 4511 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4512 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4513 | works=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4514 | echo $ac_n "checking for working volatile""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4515 | echo "configure:4516: checking for working volatile" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4516 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4517 | #line 4518 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4518 | #include "confdefs.h" |
| 4519 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4520 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4521 | volatile int x; x = 0; |
| 4522 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4523 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4524 | if { (eval echo configure:4525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4525 | rm -rf conftest* |
| 4526 | works=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4527 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4528 | echo "configure: failed program was:" >&5 |
| 4529 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4530 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4531 | cat >> confdefs.h <<\EOF |
| 4532 | #define volatile |
| 4533 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4534 | |
| 4535 | fi |
| 4536 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4537 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4538 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4539 | works=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4540 | echo $ac_n "checking for working signed char""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4541 | echo "configure:4542: checking for working signed char" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4542 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4543 | #line 4544 "configure" |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 4544 | #include "confdefs.h" |
| 4545 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4546 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4547 | signed char c; |
| 4548 | ; return 0; } |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 4549 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4550 | if { (eval echo configure:4551: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4551 | rm -rf conftest* |
| 4552 | works=yes |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 4553 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4554 | echo "configure: failed program was:" >&5 |
| 4555 | cat conftest.$ac_ext >&5 |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 4556 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4557 | cat >> confdefs.h <<\EOF |
| 4558 | #define signed |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4559 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4560 | |
| 4561 | fi |
| 4562 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4563 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4564 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4565 | have_prototypes=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4566 | echo $ac_n "checking for prototypes""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4567 | echo "configure:4568: checking for prototypes" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4568 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4569 | #line 4570 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4570 | #include "confdefs.h" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4571 | int foo(int x) { return 0; } |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4572 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4573 | return foo(10); |
| 4574 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4575 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4576 | if { (eval echo configure:4577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4577 | rm -rf conftest* |
| 4578 | cat >> confdefs.h <<\EOF |
| 4579 | #define HAVE_PROTOTYPES 1 |
| 4580 | EOF |
| 4581 | have_prototypes=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4582 | else |
| 4583 | echo "configure: failed program was:" >&5 |
| 4584 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4585 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4586 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4587 | echo "$ac_t""$have_prototypes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4588 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4589 | works=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4590 | echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4591 | echo "configure:4592: checking for variable length prototypes and stdarg.h" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4592 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4593 | #line 4594 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4594 | #include "confdefs.h" |
| 4595 | |
| 4596 | #include <stdarg.h> |
Guido van Rossum | 90eea07 | 1996-08-30 20:58:57 +0000 | [diff] [blame] | 4597 | int foo(int x, ...) { |
| 4598 | va_list va; |
| 4599 | va_start(va, x); |
| 4600 | va_arg(va, int); |
| 4601 | va_arg(va, char *); |
| 4602 | va_arg(va, double); |
| 4603 | return 0; |
| 4604 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4605 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4606 | int main() { |
Guido van Rossum | 90eea07 | 1996-08-30 20:58:57 +0000 | [diff] [blame] | 4607 | return foo(10, "", 3.14); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4608 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4609 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4610 | if { (eval echo configure:4611: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4611 | rm -rf conftest* |
| 4612 | cat >> confdefs.h <<\EOF |
| 4613 | #define HAVE_STDARG_PROTOTYPES 1 |
| 4614 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4615 | works=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4616 | else |
| 4617 | echo "configure: failed program was:" >&5 |
| 4618 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4619 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4620 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4621 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4622 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4623 | if test "$have_prototypes" = yes; then |
| 4624 | bad_prototypes=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4625 | echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4626 | echo "configure:4627: checking for bad exec* prototypes" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4627 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4628 | #line 4629 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4629 | #include "confdefs.h" |
| 4630 | #include <unistd.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4631 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4632 | char **t;execve("@",t,t); |
| 4633 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4634 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4635 | if { (eval echo configure:4636: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4636 | : |
| 4637 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4638 | echo "configure: failed program was:" >&5 |
| 4639 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4640 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4641 | cat >> confdefs.h <<\EOF |
| 4642 | #define BAD_EXEC_PROTOTYPES 1 |
| 4643 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4644 | bad_prototypes=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4645 | fi |
| 4646 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4647 | echo "$ac_t""$bad_prototypes" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4648 | fi |
| 4649 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4650 | bad_forward=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4651 | echo $ac_n "checking for bad static forward""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4652 | echo "configure:4653: checking for bad static forward" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4653 | if test "$cross_compiling" = yes; then |
| 4654 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 4655 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4656 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4657 | #line 4658 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4658 | #include "confdefs.h" |
| 4659 | |
| 4660 | struct s { int a; int b; }; |
| 4661 | static struct s foo; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4662 | int foobar() { |
| 4663 | static int random; |
| 4664 | random = (int) &foo; |
| 4665 | return random; |
| 4666 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4667 | static struct s foo = { 1, 2 }; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4668 | main() { |
| 4669 | exit(!((int)&foo == foobar())); |
| 4670 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4671 | |
| 4672 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4673 | if { (eval echo configure:4674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4674 | then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4675 | : |
| 4676 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4677 | echo "configure: failed program was:" >&5 |
| 4678 | cat conftest.$ac_ext >&5 |
| 4679 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4680 | cat >> confdefs.h <<\EOF |
| 4681 | #define BAD_STATIC_FORWARD 1 |
| 4682 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4683 | bad_forward=yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4684 | fi |
| 4685 | rm -fr conftest* |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4686 | fi |
| 4687 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4688 | echo "$ac_t""$bad_forward" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4689 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4690 | va_list_is_array=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4691 | echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4692 | echo "configure:4693: checking whether va_list is an array" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4693 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4694 | #line 4695 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4695 | #include "confdefs.h" |
| 4696 | |
| 4697 | #ifdef HAVE_STDARG_PROTOTYPES |
| 4698 | #include <stdarg.h> |
| 4699 | #else |
| 4700 | #include <varargs.h> |
| 4701 | #endif |
| 4702 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4703 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4704 | va_list list1, list2; list1 = list2; |
| 4705 | ; return 0; } |
| 4706 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4707 | if { (eval echo configure:4708: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4708 | : |
| 4709 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4710 | echo "configure: failed program was:" >&5 |
| 4711 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4712 | rm -rf conftest* |
| 4713 | cat >> confdefs.h <<\EOF |
| 4714 | #define VA_LIST_IS_ARRAY 1 |
| 4715 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4716 | va_list_is_array=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4717 | fi |
| 4718 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4719 | echo "$ac_t""$va_list_is_array" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4720 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 4721 | # sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-( |
| 4722 | echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4723 | echo "configure:4724: checking for gethostbyname_r" >&5 |
| 4724 | if eval "test \"\${ac_cv_func_gethostbyname_r+set}\" = set"; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 4725 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4726 | else |
| 4727 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4728 | #line 4729 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 4729 | #include "confdefs.h" |
| 4730 | /* System header to define __stub macros and hopefully few prototypes, |
| 4731 | which can conflict with char gethostbyname_r(); below. */ |
| 4732 | #include <assert.h> |
| 4733 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4734 | /* We use char because int might match the return type of a gcc2 |
| 4735 | builtin and then its argument prototype would still apply. */ |
| 4736 | char gethostbyname_r(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4737 | char (*f)(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 4738 | |
| 4739 | int main() { |
| 4740 | |
| 4741 | /* The GNU C library defines this for functions which it implements |
| 4742 | to always fail with ENOSYS. Some functions are actually named |
| 4743 | something starting with __ and the normal name is an alias. */ |
| 4744 | #if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r) |
| 4745 | choke me |
| 4746 | #else |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4747 | f = gethostbyname_r; |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 4748 | #endif |
| 4749 | |
| 4750 | ; return 0; } |
| 4751 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4752 | if { (eval echo configure:4753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 4753 | rm -rf conftest* |
| 4754 | eval "ac_cv_func_gethostbyname_r=yes" |
| 4755 | else |
| 4756 | echo "configure: failed program was:" >&5 |
| 4757 | cat conftest.$ac_ext >&5 |
| 4758 | rm -rf conftest* |
| 4759 | eval "ac_cv_func_gethostbyname_r=no" |
| 4760 | fi |
| 4761 | rm -f conftest* |
| 4762 | fi |
| 4763 | |
| 4764 | if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then |
| 4765 | echo "$ac_t""yes" 1>&6 |
| 4766 | |
| 4767 | cat >> confdefs.h <<\EOF |
| 4768 | #define HAVE_GETHOSTBYNAME_R 1 |
| 4769 | EOF |
| 4770 | |
| 4771 | echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4772 | echo "configure:4773: checking gethostbyname_r with 6 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 4773 | OLD_CFLAGS=$CFLAGS |
| 4774 | CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS" |
| 4775 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4776 | #line 4777 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 4777 | #include "confdefs.h" |
| 4778 | |
| 4779 | # include <netdb.h> |
| 4780 | |
| 4781 | int main() { |
| 4782 | |
| 4783 | char *name; |
| 4784 | struct hostent *he, *res; |
| 4785 | char buffer[2048]; |
| 4786 | int buflen = 2048; |
| 4787 | int h_errnop; |
| 4788 | |
| 4789 | (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop) |
| 4790 | |
| 4791 | ; return 0; } |
| 4792 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4793 | if { (eval echo configure:4794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 4794 | rm -rf conftest* |
| 4795 | |
| 4796 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 4797 | #define HAVE_GETHOSTBYNAME_R 1 |
| 4798 | EOF |
| 4799 | |
| 4800 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 4801 | #define HAVE_GETHOSTBYNAME_R_6_ARG 1 |
| 4802 | EOF |
| 4803 | |
| 4804 | echo "$ac_t""yes" 1>&6 |
| 4805 | |
| 4806 | else |
| 4807 | echo "configure: failed program was:" >&5 |
| 4808 | cat conftest.$ac_ext >&5 |
| 4809 | rm -rf conftest* |
| 4810 | |
| 4811 | echo "$ac_t""no" 1>&6 |
| 4812 | echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4813 | echo "configure:4814: checking gethostbyname_r with 5 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 4814 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4815 | #line 4816 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 4816 | #include "confdefs.h" |
| 4817 | |
| 4818 | # include <netdb.h> |
| 4819 | |
| 4820 | int main() { |
| 4821 | |
| 4822 | char *name; |
| 4823 | struct hostent *he; |
| 4824 | char buffer[2048]; |
| 4825 | int buflen = 2048; |
| 4826 | int h_errnop; |
| 4827 | |
| 4828 | (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop) |
| 4829 | |
| 4830 | ; return 0; } |
| 4831 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4832 | if { (eval echo configure:4833: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 4833 | rm -rf conftest* |
| 4834 | |
| 4835 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 4836 | #define HAVE_GETHOSTBYNAME_R 1 |
| 4837 | EOF |
| 4838 | |
| 4839 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 4840 | #define HAVE_GETHOSTBYNAME_R_5_ARG 1 |
| 4841 | EOF |
| 4842 | |
| 4843 | echo "$ac_t""yes" 1>&6 |
| 4844 | |
| 4845 | else |
| 4846 | echo "configure: failed program was:" >&5 |
| 4847 | cat conftest.$ac_ext >&5 |
| 4848 | rm -rf conftest* |
| 4849 | |
| 4850 | echo "$ac_t""no" 1>&6 |
| 4851 | echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4852 | echo "configure:4853: checking gethostbyname_r with 3 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 4853 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4854 | #line 4855 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 4855 | #include "confdefs.h" |
| 4856 | |
| 4857 | # include <netdb.h> |
| 4858 | |
| 4859 | int main() { |
| 4860 | |
| 4861 | char *name; |
| 4862 | struct hostent *he; |
| 4863 | struct hostent_data data; |
| 4864 | |
| 4865 | (void) gethostbyname_r(name, he, &data); |
| 4866 | |
| 4867 | ; return 0; } |
| 4868 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4869 | if { (eval echo configure:4870: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 4870 | rm -rf conftest* |
| 4871 | |
| 4872 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 4873 | #define HAVE_GETHOSTBYNAME_R 1 |
| 4874 | EOF |
| 4875 | |
| 4876 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 4877 | #define HAVE_GETHOSTBYNAME_R_3_ARG 1 |
| 4878 | EOF |
| 4879 | |
| 4880 | echo "$ac_t""yes" 1>&6 |
| 4881 | |
| 4882 | else |
| 4883 | echo "configure: failed program was:" >&5 |
| 4884 | cat conftest.$ac_ext >&5 |
| 4885 | rm -rf conftest* |
| 4886 | |
| 4887 | echo "$ac_t""no" 1>&6 |
| 4888 | |
| 4889 | fi |
| 4890 | rm -f conftest* |
| 4891 | |
| 4892 | fi |
| 4893 | rm -f conftest* |
| 4894 | |
| 4895 | fi |
| 4896 | rm -f conftest* |
| 4897 | CFLAGS=$OLD_CFLAGS |
| 4898 | |
| 4899 | else |
| 4900 | echo "$ac_t""no" 1>&6 |
| 4901 | |
| 4902 | echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4903 | echo "configure:4904: checking for gethostbyname" >&5 |
| 4904 | if eval "test \"\${ac_cv_func_gethostbyname+set}\" = set"; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 4905 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4906 | else |
| 4907 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4908 | #line 4909 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 4909 | #include "confdefs.h" |
| 4910 | /* System header to define __stub macros and hopefully few prototypes, |
| 4911 | which can conflict with char gethostbyname(); below. */ |
| 4912 | #include <assert.h> |
| 4913 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4914 | /* We use char because int might match the return type of a gcc2 |
| 4915 | builtin and then its argument prototype would still apply. */ |
| 4916 | char gethostbyname(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4917 | char (*f)(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 4918 | |
| 4919 | int main() { |
| 4920 | |
| 4921 | /* The GNU C library defines this for functions which it implements |
| 4922 | to always fail with ENOSYS. Some functions are actually named |
| 4923 | something starting with __ and the normal name is an alias. */ |
| 4924 | #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) |
| 4925 | choke me |
| 4926 | #else |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4927 | f = gethostbyname; |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 4928 | #endif |
| 4929 | |
| 4930 | ; return 0; } |
| 4931 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4932 | if { (eval echo configure:4933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 4933 | rm -rf conftest* |
| 4934 | eval "ac_cv_func_gethostbyname=yes" |
| 4935 | else |
| 4936 | echo "configure: failed program was:" >&5 |
| 4937 | cat conftest.$ac_ext >&5 |
| 4938 | rm -rf conftest* |
| 4939 | eval "ac_cv_func_gethostbyname=no" |
| 4940 | fi |
| 4941 | rm -f conftest* |
| 4942 | fi |
| 4943 | |
| 4944 | if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then |
| 4945 | echo "$ac_t""yes" 1>&6 |
| 4946 | cat >> confdefs.h <<\EOF |
| 4947 | #define HAVE_GETHOSTBYNAME 1 |
| 4948 | EOF |
| 4949 | |
| 4950 | else |
| 4951 | echo "$ac_t""no" 1>&6 |
| 4952 | fi |
| 4953 | |
| 4954 | |
| 4955 | fi |
| 4956 | |
| 4957 | |
| 4958 | |
| 4959 | |
| 4960 | |
| 4961 | |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 4962 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4963 | # checks for system services |
| 4964 | # (none yet) |
| 4965 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4966 | # Linux requires this for correct f.p. operations |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4967 | echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4968 | echo "configure:4969: checking for __fpu_control in -lieee" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4969 | ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'` |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4970 | if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4971 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4972 | else |
| 4973 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4974 | LIBS="-lieee $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4975 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4976 | #line 4977 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4977 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4978 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4979 | /* We use char because int might match the return type of a gcc2 |
| 4980 | builtin and then its argument prototype would still apply. */ |
| 4981 | char __fpu_control(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4982 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4983 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4984 | __fpu_control() |
| 4985 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4986 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4987 | if { (eval echo configure:4988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4988 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4989 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4990 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4991 | echo "configure: failed program was:" >&5 |
| 4992 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4993 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4994 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4995 | fi |
| 4996 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4997 | LIBS="$ac_save_LIBS" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4998 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4999 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5000 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5001 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5002 | ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 5003 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5004 | cat >> confdefs.h <<EOF |
| 5005 | #define $ac_tr_lib 1 |
| 5006 | EOF |
| 5007 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5008 | LIBS="-lieee $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5009 | |
| 5010 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5011 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5012 | fi |
| 5013 | |
| 5014 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 5015 | # Check for --with-fpectl |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 5016 | echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5017 | echo "configure:5018: checking for --with-fpectl" >&5 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 5018 | # Check whether --with-fpectl or --without-fpectl was given. |
| 5019 | if test "${with_fpectl+set}" = set; then |
| 5020 | withval="$with_fpectl" |
| 5021 | |
| 5022 | if test "$withval" != no |
| 5023 | then cat >> confdefs.h <<\EOF |
| 5024 | #define WANT_SIGFPE_HANDLER 1 |
| 5025 | EOF |
| 5026 | echo "$ac_t""yes" 1>&6 |
| 5027 | else echo "$ac_t""no" 1>&6 |
| 5028 | fi |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5029 | else |
| 5030 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 5031 | fi |
| 5032 | |
| 5033 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5034 | # check for --with-libm=... |
| 5035 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 5036 | case $ac_sys_system in |
| 5037 | next) ;; |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 5038 | BeOS) ;; |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 5039 | *) LIBM=-lm |
| 5040 | esac |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 5041 | echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5042 | echo "configure:5043: checking for --with-libm=STRING" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5043 | # Check whether --with-libm or --without-libm was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5044 | if test "${with_libm+set}" = set; then |
| 5045 | withval="$with_libm" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5046 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 5047 | if test "$withval" = no |
| 5048 | then LIBM= |
| 5049 | echo "$ac_t""force LIBM empty" 1>&6 |
| 5050 | elif test "$withval" != yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5051 | then LIBM=$withval |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 5052 | echo "$ac_t""set LIBM=\"$withval\"" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5053 | 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] | 5054 | fi |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 5055 | else |
| 5056 | echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5057 | fi |
| 5058 | |
| 5059 | |
| 5060 | # check for --with-libc=... |
| 5061 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 5062 | echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5063 | echo "configure:5064: checking for --with-libc=STRING" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5064 | # Check whether --with-libc or --without-libc was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5065 | if test "${with_libc+set}" = set; then |
| 5066 | withval="$with_libc" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5067 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 5068 | if test "$withval" = no |
| 5069 | then LIBC= |
| 5070 | echo "$ac_t""force LIBC empty" 1>&6 |
| 5071 | elif test "$withval" != yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5072 | then LIBC=$withval |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 5073 | echo "$ac_t""set LIBC=\"$withval\"" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5074 | 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] | 5075 | fi |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 5076 | else |
| 5077 | echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5078 | fi |
| 5079 | |
| 5080 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 5081 | # check for hypot() in math library |
| 5082 | LIBS_SAVE=$LIBS |
| 5083 | LIBS="$LIBS $LIBM" |
| 5084 | for ac_func in hypot |
| 5085 | do |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5086 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5087 | echo "configure:5088: checking for $ac_func" >&5 |
| 5088 | if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5089 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 5090 | else |
| 5091 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5092 | #line 5093 "configure" |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 5093 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5094 | /* System header to define __stub macros and hopefully few prototypes, |
| 5095 | which can conflict with char $ac_func(); below. */ |
| 5096 | #include <assert.h> |
| 5097 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5098 | /* We use char because int might match the return type of a gcc2 |
| 5099 | builtin and then its argument prototype would still apply. */ |
| 5100 | char $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5101 | char (*f)(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5102 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5103 | int main() { |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 5104 | |
| 5105 | /* The GNU C library defines this for functions which it implements |
| 5106 | to always fail with ENOSYS. Some functions are actually named |
| 5107 | something starting with __ and the normal name is an alias. */ |
| 5108 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5109 | choke me |
| 5110 | #else |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5111 | f = $ac_func; |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 5112 | #endif |
| 5113 | |
| 5114 | ; return 0; } |
| 5115 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5116 | if { (eval echo configure:5117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 5117 | rm -rf conftest* |
| 5118 | eval "ac_cv_func_$ac_func=yes" |
| 5119 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5120 | echo "configure: failed program was:" >&5 |
| 5121 | cat conftest.$ac_ext >&5 |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 5122 | rm -rf conftest* |
| 5123 | eval "ac_cv_func_$ac_func=no" |
| 5124 | fi |
| 5125 | rm -f conftest* |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 5126 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5127 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 5128 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5129 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5130 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 5131 | cat >> confdefs.h <<EOF |
| 5132 | #define $ac_tr_func 1 |
| 5133 | EOF |
| 5134 | |
| 5135 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5136 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 5137 | fi |
| 5138 | done |
| 5139 | |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 5140 | for ac_func in hypot |
| 5141 | do |
| 5142 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5143 | echo "configure:5144: checking for $ac_func" >&5 |
| 5144 | if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 5145 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5146 | else |
| 5147 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5148 | #line 5149 "configure" |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 5149 | #include "confdefs.h" |
| 5150 | /* System header to define __stub macros and hopefully few prototypes, |
| 5151 | which can conflict with char $ac_func(); below. */ |
| 5152 | #include <assert.h> |
| 5153 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5154 | /* We use char because int might match the return type of a gcc2 |
| 5155 | builtin and then its argument prototype would still apply. */ |
| 5156 | char $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5157 | char (*f)(); |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 5158 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5159 | int main() { |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 5160 | |
| 5161 | /* The GNU C library defines this for functions which it implements |
| 5162 | to always fail with ENOSYS. Some functions are actually named |
| 5163 | something starting with __ and the normal name is an alias. */ |
| 5164 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5165 | choke me |
| 5166 | #else |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5167 | f = $ac_func; |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 5168 | #endif |
| 5169 | |
| 5170 | ; return 0; } |
| 5171 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5172 | if { (eval echo configure:5173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 5173 | rm -rf conftest* |
| 5174 | eval "ac_cv_func_$ac_func=yes" |
| 5175 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5176 | echo "configure: failed program was:" >&5 |
| 5177 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 5178 | rm -rf conftest* |
| 5179 | eval "ac_cv_func_$ac_func=no" |
| 5180 | fi |
| 5181 | rm -f conftest* |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 5182 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5183 | |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 5184 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5185 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5186 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5187 | cat >> confdefs.h <<EOF |
| 5188 | #define $ac_tr_func 1 |
| 5189 | EOF |
| 5190 | |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 5191 | else |
| 5192 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 5193 | LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 5194 | fi |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 5195 | done |
| 5196 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5197 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 5198 | LIBS=$LIBS_SAVE |
| 5199 | |
Guido van Rossum | a28518a | 2000-05-11 18:41:32 +0000 | [diff] [blame] | 5200 | # check for rint() in math library |
| 5201 | LIBS_SAVE=$LIBS |
| 5202 | LIBS="$LIBS $LIBM" |
| 5203 | for ac_func in rint |
| 5204 | do |
| 5205 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5206 | echo "configure:5207: checking for $ac_func" >&5 |
| 5207 | if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then |
Guido van Rossum | a28518a | 2000-05-11 18:41:32 +0000 | [diff] [blame] | 5208 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5209 | else |
| 5210 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5211 | #line 5212 "configure" |
Guido van Rossum | a28518a | 2000-05-11 18:41:32 +0000 | [diff] [blame] | 5212 | #include "confdefs.h" |
| 5213 | /* System header to define __stub macros and hopefully few prototypes, |
| 5214 | which can conflict with char $ac_func(); below. */ |
| 5215 | #include <assert.h> |
| 5216 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5217 | /* We use char because int might match the return type of a gcc2 |
| 5218 | builtin and then its argument prototype would still apply. */ |
| 5219 | char $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5220 | char (*f)(); |
Guido van Rossum | a28518a | 2000-05-11 18:41:32 +0000 | [diff] [blame] | 5221 | |
| 5222 | int main() { |
| 5223 | |
| 5224 | /* The GNU C library defines this for functions which it implements |
| 5225 | to always fail with ENOSYS. Some functions are actually named |
| 5226 | something starting with __ and the normal name is an alias. */ |
| 5227 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5228 | choke me |
| 5229 | #else |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5230 | f = $ac_func; |
Guido van Rossum | a28518a | 2000-05-11 18:41:32 +0000 | [diff] [blame] | 5231 | #endif |
| 5232 | |
| 5233 | ; return 0; } |
| 5234 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5235 | if { (eval echo configure:5236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | a28518a | 2000-05-11 18:41:32 +0000 | [diff] [blame] | 5236 | rm -rf conftest* |
| 5237 | eval "ac_cv_func_$ac_func=yes" |
| 5238 | else |
| 5239 | echo "configure: failed program was:" >&5 |
| 5240 | cat conftest.$ac_ext >&5 |
| 5241 | rm -rf conftest* |
| 5242 | eval "ac_cv_func_$ac_func=no" |
| 5243 | fi |
| 5244 | rm -f conftest* |
| 5245 | fi |
| 5246 | |
| 5247 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5248 | echo "$ac_t""yes" 1>&6 |
| 5249 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5250 | cat >> confdefs.h <<EOF |
| 5251 | #define $ac_tr_func 1 |
| 5252 | EOF |
| 5253 | |
| 5254 | else |
| 5255 | echo "$ac_t""no" 1>&6 |
| 5256 | fi |
| 5257 | done |
| 5258 | |
| 5259 | LIBS=$LIBS_SAVE |
| 5260 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5261 | # check for getopt |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5262 | echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5263 | echo "configure:5264: checking for genuine getopt" >&5 |
| 5264 | if eval "test \"\${ac_cv_func_getopt+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5265 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5266 | else |
| 5267 | if test "$cross_compiling" = yes; then |
| 5268 | ac_cv_func_getopt=no |
| 5269 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5270 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5271 | #line 5272 "configure" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5272 | #include "confdefs.h" |
| 5273 | #include <stdio.h> |
| 5274 | extern int optind, opterr, getopt(); |
| 5275 | extern char* optarg; |
| 5276 | int main() { |
| 5277 | char* av[] = { "testprog", "parameter", "-fFlag", NULL }; |
| 5278 | opterr = 0; |
| 5279 | if (getopt(3, av, "f:") == 'f') { exit(1); } |
| 5280 | exit(0); |
| 5281 | } |
| 5282 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5283 | if { (eval echo configure:5284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5284 | then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5285 | ac_cv_func_getopt=yes |
| 5286 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5287 | echo "configure: failed program was:" >&5 |
| 5288 | cat conftest.$ac_ext >&5 |
| 5289 | rm -fr conftest* |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5290 | ac_cv_func_getopt=no |
| 5291 | fi |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5292 | rm -fr conftest* |
| 5293 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5294 | |
| 5295 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5296 | echo "$ac_t""$ac_cv_func_getopt" 1>&6 |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5297 | test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o" |
| 5298 | |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 5299 | # check whether malloc(0) returns NULL or not |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 5300 | echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5301 | echo "configure:5302: checking what malloc(0) returns" >&5 |
| 5302 | if eval "test \"\${ac_cv_malloc_zero+set}\" = set"; then |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 5303 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5304 | else |
| 5305 | if test "$cross_compiling" = yes; then |
| 5306 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 5307 | else |
| 5308 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5309 | #line 5310 "configure" |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 5310 | #include "confdefs.h" |
| 5311 | #include <stdio.h> |
| 5312 | #ifdef HAVE_STDLIB |
| 5313 | #include <stdlib.h> |
| 5314 | #else |
| 5315 | char *malloc(), *realloc(); |
| 5316 | int *free(); |
| 5317 | #endif |
| 5318 | main() { |
| 5319 | char *p; |
| 5320 | p = malloc(0); |
| 5321 | if (p == NULL) exit(1); |
| 5322 | p = realloc(p, 0); |
| 5323 | if (p == NULL) exit(1); |
| 5324 | free(p); |
| 5325 | exit(0); |
| 5326 | } |
| 5327 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5328 | if { (eval echo configure:5329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 5329 | then |
| 5330 | ac_cv_malloc_zero=nonnull |
| 5331 | else |
| 5332 | echo "configure: failed program was:" >&5 |
| 5333 | cat conftest.$ac_ext >&5 |
| 5334 | rm -fr conftest* |
| 5335 | ac_cv_malloc_zero=null |
| 5336 | fi |
| 5337 | rm -fr conftest* |
| 5338 | fi |
| 5339 | |
| 5340 | fi |
| 5341 | |
| 5342 | echo "$ac_t""$ac_cv_malloc_zero" 1>&6 |
| 5343 | if test "$ac_cv_malloc_zero" = null |
| 5344 | then |
| 5345 | cat >> confdefs.h <<\EOF |
| 5346 | #define MALLOC_ZERO_RETURNS_NULL 1 |
| 5347 | EOF |
| 5348 | |
| 5349 | fi |
| 5350 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5351 | # check for wchar.h |
| 5352 | ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'` |
| 5353 | echo $ac_n "checking for wchar.h""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5354 | echo "configure:5355: checking for wchar.h" >&5 |
| 5355 | if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5356 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5357 | else |
| 5358 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5359 | #line 5360 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5360 | #include "confdefs.h" |
| 5361 | #include <wchar.h> |
| 5362 | EOF |
| 5363 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5364 | { (eval echo configure:5365: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5365 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 5366 | if test -z "$ac_err"; then |
| 5367 | rm -rf conftest* |
| 5368 | eval "ac_cv_header_$ac_safe=yes" |
| 5369 | else |
| 5370 | echo "$ac_err" >&5 |
| 5371 | echo "configure: failed program was:" >&5 |
| 5372 | cat conftest.$ac_ext >&5 |
| 5373 | rm -rf conftest* |
| 5374 | eval "ac_cv_header_$ac_safe=no" |
| 5375 | fi |
| 5376 | rm -f conftest* |
| 5377 | fi |
| 5378 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 5379 | echo "$ac_t""yes" 1>&6 |
| 5380 | cat >> confdefs.h <<\EOF |
| 5381 | #define HAVE_WCHAR_H 1 |
| 5382 | EOF |
| 5383 | wchar_h="yes" |
| 5384 | else |
| 5385 | echo "$ac_t""no" 1>&6 |
| 5386 | wchar_h="no" |
| 5387 | |
| 5388 | fi |
| 5389 | |
| 5390 | |
| 5391 | # check for usable wchar_t |
| 5392 | usable_wchar_t="unkown" |
| 5393 | echo $ac_n "checking for usable wchar_t""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5394 | echo "configure:5395: checking for usable wchar_t" >&5 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5395 | if test "$cross_compiling" = yes; then |
| 5396 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 5397 | else |
| 5398 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5399 | #line 5400 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5400 | #include "confdefs.h" |
| 5401 | |
| 5402 | #include "wchar.h" |
| 5403 | #include "wctype.h" |
| 5404 | main() { |
| 5405 | wchar_t s; |
| 5406 | if (sizeof(s) == 2) |
| 5407 | exit(0); |
| 5408 | else |
| 5409 | exit(1); |
| 5410 | } |
| 5411 | |
| 5412 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5413 | if { (eval echo configure:5414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5414 | then |
| 5415 | cat >> confdefs.h <<\EOF |
| 5416 | #define HAVE_USABLE_WCHAR_T 1 |
| 5417 | EOF |
| 5418 | usable_wchar_t="yes" |
| 5419 | else |
| 5420 | echo "configure: failed program was:" >&5 |
| 5421 | cat conftest.$ac_ext >&5 |
| 5422 | rm -fr conftest* |
| 5423 | usable_wchar_t="no" |
| 5424 | fi |
| 5425 | rm -fr conftest* |
| 5426 | fi |
| 5427 | |
| 5428 | echo "$ac_t""$usable_wchar_t" 1>&6 |
| 5429 | |
| 5430 | # check for endianness |
| 5431 | echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5432 | echo "configure:5433: checking whether byte ordering is bigendian" >&5 |
| 5433 | if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5434 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5435 | else |
| 5436 | ac_cv_c_bigendian=unknown |
| 5437 | # See if sys/param.h defines the BYTE_ORDER macro. |
| 5438 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5439 | #line 5440 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5440 | #include "confdefs.h" |
| 5441 | #include <sys/types.h> |
| 5442 | #include <sys/param.h> |
| 5443 | int main() { |
| 5444 | |
| 5445 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN |
| 5446 | bogus endian macros |
| 5447 | #endif |
| 5448 | ; return 0; } |
| 5449 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5450 | if { (eval echo configure:5451: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5451 | rm -rf conftest* |
| 5452 | # It does; now see whether it defined to BIG_ENDIAN or not. |
| 5453 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5454 | #line 5455 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5455 | #include "confdefs.h" |
| 5456 | #include <sys/types.h> |
| 5457 | #include <sys/param.h> |
| 5458 | int main() { |
| 5459 | |
| 5460 | #if BYTE_ORDER != BIG_ENDIAN |
| 5461 | not big endian |
| 5462 | #endif |
| 5463 | ; return 0; } |
| 5464 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5465 | if { (eval echo configure:5466: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5466 | rm -rf conftest* |
| 5467 | ac_cv_c_bigendian=yes |
| 5468 | else |
| 5469 | echo "configure: failed program was:" >&5 |
| 5470 | cat conftest.$ac_ext >&5 |
| 5471 | rm -rf conftest* |
| 5472 | ac_cv_c_bigendian=no |
| 5473 | fi |
| 5474 | rm -f conftest* |
| 5475 | else |
| 5476 | echo "configure: failed program was:" >&5 |
| 5477 | cat conftest.$ac_ext >&5 |
| 5478 | fi |
| 5479 | rm -f conftest* |
| 5480 | if test $ac_cv_c_bigendian = unknown; then |
| 5481 | if test "$cross_compiling" = yes; then |
| 5482 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 5483 | else |
| 5484 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5485 | #line 5486 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5486 | #include "confdefs.h" |
| 5487 | main () { |
| 5488 | /* Are we little or big endian? From Harbison&Steele. */ |
| 5489 | union |
| 5490 | { |
| 5491 | long l; |
| 5492 | char c[sizeof (long)]; |
| 5493 | } u; |
| 5494 | u.l = 1; |
| 5495 | exit (u.c[sizeof (long) - 1] == 1); |
| 5496 | } |
| 5497 | EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5498 | if { (eval echo configure:5499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5499 | then |
| 5500 | ac_cv_c_bigendian=no |
| 5501 | else |
| 5502 | echo "configure: failed program was:" >&5 |
| 5503 | cat conftest.$ac_ext >&5 |
| 5504 | rm -fr conftest* |
| 5505 | ac_cv_c_bigendian=yes |
| 5506 | fi |
| 5507 | rm -fr conftest* |
| 5508 | fi |
| 5509 | |
| 5510 | fi |
| 5511 | fi |
| 5512 | |
| 5513 | echo "$ac_t""$ac_cv_c_bigendian" 1>&6 |
| 5514 | if test $ac_cv_c_bigendian = yes; then |
| 5515 | cat >> confdefs.h <<\EOF |
| 5516 | #define WORDS_BIGENDIAN 1 |
| 5517 | EOF |
| 5518 | |
| 5519 | fi |
| 5520 | |
| 5521 | |
| 5522 | # Check for --with-wctype-functions |
| 5523 | echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5524 | echo "configure:5525: checking for --with-wctype-functions" >&5 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5525 | # Check whether --with-wctype-functions or --without-wctype-functions was given. |
| 5526 | if test "${with_wctype_functions+set}" = set; then |
| 5527 | withval="$with_wctype_functions" |
| 5528 | |
| 5529 | if test "$withval" != no |
| 5530 | then cat >> confdefs.h <<\EOF |
| 5531 | #define WANT_WCTYPE_FUNCTIONS 1 |
| 5532 | EOF |
| 5533 | echo "$ac_t""yes" 1>&6 |
| 5534 | else echo "$ac_t""no" 1>&6 |
| 5535 | fi |
| 5536 | else |
| 5537 | echo "$ac_t""no" 1>&6 |
| 5538 | fi |
| 5539 | |
| 5540 | |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 5541 | # THIS MUST BE LAST, IT CAN BREAK OTHER TESTS! |
| 5542 | # Add sys/socket.h to confdefs.h |
| 5543 | cat >> confdefs.h <<\EOF |
| 5544 | #ifdef HAVE_SYS_SOCKET_H |
| 5545 | #include <sys/socket.h> |
| 5546 | #endif |
| 5547 | EOF |
| 5548 | echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5549 | echo "configure:5550: checking for socklen_t" >&5 |
| 5550 | if eval "test \"\${ac_cv_type_socklen_t+set}\" = set"; then |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 5551 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5552 | else |
| 5553 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5554 | #line 5555 "configure" |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 5555 | #include "confdefs.h" |
| 5556 | #include <sys/types.h> |
| 5557 | #if STDC_HEADERS |
| 5558 | #include <stdlib.h> |
| 5559 | #include <stddef.h> |
| 5560 | #endif |
| 5561 | EOF |
| 5562 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 5563 | egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
| 5564 | rm -rf conftest* |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5565 | eval "ac_cv_type_socklen_t=yes" |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 5566 | else |
| 5567 | rm -rf conftest* |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5568 | eval "ac_cv_type_socklen_t=no" |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 5569 | fi |
| 5570 | rm -f conftest* |
| 5571 | |
| 5572 | fi |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5573 | if eval "test \"`echo '$ac_cv_type_'socklen_t`\" = yes"; then |
| 5574 | echo "$ac_t""yes" 1>&6 |
| 5575 | else |
| 5576 | echo "$ac_t""no" 1>&6 |
| 5577 | cat >> confdefs.h <<EOF |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 5578 | #define socklen_t int |
| 5579 | EOF |
| 5580 | |
| 5581 | fi |
| 5582 | |
| 5583 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5584 | # generate output files |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5585 | trap '' 1 2 15 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5586 | cat > confcache <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5587 | # This file is a shell script that caches the results of configure |
| 5588 | # tests run on this system so they can be shared between configure |
| 5589 | # scripts and configure runs. It is not useful on other systems. |
| 5590 | # If it contains results you don't want to keep, you may remove or edit it. |
| 5591 | # |
| 5592 | # By default, configure uses ./config.cache as the cache file, |
| 5593 | # creating it if it does not exist already. You can give configure |
| 5594 | # the --cache-file=FILE option to use a different cache file; that is |
| 5595 | # what configure does when it calls configure scripts in |
| 5596 | # subdirectories, so they share the cache. |
| 5597 | # Giving --cache-file=/dev/null disables caching, for debugging configure. |
| 5598 | # config.status only pays attention to the cache file if you give it the |
| 5599 | # --recheck option to rerun configure. |
| 5600 | # |
| 5601 | EOF |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5602 | # The following way of writing the cache mishandles newlines in values, |
| 5603 | # but we know of no workaround that is simple, portable, and efficient. |
| 5604 | # So, don't put newlines in cache variables' values. |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5605 | # Ultrix sh set writes to stderr and can't be redirected directly, |
| 5606 | # and sets the high bit in the cache file unless we assign to the vars. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5607 | (set) 2>&1 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 5608 | case `(ac_space=' '; set | grep ac_space) 2>&1` in |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5609 | *ac_space=\ *) |
| 5610 | # `set' does not quote correctly, so add quotes (double-quote substitution |
| 5611 | # turns \\\\ into \\, and sed turns \\ into \). |
| 5612 | sed -n \ |
| 5613 | -e "s/'/'\\\\''/g" \ |
| 5614 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" |
| 5615 | ;; |
| 5616 | *) |
| 5617 | # `set' quotes correctly as required by POSIX, so do not add quotes. |
| 5618 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' |
| 5619 | ;; |
| 5620 | esac >> confcache |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5621 | if cmp -s $cache_file confcache; then |
| 5622 | : |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5623 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5624 | if test -w $cache_file; then |
| 5625 | echo "updating cache $cache_file" |
| 5626 | cat confcache > $cache_file |
| 5627 | else |
| 5628 | echo "not updating unwritable cache $cache_file" |
| 5629 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5630 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5631 | rm -f confcache |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 5632 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5633 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5634 | |
| 5635 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
| 5636 | # Let make expand exec_prefix. |
| 5637 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 5638 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5639 | # Any assignment to VPATH causes Sun make to only execute |
| 5640 | # the first set of double-colon rules, so remove it if not needed. |
| 5641 | # If there is a colon in the path, we need to keep it. |
| 5642 | if test "x$srcdir" = x.; then |
| 5643 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' |
| 5644 | fi |
| 5645 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5646 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5647 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5648 | DEFS=-DHAVE_CONFIG_H |
| 5649 | |
| 5650 | # Without the "./", some shells look in PATH for config.status. |
| 5651 | : ${CONFIG_STATUS=./config.status} |
| 5652 | |
| 5653 | echo creating $CONFIG_STATUS |
| 5654 | rm -f $CONFIG_STATUS |
| 5655 | cat > $CONFIG_STATUS <<EOF |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5656 | #! /bin/sh |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5657 | # Generated automatically by configure. |
| 5658 | # Run this file to recreate the current configuration. |
| 5659 | # This directory was configured as follows, |
| 5660 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: |
| 5661 | # |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5662 | # $0 $ac_configure_args |
| 5663 | # |
| 5664 | # Compiler output produced by configure, useful for debugging |
| 5665 | # configure, is in ./config.log if it exists. |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5666 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5667 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5668 | for ac_option |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5669 | do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5670 | case "\$ac_option" in |
| 5671 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5672 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" |
| 5673 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5674 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5675 | echo "$CONFIG_STATUS generated by autoconf version 2.14.1" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5676 | exit 0 ;; |
| 5677 | -help | --help | --hel | --he | --h) |
| 5678 | echo "\$ac_cs_usage"; exit 0 ;; |
| 5679 | *) echo "\$ac_cs_usage"; exit 1 ;; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5680 | esac |
| 5681 | done |
| 5682 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5683 | ac_given_srcdir=$srcdir |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5684 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 5685 | trap 'rm -fr `echo "Makefile \ |
| 5686 | Objects/Makefile \ |
| 5687 | Parser/Makefile \ |
| 5688 | Python/Makefile \ |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 5689 | Modules/Makefile.pre \ |
| 5690 | Modules/Setup.thread config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5691 | EOF |
| 5692 | cat >> $CONFIG_STATUS <<EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5693 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5694 | # Protect against being on the right side of a sed subst in config.status. |
| 5695 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; |
| 5696 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5697 | $ac_vpsub |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5698 | $extrasub |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 5699 | s%@SHELL@%$SHELL%g |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5700 | s%@CFLAGS@%$CFLAGS%g |
| 5701 | s%@CPPFLAGS@%$CPPFLAGS%g |
| 5702 | s%@CXXFLAGS@%$CXXFLAGS%g |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 5703 | s%@FFLAGS@%$FFLAGS%g |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5704 | s%@DEFS@%$DEFS%g |
| 5705 | s%@LDFLAGS@%$LDFLAGS%g |
| 5706 | s%@LIBS@%$LIBS%g |
| 5707 | s%@exec_prefix@%$exec_prefix%g |
| 5708 | s%@prefix@%$prefix%g |
| 5709 | s%@program_transform_name@%$program_transform_name%g |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5710 | s%@bindir@%$bindir%g |
| 5711 | s%@sbindir@%$sbindir%g |
| 5712 | s%@libexecdir@%$libexecdir%g |
| 5713 | s%@datadir@%$datadir%g |
| 5714 | s%@sysconfdir@%$sysconfdir%g |
| 5715 | s%@sharedstatedir@%$sharedstatedir%g |
| 5716 | s%@localstatedir@%$localstatedir%g |
| 5717 | s%@libdir@%$libdir%g |
| 5718 | s%@includedir@%$includedir%g |
| 5719 | s%@oldincludedir@%$oldincludedir%g |
| 5720 | s%@infodir@%$infodir%g |
| 5721 | s%@mandir@%$mandir%g |
Guido van Rossum | 1fd74a7 | 1997-07-19 19:36:02 +0000 | [diff] [blame] | 5722 | s%@VERSION@%$VERSION%g |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 5723 | s%@MACHDEP@%$MACHDEP%g |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 5724 | s%@SGI_ABI@%$SGI_ABI%g |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 5725 | s%@SET_CXX@%$SET_CXX%g |
| 5726 | s%@MAINOBJ@%$MAINOBJ%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5727 | s%@CC@%$CC%g |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 5728 | s%@MAKE_LDLIBRARY@%$MAKE_LDLIBRARY%g |
| 5729 | s%@LDLIBRARY@%$LDLIBRARY%g |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 5730 | s%@LINKCC@%$LINKCC%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5731 | s%@RANLIB@%$RANLIB%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5732 | s%@AR@%$AR%g |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 5733 | s%@INSTALL@%$INSTALL%g |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5734 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
| 5735 | s%@INSTALL_DATA@%$INSTALL_DATA%g |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 5736 | s%@LN@%$LN%g |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 5737 | s%@OPT@%$OPT%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5738 | s%@CPP@%$CPP%g |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 5739 | s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 5740 | s%@SO@%$SO%g |
| 5741 | s%@LDSHARED@%$LDSHARED%g |
| 5742 | s%@CCSHARED@%$CCSHARED%g |
| 5743 | s%@LINKFORSHARED@%$LINKFORSHARED%g |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 5744 | s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 5745 | s%@LDLAST@%$LDLAST%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5746 | s%@DLINCLDIR@%$DLINCLDIR%g |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 5747 | s%@DYNLOADFILE@%$DYNLOADFILE%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5748 | s%@LIBOBJS@%$LIBOBJS%g |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5749 | s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g |
| 5750 | s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g |
| 5751 | s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 5752 | s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5753 | s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5754 | s%@LIBM@%$LIBM%g |
| 5755 | s%@LIBC@%$LIBC%g |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5756 | |
| 5757 | CEOF |
| 5758 | EOF |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5759 | |
| 5760 | cat >> $CONFIG_STATUS <<\EOF |
| 5761 | |
| 5762 | # Split the substitutions into bite-sized pieces for seds with |
| 5763 | # small command number limits, like on Digital OSF/1 and HP-UX. |
| 5764 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. |
| 5765 | ac_file=1 # Number of current file. |
| 5766 | ac_beg=1 # First line for current file. |
| 5767 | ac_end=$ac_max_sed_cmds # Line after last line for current file. |
| 5768 | ac_more_lines=: |
| 5769 | ac_sed_cmds="" |
| 5770 | while $ac_more_lines; do |
| 5771 | if test $ac_beg -gt 1; then |
| 5772 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file |
| 5773 | else |
| 5774 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file |
| 5775 | fi |
| 5776 | if test ! -s conftest.s$ac_file; then |
| 5777 | ac_more_lines=false |
| 5778 | rm -f conftest.s$ac_file |
| 5779 | else |
| 5780 | if test -z "$ac_sed_cmds"; then |
| 5781 | ac_sed_cmds="sed -f conftest.s$ac_file" |
| 5782 | else |
| 5783 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" |
| 5784 | fi |
| 5785 | ac_file=`expr $ac_file + 1` |
| 5786 | ac_beg=$ac_end |
| 5787 | ac_end=`expr $ac_end + $ac_max_sed_cmds` |
| 5788 | fi |
| 5789 | done |
| 5790 | if test -z "$ac_sed_cmds"; then |
| 5791 | ac_sed_cmds=cat |
| 5792 | fi |
| 5793 | EOF |
| 5794 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5795 | cat >> $CONFIG_STATUS <<EOF |
| 5796 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 5797 | CONFIG_FILES=\${CONFIG_FILES-"Makefile \ |
| 5798 | Objects/Makefile \ |
| 5799 | Parser/Makefile \ |
| 5800 | Python/Makefile \ |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 5801 | Modules/Makefile.pre \ |
| 5802 | Modules/Setup.thread"} |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5803 | EOF |
| 5804 | cat >> $CONFIG_STATUS <<\EOF |
| 5805 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5806 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5807 | case "$ac_file" in |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5808 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5809 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
| 5810 | *) ac_file_in="${ac_file}.in" ;; |
| 5811 | esac |
| 5812 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5813 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5814 | |
| 5815 | # Remove last slash and all that follows it. Not all systems have dirname. |
| 5816 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` |
| 5817 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then |
| 5818 | # The file is in a subdirectory. |
| 5819 | test ! -d "$ac_dir" && mkdir "$ac_dir" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5820 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5821 | # A "../" for each directory in $ac_dir_suffix. |
| 5822 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` |
| 5823 | else |
| 5824 | ac_dir_suffix= ac_dots= |
| 5825 | fi |
| 5826 | |
| 5827 | case "$ac_given_srcdir" in |
| 5828 | .) srcdir=. |
| 5829 | if test -z "$ac_dots"; then top_srcdir=. |
| 5830 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; |
| 5831 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; |
| 5832 | *) # Relative path. |
| 5833 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" |
| 5834 | top_srcdir="$ac_dots$ac_given_srcdir" ;; |
| 5835 | esac |
| 5836 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5837 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5838 | echo creating "$ac_file" |
| 5839 | rm -f "$ac_file" |
| 5840 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." |
| 5841 | case "$ac_file" in |
| 5842 | *Makefile*) ac_comsub="1i\\ |
| 5843 | # $configure_input" ;; |
| 5844 | *) ac_comsub= ;; |
| 5845 | esac |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5846 | |
| 5847 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5848 | sed -e "$ac_comsub |
| 5849 | s%@configure_input@%$configure_input%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5850 | s%@srcdir@%$srcdir%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5851 | s%@top_srcdir@%$top_srcdir%g |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5852 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5853 | fi; done |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5854 | rm -f conftest.s* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5855 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5856 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where |
| 5857 | # 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] | 5858 | # |
| 5859 | # ac_d sets the value in "#define NAME VALUE" lines. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5860 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' |
| 5861 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5862 | ac_dC='\3' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5863 | ac_dD='%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5864 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5865 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
| 5866 | ac_uB='\([ ]\)%\1#\2define\3' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5867 | ac_uC=' ' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5868 | ac_uD='\4%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5869 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5870 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
| 5871 | ac_eB='$%\1#\2define\3' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5872 | ac_eC=' ' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5873 | ac_eD='%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5874 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5875 | if test "${CONFIG_HEADERS+set}" != set; then |
| 5876 | EOF |
| 5877 | cat >> $CONFIG_STATUS <<EOF |
| 5878 | CONFIG_HEADERS="config.h" |
| 5879 | EOF |
| 5880 | cat >> $CONFIG_STATUS <<\EOF |
| 5881 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5882 | 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] | 5883 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5884 | case "$ac_file" in |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5885 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5886 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
| 5887 | *) ac_file_in="${ac_file}.in" ;; |
| 5888 | esac |
| 5889 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5890 | echo creating $ac_file |
| 5891 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5892 | rm -f conftest.frag conftest.in conftest.out |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5893 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
| 5894 | cat $ac_file_inputs > conftest.in |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5895 | |
| 5896 | EOF |
| 5897 | |
| 5898 | # Transform confdefs.h into a sed script conftest.vals that substitutes |
| 5899 | # the proper values into config.h.in to produce config.h. And first: |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5900 | # Protect against being on the right side of a sed subst in config.status. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5901 | # Protect against being in an unquoted here document in config.status. |
| 5902 | rm -f conftest.vals |
| 5903 | cat > conftest.hdr <<\EOF |
| 5904 | s/[\\&%]/\\&/g |
| 5905 | s%[\\$`]%\\&%g |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5906 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5907 | s%ac_d%ac_u%gp |
| 5908 | s%ac_u%ac_e%gp |
| 5909 | EOF |
| 5910 | sed -n -f conftest.hdr confdefs.h > conftest.vals |
| 5911 | rm -f conftest.hdr |
| 5912 | |
| 5913 | # This sed command replaces #undef with comments. This is necessary, for |
| 5914 | # example, in the case of _POSIX_SOURCE, which is predefined and required |
| 5915 | # on some systems where configure will not decide to define it. |
| 5916 | cat >> conftest.vals <<\EOF |
| 5917 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% |
| 5918 | EOF |
| 5919 | |
| 5920 | # Break up conftest.vals because some shells have a limit on |
| 5921 | # 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] | 5922 | |
| 5923 | rm -f conftest.tail |
| 5924 | while : |
| 5925 | do |
| 5926 | ac_lines=`grep -c . conftest.vals` |
| 5927 | # grep -c gives empty output for an empty file on some AIX systems. |
| 5928 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi |
| 5929 | # Write a limited-size here document to conftest.frag. |
| 5930 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS |
| 5931 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS |
| 5932 | echo 'CEOF |
| 5933 | sed -f conftest.frag conftest.in > conftest.out |
| 5934 | rm -f conftest.in |
| 5935 | mv conftest.out conftest.in |
| 5936 | ' >> $CONFIG_STATUS |
| 5937 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail |
| 5938 | rm -f conftest.vals |
| 5939 | mv conftest.tail conftest.vals |
| 5940 | done |
| 5941 | rm -f conftest.vals |
| 5942 | |
| 5943 | cat >> $CONFIG_STATUS <<\EOF |
| 5944 | rm -f conftest.frag conftest.h |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5945 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5946 | cat conftest.in >> conftest.h |
| 5947 | rm -f conftest.in |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5948 | if cmp -s $ac_file conftest.h 2>/dev/null; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5949 | echo "$ac_file is unchanged" |
| 5950 | rm -f conftest.h |
| 5951 | else |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5952 | # Remove last slash and all that follows it. Not all systems have dirname. |
| 5953 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` |
| 5954 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then |
| 5955 | # The file is in a subdirectory. |
| 5956 | test ! -d "$ac_dir" && mkdir "$ac_dir" |
| 5957 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5958 | rm -f $ac_file |
| 5959 | mv conftest.h $ac_file |
| 5960 | fi |
| 5961 | fi; done |
| 5962 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5963 | EOF |
| 5964 | cat >> $CONFIG_STATUS <<EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5965 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5966 | EOF |
| 5967 | cat >> $CONFIG_STATUS <<\EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5968 | |
| 5969 | exit 0 |
| 5970 | EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5971 | chmod +x $CONFIG_STATUS |
| 5972 | rm -fr confdefs* $ac_clean_files |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5973 | test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5974 | |