blob: 52da1c894210c10f18a710bd1536d598cc066b05 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003# From configure.in Revision: 1.159
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004
Guido van Rossum627b2d71993-12-24 10:39:16 +00005# Guess values for system-dependent variables and create Makefiles.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00006# Generated automatically using autoconf version 2.13
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
Guido van Rossum627b2d71993-12-24 10:39:16 +000011
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012# Defaults:
13ac_help=
14ac_default_prefix=/usr/local
15# Any additions from configure.in:
16ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000017 --with-next-archs='arch1 arch2 ..' build MAB binary"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000018ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000019 --with-next-framework Build (OpenStep|Rhapsody|MacOSX) framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000020ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000021 --with-dyld Use (OpenStep|Rhapsody|MacOSX) dynamic linker"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000022ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000023 --without-gcc never use gcc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000025 --with-cxx=<compiler> enable C++ support"
Guido van Rossum95012191999-12-16 17:50:52 +000026ac_help="$ac_help
Skip Montanarocb853262000-08-30 22:29:48 +000027 --with-pydebug build with Py_DEBUG defined"
28ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000029 --with-libs='lib1 ...' link against additional libs"
Guido van Rossuma68acba1996-07-31 17:36:39 +000030ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000031 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries"
Guido van Rossumec2f0731997-01-22 20:54:01 +000032ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000033 --with(out)-threads[=DIRECTORY] disable/enable thread support"
Guido van Rossumec2f0731997-01-22 20:54:01 +000034ac_help="$ac_help
Barry Warsawa0f3c5c2000-06-30 16:39:35 +000035 --with(out)-thread[=DIRECTORY] deprecated; use --with(out)-threads"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000036ac_help="$ac_help
Guido van Rossum9e8181b2000-09-19 00:46:46 +000037 --with-pth use GNU pth threading libraries"
38ac_help="$ac_help
Barry Warsawef82cd72000-06-30 16:21:01 +000039 --with(out)-cycle-gc disable/enable garbage collection"
40ac_help="$ac_help
Fred Drakea50d6ec2000-08-31 16:13:20 +000041 --with(out)-libdb disable/enable bsddb module"
42ac_help="$ac_help
Barry Warsawef82cd72000-06-30 16:21:01 +000043 --with-wctype-functions use wctype.h functions"
44ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000045 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000046ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000047 --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000048ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000049 --with-fpectl enable SIGFPE catching"
Guido van Rossum7f253911997-05-09 02:42:48 +000050ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000051 --with-libm=STRING math library"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000052ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000053 --with-libc=STRING C library"
Guido van Rossum627b2d71993-12-24 10:39:16 +000054
Guido van Rossum7f43da71994-08-01 12:15:30 +000055# Initialize some variables set by options.
56# The variables have the same names as the options, with
57# dashes changed to underlines.
58build=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000059cache_file=./config.cache
60exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +000061host=NONE
62no_create=
63nonopt=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000064no_recursion=
65prefix=NONE
66program_prefix=NONE
67program_suffix=NONE
68program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +000069silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000070site=
Guido van Rossum7f43da71994-08-01 12:15:30 +000071srcdir=
72target=NONE
73verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000074x_includes=NONE
75x_libraries=NONE
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000076bindir='${exec_prefix}/bin'
77sbindir='${exec_prefix}/sbin'
78libexecdir='${exec_prefix}/libexec'
79datadir='${prefix}/share'
80sysconfdir='${prefix}/etc'
81sharedstatedir='${prefix}/com'
82localstatedir='${prefix}/var'
83libdir='${exec_prefix}/lib'
84includedir='${prefix}/include'
85oldincludedir='/usr/include'
86infodir='${prefix}/info'
87mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000088
89# Initialize some other variables.
90subdirs=
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000091MFLAGS= MAKEFLAGS=
Guido van Rossume6c2cf11999-01-08 21:08:33 +000092SHELL=${CONFIG_SHELL-/bin/sh}
Guido van Rossumf78abae1997-01-21 22:02:36 +000093# Maximum number of lines to put in a shell here document.
94ac_max_here_lines=12
Guido van Rossum7f43da71994-08-01 12:15:30 +000095
96ac_prev=
97for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +000098do
Guido van Rossum627b2d71993-12-24 10:39:16 +000099
Guido van Rossum7f43da71994-08-01 12:15:30 +0000100 # If the previous option needs an argument, assign it.
101 if test -n "$ac_prev"; then
102 eval "$ac_prev=\$ac_option"
103 ac_prev=
104 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000105 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000106
Guido van Rossum7f43da71994-08-01 12:15:30 +0000107 case "$ac_option" in
108 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
109 *) ac_optarg= ;;
110 esac
111
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000112 # Accept the important Cygnus configure options, so we can diagnose typos.
113
Guido van Rossum7f43da71994-08-01 12:15:30 +0000114 case "$ac_option" in
115
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000116 -bindir | --bindir | --bindi | --bind | --bin | --bi)
117 ac_prev=bindir ;;
118 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
119 bindir="$ac_optarg" ;;
120
121 -build | --build | --buil | --bui | --bu)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000122 ac_prev=build ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000123 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000124 build="$ac_optarg" ;;
125
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000126 -cache-file | --cache-file | --cache-fil | --cache-fi \
127 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
128 ac_prev=cache_file ;;
129 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
130 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
131 cache_file="$ac_optarg" ;;
132
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000133 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
134 ac_prev=datadir ;;
135 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
136 | --da=*)
137 datadir="$ac_optarg" ;;
138
Guido van Rossum7f43da71994-08-01 12:15:30 +0000139 -disable-* | --disable-*)
140 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000141 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000142 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000143 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000144 fi
145 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
146 eval "enable_${ac_feature}=no" ;;
147
148 -enable-* | --enable-*)
149 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000150 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000151 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000152 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000153 fi
154 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
155 case "$ac_option" in
156 *=*) ;;
157 *) ac_optarg=yes ;;
158 esac
159 eval "enable_${ac_feature}='$ac_optarg'" ;;
160
Guido van Rossum7f43da71994-08-01 12:15:30 +0000161 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
162 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
163 | --exec | --exe | --ex)
164 ac_prev=exec_prefix ;;
165 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
166 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
167 | --exec=* | --exe=* | --ex=*)
168 exec_prefix="$ac_optarg" ;;
169
170 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000171 # Obsolete; use --with-gas.
172 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000173
174 -help | --help | --hel | --he)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000175 # Omit some internal or obsolete options to make the list less imposing.
176 # This message is too long to be a string in the A/UX 3.1 sh.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000177 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000178Usage: configure [options] [host]
179Options: [defaults in brackets after descriptions]
180Configuration:
181 --cache-file=FILE cache test results in FILE
182 --help print this message
183 --no-create do not create output files
184 --quiet, --silent do not print \`checking...' messages
185 --version print the version of autoconf that created configure
186Directory and file names:
187 --prefix=PREFIX install architecture-independent files in PREFIX
188 [$ac_default_prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000189 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000190 [same as prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000191 --bindir=DIR user executables in DIR [EPREFIX/bin]
192 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
193 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
194 --datadir=DIR read-only architecture-independent data in DIR
195 [PREFIX/share]
196 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
197 --sharedstatedir=DIR modifiable architecture-independent data in DIR
198 [PREFIX/com]
199 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
200 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
201 --includedir=DIR C header files in DIR [PREFIX/include]
202 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
203 --infodir=DIR info documentation in DIR [PREFIX/info]
204 --mandir=DIR man documentation in DIR [PREFIX/man]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000205 --srcdir=DIR find the sources in DIR [configure dir or ..]
206 --program-prefix=PREFIX prepend PREFIX to installed program names
207 --program-suffix=SUFFIX append SUFFIX to installed program names
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000208 --program-transform-name=PROGRAM
209 run sed PROGRAM on installed program names
210EOF
211 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000212Host type:
213 --build=BUILD configure for building on BUILD [BUILD=HOST]
214 --host=HOST configure for HOST [guessed]
215 --target=TARGET configure for TARGET [TARGET=HOST]
216Features and packages:
217 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
218 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
219 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
220 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
221 --x-includes=DIR X include files are in DIR
222 --x-libraries=DIR X library files are in DIR
Guido van Rossum7f43da71994-08-01 12:15:30 +0000223EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000224 if test -n "$ac_help"; then
225 echo "--enable and --with options recognized:$ac_help"
226 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000227 exit 0 ;;
228
229 -host | --host | --hos | --ho)
230 ac_prev=host ;;
231 -host=* | --host=* | --hos=* | --ho=*)
232 host="$ac_optarg" ;;
233
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000234 -includedir | --includedir | --includedi | --included | --include \
235 | --includ | --inclu | --incl | --inc)
236 ac_prev=includedir ;;
237 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
238 | --includ=* | --inclu=* | --incl=* | --inc=*)
239 includedir="$ac_optarg" ;;
240
241 -infodir | --infodir | --infodi | --infod | --info | --inf)
242 ac_prev=infodir ;;
243 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
244 infodir="$ac_optarg" ;;
245
246 -libdir | --libdir | --libdi | --libd)
247 ac_prev=libdir ;;
248 -libdir=* | --libdir=* | --libdi=* | --libd=*)
249 libdir="$ac_optarg" ;;
250
251 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
252 | --libexe | --libex | --libe)
253 ac_prev=libexecdir ;;
254 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
255 | --libexe=* | --libex=* | --libe=*)
256 libexecdir="$ac_optarg" ;;
257
258 -localstatedir | --localstatedir | --localstatedi | --localstated \
259 | --localstate | --localstat | --localsta | --localst \
260 | --locals | --local | --loca | --loc | --lo)
261 ac_prev=localstatedir ;;
262 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
263 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
264 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
265 localstatedir="$ac_optarg" ;;
266
267 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
268 ac_prev=mandir ;;
269 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
270 mandir="$ac_optarg" ;;
271
Guido van Rossum7f43da71994-08-01 12:15:30 +0000272 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000273 # Obsolete; use --without-fp.
274 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000275
276 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
277 | --no-cr | --no-c)
278 no_create=yes ;;
279
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000280 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
281 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
282 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000283
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000284 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
285 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
286 | --oldin | --oldi | --old | --ol | --o)
287 ac_prev=oldincludedir ;;
288 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
289 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
290 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
291 oldincludedir="$ac_optarg" ;;
292
Guido van Rossum7f43da71994-08-01 12:15:30 +0000293 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
294 ac_prev=prefix ;;
295 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
296 prefix="$ac_optarg" ;;
297
298 -program-prefix | --program-prefix | --program-prefi | --program-pref \
299 | --program-pre | --program-pr | --program-p)
300 ac_prev=program_prefix ;;
301 -program-prefix=* | --program-prefix=* | --program-prefi=* \
302 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
303 program_prefix="$ac_optarg" ;;
304
305 -program-suffix | --program-suffix | --program-suffi | --program-suff \
306 | --program-suf | --program-su | --program-s)
307 ac_prev=program_suffix ;;
308 -program-suffix=* | --program-suffix=* | --program-suffi=* \
309 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
310 program_suffix="$ac_optarg" ;;
311
312 -program-transform-name | --program-transform-name \
313 | --program-transform-nam | --program-transform-na \
314 | --program-transform-n | --program-transform- \
315 | --program-transform | --program-transfor \
316 | --program-transfo | --program-transf \
317 | --program-trans | --program-tran \
318 | --progr-tra | --program-tr | --program-t)
319 ac_prev=program_transform_name ;;
320 -program-transform-name=* | --program-transform-name=* \
321 | --program-transform-nam=* | --program-transform-na=* \
322 | --program-transform-n=* | --program-transform-=* \
323 | --program-transform=* | --program-transfor=* \
324 | --program-transfo=* | --program-transf=* \
325 | --program-trans=* | --program-tran=* \
326 | --progr-tra=* | --program-tr=* | --program-t=*)
327 program_transform_name="$ac_optarg" ;;
328
329 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
330 | -silent | --silent | --silen | --sile | --sil)
331 silent=yes ;;
332
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000333 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
334 ac_prev=sbindir ;;
335 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
336 | --sbi=* | --sb=*)
337 sbindir="$ac_optarg" ;;
338
339 -sharedstatedir | --sharedstatedir | --sharedstatedi \
340 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
341 | --sharedst | --shareds | --shared | --share | --shar \
342 | --sha | --sh)
343 ac_prev=sharedstatedir ;;
344 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
345 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
346 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
347 | --sha=* | --sh=*)
348 sharedstatedir="$ac_optarg" ;;
349
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000350 -site | --site | --sit)
351 ac_prev=site ;;
352 -site=* | --site=* | --sit=*)
353 site="$ac_optarg" ;;
354
Guido van Rossum7f43da71994-08-01 12:15:30 +0000355 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
356 ac_prev=srcdir ;;
357 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
358 srcdir="$ac_optarg" ;;
359
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000360 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
361 | --syscon | --sysco | --sysc | --sys | --sy)
362 ac_prev=sysconfdir ;;
363 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
364 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
365 sysconfdir="$ac_optarg" ;;
366
Guido van Rossum7f43da71994-08-01 12:15:30 +0000367 -target | --target | --targe | --targ | --tar | --ta | --t)
368 ac_prev=target ;;
369 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
370 target="$ac_optarg" ;;
371
372 -v | -verbose | --verbose | --verbos | --verbo | --verb)
373 verbose=yes ;;
374
375 -version | --version | --versio | --versi | --vers)
Guido van Rossum9e8181b2000-09-19 00:46:46 +0000376 echo "configure generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000377 exit 0 ;;
378
379 -with-* | --with-*)
380 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000381 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000382 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000383 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000384 fi
385 ac_package=`echo $ac_package| sed 's/-/_/g'`
386 case "$ac_option" in
387 *=*) ;;
388 *) ac_optarg=yes ;;
389 esac
390 eval "with_${ac_package}='$ac_optarg'" ;;
391
392 -without-* | --without-*)
393 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000394 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000395 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000396 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000397 fi
398 ac_package=`echo $ac_package| sed 's/-/_/g'`
399 eval "with_${ac_package}=no" ;;
400
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000401 --x)
402 # Obsolete; use --with-x.
403 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000404
405 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
406 | --x-incl | --x-inc | --x-in | --x-i)
407 ac_prev=x_includes ;;
408 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
409 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
410 x_includes="$ac_optarg" ;;
411
412 -x-libraries | --x-libraries | --x-librarie | --x-librari \
413 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
414 ac_prev=x_libraries ;;
415 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
416 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
417 x_libraries="$ac_optarg" ;;
418
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000419 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000420 ;;
421
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000422 *)
Guido van Rossum0a516c91994-09-12 10:58:40 +0000423 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000424 echo "configure: warning: $ac_option: invalid host type" 1>&2
Guido van Rossum7f43da71994-08-01 12:15:30 +0000425 fi
Guido van Rossum0a516c91994-09-12 10:58:40 +0000426 if test "x$nonopt" != xNONE; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000427 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000428 fi
429 nonopt="$ac_option"
430 ;;
431
432 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000433done
434
Guido van Rossum7f43da71994-08-01 12:15:30 +0000435if test -n "$ac_prev"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000436 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000437fi
438
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000439trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum7f43da71994-08-01 12:15:30 +0000440
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000441# File descriptor usage:
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000442# 0 standard input
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000443# 1 file creation
444# 2 errors and warnings
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000445# 3 some systems may open it to /dev/tty
446# 4 used on the Kubota Titan
447# 6 checking for... messages and results
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000448# 5 compiler messages saved in config.log
449if test "$silent" = yes; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000450 exec 6>/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000451else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000452 exec 6>&1
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000453fi
454exec 5>./config.log
455
456echo "\
457This file contains any messages produced by compilers while
458running configure, to aid debugging if configure makes a mistake.
459" 1>&5
460
461# Strip out --no-create and --no-recursion so they do not pile up.
462# Also quote any args containing shell metacharacters.
463ac_configure_args=
464for ac_arg
465do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000466 case "$ac_arg" in
467 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
468 | --no-cr | --no-c) ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000469 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
470 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
471 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
472 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
473 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000474 esac
475done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000476
477# NLS nuisances.
Guido van Rossumf78abae1997-01-21 22:02:36 +0000478# Only set these to C if already set. These must not be set unconditionally
479# because not all systems understand e.g. LANG=C (notably SCO).
480# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
481# Non-C LC_CTYPE values break the ctype check.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000482if test "${LANG+set}" = set; then LANG=C; export LANG; fi
Guido van Rossumf78abae1997-01-21 22:02:36 +0000483if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
484if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
485if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000486
Guido van Rossum7f43da71994-08-01 12:15:30 +0000487# confdefs.h avoids OS command line length limits that DEFS can exceed.
488rm -rf conftest* confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000489# AIX cpp loses on an empty file, so make sure it contains at least a newline.
490echo > confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000491
492# A filename unique to this package, relative to the directory that
493# configure is in, which we can look for to find out if srcdir is correct.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000494ac_unique_file=Include/object.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000495
496# Find the source files, if location was not specified.
497if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000498 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000499 # Try the directory containing this script, then its parent.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000500 ac_prog=$0
501 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
502 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
503 srcdir=$ac_confdir
504 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000505 srcdir=..
506 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000507else
508 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000509fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000510if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000511 if test "$ac_srcdir_defaulted" = yes; then
512 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000513 else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000514 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000515 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000516fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000517srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
518
519# Prefer explicitly selected file to automatically selected ones.
520if test -z "$CONFIG_SITE"; then
521 if test "x$prefix" != xNONE; then
522 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
523 else
524 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
525 fi
526fi
527for ac_site_file in $CONFIG_SITE; do
528 if test -r "$ac_site_file"; then
529 echo "loading site script $ac_site_file"
530 . "$ac_site_file"
531 fi
532done
533
534if test -r "$cache_file"; then
535 echo "loading cache $cache_file"
Guido van Rossum9e8181b2000-09-19 00:46:46 +0000536 . $cache_file
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000537else
538 echo "creating cache $cache_file"
539 > $cache_file
540fi
541
Guido van Rossum7f43da71994-08-01 12:15:30 +0000542ac_ext=c
Guido van Rossum0a516c91994-09-12 10:58:40 +0000543# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000544ac_cpp='$CPP $CPPFLAGS'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000545ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000546ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000547cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000548
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000549ac_exeext=
550ac_objext=o
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000551if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
552 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
553 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
554 ac_n= ac_c='
555' ac_t=' '
556 else
557 ac_n=-n ac_c= ac_t=
558 fi
559else
560 ac_n= ac_c='\c' ac_t=
561fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000562
Guido van Rossum0a516c91994-09-12 10:58:40 +0000563
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000564
Guido van Rossum627b2d71993-12-24 10:39:16 +0000565
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000566# Set VERSION so we only need to edit in one place (i.e., here)
567
Guido van Rossumb9a22a12000-06-30 02:48:53 +0000568VERSION=2.0
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000569
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000570# NEXTSTEP stuff
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000571if test -f /usr/lib/NextStep/software_version -o -f /System/Library/CoreServices/software_version ; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000572
573 echo $ac_n "checking for --with-next-archs""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +0000574echo "configure:575: checking for --with-next-archs" >&5
Guido van Rossum563e7081996-09-10 18:20:48 +0000575 # Check whether --with-next-archs or --without-next-archs was given.
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000576if test "${with_next_archs+set}" = set; then
577 withval="$with_next_archs"
578
Guido van Rossum563e7081996-09-10 18:20:48 +0000579 if test -n "$withval"; then
580 ac_arch_flags=`/usr/lib/arch_tool -archify_list $withval`
581 # GCC does not currently support multi archs on the NeXT
582 with_gcc=no
583 fi
584 echo "$ac_t""$with_next_archs" 1>&6
585
586else
587 echo "$ac_t""none: using `arch`" 1>&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000588fi
589
Guido van Rossum563e7081996-09-10 18:20:48 +0000590
591 if test -z "$MACHDEP"
592 then
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000593 set X `hostinfo | egrep '(NeXT Mach|Kernel Release).*:' | \
Guido van Rossum563e7081996-09-10 18:20:48 +0000594 sed -e 's/://' -e 's/\./_/'` && \
595 ac_sys_system=next && ac_sys_release=$4
596
Guido van Rossumb97ef171997-09-28 05:44:03 +0000597 MACHDEP="$ac_sys_system$ac_sys_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000598 fi
599fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000600
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000601# Check whether --with-next-framework or --without-next-framework was given.
602if test "${with_next_framework+set}" = set; then
603 withval="$with_next_framework"
604 :
605fi
606
607# Check whether --with-dyld or --without-dyld was given.
608if test "${with_dyld+set}" = set; then
609 withval="$with_dyld"
610 :
611fi
612
Guido van Rossum91922671997-10-09 20:24:13 +0000613
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000614# Set name for machine-dependent library files
615
616echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +0000617echo "configure:618: checking MACHDEP" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000618if test -z "$MACHDEP"
619then
Guido van Rossum563e7081996-09-10 18:20:48 +0000620 ac_sys_system=`uname -s`
Trent Mick635f6fb2000-08-23 21:33:05 +0000621 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000622 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000623 else
Guido van Rossum563e7081996-09-10 18:20:48 +0000624 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000625 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000626 ac_md_system=`echo $ac_sys_system |
627 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
628 ac_md_release=`echo $ac_sys_release |
629 tr -d '/ ' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +0000630 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000631
Guido van Rossum07397971997-04-29 21:49:50 +0000632 case $MACHDEP in
Guido van Rossumb97ef171997-09-28 05:44:03 +0000633 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000634 esac
635fi
Guido van Rossum91922671997-10-09 20:24:13 +0000636
637#
638# SGI compilers allow the specification of the both the ABI and the
639# ISA on the command line. Depending on the values of these switches,
640# different and often incompatable code will be generated.
641#
642# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
643# thus supply support for various ABI/ISA combinations. The MACHDEP
644# variable is also adjusted.
645#
646
647if test ! -z "$SGI_ABI"
648then
649 CC="cc $SGI_ABI"
650 LDFLAGS="$SGI_ABI $LDFLAGS"
651 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
652fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000653echo "$ac_t""$MACHDEP" 1>&6
654
Guido van Rossum91922671997-10-09 20:24:13 +0000655#
656# CCC is the command that compiles C++ programs
657#
658# Not all make programs have this predefined.
659#
Guido van Rossum95012191999-12-16 17:50:52 +0000660#AC_SUBST(SET_CCC)
661#AC_MSG_CHECKING(CCC)
662#if test -z "$CCC"
663#then
664# case $ac_sys_system in
665# IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";;
666# Linux*) SET_CCC="CCC= g++";;
667# *) SET_CCC=""
668# esac
669#else
670# SET_CCC="CCC= ${CCC}"
671#fi
672#AC_MSG_RESULT($SET_CCC)
Guido van Rossum91922671997-10-09 20:24:13 +0000673
674
Guido van Rossum627b2d71993-12-24 10:39:16 +0000675# checks for alternative programs
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000676echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +0000677echo "configure:678: checking for --without-gcc" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000678# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000679if test "${with_gcc+set}" = set; then
680 withval="$with_gcc"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000681
682 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000683 no) CC=cc
684 without_gcc=yes;;
685 yes) CC=gcc
686 without_gcc=no;;
687 *) CC=$withval
688 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000689 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000690else
Guido van Rossume77438c1995-09-13 18:59:59 +0000691
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000692 case $ac_sys_system in
Guido van Rossume77438c1995-09-13 18:59:59 +0000693 OSF1) CC=cc
694 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000695 BeOS*)
696 # Dunno if it's a good idea to get this over with all at once, or
697 # to handle it in with the other goodies.
698 MACHDEP=beos
699
700 case $BE_HOST_CPU in
701 ppc)
Guido van Rossum81376801999-04-06 15:50:51 +0000702 CC="mwcc -I$PWD/BeOS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000703 without_gcc=yes
Guido van Rossum6b9da451999-03-24 17:48:12 +0000704 case `uname -r` in
705 4.0*) OPT="-DUSE_DL_EXPORT -O7 -opt schedule604 -export pragma" ;;
706 *) OPT="-DUSE_DL_EXPORT -O2 -proc 604e -export pragma" ;;
707 esac
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000708 CCSHARED=-UUSE_DL_EXPORT
709 LDFLAGS="$LDFLAGS -nodup"
710
711 AR="$PWD/BeOS/ar-fake"
712 RANLIB=:
713
714 cat >> confdefs.h <<\EOF
715#define DL_EXPORT_HEADER "dl_export.h"
716EOF
717
718 ;;
719 x86)
720 CC="gcc -I$PWD/BeOS"
721 without_gcc=no
Guido van Rossum32000e82000-05-22 21:31:50 +0000722 OPT="-DUSE_DL_EXPORT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000723 CCSHARED=-UUSE_DL_EXPORT
724
725 AR="$PWD/BeOS/ar-fake"
726 RANLIB=:
727
728 cat >> confdefs.h <<\EOF
729#define DL_EXPORT_HEADER "dl_export.h"
730EOF
731
732 ;;
733 *)
734 { echo "configure: error: Your BeOS system isn't PowerPC or x86... neat" 1>&2; exit 1; }
735 ;;
736 esac
737 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +0000738 Monterey*)
739 RANLIB=:
740 without_gcc=;;
Guido van Rossume77438c1995-09-13 18:59:59 +0000741 *) without_gcc=no;;
742 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000743fi
744
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000745echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000746
Guido van Rossum95012191999-12-16 17:50:52 +0000747
748
749MAINOBJ=python.o
750echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +0000751echo "configure:752: checking for --with-cxx=<compiler>" >&5
Guido van Rossum95012191999-12-16 17:50:52 +0000752# Check whether --with-cxx or --without-cxx was given.
753if test "${with_cxx+set}" = set; then
754 withval="$with_cxx"
755
756 case $withval in
757 no) CXX=
758 with_cxx=no;;
759 *) CXX=$withval
760 MAINOBJ=ccpython.o
761 with_cxx=$withval;;
762 esac
763else
764
765 with_cxx=no
766
767fi
768
769echo "$ac_t""$with_cxx" 1>&6
770SET_CXX="CXX = $CXX"
771
772#AC_MSG_CHECKING(CCC)
773#if test -z "$CCC"
774#then
775# case $ac_sys_system in
776# IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";;
777# Linux*) SET_CCC="CCC= g++";;
778# *) SET_CCC=""
779# esac
780#else
781# SET_CCC="CCC= ${CCC}"
782#fi
783#AC_MSG_RESULT($SET_CCC)
784
Guido van Rossum8b131c51995-03-09 14:10:13 +0000785# If the user switches compilers, we can't believe the cache
786if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
787then
788 { echo "configure: error: cached CC is different -- throw away $cache_file
789(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
790fi
791
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000792# Extract the first word of "gcc", so it can be a program name with args.
793set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000794echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +0000795echo "configure:796: checking for $ac_word" >&5
796if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000797 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000798else
799 if test -n "$CC"; then
800 ac_cv_prog_CC="$CC" # Let the user override the test.
801else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000802 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
803 ac_dummy="$PATH"
804 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000805 test -z "$ac_dir" && ac_dir=.
806 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000807 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000808 break
809 fi
810 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000811 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000812fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000813fi
814CC="$ac_cv_prog_CC"
815if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000816 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000817else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000818 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000819fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000820
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000821if test -z "$CC"; then
822 # Extract the first word of "cc", so it can be a program name with args.
823set dummy cc; ac_word=$2
824echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +0000825echo "configure:826: checking for $ac_word" >&5
826if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000827 echo $ac_n "(cached) $ac_c" 1>&6
828else
829 if test -n "$CC"; then
830 ac_cv_prog_CC="$CC" # Let the user override the test.
831else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000832 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000833 ac_prog_rejected=no
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000834 ac_dummy="$PATH"
835 for ac_dir in $ac_dummy; do
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000836 test -z "$ac_dir" && ac_dir=.
837 if test -f $ac_dir/$ac_word; then
838 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
839 ac_prog_rejected=yes
840 continue
841 fi
842 ac_cv_prog_CC="cc"
843 break
844 fi
845 done
846 IFS="$ac_save_ifs"
847if test $ac_prog_rejected = yes; then
848 # We found a bogon in the path, so make sure we never use it.
849 set dummy $ac_cv_prog_CC
850 shift
851 if test $# -gt 0; then
852 # We chose a different compiler from the bogus one.
853 # However, it has the same basename, so the bogon will be chosen
854 # first if we set CC to just the basename; use the full file name.
855 shift
856 set dummy "$ac_dir/$ac_word" "$@"
857 shift
858 ac_cv_prog_CC="$@"
859 fi
860fi
861fi
862fi
863CC="$ac_cv_prog_CC"
864if test -n "$CC"; then
865 echo "$ac_t""$CC" 1>&6
866else
867 echo "$ac_t""no" 1>&6
868fi
869
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000870 if test -z "$CC"; then
871 case "`uname -s`" in
Guido van Rossum9e8181b2000-09-19 00:46:46 +0000872 *win32* | *WIN32*)
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000873 # Extract the first word of "cl", so it can be a program name with args.
874set dummy cl; ac_word=$2
875echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +0000876echo "configure:877: checking for $ac_word" >&5
877if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000878 echo $ac_n "(cached) $ac_c" 1>&6
879else
880 if test -n "$CC"; then
881 ac_cv_prog_CC="$CC" # Let the user override the test.
882else
883 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
884 ac_dummy="$PATH"
885 for ac_dir in $ac_dummy; do
886 test -z "$ac_dir" && ac_dir=.
887 if test -f $ac_dir/$ac_word; then
888 ac_cv_prog_CC="cl"
889 break
890 fi
891 done
892 IFS="$ac_save_ifs"
893fi
894fi
895CC="$ac_cv_prog_CC"
896if test -n "$CC"; then
897 echo "$ac_t""$CC" 1>&6
898else
899 echo "$ac_t""no" 1>&6
900fi
901 ;;
902 esac
903 fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000904 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
905fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000906
Guido van Rossum9e8181b2000-09-19 00:46:46 +0000907echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
908echo "configure:909: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000909
910ac_ext=c
911# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
912ac_cpp='$CPP $CPPFLAGS'
913ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000914ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000915cross_compiling=$ac_cv_prog_cc_cross
916
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000917cat > conftest.$ac_ext << EOF
918
Guido van Rossum9e8181b2000-09-19 00:46:46 +0000919#line 920 "configure"
Guido van Rossumf78abae1997-01-21 22:02:36 +0000920#include "confdefs.h"
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000921
Guido van Rossumf78abae1997-01-21 22:02:36 +0000922main(){return(0);}
923EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +0000924if { (eval echo configure:925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000925 ac_cv_prog_cc_works=yes
926 # If we can't run a trivial program, we are probably using a cross compiler.
927 if (./conftest; exit) 2>/dev/null; then
928 ac_cv_prog_cc_cross=no
929 else
930 ac_cv_prog_cc_cross=yes
931 fi
932else
933 echo "configure: failed program was:" >&5
934 cat conftest.$ac_ext >&5
935 ac_cv_prog_cc_works=no
936fi
937rm -fr conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000938ac_ext=c
939# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
940ac_cpp='$CPP $CPPFLAGS'
941ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
942ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
943cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossumf78abae1997-01-21 22:02:36 +0000944
945echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
946if test $ac_cv_prog_cc_works = no; then
947 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
948fi
Guido van Rossum9e8181b2000-09-19 00:46:46 +0000949echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
950echo "configure:951: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000951echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
952cross_compiling=$ac_cv_prog_cc_cross
953
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000954echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +0000955echo "configure:956: checking whether we are using GNU C" >&5
956if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000957 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000958else
959 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000960#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000961 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +0000962#endif
963EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +0000964if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:965: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000965 ac_cv_prog_gcc=yes
966else
967 ac_cv_prog_gcc=no
968fi
969fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000970
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000971echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +0000972
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000973if test $ac_cv_prog_gcc = yes; then
974 GCC=yes
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000975else
976 GCC=
977fi
978
979ac_test_CFLAGS="${CFLAGS+set}"
980ac_save_CFLAGS="$CFLAGS"
981CFLAGS=
982echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +0000983echo "configure:984: checking whether ${CC-cc} accepts -g" >&5
984if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000985 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000986else
987 echo 'void f(){}' > conftest.c
988if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000989 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000990else
Guido van Rossumf78abae1997-01-21 22:02:36 +0000991 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000992fi
993rm -f conftest*
994
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000995fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000996
Guido van Rossumf78abae1997-01-21 22:02:36 +0000997echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000998if test "$ac_test_CFLAGS" = set; then
999 CFLAGS="$ac_save_CFLAGS"
1000elif test $ac_cv_prog_cc_g = yes; then
1001 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001002 CFLAGS="-g -O2"
1003 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001004 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001005 fi
1006else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001007 if test "$GCC" = yes; then
1008 CFLAGS="-O2"
1009 else
1010 CFLAGS=
1011 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001012fi
1013
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001014
Guido van Rossumdd997f71998-10-07 19:58:26 +00001015case $MACHDEP in
1016bsdos*)
1017 case $CC in
1018 gcc) CC="$CC -D_HAVE_BSDI";;
1019 esac;;
1020esac
1021
Guido van Rossum24b1e751997-08-21 02:29:16 +00001022case $ac_sys_system in
1023hp*|HP*)
1024 case $CC in
1025 cc|*/cc) CC="$CC -Aa -D_HPUX_SOURCE";;
1026 esac;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001027BeOS*)
1028 case $CC in
1029 cc) CC=cc;;
1030 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001031Monterey*)
1032 case $CC in
1033 cc) CC="$CC -Wl,-Bexport";;
1034 esac;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001035esac
1036
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001037# LDLIBRARY is the name of the library to link against (as opposed to the
1038# name of the library into which to insert object files). On systems
1039# without shared libraries, LDLIBRARY is the same as LIBRARY (defined in
1040# the Makefiles).
1041
1042
1043LDLIBRARY=''
1044
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001045# LINKCC is the command that links the python executable -- default is $(CC).
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001046# This is altered for AIX and BeOS in order to build the export list before
1047# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001048
1049echo $ac_n "checking LINKCC""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001050echo "configure:1051: checking LINKCC" >&5
Guido van Rossum95012191999-12-16 17:50:52 +00001051if test -z "$LINKCC" -a ! -z "$CXX"
1052then
1053 LINKCC="$CXX"
1054fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001055if test -z "$LINKCC"
1056then
1057 case $ac_sys_system in
1058 AIX*)
Guido van Rossum45140f91997-08-29 18:44:06 +00001059 LINKCC="\$(srcdir)/makexp_aix python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001060 BeOS*)
Guido van Rossumea516321998-12-17 18:08:55 +00001061 LINKCC="\$(srcdir)/../BeOS/linkcc \$(LIBRARY) \$(PURIFY) \$(CC) \$(OPT)"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001062 LDLIBRARY='libpython$(VERSION).so';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001063 dgux*)
1064 LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";;
Trent Mick635f6fb2000-08-23 21:33:05 +00001065 Monterey64*)
1066 LINKCC="\$(PURIFY) \$(CC) -L/usr/lib/ia64l64";;
Guido van Rossum25f93031997-08-18 16:00:04 +00001067 *) LINKCC="\$(PURIFY) \$(CC)";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001068 esac
1069fi
1070echo "$ac_t""$LINKCC" 1>&6
1071
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001072echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001073echo "configure:1074: checking LDLIBRARY" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001074
1075# NeXT framework builds require that the 'ar' library be converted into
1076# a bundle using libtool.
1077if test "$with_next_framework"
1078then
1079 LDLIBRARY='libpython$(VERSION).dylib'
1080fi
1081
1082# DG/UX requires some fancy ld contortions to produce a .so from an .a
1083if test "$MACHDEP" = "dguxR4"
1084then
1085 LDLIBRARY='libpython$(VERSION).so'
1086 OPT="$OPT -pic"
1087fi
1088echo "$ac_t""$LDLIBRARY" 1>&6
1089
1090# If LDLIBRARY is different from LIBRARY, emit a rule to build it.
1091if test -z "$LDLIBRARY"
1092then
1093 LDLIBRARY='libpython$(VERSION).a'
1094 MAKE_LDLIBRARY="true"
1095else
1096 MAKE_LDLIBRARY='$(MAKE) $(LDLIBRARY)'
1097fi
1098
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001099# Extract the first word of "ranlib", so it can be a program name with args.
1100set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001101echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001102echo "configure:1103: checking for $ac_word" >&5
1103if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001104 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001105else
1106 if test -n "$RANLIB"; then
1107 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1108else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001109 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1110 ac_dummy="$PATH"
1111 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001112 test -z "$ac_dir" && ac_dir=.
1113 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001114 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001115 break
1116 fi
1117 done
Guido van Rossum7f43da71994-08-01 12:15:30 +00001118 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001119 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001120fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001121fi
1122RANLIB="$ac_cv_prog_RANLIB"
1123if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001124 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001125else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001126 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001127fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001128
1129
Guido van Rossum7f43da71994-08-01 12:15:30 +00001130for ac_prog in ar aal
1131do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001132# Extract the first word of "$ac_prog", so it can be a program name with args.
1133set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001134echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001135echo "configure:1136: checking for $ac_word" >&5
1136if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001137 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001138else
1139 if test -n "$AR"; then
1140 ac_cv_prog_AR="$AR" # Let the user override the test.
1141else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001142 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1143 ac_dummy="$PATH"
1144 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145 test -z "$ac_dir" && ac_dir=.
1146 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001147 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001148 break
1149 fi
1150 done
1151 IFS="$ac_save_ifs"
1152fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001153fi
1154AR="$ac_cv_prog_AR"
1155if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001156 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001157else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001158 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001159fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001160
1161test -n "$AR" && break
1162done
1163test -n "$AR" || AR="ar"
1164
1165
Guido van Rossumda88dad1995-01-26 00:46:29 +00001166
1167
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001168# Install just never works :-(
1169if test -z "$INSTALL"
Guido van Rossumda88dad1995-01-26 00:46:29 +00001170then
1171 INSTALL=cp
1172 INSTALL_PROGRAM=cp
1173 INSTALL_DATA=cp
1174else
1175 INSTALL_PROGRAM="$INSTALL"
1176 INSTALL_DATA="$INSTALL -m 644"
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001177fi
1178
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001179# Not every filesystem supports hard links
1180
1181if test -z "$LN" ; then
1182 case $ac_sys_system in
1183 BeOS*) LN="ln -s";;
1184 *) LN=ln;;
1185 esac
1186fi
1187
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001188# Optimizer/debugger flags passed between Makefiles
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001189
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001190if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001191then
Guido van Rossumedca74a1997-07-18 23:29:40 +00001192 case $GCC in
1193 yes)
1194 case $ac_cv_prog_cc_g in
1195 yes) OPT="-g -O2";;
1196 *) OPT="-O2";;
1197 esac
1198 ;;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001199 *) OPT="-O";;
1200 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001201fi
1202
Trent Mick635f6fb2000-08-23 21:33:05 +00001203# The current (beta) Monterey compiler dies with optimizations
1204case $ac_sys_system in
1205Monterey*) OPT="";;
1206esac
1207
Guido van Rossum563e7081996-09-10 18:20:48 +00001208if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00001209then
1210 OPT="$OPT $ac_arch_flags"
1211fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001212# checks for UNIX variants that set C preprocessor variables
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001213echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001214echo "configure:1215: checking how to run the C preprocessor" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001215# On Suns, sometimes $CPP names a directory.
1216if test -n "$CPP" && test -d "$CPP"; then
1217 CPP=
1218fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001219if test -z "$CPP"; then
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001220if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001221 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001222else
1223 # This must be in double quotes, not single quotes, because CPP may get
1224 # substituted into the Makefile and "${CC-cc}" will confuse make.
Guido van Rossum627b2d71993-12-24 10:39:16 +00001225 CPP="${CC-cc} -E"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001226 # On the NeXT, cc -E runs the code through the compiler's parser,
1227 # not just through cpp.
1228 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001229#line 1230 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001230#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001231#include <assert.h>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001232Syntax Error
1233EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001234ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001235{ (eval echo configure:1236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001236ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001237if test -z "$ac_err"; then
1238 :
1239else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001240 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001241 echo "configure: failed program was:" >&5
1242 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00001243 rm -rf conftest*
1244 CPP="${CC-cc} -E -traditional-cpp"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001245 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001246#line 1247 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001247#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001248#include <assert.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001249Syntax Error
1250EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001251ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001252{ (eval echo configure:1253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001253ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1254if test -z "$ac_err"; then
1255 :
1256else
1257 echo "$ac_err" >&5
1258 echo "configure: failed program was:" >&5
1259 cat conftest.$ac_ext >&5
1260 rm -rf conftest*
1261 CPP="${CC-cc} -nologo -E"
1262 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001263#line 1264 "configure"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001264#include "confdefs.h"
1265#include <assert.h>
1266Syntax Error
1267EOF
1268ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001269{ (eval echo configure:1270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001270ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001271if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001272 :
1273else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001274 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001275 echo "configure: failed program was:" >&5
1276 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001277 rm -rf conftest*
1278 CPP=/lib/cpp
1279fi
1280rm -f conftest*
1281fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001282rm -f conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001283fi
1284rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001285 ac_cv_prog_CPP="$CPP"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001286fi
Guido van Rossume77438c1995-09-13 18:59:59 +00001287 CPP="$ac_cv_prog_CPP"
1288else
1289 ac_cv_prog_CPP="$CPP"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001290fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001291echo "$ac_t""$CPP" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001292
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001293echo $ac_n "checking for AIX""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001294echo "configure:1295: checking for AIX" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001295cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001296#line 1297 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001297#include "confdefs.h"
1298#ifdef _AIX
1299 yes
1300#endif
1301
1302EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001303if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1304 egrep "yes" >/dev/null 2>&1; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001305 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001306 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001307#define _ALL_SOURCE 1
1308EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001309
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001310else
1311 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001312 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001313fi
1314rm -f conftest*
1315
1316
Guido van Rossumf78abae1997-01-21 22:02:36 +00001317ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001318echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001319echo "configure:1320: checking for minix/config.h" >&5
1320if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001321 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001322else
1323 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001324#line 1325 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001325#include "confdefs.h"
1326#include <minix/config.h>
1327EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001328ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001329{ (eval echo configure:1330: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001330ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001331if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001332 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001333 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001334else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001335 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001336 echo "configure: failed program was:" >&5
1337 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001338 rm -rf conftest*
1339 eval "ac_cv_header_$ac_safe=no"
1340fi
1341rm -f conftest*
1342fi
1343if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001344 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001345 MINIX=yes
1346else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001347 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001348MINIX=
Guido van Rossum627b2d71993-12-24 10:39:16 +00001349fi
1350
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001351if test "$MINIX" = yes; then
1352 cat >> confdefs.h <<\EOF
1353#define _POSIX_SOURCE 1
1354EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001355
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001356 cat >> confdefs.h <<\EOF
1357#define _POSIX_1_SOURCE 2
1358EOF
1359
1360 cat >> confdefs.h <<\EOF
1361#define _MINIX 1
1362EOF
1363
1364fi
1365
Guido van Rossumda88dad1995-01-26 00:46:29 +00001366
Guido van Rossum91922671997-10-09 20:24:13 +00001367echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001368echo "configure:1369: checking whether $CC accepts -OPT:Olimit=0" >&5
1369if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then
Guido van Rossum91922671997-10-09 20:24:13 +00001370 echo $ac_n "(cached) $ac_c" 1>&6
1371else
1372 ac_save_cc="$CC"
1373CC="$CC -OPT:Olimit=0"
1374if test "$cross_compiling" = yes; then
1375 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1376else
1377 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001378#line 1379 "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00001379#include "confdefs.h"
1380int main() { return 0; }
1381EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001382if { (eval echo configure:1383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossum91922671997-10-09 20:24:13 +00001383then
1384 ac_cv_opt_olimit_ok=yes
1385else
1386 echo "configure: failed program was:" >&5
1387 cat conftest.$ac_ext >&5
1388 rm -fr conftest*
1389 ac_cv_opt_olimit_ok=no
1390fi
1391rm -fr conftest*
1392fi
1393
1394CC="$ac_save_cc"
1395fi
1396
1397echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00001398if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum304dd2d1997-10-20 23:10:56 +00001399 OPT="$OPT -OPT:Olimit=0"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001400else
1401 echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001402echo "configure:1403: checking whether $CC accepts -Olimit 1500" >&5
1403 if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001404 echo $ac_n "(cached) $ac_c" 1>&6
1405else
1406 ac_save_cc="$CC"
1407 CC="$CC -Olimit 1500"
1408 if test "$cross_compiling" = yes; then
1409 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1410else
1411 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001412#line 1413 "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001413#include "confdefs.h"
1414int main() { return 0; }
1415EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001416if { (eval echo configure:1417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001417then
1418 ac_cv_olimit_ok=yes
1419else
1420 echo "configure: failed program was:" >&5
1421 cat conftest.$ac_ext >&5
1422 rm -fr conftest*
1423 ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00001424fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001425rm -fr conftest*
1426fi
1427
1428 CC="$ac_save_cc"
1429fi
1430
1431 echo "$ac_t""$ac_cv_olimit_ok" 1>&6
1432 if test $ac_cv_olimit_ok = yes; then
1433 OPT="$OPT -Olimit 1500"
1434 fi
1435fi
1436
Guido van Rossum84e7b241996-08-19 21:59:00 +00001437
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001438# checks for header files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001439echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001440echo "configure:1441: checking for ANSI C header files" >&5
1441if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001442 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001443else
1444 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001445#line 1446 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001446#include "confdefs.h"
1447#include <stdlib.h>
1448#include <stdarg.h>
1449#include <string.h>
1450#include <float.h>
1451EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001452ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001453{ (eval echo configure:1454: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001454ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001455if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001456 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001457 ac_cv_header_stdc=yes
1458else
1459 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001460 echo "configure: failed program was:" >&5
1461 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001462 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001463 ac_cv_header_stdc=no
1464fi
1465rm -f conftest*
1466
1467if test $ac_cv_header_stdc = yes; then
1468 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1469cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001470#line 1471 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001471#include "confdefs.h"
1472#include <string.h>
1473EOF
1474if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1475 egrep "memchr" >/dev/null 2>&1; then
1476 :
1477else
1478 rm -rf conftest*
1479 ac_cv_header_stdc=no
1480fi
1481rm -f conftest*
1482
1483fi
1484
1485if test $ac_cv_header_stdc = yes; then
1486 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1487cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001488#line 1489 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001489#include "confdefs.h"
1490#include <stdlib.h>
1491EOF
1492if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1493 egrep "free" >/dev/null 2>&1; then
1494 :
1495else
1496 rm -rf conftest*
1497 ac_cv_header_stdc=no
1498fi
1499rm -f conftest*
1500
1501fi
1502
1503if test $ac_cv_header_stdc = yes; then
1504 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1505if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001506 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001507else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001508 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001509#line 1510 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001510#include "confdefs.h"
1511#include <ctype.h>
1512#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1513#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001514#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00001515int main () { int i; for (i = 0; i < 256; i++)
1516if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1517exit (0); }
1518
1519EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001520if { (eval echo configure:1521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00001521then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001522 :
1523else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001524 echo "configure: failed program was:" >&5
1525 cat conftest.$ac_ext >&5
1526 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001527 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001528fi
1529rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001530fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001531
1532fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001533fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001534
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001535echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001536if test $ac_cv_header_stdc = yes; then
1537 cat >> confdefs.h <<\EOF
1538#define STDC_HEADERS 1
1539EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001540
1541fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001542
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00001543for ac_hdr in dlfcn.h fcntl.h limits.h locale.h ncurses.h poll.h pthread.h \
Guido van Rossum2d38f911996-06-26 19:47:01 +00001544signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h \
Fred Drakea50d6ec2000-08-31 16:13:20 +00001545sys/audioio.h sys/file.h sys/lock.h db_185.h db.h \
Guido van Rossum95713eb2000-05-18 20:53:31 +00001546sys/param.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Fred Drakeae90f8d2000-09-15 03:38:12 +00001547sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
1548ndbm.h db1/ndbm.h gdbm/ndbm.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001549do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001550ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001551echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001552echo "configure:1553: checking for $ac_hdr" >&5
1553if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001554 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001555else
1556 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001557#line 1558 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001558#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001559#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001560EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001561ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001562{ (eval echo configure:1563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001563ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001564if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001565 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001566 eval "ac_cv_header_$ac_safe=yes"
1567else
1568 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001569 echo "configure: failed program was:" >&5
1570 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001571 rm -rf conftest*
1572 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001573fi
1574rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001575fi
1576if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001577 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001578 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001579 cat >> confdefs.h <<EOF
1580#define $ac_tr_hdr 1
1581EOF
1582
1583else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001584 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001585fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001586done
1587
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001588ac_header_dirent=no
1589for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1590do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001591ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001592echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001593echo "configure:1594: checking for $ac_hdr that defines DIR" >&5
1594if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001595 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001596else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001597 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001598#line 1599 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001599#include "confdefs.h"
1600#include <sys/types.h>
1601#include <$ac_hdr>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001602int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001603DIR *dirp = 0;
1604; return 0; }
1605EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001606if { (eval echo configure:1607: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001607 rm -rf conftest*
1608 eval "ac_cv_header_dirent_$ac_safe=yes"
1609else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001610 echo "configure: failed program was:" >&5
1611 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001612 rm -rf conftest*
1613 eval "ac_cv_header_dirent_$ac_safe=no"
1614fi
1615rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001616fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001617if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001618 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001619 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001620 cat >> confdefs.h <<EOF
1621#define $ac_tr_hdr 1
1622EOF
1623 ac_header_dirent=$ac_hdr; break
1624else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001625 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001626fi
1627done
1628# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1629if test $ac_header_dirent = dirent.h; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001630echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001631echo "configure:1632: checking for opendir in -ldir" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001632ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001633if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001634 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001635else
1636 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001637LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001638cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001639#line 1640 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001640#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001641/* Override any gcc2 internal prototype to avoid an error. */
1642/* We use char because int might match the return type of a gcc2
1643 builtin and then its argument prototype would still apply. */
1644char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001645
Guido van Rossumf78abae1997-01-21 22:02:36 +00001646int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001647opendir()
1648; return 0; }
1649EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001650if { (eval echo configure:1651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001651 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001652 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001653else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001654 echo "configure: failed program was:" >&5
1655 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001656 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001657 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001658fi
1659rm -f conftest*
1660LIBS="$ac_save_LIBS"
1661
1662fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001663if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001664 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001665 LIBS="$LIBS -ldir"
1666else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001667 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001668fi
1669
1670else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001671echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001672echo "configure:1673: checking for opendir in -lx" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001673ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001674if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001675 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001676else
1677 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001678LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001679cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001680#line 1681 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001681#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001682/* Override any gcc2 internal prototype to avoid an error. */
1683/* We use char because int might match the return type of a gcc2
1684 builtin and then its argument prototype would still apply. */
1685char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001686
Guido van Rossumf78abae1997-01-21 22:02:36 +00001687int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001688opendir()
1689; return 0; }
1690EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001691if { (eval echo configure:1692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001692 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001693 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001694else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001695 echo "configure: failed program was:" >&5
1696 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001697 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001698 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001699fi
1700rm -f conftest*
1701LIBS="$ac_save_LIBS"
1702
1703fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001704if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001705 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001706 LIBS="$LIBS -lx"
1707else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001708 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001709fi
1710
1711fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001712
1713
1714# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00001715was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001716echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001717echo "configure:1718: checking for clock_t in time.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001718cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001719#line 1720 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001720#include "confdefs.h"
1721#include <time.h>
1722EOF
1723if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1724 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00001725 rm -rf conftest*
1726 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001727else
1728 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001729 cat >> confdefs.h <<\EOF
1730#define clock_t long
1731EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001732
1733fi
1734rm -f conftest*
1735
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001736echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00001737
Guido van Rossum84e7b241996-08-19 21:59:00 +00001738# Add some code to confdefs.h so that the test for off_t works on SCO
1739cat >> confdefs.h <<\EOF
1740#if defined(SCO_DS)
1741#undef _OFF_T
1742#endif
1743EOF
1744
Guido van Rossumef2255b2000-03-10 22:30:29 +00001745# Type availability checks
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001746echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001747echo "configure:1748: checking for mode_t" >&5
1748if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001749 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001750else
1751 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001752#line 1753 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001753#include "confdefs.h"
1754#include <sys/types.h>
1755#if STDC_HEADERS
1756#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001757#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001758#endif
1759EOF
1760if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001761 egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001762 rm -rf conftest*
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001763 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001764else
1765 rm -rf conftest*
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001766 ac_cv_type_mode_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001767fi
1768rm -f conftest*
1769
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001770fi
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001771echo "$ac_t""$ac_cv_type_mode_t" 1>&6
1772if test $ac_cv_type_mode_t = no; then
1773 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001774#define mode_t int
1775EOF
1776
1777fi
1778
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001779echo $ac_n "checking for off_t""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00001780echo "configure:1781: checking for off_t" >&5
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001781if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001782 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001783else
1784 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00001785#line 1786 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001786#include "confdefs.h"
1787#include <sys/types.h>
1788#if STDC_HEADERS
1789#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001790#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001791#endif
1792EOF
1793if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001794 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001795 rm -rf conftest*
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001796 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001797else
1798 rm -rf conftest*
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001799 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001800fi
1801rm -f conftest*
1802
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001803fi
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001804echo "$ac_t""$ac_cv_type_off_t" 1>&6
1805if test $ac_cv_type_off_t = no; then
1806 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001807#define off_t long
1808EOF
1809
1810fi
1811
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001812echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001813echo "configure:1814: checking for pid_t" >&5
1814if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001815 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001816else
1817 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001818#line 1819 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001819#include "confdefs.h"
1820#include <sys/types.h>
1821#if STDC_HEADERS
1822#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001823#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001824#endif
1825EOF
1826if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001827 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001828 rm -rf conftest*
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001829 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001830else
1831 rm -rf conftest*
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001832 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001833fi
1834rm -f conftest*
1835
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001836fi
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001837echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1838if test $ac_cv_type_pid_t = no; then
1839 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001840#define pid_t int
1841EOF
1842
1843fi
1844
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001845echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001846echo "configure:1847: checking return type of signal handlers" >&5
1847if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001848 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001849else
1850 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001851#line 1852 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001852#include "confdefs.h"
1853#include <sys/types.h>
1854#include <signal.h>
1855#ifdef signal
1856#undef signal
1857#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001858#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001859extern "C" void (*signal (int, void (*)(int)))(int);
1860#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001861void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001862#endif
1863
Guido van Rossumf78abae1997-01-21 22:02:36 +00001864int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001865int i;
1866; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001867EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001868if { (eval echo configure:1869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001869 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001870 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00001871else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001872 echo "configure: failed program was:" >&5
1873 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001874 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001875 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00001876fi
1877rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001878fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001879
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001880echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001881cat >> confdefs.h <<EOF
1882#define RETSIGTYPE $ac_cv_type_signal
1883EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001884
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001885
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001886echo $ac_n "checking for size_t""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001887echo "configure:1888: checking for size_t" >&5
1888if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001889 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001890else
1891 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001892#line 1893 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001893#include "confdefs.h"
1894#include <sys/types.h>
1895#if STDC_HEADERS
1896#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001897#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001898#endif
1899EOF
1900if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001901 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001902 rm -rf conftest*
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001903 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001904else
1905 rm -rf conftest*
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001906 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001907fi
1908rm -f conftest*
1909
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001910fi
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001911echo "$ac_t""$ac_cv_type_size_t" 1>&6
1912if test $ac_cv_type_size_t = no; then
1913 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001914#define size_t unsigned
1915EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001916
1917fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001918
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001919echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001920echo "configure:1921: checking for uid_t in sys/types.h" >&5
1921if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001922 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001923else
1924 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001925#line 1926 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001926#include "confdefs.h"
1927#include <sys/types.h>
1928EOF
1929if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1930 egrep "uid_t" >/dev/null 2>&1; then
1931 rm -rf conftest*
1932 ac_cv_type_uid_t=yes
1933else
1934 rm -rf conftest*
1935 ac_cv_type_uid_t=no
1936fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001937rm -f conftest*
1938
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001939fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001940
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001941echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001942if test $ac_cv_type_uid_t = no; then
1943 cat >> confdefs.h <<\EOF
1944#define uid_t int
1945EOF
1946
1947 cat >> confdefs.h <<\EOF
1948#define gid_t int
1949EOF
1950
1951fi
1952
Guido van Rossum627b2d71993-12-24 10:39:16 +00001953
Guido van Rossumef2255b2000-03-10 22:30:29 +00001954# Sizes of various common basic types
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001955echo $ac_n "checking size of int""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001956echo "configure:1957: checking size of int" >&5
1957if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001958 echo $ac_n "(cached) $ac_c" 1>&6
1959else
1960 if test "$cross_compiling" = yes; then
1961 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1962else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001963 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001964#line 1965 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001965#include "confdefs.h"
1966#include <stdio.h>
1967main()
1968{
1969 FILE *f=fopen("conftestval", "w");
1970 if (!f) exit(1);
1971 fprintf(f, "%d\n", sizeof(int));
1972 exit(0);
1973}
1974EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001975if { (eval echo configure:1976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00001976then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001977 ac_cv_sizeof_int=`cat conftestval`
1978else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001979 echo "configure: failed program was:" >&5
1980 cat conftest.$ac_ext >&5
1981 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001982 ac_cv_sizeof_int=0
1983fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001984rm -fr conftest*
1985fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001986
1987fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001988echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1989cat >> confdefs.h <<EOF
1990#define SIZEOF_INT $ac_cv_sizeof_int
1991EOF
1992
1993
1994echo $ac_n "checking size of long""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001995echo "configure:1996: checking size of long" >&5
1996if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001997 echo $ac_n "(cached) $ac_c" 1>&6
1998else
1999 if test "$cross_compiling" = yes; then
2000 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2001else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002002 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002003#line 2004 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002004#include "confdefs.h"
2005#include <stdio.h>
2006main()
2007{
2008 FILE *f=fopen("conftestval", "w");
2009 if (!f) exit(1);
2010 fprintf(f, "%d\n", sizeof(long));
2011 exit(0);
2012}
2013EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002014if { (eval echo configure:2015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00002015then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002016 ac_cv_sizeof_long=`cat conftestval`
2017else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002018 echo "configure: failed program was:" >&5
2019 cat conftest.$ac_ext >&5
2020 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002021 ac_cv_sizeof_long=0
2022fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002023rm -fr conftest*
2024fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002025
2026fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002027echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2028cat >> confdefs.h <<EOF
2029#define SIZEOF_LONG $ac_cv_sizeof_long
2030EOF
2031
2032
Guido van Rossumad678af1998-10-02 14:42:15 +00002033echo $ac_n "checking size of void *""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002034echo "configure:2035: checking size of void *" >&5
2035if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002036 echo $ac_n "(cached) $ac_c" 1>&6
2037else
2038 if test "$cross_compiling" = yes; then
2039 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2040else
2041 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002042#line 2043 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002043#include "confdefs.h"
2044#include <stdio.h>
2045main()
2046{
2047 FILE *f=fopen("conftestval", "w");
2048 if (!f) exit(1);
2049 fprintf(f, "%d\n", sizeof(void *));
2050 exit(0);
2051}
2052EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002053if { (eval echo configure:2054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumad678af1998-10-02 14:42:15 +00002054then
2055 ac_cv_sizeof_void_p=`cat conftestval`
2056else
2057 echo "configure: failed program was:" >&5
2058 cat conftest.$ac_ext >&5
2059 rm -fr conftest*
2060 ac_cv_sizeof_void_p=0
2061fi
2062rm -fr conftest*
2063fi
2064
2065fi
2066echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2067cat >> confdefs.h <<EOF
2068#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2069EOF
2070
2071
Guido van Rossumef2255b2000-03-10 22:30:29 +00002072echo $ac_n "checking size of char""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002073echo "configure:2074: checking size of char" >&5
2074if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002075 echo $ac_n "(cached) $ac_c" 1>&6
2076else
2077 if test "$cross_compiling" = yes; then
2078 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2079else
2080 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002081#line 2082 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002082#include "confdefs.h"
2083#include <stdio.h>
2084main()
2085{
2086 FILE *f=fopen("conftestval", "w");
2087 if (!f) exit(1);
2088 fprintf(f, "%d\n", sizeof(char));
2089 exit(0);
2090}
2091EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002092if { (eval echo configure:2093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumef2255b2000-03-10 22:30:29 +00002093then
2094 ac_cv_sizeof_char=`cat conftestval`
2095else
2096 echo "configure: failed program was:" >&5
2097 cat conftest.$ac_ext >&5
2098 rm -fr conftest*
2099 ac_cv_sizeof_char=0
2100fi
2101rm -fr conftest*
2102fi
2103
2104fi
2105echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2106cat >> confdefs.h <<EOF
2107#define SIZEOF_CHAR $ac_cv_sizeof_char
2108EOF
2109
2110
2111echo $ac_n "checking size of short""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002112echo "configure:2113: checking size of short" >&5
2113if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002114 echo $ac_n "(cached) $ac_c" 1>&6
2115else
2116 if test "$cross_compiling" = yes; then
2117 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2118else
2119 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002120#line 2121 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002121#include "confdefs.h"
2122#include <stdio.h>
2123main()
2124{
2125 FILE *f=fopen("conftestval", "w");
2126 if (!f) exit(1);
2127 fprintf(f, "%d\n", sizeof(short));
2128 exit(0);
2129}
2130EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002131if { (eval echo configure:2132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumef2255b2000-03-10 22:30:29 +00002132then
2133 ac_cv_sizeof_short=`cat conftestval`
2134else
2135 echo "configure: failed program was:" >&5
2136 cat conftest.$ac_ext >&5
2137 rm -fr conftest*
2138 ac_cv_sizeof_short=0
2139fi
2140rm -fr conftest*
2141fi
2142
2143fi
2144echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2145cat >> confdefs.h <<EOF
2146#define SIZEOF_SHORT $ac_cv_sizeof_short
2147EOF
2148
2149
2150echo $ac_n "checking size of float""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002151echo "configure:2152: checking size of float" >&5
2152if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002153 echo $ac_n "(cached) $ac_c" 1>&6
2154else
2155 if test "$cross_compiling" = yes; then
2156 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2157else
2158 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002159#line 2160 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002160#include "confdefs.h"
2161#include <stdio.h>
2162main()
2163{
2164 FILE *f=fopen("conftestval", "w");
2165 if (!f) exit(1);
2166 fprintf(f, "%d\n", sizeof(float));
2167 exit(0);
2168}
2169EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002170if { (eval echo configure:2171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumef2255b2000-03-10 22:30:29 +00002171then
2172 ac_cv_sizeof_float=`cat conftestval`
2173else
2174 echo "configure: failed program was:" >&5
2175 cat conftest.$ac_ext >&5
2176 rm -fr conftest*
2177 ac_cv_sizeof_float=0
2178fi
2179rm -fr conftest*
2180fi
2181
2182fi
2183echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2184cat >> confdefs.h <<EOF
2185#define SIZEOF_FLOAT $ac_cv_sizeof_float
2186EOF
2187
2188
2189echo $ac_n "checking size of double""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002190echo "configure:2191: checking size of double" >&5
2191if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002192 echo $ac_n "(cached) $ac_c" 1>&6
2193else
2194 if test "$cross_compiling" = yes; then
2195 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2196else
2197 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002198#line 2199 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002199#include "confdefs.h"
2200#include <stdio.h>
2201main()
2202{
2203 FILE *f=fopen("conftestval", "w");
2204 if (!f) exit(1);
2205 fprintf(f, "%d\n", sizeof(double));
2206 exit(0);
2207}
2208EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002209if { (eval echo configure:2210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumef2255b2000-03-10 22:30:29 +00002210then
2211 ac_cv_sizeof_double=`cat conftestval`
2212else
2213 echo "configure: failed program was:" >&5
2214 cat conftest.$ac_ext >&5
2215 rm -fr conftest*
2216 ac_cv_sizeof_double=0
2217fi
2218rm -fr conftest*
2219fi
2220
2221fi
2222echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2223cat >> confdefs.h <<EOF
2224#define SIZEOF_DOUBLE $ac_cv_sizeof_double
2225EOF
2226
2227
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002228echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002229echo "configure:2230: checking size of fpos_t" >&5
2230if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002231 echo $ac_n "(cached) $ac_c" 1>&6
2232else
2233 if test "$cross_compiling" = yes; then
2234 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2235else
2236 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002237#line 2238 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002238#include "confdefs.h"
2239#include <stdio.h>
2240main()
2241{
2242 FILE *f=fopen("conftestval", "w");
2243 if (!f) exit(1);
2244 fprintf(f, "%d\n", sizeof(fpos_t));
2245 exit(0);
2246}
2247EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002248if { (eval echo configure:2249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002249then
2250 ac_cv_sizeof_fpos_t=`cat conftestval`
2251else
2252 echo "configure: failed program was:" >&5
2253 cat conftest.$ac_ext >&5
2254 rm -fr conftest*
2255 ac_cv_sizeof_fpos_t=0
2256fi
2257rm -fr conftest*
2258fi
2259
2260fi
2261echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6
2262cat >> confdefs.h <<EOF
2263#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
2264EOF
2265
2266
Guido van Rossum0a516c91994-09-12 10:58:40 +00002267
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002268echo $ac_n "checking for long long support""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002269echo "configure:2270: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002270have_long_long=no
2271cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002272#line 2273 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002273#include "confdefs.h"
2274
2275int main() {
2276long long x; x = (long long)0;
2277; return 0; }
2278EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002279if { (eval echo configure:2280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002280 rm -rf conftest*
2281 cat >> confdefs.h <<\EOF
2282#define HAVE_LONG_LONG 1
2283EOF
2284 have_long_long=yes
2285else
2286 echo "configure: failed program was:" >&5
2287 cat conftest.$ac_ext >&5
2288fi
2289rm -f conftest*
2290echo "$ac_t""$have_long_long" 1>&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002291if test "$have_long_long" = yes ; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002292echo $ac_n "checking size of long long""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002293echo "configure:2294: checking size of long long" >&5
2294if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002295 echo $ac_n "(cached) $ac_c" 1>&6
2296else
2297 if test "$cross_compiling" = yes; then
2298 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2299else
2300 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002301#line 2302 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002302#include "confdefs.h"
2303#include <stdio.h>
2304main()
2305{
2306 FILE *f=fopen("conftestval", "w");
2307 if (!f) exit(1);
2308 fprintf(f, "%d\n", sizeof(long long));
2309 exit(0);
2310}
2311EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002312if { (eval echo configure:2313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002313then
2314 ac_cv_sizeof_long_long=`cat conftestval`
2315else
2316 echo "configure: failed program was:" >&5
2317 cat conftest.$ac_ext >&5
2318 rm -fr conftest*
2319 ac_cv_sizeof_long_long=0
2320fi
2321rm -fr conftest*
2322fi
2323
2324fi
2325echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2326cat >> confdefs.h <<EOF
2327#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2328EOF
2329
2330
2331fi
2332
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002333echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002334echo "configure:2335: checking for uintptr_t support" >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002335have_uintptr_t=no
2336cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002337#line 2338 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002338#include "confdefs.h"
2339
2340int main() {
2341uintptr_t x; x = (uintptr_t)0;
2342; return 0; }
2343EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002344if { (eval echo configure:2345: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002345 rm -rf conftest*
2346 cat >> confdefs.h <<\EOF
2347#define HAVE_UINTPTR_T 1
2348EOF
2349 have_uintptr_t=yes
2350else
2351 echo "configure: failed program was:" >&5
2352 cat conftest.$ac_ext >&5
2353fi
2354rm -f conftest*
2355echo "$ac_t""$have_uintptr_t" 1>&6
2356if test "$have_uintptr_t" = yes ; then
2357echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002358echo "configure:2359: checking size of uintptr_t" >&5
2359if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002360 echo $ac_n "(cached) $ac_c" 1>&6
2361else
2362 if test "$cross_compiling" = yes; then
2363 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2364else
2365 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002366#line 2367 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002367#include "confdefs.h"
2368#include <stdio.h>
2369main()
2370{
2371 FILE *f=fopen("conftestval", "w");
2372 if (!f) exit(1);
2373 fprintf(f, "%d\n", sizeof(uintptr_t));
2374 exit(0);
2375}
2376EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002377if { (eval echo configure:2378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002378then
2379 ac_cv_sizeof_uintptr_t=`cat conftestval`
2380else
2381 echo "configure: failed program was:" >&5
2382 cat conftest.$ac_ext >&5
2383 rm -fr conftest*
2384 ac_cv_sizeof_uintptr_t=0
2385fi
2386rm -fr conftest*
2387fi
2388
2389fi
2390echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6
2391cat >> confdefs.h <<EOF
2392#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
2393EOF
2394
2395
2396fi
2397
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002398# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
2399echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002400echo "configure:2401: checking size of off_t" >&5
2401if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002402 echo $ac_n "(cached) $ac_c" 1>&6
2403else
2404 if test "$cross_compiling" = yes; then
2405 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2406else
2407 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002408#line 2409 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002409#include "confdefs.h"
2410#include <stdio.h>
2411#include <sys/types.h>
2412main()
2413{
2414 FILE *f=fopen("conftestval", "w");
2415 if (!f) exit(1);
2416 fprintf(f, "%d\n", sizeof(off_t));
2417 exit(0);
2418}
2419EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002420if { (eval echo configure:2421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002421then
2422 ac_cv_sizeof_off_t=`cat conftestval`
2423else
2424 echo "configure: failed program was:" >&5
2425 cat conftest.$ac_ext >&5
2426 rm -fr conftest*
2427 ac_cv_sizeof_off_t=0
2428fi
2429rm -fr conftest*
2430fi
2431
2432
2433fi
2434
2435echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2436cat >> confdefs.h <<EOF
2437#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2438EOF
2439
2440
2441echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002442echo "configure:2443: checking whether to enable large file support" >&5
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002443if test "$have_long_long" = yes -a \
2444 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2445 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002446 cat >> confdefs.h <<\EOF
2447#define HAVE_LARGEFILE_SUPPORT 1
2448EOF
2449
2450 echo "$ac_t""yes" 1>&6
2451else
2452 echo "$ac_t""no" 1>&6
2453fi
2454
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002455# AC_CHECK_SIZEOF() doesn't include <time.h>.
2456echo $ac_n "checking size of time_t""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002457echo "configure:2458: checking size of time_t" >&5
2458if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002459 echo $ac_n "(cached) $ac_c" 1>&6
2460else
2461 if test "$cross_compiling" = yes; then
2462 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2463else
2464 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002465#line 2466 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002466#include "confdefs.h"
2467#include <stdio.h>
2468#include <time.h>
2469main()
2470{
2471 FILE *f=fopen("conftestval", "w");
2472 if (!f) exit(1);
2473 fprintf(f, "%d\n", sizeof(time_t));
2474 exit(0);
2475}
2476EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002477if { (eval echo configure:2478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002478then
2479 ac_cv_sizeof_time_t=`cat conftestval`
2480else
2481 echo "configure: failed program was:" >&5
2482 cat conftest.$ac_ext >&5
2483 rm -fr conftest*
2484 ac_cv_sizeof_time_t=0
2485fi
2486rm -fr conftest*
2487fi
2488
2489
2490fi
2491
2492echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6
2493cat >> confdefs.h <<EOF
2494#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
2495EOF
2496
2497
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002498
Trent Mick635f6fb2000-08-23 21:33:05 +00002499# if have pthread_t then define SIZEOF_PTHREAD_T
2500echo $ac_n "checking for pthread_t""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002501echo "configure:2502: checking for pthread_t" >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00002502have_pthread_t=no
2503cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002504#line 2505 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002505#include "confdefs.h"
2506#include <pthread.h>
2507int main() {
2508pthread_t x; x = (pthread_t)0;
2509; return 0; }
2510EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002511if { (eval echo configure:2512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002512 rm -rf conftest*
2513 have_pthread_t=yes
2514else
2515 echo "configure: failed program was:" >&5
2516 cat conftest.$ac_ext >&5
2517fi
2518rm -f conftest*
2519echo "$ac_t""$have_pthread_t" 1>&6
2520if test "$have_pthread_t" = yes ; then
2521 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
2522 echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002523echo "configure:2524: checking size of pthread_t" >&5
2524 if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002525 echo $ac_n "(cached) $ac_c" 1>&6
2526else
2527 if test "$cross_compiling" = yes; then
2528 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2529else
2530 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002531#line 2532 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002532#include "confdefs.h"
2533#include <stdio.h>
2534 #include <pthread.h>
2535 main()
2536 {
2537 FILE *f=fopen("conftestval", "w");
2538 if (!f) exit(1);
2539 fprintf(f, "%d\n", sizeof(pthread_t));
2540 exit(0);
2541 }
2542EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002543if { (eval echo configure:2544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Trent Mick635f6fb2000-08-23 21:33:05 +00002544then
2545 ac_cv_sizeof_pthread_t=`cat conftestval`
2546else
2547 echo "configure: failed program was:" >&5
2548 cat conftest.$ac_ext >&5
2549 rm -fr conftest*
2550 ac_cv_sizeof_pthread_t=0
2551fi
2552rm -fr conftest*
2553fi
2554
2555
2556fi
2557
2558 echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6
2559 cat >> confdefs.h <<EOF
2560#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
2561EOF
2562
2563fi
2564
2565
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002566# Minor variations in building a framework between NextStep versions 4 and 5
2567
2568case $ac_sys_system/$ac_sys_release in
2569 next/4*)
2570 ns_undef_sym='__environ'
2571 LIBTOOL_CRUFT="-U $ns_undef_sym" ;;
2572 next/5*)
2573 ns_undef_sym='_environ'
2574 LIBTOOL_CRUFT="-lcc_dynamic -U $ns_undef_sym" ;;
2575esac
2576
2577echo $ac_n "checking for --with-next-framework""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002578echo "configure:2579: checking for --with-next-framework" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002579if test "$with_next_framework"
2580then
2581 OPT="$OPT -fno-common"
2582 # -U __environ is needed since bundles don't have access
2583 # to crt0 when built but will always be linked against it
2584 LDFLAGS="$LDFLAGS -Wl,-U,$ns_undef_sym"
2585 cat >> confdefs.h <<\EOF
2586#define WITH_NEXT_FRAMEWORK 1
2587EOF
2588
2589 echo "$ac_t""yes" 1>&6
2590else
2591 echo "$ac_t""no" 1>&6
2592fi
2593
2594echo $ac_n "checking for --with-dyld""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002595echo "configure:2596: checking for --with-dyld" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002596if test "$with_next_framework" -o "$with_dyld"
2597then
2598 if test "$with_dyld"
2599 then
2600 echo "$ac_t""yes" 1>&6
2601 else
2602 echo "$ac_t""required for framework build" 1>&6
2603 fi
2604 cat >> confdefs.h <<\EOF
2605#define WITH_DYLD 1
2606EOF
2607
2608 ns_dyld='set'
2609else
2610 echo "$ac_t""no" 1>&6
2611fi
2612
Guido van Rossum0a516c91994-09-12 10:58:40 +00002613# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00002614
2615
2616
2617
Guido van Rossum0a516c91994-09-12 10:58:40 +00002618# SO is the extension of shared libraries `(including the dot!)
2619# -- usually .so, .sl on HP-UX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002620echo $ac_n "checking SO""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002621echo "configure:2622: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002622if test -z "$SO"
2623then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002624 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00002625 hp*|HP*) SO=.sl;;
2626 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002627 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002628fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002629echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002630# LDSHARED is the ld *command* used to create shared library
2631# -- "ld" on SunOS 4.x.x, "ld -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002632# (Shared libraries in this instance are shared modules to be loaded into
2633# Python, as opposed to building Python itself as a shared library.)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002634echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002635echo "configure:2636: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002636if test -z "$LDSHARED"
2637then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002638 case $ac_sys_system/$ac_sys_release in
Guido van Rossum45140f91997-08-29 18:44:06 +00002639 AIX*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002640 BeOS*) LDSHARED="\$(srcdir)/../BeOS/linkmodule -L.. -lpython\$(VERSION)";;
Guido van Rossum07397971997-04-29 21:49:50 +00002641 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00002642 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002643 SunOS/4*) LDSHARED="ld";;
Greg Ward57c9a6632000-05-26 12:22:54 +00002644 SunOS/5*)
2645 if test "$GCC" = "yes"
2646 then LDSHARED='$(CC) -G'
2647 else LDSHARED="ld -G";
2648 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002649 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00002650 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
2651 DYNIX/ptx*) LDSHARED="ld -G";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002652 next/*)
2653 if test "$ns_dyld"
2654 then LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind'
2655 else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';
2656 fi
2657 if test "$with_next_framework" ; then
2658 LDSHARED="$LDSHARED \$(LDLIBRARY)"
2659 fi ;;
Guido van Rossum81652ab1996-07-21 02:53:27 +00002660 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002661 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00002662 BSD/OS*/4*) LDSHARED="gcc -shared";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002663 OpenBSD*) LDSHARED="ld -Bshareable";;
Guido van Rossumdf693651999-01-07 21:50:41 +00002664 NetBSD*)
2665 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2666 then
2667 LDSHARED="cc -shared"
2668 else
2669 LDSHARED="ld -Bshareable"
2670 fi;;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002671 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00002672 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00002673 then
2674 LDSHARED="cc -shared ${LDFLAGS}"
2675 else
2676 LDSHARED="ld -Bshareable ${LDFLAGS}"
2677 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002678 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00002679 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002680 *) LDSHARED="ld";;
2681 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002682fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002683echo "$ac_t""$LDSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002684# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002685# library (module) -- this is only needed for a few systems
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002686echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002687echo "configure:2688: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002688if test -z "$CCSHARED"
2689then
Guido van Rossum07397971997-04-29 21:49:50 +00002690 case $ac_sys_system/$ac_sys_release in
Guido van Rossumaf07a441995-02-13 19:45:27 +00002691 hp*|HP*) if test "$GCC" = yes;
2692 then CCSHARED="-fpic";
2693 else CCSHARED="+z";
2694 fi;;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002695 Linux*) CCSHARED="-fpic";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002696 BSD/OS*/4*) CCSHARED="-fpic";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002697 OpenBSD*) CCSHARED="-fpic";;
2698 FreeBSD*|NetBSD*) CCSHARED="-fPIC";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002699 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00002700 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002701 IRIX*/6*) case $CC in
2702 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00002703 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002704 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002705 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002706fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002707echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002708# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002709# the python executable -- this is only needed for a few systems
2710echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002711echo "configure:2712: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002712if test -z "$LINKFORSHARED"
2713then
Guido van Rossum07397971997-04-29 21:49:50 +00002714 case $ac_sys_system/$ac_sys_release in
Guido van Rossum69f65801998-03-03 21:47:00 +00002715 AIX*) LINKFORSHARED='-Wl,-bE:python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002716 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00002717 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002718 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum2d9feed1997-11-24 17:36:21 +00002719 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002720 # -u libsys_s pulls in all symbols in libsys
2721 next/2*|next/3*) LINKFORSHARED="-u libsys_s";;
2722 # -u __dummy makes the linker aware of the objc runtime
2723 # in System.framework; otherwise, __objcInit (referenced in
2724 # crt1.o) gets erroneously defined as common, which breaks dynamic
2725 # loading of any modules which reference it in System.framework
2726 next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System" ;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002727 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002728 FreeBSD*|NetBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00002729 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2730 then
2731 LINKFORSHARED="-Wl,--export-dynamic"
2732 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002733 SunOS/5*) case $CC in
2734 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00002735 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00002736 then
2737 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002738 fi;;
2739 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002740 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002741fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002742echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002743
Guido van Rossum627b2d71993-12-24 10:39:16 +00002744# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00002745echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002746echo "configure:2747: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002747ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002748if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002749 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002750else
2751 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002752LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002753cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002754#line 2755 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002755#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002756/* Override any gcc2 internal prototype to avoid an error. */
2757/* We use char because int might match the return type of a gcc2
2758 builtin and then its argument prototype would still apply. */
2759char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002760
Guido van Rossumf78abae1997-01-21 22:02:36 +00002761int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002762dlopen()
2763; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002764EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002765if { (eval echo configure:2766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002766 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002767 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002768else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002769 echo "configure: failed program was:" >&5
2770 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002771 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002772 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002773fi
2774rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002775LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002776
Guido van Rossum627b2d71993-12-24 10:39:16 +00002777fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002778if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002779 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002780 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2781 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002782 cat >> confdefs.h <<EOF
2783#define $ac_tr_lib 1
2784EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002785
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002786 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002787
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002788else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002789 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002790fi
2791 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00002792echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002793echo "configure:2794: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002794ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002795if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002796 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002797else
2798 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002799LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002800cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002801#line 2802 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002802#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002803/* Override any gcc2 internal prototype to avoid an error. */
2804/* We use char because int might match the return type of a gcc2
2805 builtin and then its argument prototype would still apply. */
2806char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002807
Guido van Rossumf78abae1997-01-21 22:02:36 +00002808int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002809shl_load()
2810; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002811EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002812if { (eval echo configure:2813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002813 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002814 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002815else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002816 echo "configure: failed program was:" >&5
2817 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002818 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002819 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002820fi
2821rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002822LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002823
Guido van Rossum627b2d71993-12-24 10:39:16 +00002824fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002825if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002826 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002827 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2828 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002829 cat >> confdefs.h <<EOF
2830#define $ac_tr_lib 1
2831EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002832
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002833 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002834
2835else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002836 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002837fi
2838 # Dynamic linking for HP-UX
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002839
Skip Montanarocb853262000-08-30 22:29:48 +00002840# Check for --with-pydebug
2841echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002842echo "configure:2843: checking for --with-pydebug" >&5
Skip Montanarocb853262000-08-30 22:29:48 +00002843# Check whether --with-pydebug or --without-pydebug was given.
2844if test "${with_pydebug+set}" = set; then
2845 withval="$with_pydebug"
2846
2847if test "$withval" != no
2848then cat >> confdefs.h <<\EOF
2849#define Py_DEBUG 1
2850EOF
2851 echo "$ac_t""yes" 1>&6
2852else echo "$ac_t""no" 1>&6
2853fi
2854else
2855 echo "$ac_t""no" 1>&6
2856fi
2857
2858
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002859# checks for system dependent C++ extensions support
2860case "$ac_sys_system" in
2861 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002862echo "configure:2863: checking for genuine AIX C++ extensions support" >&5
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002863 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002864#line 2865 "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002865#include "confdefs.h"
2866#include "/usr/lpp/xlC/include/load.h"
2867int main() {
2868loadAndInit("", 0, "")
2869; return 0; }
2870EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002871if { (eval echo configure:2872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002872 rm -rf conftest*
2873 cat >> confdefs.h <<\EOF
2874#define AIX_GENUINE_CPLUSPLUS 1
2875EOF
2876
2877 echo "$ac_t""yes" 1>&6
2878else
2879 echo "configure: failed program was:" >&5
2880 cat conftest.$ac_ext >&5
2881 rm -rf conftest*
2882 echo "$ac_t""no" 1>&6
2883fi
2884rm -f conftest*;;
2885 *) ;;
2886esac
2887
Guido van Rossum70c7f481998-03-26 18:44:10 +00002888# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
2889# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002890# BeOS' sockets are stashed in libnet.
2891case "$ac_sys_system" in
2892IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00002893*)
Guido van Rossumf78abae1997-01-21 22:02:36 +00002894echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002895echo "configure:2896: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002896ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002897if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002898 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002899else
2900 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002901LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002902cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002903#line 2904 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002904#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002905/* Override any gcc2 internal prototype to avoid an error. */
2906/* We use char because int might match the return type of a gcc2
2907 builtin and then its argument prototype would still apply. */
2908char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002909
Guido van Rossumf78abae1997-01-21 22:02:36 +00002910int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002911t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002912; return 0; }
2913EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002914if { (eval echo configure:2915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002915 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002916 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002917else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002918 echo "configure: failed program was:" >&5
2919 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002920 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002921 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002922fi
2923rm -f conftest*
2924LIBS="$ac_save_LIBS"
2925
2926fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002927if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002928 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002929 LIBS="-lnsl $LIBS"
2930else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002931 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002932fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002933 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00002934echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002935echo "configure:2936: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002936ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002937if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002938 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002939else
2940 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002941LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002942cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002943#line 2944 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002944#include "confdefs.h"
2945/* Override any gcc2 internal prototype to avoid an error. */
2946/* We use char because int might match the return type of a gcc2
2947 builtin and then its argument prototype would still apply. */
2948char socket();
2949
2950int main() {
2951socket()
2952; return 0; }
2953EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002954if { (eval echo configure:2955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002955 rm -rf conftest*
2956 eval "ac_cv_lib_$ac_lib_var=yes"
2957else
2958 echo "configure: failed program was:" >&5
2959 cat conftest.$ac_ext >&5
2960 rm -rf conftest*
2961 eval "ac_cv_lib_$ac_lib_var=no"
2962fi
2963rm -f conftest*
2964LIBS="$ac_save_LIBS"
2965
2966fi
2967if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2968 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00002969 LIBS="-lsocket $LIBS"
2970else
2971 echo "$ac_t""no" 1>&6
2972fi
2973 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00002974;;
2975esac
2976case "$ac_sys_system" in
2977BeOS*)
Guido van Rossumad678af1998-10-02 14:42:15 +00002978echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002979echo "configure:2980: checking for socket in -lnet" >&5
Guido van Rossumad678af1998-10-02 14:42:15 +00002980ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002981if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002982 echo $ac_n "(cached) $ac_c" 1>&6
2983else
2984 ac_save_LIBS="$LIBS"
2985LIBS="-lnet $LIBS $LIBS"
2986cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002987#line 2988 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002988#include "confdefs.h"
2989/* Override any gcc2 internal prototype to avoid an error. */
2990/* We use char because int might match the return type of a gcc2
2991 builtin and then its argument prototype would still apply. */
2992char socket();
2993
2994int main() {
2995socket()
2996; return 0; }
2997EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00002998if { (eval echo configure:2999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002999 rm -rf conftest*
3000 eval "ac_cv_lib_$ac_lib_var=yes"
3001else
3002 echo "configure: failed program was:" >&5
3003 cat conftest.$ac_ext >&5
3004 rm -rf conftest*
3005 eval "ac_cv_lib_$ac_lib_var=no"
3006fi
3007rm -f conftest*
3008LIBS="$ac_save_LIBS"
3009
3010fi
3011if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3012 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003013 LIBS="-lnet $LIBS"
3014else
3015 echo "$ac_t""no" 1>&6
3016fi
3017 # BeOS
3018;;
3019esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00003020
Guido van Rossuma68acba1996-07-31 17:36:39 +00003021echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003022echo "configure:3023: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00003023# Check whether --with-libs or --without-libs was given.
3024if test "${with_libs+set}" = set; then
3025 withval="$with_libs"
3026
3027echo "$ac_t""$withval" 1>&6
3028LIBS="$withval $LIBS"
3029
3030else
3031 echo "$ac_t""no" 1>&6
3032fi
3033
Guido van Rossum7f43da71994-08-01 12:15:30 +00003034
Guido van Rossum009f7871997-12-04 00:51:42 +00003035
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003036USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00003037
Guido van Rossumec2f0731997-01-22 20:54:01 +00003038echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003039echo "configure:3040: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003040
3041# Check whether --with-dec-threads or --without-dec-threads was given.
3042if test "${with_dec_threads+set}" = set; then
3043 withval="$with_dec_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003044
3045echo "$ac_t""$withval" 1>&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00003046LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00003047if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00003048 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00003049fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003050else
3051 echo "$ac_t""no" 1>&6
3052fi
3053
3054
3055echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003056echo "configure:3057: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003057# Check whether --with-threads or --without-threads was given.
3058if test "${with_threads+set}" = set; then
3059 withval="$with_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003060 :
Guido van Rossumec2f0731997-01-22 20:54:01 +00003061fi
3062
3063
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003064# --with-thread is deprecated, but check for it anyway
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003065# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003066if test "${with_thread+set}" = set; then
3067 withval="$with_thread"
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003068
3069with_threads=$with_thread
Guido van Rossum7f43da71994-08-01 12:15:30 +00003070fi
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003071
3072
3073if test -z "$with_threads"
3074then with_threads="yes"
3075fi
3076echo "$ac_t""$with_threads" 1>&6
3077
3078if test "$with_threads" = "no"
3079then
3080 USE_THREAD_MODULE="#"
3081else
3082 if test -d "$with_threads"
3083 then LDFLAGS="$LDFLAGS -L$with_threads"
3084 fi
3085 if test -d "$withval"
3086 then LDFLAGS="$LDFLAGS -L$withval"
3087 fi
3088 cat >> confdefs.h <<\EOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00003089#define _REENTRANT 1
3090EOF
3091
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003092 ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003093echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003094echo "configure:3095: checking for mach/cthreads.h" >&5
3095if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003096 echo $ac_n "(cached) $ac_c" 1>&6
3097else
3098 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003099#line 3100 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003100#include "confdefs.h"
3101#include <mach/cthreads.h>
3102EOF
3103ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003104{ (eval echo configure:3105: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003105ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003106if test -z "$ac_err"; then
3107 rm -rf conftest*
3108 eval "ac_cv_header_$ac_safe=yes"
3109else
3110 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003111 echo "configure: failed program was:" >&5
3112 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003113 rm -rf conftest*
3114 eval "ac_cv_header_$ac_safe=no"
3115fi
3116rm -f conftest*
3117fi
3118if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3119 echo "$ac_t""yes" 1>&6
3120 cat >> confdefs.h <<\EOF
3121#define WITH_THREAD 1
3122EOF
3123
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003124 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003125#define C_THREADS 1
3126EOF
3127
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003128 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003129else
3130 echo "$ac_t""no" 1>&6
3131
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003132 echo $ac_n "checking for --with-pth""... $ac_c" 1>&6
3133echo "configure:3134: checking for --with-pth" >&5
3134 # Check whether --with-pth or --without-pth was given.
3135if test "${with_pth+set}" = set; then
3136 withval="$with_pth"
3137
3138 echo "$ac_t""$withval" 1>&6
3139 cat >> confdefs.h <<\EOF
3140#define WITH_THREAD 1
3141EOF
3142
3143 cat >> confdefs.h <<\EOF
3144#define HAVE_PTH 1
3145EOF
3146
3147 LIBS="-lpth $LIBS"
3148 LIBOBJS="$LIBOBJS thread.o"
3149else
3150
3151 echo "$ac_t""no" 1>&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003152 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003153echo "configure:3154: checking for pthread_create in -lpthread" >&5
Guido van Rossum02a1c402000-02-25 19:26:31 +00003154ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003155if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003156 echo $ac_n "(cached) $ac_c" 1>&6
3157else
3158 ac_save_LIBS="$LIBS"
3159LIBS="-lpthread $LIBS"
3160cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003161#line 3162 "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003162#include "confdefs.h"
3163/* Override any gcc2 internal prototype to avoid an error. */
3164/* We use char because int might match the return type of a gcc2
3165 builtin and then its argument prototype would still apply. */
3166char pthread_create();
3167
3168int main() {
3169pthread_create()
3170; return 0; }
3171EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003172if { (eval echo configure:3173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003173 rm -rf conftest*
3174 eval "ac_cv_lib_$ac_lib_var=yes"
3175else
3176 echo "configure: failed program was:" >&5
3177 cat conftest.$ac_ext >&5
3178 rm -rf conftest*
3179 eval "ac_cv_lib_$ac_lib_var=no"
3180fi
3181rm -f conftest*
3182LIBS="$ac_save_LIBS"
3183
3184fi
3185if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3186 echo "$ac_t""yes" 1>&6
3187 cat >> confdefs.h <<\EOF
3188#define WITH_THREAD 1
3189EOF
3190
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003191 cat >> confdefs.h <<\EOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00003192#define _POSIX_THREADS 1
3193EOF
3194
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003195 LIBS="-lpthread $LIBS"
3196 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003197else
3198 echo "$ac_t""no" 1>&6
3199
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003200 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003201echo "configure:3202: checking for pthread_detach" >&5
3202if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003203 echo $ac_n "(cached) $ac_c" 1>&6
3204else
3205 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003206#line 3207 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003207#include "confdefs.h"
3208/* System header to define __stub macros and hopefully few prototypes,
Guido van Rossumea516321998-12-17 18:08:55 +00003209 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00003210#include <assert.h>
3211/* Override any gcc2 internal prototype to avoid an error. */
3212/* We use char because int might match the return type of a gcc2
3213 builtin and then its argument prototype would still apply. */
Guido van Rossumea516321998-12-17 18:08:55 +00003214char pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003215
3216int main() {
3217
3218/* The GNU C library defines this for functions which it implements
3219 to always fail with ENOSYS. Some functions are actually named
3220 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00003221#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00003222choke me
3223#else
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003224pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003225#endif
3226
3227; return 0; }
3228EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003229if { (eval echo configure:3230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003230 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003231 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003232else
3233 echo "configure: failed program was:" >&5
3234 cat conftest.$ac_ext >&5
3235 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003236 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003237fi
3238rm -f conftest*
3239fi
3240
Guido van Rossumea516321998-12-17 18:08:55 +00003241if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003242 echo "$ac_t""yes" 1>&6
3243 cat >> confdefs.h <<\EOF
3244#define WITH_THREAD 1
3245EOF
3246
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003247 cat >> confdefs.h <<\EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00003248#define _POSIX_THREADS 1
3249EOF
3250
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003251 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00003252else
3253 echo "$ac_t""no" 1>&6
3254
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003255 ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003256echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003257echo "configure:3258: checking for kernel/OS.h" >&5
3258if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003259 echo $ac_n "(cached) $ac_c" 1>&6
3260else
3261 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003262#line 3263 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003263#include "confdefs.h"
3264#include <kernel/OS.h>
3265EOF
3266ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003267{ (eval echo configure:3268: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003268ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003269if test -z "$ac_err"; then
3270 rm -rf conftest*
3271 eval "ac_cv_header_$ac_safe=yes"
3272else
3273 echo "$ac_err" >&5
3274 echo "configure: failed program was:" >&5
3275 cat conftest.$ac_ext >&5
3276 rm -rf conftest*
3277 eval "ac_cv_header_$ac_safe=no"
3278fi
3279rm -f conftest*
3280fi
3281if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3282 echo "$ac_t""yes" 1>&6
3283 cat >> confdefs.h <<\EOF
3284#define WITH_THREAD 1
3285EOF
3286
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003287 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003288#define BEOS_THREADS 1
3289EOF
3290
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003291 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003292else
3293 echo "$ac_t""no" 1>&6
3294
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003295 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003296echo "configure:3297: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003297ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003298if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003299 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003300else
3301 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003302LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003303cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003304#line 3305 "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00003305#include "confdefs.h"
3306/* Override any gcc2 internal prototype to avoid an error. */
3307/* We use char because int might match the return type of a gcc2
3308 builtin and then its argument prototype would still apply. */
3309char pthread_create();
3310
3311int main() {
3312pthread_create()
3313; return 0; }
3314EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003315if { (eval echo configure:3316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Greg Steinadf63d62000-07-05 10:38:09 +00003316 rm -rf conftest*
3317 eval "ac_cv_lib_$ac_lib_var=yes"
3318else
3319 echo "configure: failed program was:" >&5
3320 cat conftest.$ac_ext >&5
3321 rm -rf conftest*
3322 eval "ac_cv_lib_$ac_lib_var=no"
3323fi
3324rm -f conftest*
3325LIBS="$ac_save_LIBS"
3326
3327fi
3328if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3329 echo "$ac_t""yes" 1>&6
3330 cat >> confdefs.h <<\EOF
3331#define WITH_THREAD 1
3332EOF
3333
3334 cat >> confdefs.h <<\EOF
3335#define _POSIX_THREADS 1
3336EOF
3337
3338 LIBS="$LIBS -lpthreads"
3339 LIBOBJS="$LIBOBJS thread.o"
3340else
3341 echo "$ac_t""no" 1>&6
3342
3343 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003344echo "configure:3345: checking for pthread_create in -lc_r" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003345ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003346if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Greg Steinadf63d62000-07-05 10:38:09 +00003347 echo $ac_n "(cached) $ac_c" 1>&6
3348else
3349 ac_save_LIBS="$LIBS"
3350LIBS="-lc_r $LIBS"
3351cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003352#line 3353 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00003353#include "confdefs.h"
3354/* Override any gcc2 internal prototype to avoid an error. */
3355/* We use char because int might match the return type of a gcc2
3356 builtin and then its argument prototype would still apply. */
3357char pthread_create();
3358
3359int main() {
3360pthread_create()
3361; return 0; }
3362EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003363if { (eval echo configure:3364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum49545951997-12-02 19:28:29 +00003364 rm -rf conftest*
3365 eval "ac_cv_lib_$ac_lib_var=yes"
3366else
3367 echo "configure: failed program was:" >&5
3368 cat conftest.$ac_ext >&5
3369 rm -rf conftest*
3370 eval "ac_cv_lib_$ac_lib_var=no"
3371fi
3372rm -f conftest*
3373LIBS="$ac_save_LIBS"
3374
3375fi
3376if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3377 echo "$ac_t""yes" 1>&6
3378 cat >> confdefs.h <<\EOF
3379#define WITH_THREAD 1
3380EOF
3381
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003382 cat >> confdefs.h <<\EOF
Guido van Rossum49545951997-12-02 19:28:29 +00003383#define _POSIX_THREADS 1
3384EOF
3385
Greg Steinadf63d62000-07-05 10:38:09 +00003386 LIBS="$LIBS -lc_r"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003387 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003388else
3389 echo "$ac_t""no" 1>&6
3390
Greg Steinadf63d62000-07-05 10:38:09 +00003391 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003392echo "configure:3393: checking for __d6_pthread_create in -lthread" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003393ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003394if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003395 echo $ac_n "(cached) $ac_c" 1>&6
3396else
3397 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00003398LIBS="-lthread $LIBS"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003399cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003400#line 3401 "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003401#include "confdefs.h"
3402/* Override any gcc2 internal prototype to avoid an error. */
3403/* We use char because int might match the return type of a gcc2
3404 builtin and then its argument prototype would still apply. */
Greg Steinadf63d62000-07-05 10:38:09 +00003405char __d6_pthread_create();
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003406
3407int main() {
Greg Steinadf63d62000-07-05 10:38:09 +00003408__d6_pthread_create()
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003409; return 0; }
3410EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003411if { (eval echo configure:3412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003412 rm -rf conftest*
3413 eval "ac_cv_lib_$ac_lib_var=yes"
3414else
3415 echo "configure: failed program was:" >&5
3416 cat conftest.$ac_ext >&5
3417 rm -rf conftest*
3418 eval "ac_cv_lib_$ac_lib_var=no"
3419fi
3420rm -f conftest*
3421LIBS="$ac_save_LIBS"
3422
3423fi
3424if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3425 echo "$ac_t""yes" 1>&6
3426 cat >> confdefs.h <<\EOF
3427#define WITH_THREAD 1
3428EOF
3429
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003430 cat >> confdefs.h <<\EOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003431#define _POSIX_THREADS 1
3432EOF
3433
Greg Steinadf63d62000-07-05 10:38:09 +00003434 LIBS="$LIBS -lthread"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003435 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +00003436else
3437 echo "$ac_t""no" 1>&6
3438
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003439 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003440echo "configure:3441: checking for pthread_create in -lcma" >&5
Guido van Rossumb93a8621998-05-07 13:27:32 +00003441ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003442if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003443 echo $ac_n "(cached) $ac_c" 1>&6
3444else
3445 ac_save_LIBS="$LIBS"
3446LIBS="-lcma $LIBS"
3447cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003448#line 3449 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003449#include "confdefs.h"
3450/* Override any gcc2 internal prototype to avoid an error. */
3451/* We use char because int might match the return type of a gcc2
3452 builtin and then its argument prototype would still apply. */
3453char pthread_create();
3454
3455int main() {
3456pthread_create()
3457; return 0; }
3458EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003459if { (eval echo configure:3460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003460 rm -rf conftest*
3461 eval "ac_cv_lib_$ac_lib_var=yes"
3462else
3463 echo "configure: failed program was:" >&5
3464 cat conftest.$ac_ext >&5
3465 rm -rf conftest*
3466 eval "ac_cv_lib_$ac_lib_var=no"
3467fi
3468rm -f conftest*
3469LIBS="$ac_save_LIBS"
3470
3471fi
3472if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3473 echo "$ac_t""yes" 1>&6
3474 cat >> confdefs.h <<\EOF
3475#define WITH_THREAD 1
3476EOF
3477
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003478 cat >> confdefs.h <<\EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003479#define _POSIX_THREADS 1
3480EOF
3481
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003482 LIBS="$LIBS -lcma"
3483 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003484else
3485 echo "$ac_t""no" 1>&6
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003486
3487 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00003488fi
3489
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003490
Guido van Rossum627b2d71993-12-24 10:39:16 +00003491fi
3492
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003493fi
3494
Guido van Rossum0be3e491997-05-22 20:33:33 +00003495fi
3496
Guido van Rossum49545951997-12-02 19:28:29 +00003497fi
3498
Guido van Rossumb93a8621998-05-07 13:27:32 +00003499fi
3500
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003501fi
3502
Guido van Rossumad678af1998-10-02 14:42:15 +00003503fi
3504
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003505fi
3506
Guido van Rossum0be3e491997-05-22 20:33:33 +00003507
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003508 echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003509echo "configure:3510: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003510ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003511if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003512 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003513else
3514 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003515LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003516cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003517#line 3518 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003518#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003519/* Override any gcc2 internal prototype to avoid an error. */
3520/* We use char because int might match the return type of a gcc2
3521 builtin and then its argument prototype would still apply. */
3522char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003523
Guido van Rossumf78abae1997-01-21 22:02:36 +00003524int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003525usconfig()
3526; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003527EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003528if { (eval echo configure:3529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003529 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003530 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003531else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003532 echo "configure: failed program was:" >&5
3533 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003534 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003535 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003536fi
3537rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003538LIBS="$ac_save_LIBS"
3539
3540fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003541if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003542 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003543 cat >> confdefs.h <<\EOF
3544#define WITH_THREAD 1
3545EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003546
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003547 LIBS="$LIBS -lmpc"
3548 LIBOBJS="$LIBOBJS thread.o"
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003549 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00003550else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003551 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003552fi
3553
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003554 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003555echo "configure:3556: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003556ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003557if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003558 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003559else
3560 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003561LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003562cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003563#line 3564 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003564#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003565/* Override any gcc2 internal prototype to avoid an error. */
3566/* We use char because int might match the return type of a gcc2
3567 builtin and then its argument prototype would still apply. */
3568char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003569
Guido van Rossumf78abae1997-01-21 22:02:36 +00003570int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003571thr_create()
3572; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003573EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003574if { (eval echo configure:3575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003575 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003576 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003577else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003578 echo "configure: failed program was:" >&5
3579 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003580 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003581 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003582fi
3583rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003584LIBS="$ac_save_LIBS"
3585
3586fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003587if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003588 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003589 cat >> confdefs.h <<\EOF
3590#define WITH_THREAD 1
3591EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003592
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003593 LIBS="$LIBS -lthread"
3594 LIBOBJS="$LIBOBJS thread.o"
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003595 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00003596else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003597 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003598fi
3599
Guido van Rossum627b2d71993-12-24 10:39:16 +00003600fi
3601
Barry Warsawef82cd72000-06-30 16:21:01 +00003602# Check for GC support
3603
3604USE_GC_MODULE=""
3605echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003606echo "configure:3607: checking for --with-cycle-gc" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00003607# Check whether --with-cycle-gc or --without-cycle-gc was given.
3608if test "${with_cycle_gc+set}" = set; then
3609 withval="$with_cycle_gc"
3610 :
3611fi
3612
3613
3614if test -z "$with_cycle_gc"
3615then with_cycle_gc="yes"
3616fi
3617if test "$with_cycle_gc" = "no"
3618then
3619 USE_GC_MODULE="#"
3620else
3621 cat >> confdefs.h <<\EOF
3622#define WITH_CYCLE_GC 1
3623EOF
3624
3625fi
3626echo "$ac_t""$with_cycle_gc" 1>&6
3627
Fred Drakea50d6ec2000-08-31 16:13:20 +00003628# Check for LIBDB support
3629# either --with-libdb or, in its absence, the presence of db.h
3630
3631USE_BSDDB_MODULE=""
3632echo $ac_n "checking for --with-libdb""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003633echo "configure:3634: checking for --with-libdb" >&5
Fred Drakea50d6ec2000-08-31 16:13:20 +00003634# Check whether --with-libdb or --without-libdb was given.
3635if test "${with_libdb+set}" = set; then
3636 withval="$with_libdb"
3637 :
3638fi
3639
3640
Skip Montanarob89f41e2000-09-04 04:06:05 +00003641# enabled by default, but db.h must be found
3642if test "$ac_cv_header_db_h" = "yes"
3643then
3644 if test "$with_libdb" != "no"
3645 then with_libdb="yes"
3646 fi
3647else
3648 # make sure user knows why bsddb support wasn't enabled event
3649 # though s/he requested it
3650 if test "$with_libdb" = "yes"
3651 then echo $ac_n "(requested, but db.h was not found) $ac_c"
3652 fi
3653 with_libdb="no"
Fred Drakea50d6ec2000-08-31 16:13:20 +00003654fi
Skip Montanarob89f41e2000-09-04 04:06:05 +00003655
Fred Drakea50d6ec2000-08-31 16:13:20 +00003656if test "$with_libdb" = "no"
3657then
3658 USE_BSDDB_MODULE="#"
3659else
3660 cat >> confdefs.h <<\EOF
3661#define WITH_LIBDB 1
3662EOF
3663
3664fi
3665echo "$ac_t""$with_libdb" 1>&6
3666
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003667if test "$with_libdb" = "yes"
3668then
3669 # check for libdb; BSD systems have the DB routines in libc --tg
3670
3671 echo $ac_n "checking for dbopen""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003672echo "configure:3673: checking for dbopen" >&5
3673if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003674 echo $ac_n "(cached) $ac_c" 1>&6
3675else
3676 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003677#line 3678 "configure"
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003678#include "confdefs.h"
3679/* System header to define __stub macros and hopefully few prototypes,
3680 which can conflict with char dbopen(); below. */
3681#include <assert.h>
3682/* Override any gcc2 internal prototype to avoid an error. */
3683/* We use char because int might match the return type of a gcc2
3684 builtin and then its argument prototype would still apply. */
3685char dbopen();
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003686
3687int main() {
3688
3689/* The GNU C library defines this for functions which it implements
3690 to always fail with ENOSYS. Some functions are actually named
3691 something starting with __ and the normal name is an alias. */
3692#if defined (__stub_dbopen) || defined (__stub___dbopen)
3693choke me
3694#else
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003695dbopen();
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003696#endif
3697
3698; return 0; }
3699EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003700if { (eval echo configure:3701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003701 rm -rf conftest*
3702 eval "ac_cv_func_dbopen=yes"
3703else
3704 echo "configure: failed program was:" >&5
3705 cat conftest.$ac_ext >&5
3706 rm -rf conftest*
3707 eval "ac_cv_func_dbopen=no"
3708fi
3709rm -f conftest*
3710fi
3711
3712if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
3713 echo "$ac_t""yes" 1>&6
3714 HAVE_LIBDB=
3715else
3716 echo "$ac_t""no" 1>&6
3717echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003718echo "configure:3719: checking for dbopen in -ldb" >&5
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003719ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'`
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003720if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003721 echo $ac_n "(cached) $ac_c" 1>&6
3722else
3723 ac_save_LIBS="$LIBS"
3724LIBS="-ldb $LIBS"
3725cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003726#line 3727 "configure"
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003727#include "confdefs.h"
3728/* Override any gcc2 internal prototype to avoid an error. */
3729/* We use char because int might match the return type of a gcc2
3730 builtin and then its argument prototype would still apply. */
3731char dbopen();
3732
3733int main() {
3734dbopen()
3735; return 0; }
3736EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003737if { (eval echo configure:3738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003738 rm -rf conftest*
3739 eval "ac_cv_lib_$ac_lib_var=yes"
3740else
3741 echo "configure: failed program was:" >&5
3742 cat conftest.$ac_ext >&5
3743 rm -rf conftest*
3744 eval "ac_cv_lib_$ac_lib_var=no"
3745fi
3746rm -f conftest*
3747LIBS="$ac_save_LIBS"
3748
3749fi
3750if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3751 echo "$ac_t""yes" 1>&6
3752 HAVE_LIBDB=-ldb
3753else
3754 echo "$ac_t""no" 1>&6
3755fi
3756
3757fi
3758
3759fi
3760
Barry Warsawef82cd72000-06-30 16:21:01 +00003761# Check for --with-wctype-functions
3762echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003763echo "configure:3764: checking for --with-wctype-functions" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00003764# Check whether --with-wctype-functions or --without-wctype-functions was given.
3765if test "${with_wctype_functions+set}" = set; then
3766 withval="$with_wctype_functions"
3767
3768if test "$withval" != no
3769then cat >> confdefs.h <<\EOF
3770#define WANT_WCTYPE_FUNCTIONS 1
3771EOF
3772 echo "$ac_t""yes" 1>&6
3773else echo "$ac_t""no" 1>&6
3774fi
3775else
3776 echo "$ac_t""no" 1>&6
3777fi
3778
3779
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003780# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00003781
3782DLINCLDIR=/
3783
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003784echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003785echo "configure:3786: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003786# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003787if test "${with_sgi_dl+set}" = set; then
3788 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003789
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003790echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003791cat >> confdefs.h <<\EOF
3792#define WITH_SGI_DL 1
3793EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003794
Guido van Rossume97ee181999-12-20 21:27:22 +00003795DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003796dldir=$withval
3797if test -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00003798then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003799else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003800fi
3801DLINCLDIR=${dldir}
3802LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003803else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003804 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003805fi
3806
3807
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003808echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003809echo "configure:3810: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003810# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003811if test "${with_dl_dld+set}" = set; then
3812 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003813
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003814echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003815cat >> confdefs.h <<\EOF
3816#define WITH_DL_DLD 1
3817EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003818
Guido van Rossume97ee181999-12-20 21:27:22 +00003819DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003820dldir=`echo "$withval" | sed 's/,.*//'`
3821dlddir=`echo "$withval" | sed 's/.*,//'`
3822if test -d "$dldir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00003823then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003824else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003825fi
3826DLINCLDIR=${dldir}
3827LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003828else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003829 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003830fi
3831
3832
Guido van Rossume97ee181999-12-20 21:27:22 +00003833# the dlopen() function means we might want to use dynload_shlib.o. some
3834# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00003835for ac_func in dlopen
3836do
3837echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003838echo "configure:3839: checking for $ac_func" >&5
3839if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00003840 echo $ac_n "(cached) $ac_c" 1>&6
3841else
3842 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003843#line 3844 "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +00003844#include "confdefs.h"
3845/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00003846 which can conflict with char $ac_func(); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +00003847#include <assert.h>
3848/* Override any gcc2 internal prototype to avoid an error. */
3849/* We use char because int might match the return type of a gcc2
3850 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00003851char $ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00003852
3853int main() {
3854
3855/* The GNU C library defines this for functions which it implements
3856 to always fail with ENOSYS. Some functions are actually named
3857 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00003858#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +00003859choke me
3860#else
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003861$ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00003862#endif
3863
3864; return 0; }
3865EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003866if { (eval echo configure:3867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossume97ee181999-12-20 21:27:22 +00003867 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00003868 eval "ac_cv_func_$ac_func=yes"
Guido van Rossume97ee181999-12-20 21:27:22 +00003869else
3870 echo "configure: failed program was:" >&5
3871 cat conftest.$ac_ext >&5
3872 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00003873 eval "ac_cv_func_$ac_func=no"
Guido van Rossume97ee181999-12-20 21:27:22 +00003874fi
3875rm -f conftest*
3876fi
3877
Thomas Wouters3a584202000-08-05 23:28:51 +00003878if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00003879 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00003880 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3881 cat >> confdefs.h <<EOF
3882#define $ac_tr_func 1
3883EOF
3884
Guido van Rossume97ee181999-12-20 21:27:22 +00003885else
3886 echo "$ac_t""no" 1>&6
3887fi
Thomas Wouters3a584202000-08-05 23:28:51 +00003888done
Guido van Rossume97ee181999-12-20 21:27:22 +00003889
3890
3891# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
3892# loading of modules.
3893
3894echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003895echo "configure:3896: checking DYNLOADFILE" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00003896if test -z "$DYNLOADFILE"
3897then
3898 case $ac_sys_system/$ac_sys_release in
3899 AIX*) DYNLOADFILE="dynload_aix.o";;
3900 BeOS*) DYNLOADFILE="dynload_beos.o";;
3901 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
3902 next/*) DYNLOADFILE="dynload_next.o";;
3903 *)
3904 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
3905 # out any dynamic loading
3906 if test "$ac_cv_func_dlopen" = yes
3907 then DYNLOADFILE="dynload_shlib.o"
3908 else DYNLOADFILE="dynload_stub.o"
3909 fi
3910 ;;
3911 esac
3912fi
3913echo "$ac_t""$DYNLOADFILE" 1>&6
3914if test "$DYNLOADFILE" != "dynload_stub.o"
3915then
3916 cat >> confdefs.h <<\EOF
3917#define HAVE_DYNAMIC_LOADING 1
3918EOF
3919
3920fi
3921
Guido van Rossum627b2d71993-12-24 10:39:16 +00003922# checks for library functions
Thomas Wouters3a584202000-08-05 23:28:51 +00003923for ac_func in alarm chown clock confstr ctermid ctermid_r execv \
Fred Drake35a092f1999-12-13 16:23:35 +00003924 flock fork fsync fdatasync fpathconf ftime ftruncate \
Thomas Wouters3a584202000-08-05 23:28:51 +00003925 getgroups getlogin getpeername getpid getpwent getwd \
Andrew M. Kuchling22c69342000-06-18 15:07:40 +00003926 kill link lstat mkfifo mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00003927 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +00003928 putenv readlink \
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00003929 select setegid seteuid setgid \
Thomas Wouters3a584202000-08-05 23:28:51 +00003930 setlocale setregid setreuid setsid setpgid setuid setvbuf \
Fred Drake35a092f1999-12-13 16:23:35 +00003931 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00003932 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Thomas Wouters70c21a12000-07-14 14:28:33 +00003933 truncate uname waitpid _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00003934do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003935echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003936echo "configure:3937: checking for $ac_func" >&5
3937if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003938 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003939else
3940 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003941#line 3942 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003942#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003943/* System header to define __stub macros and hopefully few prototypes,
3944 which can conflict with char $ac_func(); below. */
3945#include <assert.h>
3946/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003947/* We use char because int might match the return type of a gcc2
3948 builtin and then its argument prototype would still apply. */
3949char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003950
Guido van Rossumf78abae1997-01-21 22:02:36 +00003951int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003952
Guido van Rossum627b2d71993-12-24 10:39:16 +00003953/* The GNU C library defines this for functions which it implements
3954 to always fail with ENOSYS. Some functions are actually named
3955 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003956#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00003957choke me
3958#else
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003959$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003960#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003961
Guido van Rossum7f43da71994-08-01 12:15:30 +00003962; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003963EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003964if { (eval echo configure:3965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003965 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003966 eval "ac_cv_func_$ac_func=yes"
3967else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003968 echo "configure: failed program was:" >&5
3969 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003970 rm -rf conftest*
3971 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003972fi
3973rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003974fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003975
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003976if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003977 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003978 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003979 cat >> confdefs.h <<EOF
3980#define $ac_tr_func 1
3981EOF
3982
3983else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003984 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003985fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003986done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003987
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003988
Fred Drake8cef4cf2000-06-28 16:40:38 +00003989# check for openpty and forkpty
3990
3991for ac_func in openpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00003992do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003993echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003994echo "configure:3995: checking for $ac_func" >&5
3995if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003996 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003997else
3998 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003999#line 4000 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004000#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004001/* System header to define __stub macros and hopefully few prototypes,
4002 which can conflict with char $ac_func(); below. */
4003#include <assert.h>
4004/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004005/* We use char because int might match the return type of a gcc2
4006 builtin and then its argument prototype would still apply. */
4007char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004008
Guido van Rossumf78abae1997-01-21 22:02:36 +00004009int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004010
Guido van Rossum627b2d71993-12-24 10:39:16 +00004011/* The GNU C library defines this for functions which it implements
4012 to always fail with ENOSYS. Some functions are actually named
4013 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004014#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004015choke me
4016#else
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004017$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004018#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004019
Guido van Rossum7f43da71994-08-01 12:15:30 +00004020; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004021EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004022if { (eval echo configure:4023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004023 rm -rf conftest*
4024 eval "ac_cv_func_$ac_func=yes"
4025else
4026 echo "configure: failed program was:" >&5
4027 cat conftest.$ac_ext >&5
4028 rm -rf conftest*
4029 eval "ac_cv_func_$ac_func=no"
4030fi
4031rm -f conftest*
4032fi
4033
4034if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4035 echo "$ac_t""yes" 1>&6
4036 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4037 cat >> confdefs.h <<EOF
4038#define $ac_tr_func 1
4039EOF
4040
4041else
4042 echo "$ac_t""no" 1>&6
4043echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004044echo "configure:4045: checking for openpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004045ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004046if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004047 echo $ac_n "(cached) $ac_c" 1>&6
4048else
4049 ac_save_LIBS="$LIBS"
4050LIBS="-lutil $LIBS"
4051cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004052#line 4053 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004053#include "confdefs.h"
4054/* Override any gcc2 internal prototype to avoid an error. */
4055/* We use char because int might match the return type of a gcc2
4056 builtin and then its argument prototype would still apply. */
4057char openpty();
4058
4059int main() {
4060openpty()
4061; return 0; }
4062EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004063if { (eval echo configure:4064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004064 rm -rf conftest*
4065 eval "ac_cv_lib_$ac_lib_var=yes"
4066else
4067 echo "configure: failed program was:" >&5
4068 cat conftest.$ac_ext >&5
4069 rm -rf conftest*
4070 eval "ac_cv_lib_$ac_lib_var=no"
4071fi
4072rm -f conftest*
4073LIBS="$ac_save_LIBS"
4074
4075fi
4076if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4077 echo "$ac_t""yes" 1>&6
4078 cat >> confdefs.h <<\EOF
4079#define HAVE_OPENPTY 1
4080EOF
4081 LIBS="$LIBS -lutil"
4082else
4083 echo "$ac_t""no" 1>&6
4084fi
4085
4086fi
4087done
4088
4089for ac_func in forkpty
4090do
4091echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004092echo "configure:4093: checking for $ac_func" >&5
4093if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004094 echo $ac_n "(cached) $ac_c" 1>&6
4095else
4096 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004097#line 4098 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004098#include "confdefs.h"
4099/* System header to define __stub macros and hopefully few prototypes,
4100 which can conflict with char $ac_func(); below. */
4101#include <assert.h>
4102/* Override any gcc2 internal prototype to avoid an error. */
4103/* We use char because int might match the return type of a gcc2
4104 builtin and then its argument prototype would still apply. */
4105char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004106
4107int main() {
4108
4109/* The GNU C library defines this for functions which it implements
4110 to always fail with ENOSYS. Some functions are actually named
4111 something starting with __ and the normal name is an alias. */
4112#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4113choke me
4114#else
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004115$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004116#endif
4117
4118; return 0; }
4119EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004120if { (eval echo configure:4121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004121 rm -rf conftest*
4122 eval "ac_cv_func_$ac_func=yes"
4123else
4124 echo "configure: failed program was:" >&5
4125 cat conftest.$ac_ext >&5
4126 rm -rf conftest*
4127 eval "ac_cv_func_$ac_func=no"
4128fi
4129rm -f conftest*
4130fi
4131
4132if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4133 echo "$ac_t""yes" 1>&6
4134 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4135 cat >> confdefs.h <<EOF
4136#define $ac_tr_func 1
4137EOF
4138
4139else
4140 echo "$ac_t""no" 1>&6
4141echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004142echo "configure:4143: checking for forkpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004143ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004144if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004145 echo $ac_n "(cached) $ac_c" 1>&6
4146else
4147 ac_save_LIBS="$LIBS"
4148LIBS="-lutil $LIBS"
4149cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004150#line 4151 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004151#include "confdefs.h"
4152/* Override any gcc2 internal prototype to avoid an error. */
4153/* We use char because int might match the return type of a gcc2
4154 builtin and then its argument prototype would still apply. */
4155char forkpty();
4156
4157int main() {
4158forkpty()
4159; return 0; }
4160EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004161if { (eval echo configure:4162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004162 rm -rf conftest*
4163 eval "ac_cv_lib_$ac_lib_var=yes"
4164else
4165 echo "configure: failed program was:" >&5
4166 cat conftest.$ac_ext >&5
4167 rm -rf conftest*
4168 eval "ac_cv_lib_$ac_lib_var=no"
4169fi
4170rm -f conftest*
4171LIBS="$ac_save_LIBS"
4172
4173fi
4174if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4175 echo "$ac_t""yes" 1>&6
4176 cat >> confdefs.h <<\EOF
4177#define HAVE_FORKPTY 1
4178EOF
4179 LIBS="$LIBS -lutil"
4180else
4181 echo "$ac_t""no" 1>&6
4182fi
4183
4184fi
4185done
4186
4187
4188# check for long file support functions
4189for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
4190do
4191echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004192echo "configure:4193: checking for $ac_func" >&5
4193if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004194 echo $ac_n "(cached) $ac_c" 1>&6
4195else
4196 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004197#line 4198 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004198#include "confdefs.h"
4199/* System header to define __stub macros and hopefully few prototypes,
4200 which can conflict with char $ac_func(); below. */
4201#include <assert.h>
4202/* Override any gcc2 internal prototype to avoid an error. */
4203/* We use char because int might match the return type of a gcc2
4204 builtin and then its argument prototype would still apply. */
4205char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004206
4207int main() {
4208
4209/* The GNU C library defines this for functions which it implements
4210 to always fail with ENOSYS. Some functions are actually named
4211 something starting with __ and the normal name is an alias. */
4212#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4213choke me
4214#else
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004215$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004216#endif
4217
4218; return 0; }
4219EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004220if { (eval echo configure:4221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004221 rm -rf conftest*
4222 eval "ac_cv_func_$ac_func=yes"
4223else
4224 echo "configure: failed program was:" >&5
4225 cat conftest.$ac_ext >&5
4226 rm -rf conftest*
4227 eval "ac_cv_func_$ac_func=no"
4228fi
4229rm -f conftest*
4230fi
4231
4232if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4233 echo "$ac_t""yes" 1>&6
4234 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4235 cat >> confdefs.h <<EOF
4236#define $ac_tr_func 1
4237EOF
4238
4239else
4240 echo "$ac_t""no" 1>&6
4241fi
4242done
4243
4244
4245for ac_func in dup2 getcwd strdup strerror memmove
4246do
4247echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004248echo "configure:4249: checking for $ac_func" >&5
4249if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004250 echo $ac_n "(cached) $ac_c" 1>&6
4251else
4252 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004253#line 4254 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004254#include "confdefs.h"
4255/* System header to define __stub macros and hopefully few prototypes,
4256 which can conflict with char $ac_func(); below. */
4257#include <assert.h>
4258/* Override any gcc2 internal prototype to avoid an error. */
4259/* We use char because int might match the return type of a gcc2
4260 builtin and then its argument prototype would still apply. */
4261char $ac_func();
4262
4263int main() {
4264
4265/* The GNU C library defines this for functions which it implements
4266 to always fail with ENOSYS. Some functions are actually named
4267 something starting with __ and the normal name is an alias. */
4268#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4269choke me
4270#else
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004271$ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004272#endif
4273
4274; return 0; }
4275EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004276if { (eval echo configure:4277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004277 rm -rf conftest*
4278 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004279else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004280 echo "configure: failed program was:" >&5
4281 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004282 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004283 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004284fi
4285rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004286fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004287
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004288if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004289 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00004290 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4291 cat >> confdefs.h <<EOF
4292#define $ac_tr_func 1
4293EOF
4294
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004295else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004296 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004297LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004298fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004299done
4300
Guido van Rossumf78abae1997-01-21 22:02:36 +00004301
Thomas Wouters3a584202000-08-05 23:28:51 +00004302for ac_func in getpgrp
4303do
4304echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004305echo "configure:4306: checking for $ac_func" >&5
4306if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004307 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004308else
4309 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004310#line 4311 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004311#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004312/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004313 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004314#include <assert.h>
4315/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004316/* We use char because int might match the return type of a gcc2
4317 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004318char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004319
Guido van Rossumf78abae1997-01-21 22:02:36 +00004320int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004321
Guido van Rossum627b2d71993-12-24 10:39:16 +00004322/* The GNU C library defines this for functions which it implements
4323 to always fail with ENOSYS. Some functions are actually named
4324 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004325#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004326choke me
4327#else
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004328$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004329#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004330
4331; return 0; }
4332EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004333if { (eval echo configure:4334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004334 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004335 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004336else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004337 echo "configure: failed program was:" >&5
4338 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004339 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004340 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004341fi
4342rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004343fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004344
Thomas Wouters3a584202000-08-05 23:28:51 +00004345if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004346 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004347 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4348 cat >> confdefs.h <<EOF
4349#define $ac_tr_func 1
4350EOF
4351 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004352#line 4353 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004353#include "confdefs.h"
4354#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004355int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004356getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00004357; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004358EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004359if { (eval echo configure:4360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004360 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004361 cat >> confdefs.h <<\EOF
4362#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00004363EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004364
Guido van Rossumf78abae1997-01-21 22:02:36 +00004365else
4366 echo "configure: failed program was:" >&5
4367 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004368fi
4369rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004370else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004371 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004372fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004373done
Guido van Rossum627b2d71993-12-24 10:39:16 +00004374
Thomas Wouters3a584202000-08-05 23:28:51 +00004375for ac_func in setpgrp
4376do
4377echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004378echo "configure:4379: checking for $ac_func" >&5
4379if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004380 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004381else
4382 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004383#line 4384 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004384#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004385/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004386 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004387#include <assert.h>
4388/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004389/* We use char because int might match the return type of a gcc2
4390 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004391char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004392
Guido van Rossumf78abae1997-01-21 22:02:36 +00004393int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004394
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004395/* The GNU C library defines this for functions which it implements
4396 to always fail with ENOSYS. Some functions are actually named
4397 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004398#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004399choke me
4400#else
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004401$ac_func();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004402#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004403
4404; return 0; }
4405EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004406if { (eval echo configure:4407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004407 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004408 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004409else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004410 echo "configure: failed program was:" >&5
4411 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004412 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004413 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004414fi
4415rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004416fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004417
Thomas Wouters3a584202000-08-05 23:28:51 +00004418if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004419 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004420 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4421 cat >> confdefs.h <<EOF
4422#define $ac_tr_func 1
4423EOF
4424 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004425#line 4426 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004426#include "confdefs.h"
4427#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004428int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004429setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004430; return 0; }
4431EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004432if { (eval echo configure:4433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004433 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004434 cat >> confdefs.h <<\EOF
4435#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004436EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004437
Guido van Rossumf78abae1997-01-21 22:02:36 +00004438else
4439 echo "configure: failed program was:" >&5
4440 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004441fi
4442rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004443else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004444 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004445fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004446done
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004447
Thomas Wouters3a584202000-08-05 23:28:51 +00004448for ac_func in gettimeofday
4449do
4450echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004451echo "configure:4452: checking for $ac_func" >&5
4452if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004453 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004454else
4455 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004456#line 4457 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004457#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004458/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004459 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004460#include <assert.h>
4461/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004462/* We use char because int might match the return type of a gcc2
4463 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004464char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004465
Guido van Rossumf78abae1997-01-21 22:02:36 +00004466int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004467
4468/* The GNU C library defines this for functions which it implements
4469 to always fail with ENOSYS. Some functions are actually named
4470 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004471#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004472choke me
4473#else
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004474$ac_func();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004475#endif
4476
4477; return 0; }
4478EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004479if { (eval echo configure:4480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004480 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004481 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004482else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004483 echo "configure: failed program was:" >&5
4484 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004485 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004486 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004487fi
4488rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004489fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004490
Thomas Wouters3a584202000-08-05 23:28:51 +00004491if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004492 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004493 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4494 cat >> confdefs.h <<EOF
4495#define $ac_tr_func 1
4496EOF
4497 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004498#line 4499 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004499#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004500#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004501int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004502gettimeofday((struct timeval*)0,(struct timezone*)0);
4503; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004504EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004505if { (eval echo configure:4506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004506 :
4507else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004508 echo "configure: failed program was:" >&5
4509 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004510 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004511 cat >> confdefs.h <<\EOF
4512#define GETTIMEOFDAY_NO_TZ 1
4513EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004514
4515fi
4516rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004517else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004518 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004519fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004520done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004521
4522
4523# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004524echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004525echo "configure:4526: checking whether time.h and sys/time.h may both be included" >&5
4526if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004527 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004528else
4529 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004530#line 4531 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004531#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004532#include <sys/types.h>
4533#include <sys/time.h>
4534#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004535int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004536struct tm *tp;
4537; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004538EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004539if { (eval echo configure:4540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004540 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004541 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004542else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004543 echo "configure: failed program was:" >&5
4544 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004545 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004546 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004547fi
4548rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004549fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004550
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004551echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004552if test $ac_cv_header_time = yes; then
4553 cat >> confdefs.h <<\EOF
4554#define TIME_WITH_SYS_TIME 1
4555EOF
4556
4557fi
4558
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004559echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004560echo "configure:4561: checking whether struct tm is in sys/time.h or time.h" >&5
4561if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004562 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004563else
4564 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004565#line 4566 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004566#include "confdefs.h"
4567#include <sys/types.h>
4568#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004569int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004570struct tm *tp; tp->tm_sec;
4571; return 0; }
4572EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004573if { (eval echo configure:4574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004574 rm -rf conftest*
4575 ac_cv_struct_tm=time.h
4576else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004577 echo "configure: failed program was:" >&5
4578 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004579 rm -rf conftest*
4580 ac_cv_struct_tm=sys/time.h
4581fi
4582rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004583fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004584
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004585echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004586if test $ac_cv_struct_tm = sys/time.h; then
4587 cat >> confdefs.h <<\EOF
4588#define TM_IN_SYS_TIME 1
4589EOF
4590
4591fi
4592
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004593echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4594echo "configure:4595: checking for tm_zone in struct tm" >&5
4595if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004596 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004597else
4598 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004599#line 4600 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004600#include "confdefs.h"
4601#include <sys/types.h>
4602#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004603int main() {
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004604struct tm tm; tm.tm_zone;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004605; return 0; }
4606EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004607if { (eval echo configure:4608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004608 rm -rf conftest*
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004609 ac_cv_struct_tm_zone=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004610else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004611 echo "configure: failed program was:" >&5
4612 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004613 rm -rf conftest*
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004614 ac_cv_struct_tm_zone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004615fi
4616rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004617fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004618
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004619echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4620if test "$ac_cv_struct_tm_zone" = yes; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004621 cat >> confdefs.h <<\EOF
4622#define HAVE_TM_ZONE 1
4623EOF
4624
4625else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004626 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004627echo "configure:4628: checking for tzname" >&5
4628if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004629 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004630else
4631 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004632#line 4633 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004633#include "confdefs.h"
4634#include <time.h>
4635#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004636extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004637#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00004638int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004639atoi(*tzname);
4640; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004641EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004642if { (eval echo configure:4643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004643 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004644 ac_cv_var_tzname=yes
4645else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004646 echo "configure: failed program was:" >&5
4647 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004648 rm -rf conftest*
4649 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004650fi
4651rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00004652fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004653
4654echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004655 if test $ac_cv_var_tzname = yes; then
4656 cat >> confdefs.h <<\EOF
4657#define HAVE_TZNAME 1
4658EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004659
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004660 fi
4661fi
4662
4663
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004664echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004665echo "configure:4666: checking for time.h that defines altzone" >&5
4666if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004667 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004668else
4669 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004670#line 4671 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004671#include "confdefs.h"
4672#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004673int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004674return altzone;
4675; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004676EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004677if { (eval echo configure:4678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004678 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004679 ac_cv_header_time_altzone=yes
4680else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004681 echo "configure: failed program was:" >&5
4682 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004683 rm -rf conftest*
4684 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00004685fi
4686rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004687fi
4688
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004689echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004690if test $ac_cv_header_time_altzone = yes; then
4691 cat >> confdefs.h <<\EOF
4692#define HAVE_ALTZONE 1
4693EOF
4694
4695fi
4696
Guido van Rossumda88dad1995-01-26 00:46:29 +00004697was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004698echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004699echo "configure:4700: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004700cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004701#line 4702 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004702#include "confdefs.h"
4703
4704#include <sys/types.h>
4705#include <sys/select.h>
4706#include <sys/time.h>
4707
Guido van Rossumf78abae1997-01-21 22:02:36 +00004708int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004709;
4710; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004711EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004712if { (eval echo configure:4713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004713 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004714 cat >> confdefs.h <<\EOF
4715#define SYS_SELECT_WITH_SYS_TIME 1
4716EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004717 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004718else
4719 echo "configure: failed program was:" >&5
4720 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00004721fi
4722rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004723echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004724
4725# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00004726
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004727echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004728echo "configure:4729: checking whether char is unsigned" >&5
4729if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004730 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004731else
4732 if test "$GCC" = yes; then
4733 # GCC predefines this symbol on systems where it applies.
4734cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004735#line 4736 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004736#include "confdefs.h"
4737#ifdef __CHAR_UNSIGNED__
4738 yes
4739#endif
4740
4741EOF
4742if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4743 egrep "yes" >/dev/null 2>&1; then
4744 rm -rf conftest*
4745 ac_cv_c_char_unsigned=yes
4746else
4747 rm -rf conftest*
4748 ac_cv_c_char_unsigned=no
4749fi
4750rm -f conftest*
4751
4752else
4753if test "$cross_compiling" = yes; then
4754 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4755else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004756 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004757#line 4758 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004758#include "confdefs.h"
4759/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004760#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00004761#define volatile
4762#endif
4763main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00004764 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00004765}
4766EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004767if { (eval echo configure:4768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00004768then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004769 ac_cv_c_char_unsigned=yes
4770else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004771 echo "configure: failed program was:" >&5
4772 cat conftest.$ac_ext >&5
4773 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004774 ac_cv_c_char_unsigned=no
4775fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004776rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004777fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004778
4779fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004780fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004781
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004782echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004783if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
4784 cat >> confdefs.h <<\EOF
4785#define __CHAR_UNSIGNED__ 1
4786EOF
4787
4788fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004789
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004790echo $ac_n "checking for working const""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004791echo "configure:4792: checking for working const" >&5
4792if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004793 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004794else
4795 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004796#line 4797 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004797#include "confdefs.h"
4798
Guido van Rossumf78abae1997-01-21 22:02:36 +00004799int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004800
4801/* Ultrix mips cc rejects this. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004802typedef int charset[2]; const charset x;
4803/* SunOS 4.1.1 cc rejects this. */
4804char const *const *ccp;
4805char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004806/* NEC SVR4.0.2 mips cc rejects this. */
4807struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004808static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00004809/* AIX XL C 1.02.0.0 rejects this.
4810 It does not let you subtract one const X* pointer from another in an arm
4811 of an if-expression whose if-part is not a constant expression */
4812const char *g = "string";
4813ccp = &g + (g ? g-g : 0);
4814/* HPUX 7.0 cc rejects these. */
4815++ccp;
4816p = (char**) ccp;
4817ccp = (char const *const *) p;
4818{ /* SCO 3.2v4 cc rejects this. */
4819 char *t;
4820 char const *s = 0 ? (char *) 0 : (char const *) 0;
4821
4822 *t++ = 0;
4823}
4824{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004825 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00004826 const int *foo = &x[0];
4827 ++foo;
4828}
4829{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4830 typedef const int *iptr;
4831 iptr p = 0;
4832 ++p;
4833}
4834{ /* AIX XL C 1.02.0.0 rejects this saying
4835 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4836 struct s { int j; const int *ap[3]; };
4837 struct s *b; b->j = 5;
4838}
4839{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4840 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004841}
4842
4843; return 0; }
4844EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004845if { (eval echo configure:4846: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004846 rm -rf conftest*
4847 ac_cv_c_const=yes
4848else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004849 echo "configure: failed program was:" >&5
4850 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004851 rm -rf conftest*
4852 ac_cv_c_const=no
4853fi
4854rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004855fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004856
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004857echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004858if test $ac_cv_c_const = no; then
4859 cat >> confdefs.h <<\EOF
4860#define const
4861EOF
4862
4863fi
4864
Guido van Rossumef2255b2000-03-10 22:30:29 +00004865echo $ac_n "checking for inline""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004866echo "configure:4867: checking for inline" >&5
4867if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00004868 echo $ac_n "(cached) $ac_c" 1>&6
4869else
4870 ac_cv_c_inline=no
4871for ac_kw in inline __inline__ __inline; do
4872 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004873#line 4874 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00004874#include "confdefs.h"
4875
4876int main() {
4877} $ac_kw foo() {
4878; return 0; }
4879EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004880if { (eval echo configure:4881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00004881 rm -rf conftest*
4882 ac_cv_c_inline=$ac_kw; break
4883else
4884 echo "configure: failed program was:" >&5
4885 cat conftest.$ac_ext >&5
4886fi
4887rm -f conftest*
4888done
4889
4890fi
4891
4892echo "$ac_t""$ac_cv_c_inline" 1>&6
4893case "$ac_cv_c_inline" in
4894 inline | yes) ;;
4895 no) cat >> confdefs.h <<\EOF
4896#define inline
4897EOF
4898 ;;
4899 *) cat >> confdefs.h <<EOF
4900#define inline $ac_cv_c_inline
4901EOF
4902 ;;
4903esac
4904
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004905
Guido van Rossumda88dad1995-01-26 00:46:29 +00004906works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004907echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004908echo "configure:4909: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004909cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004910#line 4911 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004911#include "confdefs.h"
4912
Guido van Rossumf78abae1997-01-21 22:02:36 +00004913int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004914volatile int x; x = 0;
4915; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004916EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004917if { (eval echo configure:4918: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004918 rm -rf conftest*
4919 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004920else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004921 echo "configure: failed program was:" >&5
4922 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004923 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004924 cat >> confdefs.h <<\EOF
4925#define volatile
4926EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004927
4928fi
4929rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004930echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004931
Guido van Rossumda88dad1995-01-26 00:46:29 +00004932works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004933echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004934echo "configure:4935: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004935cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004936#line 4937 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004937#include "confdefs.h"
4938
Guido van Rossumf78abae1997-01-21 22:02:36 +00004939int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004940signed char c;
4941; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004942EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004943if { (eval echo configure:4944: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004944 rm -rf conftest*
4945 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004946else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004947 echo "configure: failed program was:" >&5
4948 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004949 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004950 cat >> confdefs.h <<\EOF
4951#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00004952EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004953
4954fi
4955rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004956echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004957
Guido van Rossumda88dad1995-01-26 00:46:29 +00004958have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004959echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004960echo "configure:4961: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004961cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004962#line 4963 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004963#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004964int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00004965int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004966return foo(10);
4967; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004968EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004969if { (eval echo configure:4970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004970 rm -rf conftest*
4971 cat >> confdefs.h <<\EOF
4972#define HAVE_PROTOTYPES 1
4973EOF
4974 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004975else
4976 echo "configure: failed program was:" >&5
4977 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00004978fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004979rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004980echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004981
Guido van Rossumda88dad1995-01-26 00:46:29 +00004982works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004983echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004984echo "configure:4985: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004985cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00004986#line 4987 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004987#include "confdefs.h"
4988
4989#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00004990int foo(int x, ...) {
4991 va_list va;
4992 va_start(va, x);
4993 va_arg(va, int);
4994 va_arg(va, char *);
4995 va_arg(va, double);
4996 return 0;
4997}
Guido van Rossum7f43da71994-08-01 12:15:30 +00004998
Guido van Rossumf78abae1997-01-21 22:02:36 +00004999int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00005000return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005001; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005002EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005003if { (eval echo configure:5004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005004 rm -rf conftest*
5005 cat >> confdefs.h <<\EOF
5006#define HAVE_STDARG_PROTOTYPES 1
5007EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005008 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005009else
5010 echo "configure: failed program was:" >&5
5011 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005012fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005013rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005014echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005015
Guido van Rossumda88dad1995-01-26 00:46:29 +00005016if test "$have_prototypes" = yes; then
5017bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005018echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005019echo "configure:5020: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005020cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005021#line 5022 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005022#include "confdefs.h"
5023#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005024int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005025char **t;execve("@",t,t);
5026; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005027EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005028if { (eval echo configure:5029: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005029 :
5030else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005031 echo "configure: failed program was:" >&5
5032 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005033 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005034 cat >> confdefs.h <<\EOF
5035#define BAD_EXEC_PROTOTYPES 1
5036EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005037 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005038fi
5039rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005040echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005041fi
5042
Guido van Rossumda88dad1995-01-26 00:46:29 +00005043bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005044echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005045echo "configure:5046: checking for bad static forward" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005046if test "$cross_compiling" = yes; then
5047 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5048else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005049 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005050#line 5051 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005051#include "confdefs.h"
5052
5053struct s { int a; int b; };
5054static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005055int foobar() {
5056 static int random;
5057 random = (int) &foo;
5058 return random;
5059}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005060static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005061main() {
5062 exit(!((int)&foo == foobar()));
5063}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005064
5065EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005066if { (eval echo configure:5067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00005067then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005068 :
5069else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005070 echo "configure: failed program was:" >&5
5071 cat conftest.$ac_ext >&5
5072 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005073 cat >> confdefs.h <<\EOF
5074#define BAD_STATIC_FORWARD 1
5075EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005076 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005077fi
5078rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00005079fi
5080
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005081echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005082
Guido van Rossumda88dad1995-01-26 00:46:29 +00005083va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005084echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005085echo "configure:5086: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005086cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005087#line 5088 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005088#include "confdefs.h"
5089
5090#ifdef HAVE_STDARG_PROTOTYPES
5091#include <stdarg.h>
5092#else
5093#include <varargs.h>
5094#endif
5095
Guido van Rossumf78abae1997-01-21 22:02:36 +00005096int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005097va_list list1, list2; list1 = list2;
5098; return 0; }
5099EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005100if { (eval echo configure:5101: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005101 :
5102else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005103 echo "configure: failed program was:" >&5
5104 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005105 rm -rf conftest*
5106 cat >> confdefs.h <<\EOF
5107#define VA_LIST_IS_ARRAY 1
5108EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005109 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005110fi
5111rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005112echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005113
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005114# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
5115echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005116echo "configure:5117: checking for gethostbyname_r" >&5
5117if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005118 echo $ac_n "(cached) $ac_c" 1>&6
5119else
5120 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005121#line 5122 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005122#include "confdefs.h"
5123/* System header to define __stub macros and hopefully few prototypes,
5124 which can conflict with char gethostbyname_r(); below. */
5125#include <assert.h>
5126/* Override any gcc2 internal prototype to avoid an error. */
5127/* We use char because int might match the return type of a gcc2
5128 builtin and then its argument prototype would still apply. */
5129char gethostbyname_r();
5130
5131int main() {
5132
5133/* The GNU C library defines this for functions which it implements
5134 to always fail with ENOSYS. Some functions are actually named
5135 something starting with __ and the normal name is an alias. */
5136#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
5137choke me
5138#else
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005139gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005140#endif
5141
5142; return 0; }
5143EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005144if { (eval echo configure:5145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005145 rm -rf conftest*
5146 eval "ac_cv_func_gethostbyname_r=yes"
5147else
5148 echo "configure: failed program was:" >&5
5149 cat conftest.$ac_ext >&5
5150 rm -rf conftest*
5151 eval "ac_cv_func_gethostbyname_r=no"
5152fi
5153rm -f conftest*
5154fi
5155
5156if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
5157 echo "$ac_t""yes" 1>&6
5158
5159 cat >> confdefs.h <<\EOF
5160#define HAVE_GETHOSTBYNAME_R 1
5161EOF
5162
5163 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005164echo "configure:5165: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005165 OLD_CFLAGS=$CFLAGS
5166 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
5167 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005168#line 5169 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005169#include "confdefs.h"
5170
5171# include <netdb.h>
5172
5173int main() {
5174
5175 char *name;
5176 struct hostent *he, *res;
5177 char buffer[2048];
5178 int buflen = 2048;
5179 int h_errnop;
5180
5181 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
5182
5183; return 0; }
5184EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005185if { (eval echo configure:5186: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005186 rm -rf conftest*
5187
5188 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005189#define HAVE_GETHOSTBYNAME_R 1
5190EOF
5191
5192 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005193#define HAVE_GETHOSTBYNAME_R_6_ARG 1
5194EOF
5195
5196 echo "$ac_t""yes" 1>&6
5197
5198else
5199 echo "configure: failed program was:" >&5
5200 cat conftest.$ac_ext >&5
5201 rm -rf conftest*
5202
5203 echo "$ac_t""no" 1>&6
5204 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005205echo "configure:5206: checking gethostbyname_r with 5 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005206 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005207#line 5208 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005208#include "confdefs.h"
5209
5210# include <netdb.h>
5211
5212int main() {
5213
5214 char *name;
5215 struct hostent *he;
5216 char buffer[2048];
5217 int buflen = 2048;
5218 int h_errnop;
5219
5220 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
5221
5222; return 0; }
5223EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005224if { (eval echo configure:5225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005225 rm -rf conftest*
5226
5227 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005228#define HAVE_GETHOSTBYNAME_R 1
5229EOF
5230
5231 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005232#define HAVE_GETHOSTBYNAME_R_5_ARG 1
5233EOF
5234
5235 echo "$ac_t""yes" 1>&6
5236
5237else
5238 echo "configure: failed program was:" >&5
5239 cat conftest.$ac_ext >&5
5240 rm -rf conftest*
5241
5242 echo "$ac_t""no" 1>&6
5243 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005244echo "configure:5245: checking gethostbyname_r with 3 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005245 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005246#line 5247 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005247#include "confdefs.h"
5248
5249# include <netdb.h>
5250
5251int main() {
5252
5253 char *name;
5254 struct hostent *he;
5255 struct hostent_data data;
5256
5257 (void) gethostbyname_r(name, he, &data);
5258
5259; return 0; }
5260EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005261if { (eval echo configure:5262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005262 rm -rf conftest*
5263
5264 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005265#define HAVE_GETHOSTBYNAME_R 1
5266EOF
5267
5268 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005269#define HAVE_GETHOSTBYNAME_R_3_ARG 1
5270EOF
5271
5272 echo "$ac_t""yes" 1>&6
5273
5274else
5275 echo "configure: failed program was:" >&5
5276 cat conftest.$ac_ext >&5
5277 rm -rf conftest*
5278
5279 echo "$ac_t""no" 1>&6
5280
5281fi
5282rm -f conftest*
5283
5284fi
5285rm -f conftest*
5286
5287fi
5288rm -f conftest*
5289 CFLAGS=$OLD_CFLAGS
5290
5291else
5292 echo "$ac_t""no" 1>&6
5293
Thomas Wouters3a584202000-08-05 23:28:51 +00005294 for ac_func in gethostbyname
5295do
5296echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005297echo "configure:5298: checking for $ac_func" >&5
5298if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005299 echo $ac_n "(cached) $ac_c" 1>&6
5300else
5301 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005302#line 5303 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005303#include "confdefs.h"
5304/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005305 which can conflict with char $ac_func(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005306#include <assert.h>
5307/* Override any gcc2 internal prototype to avoid an error. */
5308/* We use char because int might match the return type of a gcc2
5309 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005310char $ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005311
5312int main() {
5313
5314/* The GNU C library defines this for functions which it implements
5315 to always fail with ENOSYS. Some functions are actually named
5316 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005317#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005318choke me
5319#else
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005320$ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005321#endif
5322
5323; return 0; }
5324EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005325if { (eval echo configure:5326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005326 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005327 eval "ac_cv_func_$ac_func=yes"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005328else
5329 echo "configure: failed program was:" >&5
5330 cat conftest.$ac_ext >&5
5331 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005332 eval "ac_cv_func_$ac_func=no"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005333fi
5334rm -f conftest*
5335fi
5336
Thomas Wouters3a584202000-08-05 23:28:51 +00005337if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005338 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005339 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5340 cat >> confdefs.h <<EOF
5341#define $ac_tr_func 1
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005342EOF
Thomas Wouters3a584202000-08-05 23:28:51 +00005343
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005344else
5345 echo "$ac_t""no" 1>&6
5346fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005347done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005348
5349
5350fi
5351
5352
5353
5354
5355
5356
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005357
Guido van Rossum627b2d71993-12-24 10:39:16 +00005358# checks for system services
5359# (none yet)
5360
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005361# Linux requires this for correct f.p. operations
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005362echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005363echo "configure:5364: checking for __fpu_control" >&5
5364if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005365 echo $ac_n "(cached) $ac_c" 1>&6
5366else
5367 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005368#line 5369 "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005369#include "confdefs.h"
5370/* System header to define __stub macros and hopefully few prototypes,
5371 which can conflict with char __fpu_control(); below. */
5372#include <assert.h>
5373/* Override any gcc2 internal prototype to avoid an error. */
5374/* We use char because int might match the return type of a gcc2
5375 builtin and then its argument prototype would still apply. */
5376char __fpu_control();
5377
5378int main() {
5379
5380/* The GNU C library defines this for functions which it implements
5381 to always fail with ENOSYS. Some functions are actually named
5382 something starting with __ and the normal name is an alias. */
5383#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
5384choke me
5385#else
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005386__fpu_control();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005387#endif
5388
5389; return 0; }
5390EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005391if { (eval echo configure:5392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005392 rm -rf conftest*
5393 eval "ac_cv_func___fpu_control=yes"
5394else
5395 echo "configure: failed program was:" >&5
5396 cat conftest.$ac_ext >&5
5397 rm -rf conftest*
5398 eval "ac_cv_func___fpu_control=no"
5399fi
5400rm -f conftest*
5401fi
5402
5403if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
5404 echo "$ac_t""yes" 1>&6
5405 :
5406else
5407 echo "$ac_t""no" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005408echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005409echo "configure:5410: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00005410ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005411if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005412 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005413else
5414 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005415LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005416cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005417#line 5418 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005418#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005419/* Override any gcc2 internal prototype to avoid an error. */
5420/* We use char because int might match the return type of a gcc2
5421 builtin and then its argument prototype would still apply. */
5422char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00005423
Guido van Rossumf78abae1997-01-21 22:02:36 +00005424int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005425__fpu_control()
5426; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005427EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005428if { (eval echo configure:5429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005429 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005430 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005431else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005432 echo "configure: failed program was:" >&5
5433 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005434 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005435 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005436fi
5437rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005438LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005439
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005440fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005441if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005442 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005443 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5444 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005445 cat >> confdefs.h <<EOF
5446#define $ac_tr_lib 1
5447EOF
5448
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005449 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005450
5451else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005452 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005453fi
5454
5455
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005456fi
5457
5458
Guido van Rossum7f253911997-05-09 02:42:48 +00005459# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00005460echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005461echo "configure:5462: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00005462# Check whether --with-fpectl or --without-fpectl was given.
5463if test "${with_fpectl+set}" = set; then
5464 withval="$with_fpectl"
5465
5466if test "$withval" != no
5467then cat >> confdefs.h <<\EOF
5468#define WANT_SIGFPE_HANDLER 1
5469EOF
5470 echo "$ac_t""yes" 1>&6
5471else echo "$ac_t""no" 1>&6
5472fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00005473else
5474 echo "$ac_t""no" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00005475fi
5476
5477
Guido van Rossum7f43da71994-08-01 12:15:30 +00005478# check for --with-libm=...
5479
Guido van Rossum563e7081996-09-10 18:20:48 +00005480case $ac_sys_system in
5481next) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00005482BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00005483*) LIBM=-lm
5484esac
Guido van Rossum7f253911997-05-09 02:42:48 +00005485echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005486echo "configure:5487: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005487# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005488if test "${with_libm+set}" = set; then
5489 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005490
Guido van Rossum7f253911997-05-09 02:42:48 +00005491if test "$withval" = no
5492then LIBM=
5493 echo "$ac_t""force LIBM empty" 1>&6
5494elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005495then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00005496 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005497else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005498fi
Guido van Rossum7f253911997-05-09 02:42:48 +00005499else
5500 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005501fi
5502
5503
5504# check for --with-libc=...
5505
Guido van Rossum7f253911997-05-09 02:42:48 +00005506echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005507echo "configure:5508: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005508# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005509if test "${with_libc+set}" = set; then
5510 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005511
Guido van Rossum7f253911997-05-09 02:42:48 +00005512if test "$withval" = no
5513then LIBC=
5514 echo "$ac_t""force LIBC empty" 1>&6
5515elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005516then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00005517 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005518else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005519fi
Guido van Rossum7f253911997-05-09 02:42:48 +00005520else
5521 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005522fi
5523
5524
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005525# check for hypot() in math library
5526LIBS_SAVE=$LIBS
5527LIBS="$LIBS $LIBM"
5528for ac_func in hypot
5529do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005530echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005531echo "configure:5532: checking for $ac_func" >&5
5532if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005533 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005534else
5535 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005536#line 5537 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005537#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005538/* System header to define __stub macros and hopefully few prototypes,
5539 which can conflict with char $ac_func(); below. */
5540#include <assert.h>
5541/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005542/* We use char because int might match the return type of a gcc2
5543 builtin and then its argument prototype would still apply. */
5544char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005545
Guido van Rossumf78abae1997-01-21 22:02:36 +00005546int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005547
5548/* The GNU C library defines this for functions which it implements
5549 to always fail with ENOSYS. Some functions are actually named
5550 something starting with __ and the normal name is an alias. */
5551#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5552choke me
5553#else
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005554$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005555#endif
5556
5557; return 0; }
5558EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005559if { (eval echo configure:5560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005560 rm -rf conftest*
5561 eval "ac_cv_func_$ac_func=yes"
5562else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005563 echo "configure: failed program was:" >&5
5564 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005565 rm -rf conftest*
5566 eval "ac_cv_func_$ac_func=no"
5567fi
5568rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005569fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005570
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005571if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5572 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005573 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5574 cat >> confdefs.h <<EOF
5575#define $ac_tr_func 1
5576EOF
5577
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005578else
5579 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005580LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005581fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005582done
5583
Guido van Rossumf78abae1997-01-21 22:02:36 +00005584
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005585LIBS=$LIBS_SAVE
5586
Guido van Rossumda88dad1995-01-26 00:46:29 +00005587# check for getopt
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005588echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005589echo "configure:5590: checking for genuine getopt" >&5
5590if eval "test \"`echo '$''{'ac_cv_func_getopt'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005591 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005592else
5593 if test "$cross_compiling" = yes; then
5594 ac_cv_func_getopt=no
5595else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005596 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005597#line 5598 "configure"
Guido van Rossumda88dad1995-01-26 00:46:29 +00005598#include "confdefs.h"
5599#include <stdio.h>
5600extern int optind, opterr, getopt();
5601extern char* optarg;
5602int main() {
5603 char* av[] = { "testprog", "parameter", "-fFlag", NULL };
5604 opterr = 0;
5605 if (getopt(3, av, "f:") == 'f') { exit(1); }
5606 exit(0);
5607}
5608EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005609if { (eval echo configure:5610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00005610then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005611 ac_cv_func_getopt=yes
5612else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005613 echo "configure: failed program was:" >&5
5614 cat conftest.$ac_ext >&5
5615 rm -fr conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00005616 ac_cv_func_getopt=no
5617fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00005618rm -fr conftest*
5619fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005620
5621fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005622echo "$ac_t""$ac_cv_func_getopt" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005623test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o"
5624
Guido van Rossumad713701997-07-10 22:42:38 +00005625# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00005626echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005627echo "configure:5628: checking what malloc(0) returns" >&5
5628if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
Guido van Rossumad713701997-07-10 22:42:38 +00005629 echo $ac_n "(cached) $ac_c" 1>&6
5630else
5631 if test "$cross_compiling" = yes; then
5632 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5633else
5634 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005635#line 5636 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00005636#include "confdefs.h"
5637#include <stdio.h>
5638#ifdef HAVE_STDLIB
5639#include <stdlib.h>
5640#else
5641char *malloc(), *realloc();
5642int *free();
5643#endif
5644main() {
5645 char *p;
5646 p = malloc(0);
5647 if (p == NULL) exit(1);
5648 p = realloc(p, 0);
5649 if (p == NULL) exit(1);
5650 free(p);
5651 exit(0);
5652}
5653EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005654if { (eval echo configure:5655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumad713701997-07-10 22:42:38 +00005655then
5656 ac_cv_malloc_zero=nonnull
5657else
5658 echo "configure: failed program was:" >&5
5659 cat conftest.$ac_ext >&5
5660 rm -fr conftest*
5661 ac_cv_malloc_zero=null
5662fi
5663rm -fr conftest*
5664fi
5665
5666fi
5667
5668echo "$ac_t""$ac_cv_malloc_zero" 1>&6
5669if test "$ac_cv_malloc_zero" = null
5670then
5671 cat >> confdefs.h <<\EOF
5672#define MALLOC_ZERO_RETURNS_NULL 1
5673EOF
5674
5675fi
5676
Guido van Rossumef2255b2000-03-10 22:30:29 +00005677# check for wchar.h
5678ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
5679echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005680echo "configure:5681: checking for wchar.h" >&5
5681if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005682 echo $ac_n "(cached) $ac_c" 1>&6
5683else
5684 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005685#line 5686 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005686#include "confdefs.h"
5687#include <wchar.h>
5688EOF
5689ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005690{ (eval echo configure:5691: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00005691ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5692if test -z "$ac_err"; then
5693 rm -rf conftest*
5694 eval "ac_cv_header_$ac_safe=yes"
5695else
5696 echo "$ac_err" >&5
5697 echo "configure: failed program was:" >&5
5698 cat conftest.$ac_ext >&5
5699 rm -rf conftest*
5700 eval "ac_cv_header_$ac_safe=no"
5701fi
5702rm -f conftest*
5703fi
5704if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5705 echo "$ac_t""yes" 1>&6
5706 cat >> confdefs.h <<\EOF
5707#define HAVE_WCHAR_H 1
5708EOF
5709 wchar_h="yes"
5710else
5711 echo "$ac_t""no" 1>&6
5712wchar_h="no"
5713
5714fi
5715
5716
5717# check for usable wchar_t
5718usable_wchar_t="unkown"
5719echo $ac_n "checking for usable wchar_t""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005720echo "configure:5721: checking for usable wchar_t" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +00005721if test "$cross_compiling" = yes; then
5722 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5723else
5724 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005725#line 5726 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005726#include "confdefs.h"
5727
5728#include "wchar.h"
5729#include "wctype.h"
5730main() {
5731 wchar_t s;
5732 if (sizeof(s) == 2)
5733 exit(0);
5734 else
5735 exit(1);
5736}
5737
5738EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005739if { (eval echo configure:5740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumef2255b2000-03-10 22:30:29 +00005740then
5741 cat >> confdefs.h <<\EOF
5742#define HAVE_USABLE_WCHAR_T 1
5743EOF
5744 usable_wchar_t="yes"
5745else
5746 echo "configure: failed program was:" >&5
5747 cat conftest.$ac_ext >&5
5748 rm -fr conftest*
5749 usable_wchar_t="no"
5750fi
5751rm -fr conftest*
5752fi
5753
5754echo "$ac_t""$usable_wchar_t" 1>&6
5755
5756# check for endianness
5757echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005758echo "configure:5759: checking whether byte ordering is bigendian" >&5
5759if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005760 echo $ac_n "(cached) $ac_c" 1>&6
5761else
5762 ac_cv_c_bigendian=unknown
5763# See if sys/param.h defines the BYTE_ORDER macro.
5764cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005765#line 5766 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005766#include "confdefs.h"
5767#include <sys/types.h>
5768#include <sys/param.h>
5769int main() {
5770
5771#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
5772 bogus endian macros
5773#endif
5774; return 0; }
5775EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005776if { (eval echo configure:5777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005777 rm -rf conftest*
5778 # It does; now see whether it defined to BIG_ENDIAN or not.
5779cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005780#line 5781 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005781#include "confdefs.h"
5782#include <sys/types.h>
5783#include <sys/param.h>
5784int main() {
5785
5786#if BYTE_ORDER != BIG_ENDIAN
5787 not big endian
5788#endif
5789; return 0; }
5790EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005791if { (eval echo configure:5792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005792 rm -rf conftest*
5793 ac_cv_c_bigendian=yes
5794else
5795 echo "configure: failed program was:" >&5
5796 cat conftest.$ac_ext >&5
5797 rm -rf conftest*
5798 ac_cv_c_bigendian=no
5799fi
5800rm -f conftest*
5801else
5802 echo "configure: failed program was:" >&5
5803 cat conftest.$ac_ext >&5
5804fi
5805rm -f conftest*
5806if test $ac_cv_c_bigendian = unknown; then
5807if test "$cross_compiling" = yes; then
5808 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5809else
5810 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005811#line 5812 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005812#include "confdefs.h"
5813main () {
5814 /* Are we little or big endian? From Harbison&Steele. */
5815 union
5816 {
5817 long l;
5818 char c[sizeof (long)];
5819 } u;
5820 u.l = 1;
5821 exit (u.c[sizeof (long) - 1] == 1);
5822}
5823EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005824if { (eval echo configure:5825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumef2255b2000-03-10 22:30:29 +00005825then
5826 ac_cv_c_bigendian=no
5827else
5828 echo "configure: failed program was:" >&5
5829 cat conftest.$ac_ext >&5
5830 rm -fr conftest*
5831 ac_cv_c_bigendian=yes
5832fi
5833rm -fr conftest*
5834fi
5835
5836fi
5837fi
5838
5839echo "$ac_t""$ac_cv_c_bigendian" 1>&6
5840if test $ac_cv_c_bigendian = yes; then
5841 cat >> confdefs.h <<\EOF
5842#define WORDS_BIGENDIAN 1
5843EOF
5844
5845fi
5846
5847
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005848# Check whether right shifting a negative integer extends the sign bit
5849# or fills with zeros (like the Cray J90, according to Tim Peters).
5850echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005851echo "configure:5852: checking whether right shift extends the sign bit" >&5
5852if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
Vladimir Marangozova6180282000-07-12 05:05:06 +00005853 echo $ac_n "(cached) $ac_c" 1>&6
5854else
5855
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005856if test "$cross_compiling" = yes; then
5857 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5858else
5859 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005860#line 5861 "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005861#include "confdefs.h"
5862
5863int main()
5864{
Vladimir Marangozova6180282000-07-12 05:05:06 +00005865 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005866}
5867
5868EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005869if { (eval echo configure:5870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Vladimir Marangozova6180282000-07-12 05:05:06 +00005870then
5871 ac_cv_rshift_extends_sign=yes
5872else
5873 echo "configure: failed program was:" >&5
5874 cat conftest.$ac_ext >&5
5875 rm -fr conftest*
5876 ac_cv_rshift_extends_sign=no
5877fi
5878rm -fr conftest*
5879fi
5880
5881fi
5882
5883echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
5884if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005885then
5886 cat >> confdefs.h <<\EOF
5887#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
5888EOF
5889
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005890fi
5891
5892
Guido van Rossum95713eb2000-05-18 20:53:31 +00005893# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
5894# Add sys/socket.h to confdefs.h
5895cat >> confdefs.h <<\EOF
5896#ifdef HAVE_SYS_SOCKET_H
5897#include <sys/socket.h>
5898#endif
5899EOF
5900echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005901echo "configure:5902: checking for socklen_t" >&5
5902if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
Guido van Rossum95713eb2000-05-18 20:53:31 +00005903 echo $ac_n "(cached) $ac_c" 1>&6
5904else
5905 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005906#line 5907 "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +00005907#include "confdefs.h"
5908#include <sys/types.h>
5909#if STDC_HEADERS
5910#include <stdlib.h>
5911#include <stddef.h>
5912#endif
5913EOF
5914if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5915 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5916 rm -rf conftest*
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005917 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +00005918else
5919 rm -rf conftest*
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005920 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +00005921fi
5922rm -f conftest*
5923
5924fi
Guido van Rossum9e8181b2000-09-19 00:46:46 +00005925echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
5926if test $ac_cv_type_socklen_t = no; then
5927 cat >> confdefs.h <<\EOF
Guido van Rossum95713eb2000-05-18 20:53:31 +00005928#define socklen_t int
5929EOF
5930
5931fi
5932
5933
Guido van Rossum627b2d71993-12-24 10:39:16 +00005934# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005935trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005936cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005937# This file is a shell script that caches the results of configure
5938# tests run on this system so they can be shared between configure
5939# scripts and configure runs. It is not useful on other systems.
5940# If it contains results you don't want to keep, you may remove or edit it.
5941#
5942# By default, configure uses ./config.cache as the cache file,
5943# creating it if it does not exist already. You can give configure
5944# the --cache-file=FILE option to use a different cache file; that is
5945# what configure does when it calls configure scripts in
5946# subdirectories, so they share the cache.
5947# Giving --cache-file=/dev/null disables caching, for debugging configure.
5948# config.status only pays attention to the cache file if you give it the
5949# --recheck option to rerun configure.
5950#
5951EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00005952# The following way of writing the cache mishandles newlines in values,
5953# but we know of no workaround that is simple, portable, and efficient.
5954# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005955# Ultrix sh set writes to stderr and can't be redirected directly,
5956# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005957(set) 2>&1 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005958 case `(ac_space=' '; set | grep ac_space) 2>&1` in
Guido van Rossumf78abae1997-01-21 22:02:36 +00005959 *ac_space=\ *)
5960 # `set' does not quote correctly, so add quotes (double-quote substitution
5961 # turns \\\\ into \\, and sed turns \\ into \).
5962 sed -n \
5963 -e "s/'/'\\\\''/g" \
5964 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5965 ;;
5966 *)
5967 # `set' quotes correctly as required by POSIX, so do not add quotes.
5968 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5969 ;;
5970 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005971if cmp -s $cache_file confcache; then
5972 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005973else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005974 if test -w $cache_file; then
5975 echo "updating cache $cache_file"
5976 cat confcache > $cache_file
5977 else
5978 echo "not updating unwritable cache $cache_file"
5979 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005980fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005981rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00005982
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005983trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005984
5985test "x$prefix" = xNONE && prefix=$ac_default_prefix
5986# Let make expand exec_prefix.
5987test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00005988
Guido van Rossum7f43da71994-08-01 12:15:30 +00005989# Any assignment to VPATH causes Sun make to only execute
5990# the first set of double-colon rules, so remove it if not needed.
5991# If there is a colon in the path, we need to keep it.
5992if test "x$srcdir" = x.; then
5993 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
5994fi
5995
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005996trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00005997
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005998DEFS=-DHAVE_CONFIG_H
5999
6000# Without the "./", some shells look in PATH for config.status.
6001: ${CONFIG_STATUS=./config.status}
6002
6003echo creating $CONFIG_STATUS
6004rm -f $CONFIG_STATUS
6005cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006006#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00006007# Generated automatically by configure.
6008# Run this file to recreate the current configuration.
6009# This directory was configured as follows,
6010# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6011#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006012# $0 $ac_configure_args
6013#
6014# Compiler output produced by configure, useful for debugging
6015# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00006016
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006017ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006018for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00006019do
Guido van Rossum7f43da71994-08-01 12:15:30 +00006020 case "\$ac_option" in
6021 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006022 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6023 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00006024 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossum9e8181b2000-09-19 00:46:46 +00006025 echo "$CONFIG_STATUS generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006026 exit 0 ;;
6027 -help | --help | --hel | --he | --h)
6028 echo "\$ac_cs_usage"; exit 0 ;;
6029 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00006030 esac
6031done
6032
Guido van Rossum7f43da71994-08-01 12:15:30 +00006033ac_given_srcdir=$srcdir
Guido van Rossum627b2d71993-12-24 10:39:16 +00006034
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006035trap 'rm -fr `echo "Makefile \
6036 Objects/Makefile \
6037 Parser/Makefile \
Sjoerd Mullendera1795032000-08-17 11:41:06 +00006038 Grammar/Makefile \
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006039 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00006040 Modules/Makefile.pre \
Barry Warsawef82cd72000-06-30 16:21:01 +00006041 Modules/Setup.config config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006042EOF
6043cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006044
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006045# Protect against being on the right side of a sed subst in config.status.
6046sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6047 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006048$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00006049$extrasub
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006050s%@SHELL@%$SHELL%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006051s%@CFLAGS@%$CFLAGS%g
6052s%@CPPFLAGS@%$CPPFLAGS%g
6053s%@CXXFLAGS@%$CXXFLAGS%g
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006054s%@FFLAGS@%$FFLAGS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006055s%@DEFS@%$DEFS%g
6056s%@LDFLAGS@%$LDFLAGS%g
6057s%@LIBS@%$LIBS%g
6058s%@exec_prefix@%$exec_prefix%g
6059s%@prefix@%$prefix%g
6060s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006061s%@bindir@%$bindir%g
6062s%@sbindir@%$sbindir%g
6063s%@libexecdir@%$libexecdir%g
6064s%@datadir@%$datadir%g
6065s%@sysconfdir@%$sysconfdir%g
6066s%@sharedstatedir@%$sharedstatedir%g
6067s%@localstatedir@%$localstatedir%g
6068s%@libdir@%$libdir%g
6069s%@includedir@%$includedir%g
6070s%@oldincludedir@%$oldincludedir%g
6071s%@infodir@%$infodir%g
6072s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00006073s%@VERSION@%$VERSION%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006074s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00006075s%@SGI_ABI@%$SGI_ABI%g
Guido van Rossum95012191999-12-16 17:50:52 +00006076s%@SET_CXX@%$SET_CXX%g
6077s%@MAINOBJ@%$MAINOBJ%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006078s%@CC@%$CC%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00006079s%@MAKE_LDLIBRARY@%$MAKE_LDLIBRARY%g
6080s%@LDLIBRARY@%$LDLIBRARY%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00006081s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006082s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006083s%@AR@%$AR%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00006084s%@INSTALL@%$INSTALL%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00006085s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6086s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006087s%@LN@%$LN%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00006088s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006089s%@CPP@%$CPP%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00006090s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00006091s%@SO@%$SO%g
6092s%@LDSHARED@%$LDSHARED%g
6093s%@CCSHARED@%$CCSHARED%g
6094s%@LINKFORSHARED@%$LINKFORSHARED%g
Guido van Rossum009f7871997-12-04 00:51:42 +00006095s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00006096s%@LDLAST@%$LDLAST%g
Barry Warsawef82cd72000-06-30 16:21:01 +00006097s%@USE_GC_MODULE@%$USE_GC_MODULE%g
Fred Drakea50d6ec2000-08-31 16:13:20 +00006098s%@USE_BSDDB_MODULE@%$USE_BSDDB_MODULE%g
Skip Montanaroed33c9a2000-09-08 02:17:15 +00006099s%@HAVE_LIBDB@%$HAVE_LIBDB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006100s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossume97ee181999-12-20 21:27:22 +00006101s%@DYNLOADFILE@%$DYNLOADFILE%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006102s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006103s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
6104s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
6105s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006106s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006107s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006108s%@LIBM@%$LIBM%g
6109s%@LIBC@%$LIBC%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006110
6111CEOF
6112EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00006113
6114cat >> $CONFIG_STATUS <<\EOF
6115
6116# Split the substitutions into bite-sized pieces for seds with
6117# small command number limits, like on Digital OSF/1 and HP-UX.
6118ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6119ac_file=1 # Number of current file.
6120ac_beg=1 # First line for current file.
6121ac_end=$ac_max_sed_cmds # Line after last line for current file.
6122ac_more_lines=:
6123ac_sed_cmds=""
6124while $ac_more_lines; do
6125 if test $ac_beg -gt 1; then
6126 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6127 else
6128 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6129 fi
6130 if test ! -s conftest.s$ac_file; then
6131 ac_more_lines=false
6132 rm -f conftest.s$ac_file
6133 else
6134 if test -z "$ac_sed_cmds"; then
6135 ac_sed_cmds="sed -f conftest.s$ac_file"
6136 else
6137 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6138 fi
6139 ac_file=`expr $ac_file + 1`
6140 ac_beg=$ac_end
6141 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6142 fi
6143done
6144if test -z "$ac_sed_cmds"; then
6145 ac_sed_cmds=cat
6146fi
6147EOF
6148
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006149cat >> $CONFIG_STATUS <<EOF
6150
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006151CONFIG_FILES=\${CONFIG_FILES-"Makefile \
6152 Objects/Makefile \
6153 Parser/Makefile \
Sjoerd Mullendera1795032000-08-17 11:41:06 +00006154 Grammar/Makefile \
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006155 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00006156 Modules/Makefile.pre \
Barry Warsawef82cd72000-06-30 16:21:01 +00006157 Modules/Setup.config"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006158EOF
6159cat >> $CONFIG_STATUS <<\EOF
6160for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00006161 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006162 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00006163 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006164 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6165 *) ac_file_in="${ac_file}.in" ;;
6166 esac
6167
Guido van Rossumf78abae1997-01-21 22:02:36 +00006168 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006169
6170 # Remove last slash and all that follows it. Not all systems have dirname.
6171 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6172 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6173 # The file is in a subdirectory.
6174 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006175 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006176 # A "../" for each directory in $ac_dir_suffix.
6177 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6178 else
6179 ac_dir_suffix= ac_dots=
6180 fi
6181
6182 case "$ac_given_srcdir" in
6183 .) srcdir=.
6184 if test -z "$ac_dots"; then top_srcdir=.
6185 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6186 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6187 *) # Relative path.
6188 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6189 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6190 esac
6191
Guido van Rossumf78abae1997-01-21 22:02:36 +00006192
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006193 echo creating "$ac_file"
6194 rm -f "$ac_file"
6195 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6196 case "$ac_file" in
6197 *Makefile*) ac_comsub="1i\\
6198# $configure_input" ;;
6199 *) ac_comsub= ;;
6200 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00006201
6202 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006203 sed -e "$ac_comsub
6204s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006205s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006206s%@top_srcdir@%$top_srcdir%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00006207" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00006208fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00006209rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006210
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006211# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6212# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00006213#
6214# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006215ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
6216ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006217ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006218ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006219# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006220ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6221ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006222ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006223ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006224# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006225ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6226ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006227ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006228ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006229
Guido van Rossumf78abae1997-01-21 22:02:36 +00006230if test "${CONFIG_HEADERS+set}" != set; then
6231EOF
6232cat >> $CONFIG_STATUS <<EOF
6233 CONFIG_HEADERS="config.h"
6234EOF
6235cat >> $CONFIG_STATUS <<\EOF
6236fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006237for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00006238 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006239 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00006240 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006241 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6242 *) ac_file_in="${ac_file}.in" ;;
6243 esac
6244
Guido van Rossum7f43da71994-08-01 12:15:30 +00006245 echo creating $ac_file
6246
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006247 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00006248 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6249 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006250
6251EOF
6252
6253# Transform confdefs.h into a sed script conftest.vals that substitutes
6254# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006255# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006256# Protect against being in an unquoted here document in config.status.
6257rm -f conftest.vals
6258cat > conftest.hdr <<\EOF
6259s/[\\&%]/\\&/g
6260s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006261s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006262s%ac_d%ac_u%gp
6263s%ac_u%ac_e%gp
6264EOF
6265sed -n -f conftest.hdr confdefs.h > conftest.vals
6266rm -f conftest.hdr
6267
6268# This sed command replaces #undef with comments. This is necessary, for
6269# example, in the case of _POSIX_SOURCE, which is predefined and required
6270# on some systems where configure will not decide to define it.
6271cat >> conftest.vals <<\EOF
6272s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6273EOF
6274
6275# Break up conftest.vals because some shells have a limit on
6276# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006277
6278rm -f conftest.tail
6279while :
6280do
6281 ac_lines=`grep -c . conftest.vals`
6282 # grep -c gives empty output for an empty file on some AIX systems.
6283 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6284 # Write a limited-size here document to conftest.frag.
6285 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6286 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6287 echo 'CEOF
6288 sed -f conftest.frag conftest.in > conftest.out
6289 rm -f conftest.in
6290 mv conftest.out conftest.in
6291' >> $CONFIG_STATUS
6292 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6293 rm -f conftest.vals
6294 mv conftest.tail conftest.vals
6295done
6296rm -f conftest.vals
6297
6298cat >> $CONFIG_STATUS <<\EOF
6299 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00006300 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006301 cat conftest.in >> conftest.h
6302 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00006303 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00006304 echo "$ac_file is unchanged"
6305 rm -f conftest.h
6306 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006307 # Remove last slash and all that follows it. Not all systems have dirname.
6308 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6309 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6310 # The file is in a subdirectory.
6311 test ! -d "$ac_dir" && mkdir "$ac_dir"
6312 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006313 rm -f $ac_file
6314 mv conftest.h $ac_file
6315 fi
6316fi; done
6317
Guido van Rossumf78abae1997-01-21 22:02:36 +00006318EOF
6319cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006320
Guido van Rossumf78abae1997-01-21 22:02:36 +00006321EOF
6322cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006323
6324exit 0
6325EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006326chmod +x $CONFIG_STATUS
6327rm -fr confdefs* $ac_clean_files
Guido van Rossum9e8181b2000-09-19 00:46:46 +00006328test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00006329