blob: 0329456972cfc866dab94280998a5a9d0901b85b [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00003# From configure.in Revision: 1.153
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.
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +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
Barry Warsawef82cd72000-06-30 16:21:01 +000037 --with(out)-cycle-gc disable/enable garbage collection"
38ac_help="$ac_help
Fred Drakea50d6ec2000-08-31 16:13:20 +000039 --with(out)-libdb disable/enable bsddb module"
40ac_help="$ac_help
Barry Warsawef82cd72000-06-30 16:21:01 +000041 --with-wctype-functions use wctype.h functions"
42ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000043 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000044ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000045 --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000046ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000047 --with-fpectl enable SIGFPE catching"
Guido van Rossum7f253911997-05-09 02:42:48 +000048ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000049 --with-libm=STRING math library"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000050ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000051 --with-libc=STRING C library"
Guido van Rossum627b2d71993-12-24 10:39:16 +000052
Guido van Rossum7f43da71994-08-01 12:15:30 +000053# Initialize some variables set by options.
54# The variables have the same names as the options, with
55# dashes changed to underlines.
56build=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000057cache_file=./config.cache
58exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +000059host=NONE
60no_create=
61nonopt=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000062no_recursion=
63prefix=NONE
64program_prefix=NONE
65program_suffix=NONE
66program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +000067silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000068site=
Guido van Rossum7f43da71994-08-01 12:15:30 +000069srcdir=
70target=NONE
71verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000072x_includes=NONE
73x_libraries=NONE
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000074bindir='${exec_prefix}/bin'
75sbindir='${exec_prefix}/sbin'
76libexecdir='${exec_prefix}/libexec'
77datadir='${prefix}/share'
78sysconfdir='${prefix}/etc'
79sharedstatedir='${prefix}/com'
80localstatedir='${prefix}/var'
81libdir='${exec_prefix}/lib'
82includedir='${prefix}/include'
83oldincludedir='/usr/include'
84infodir='${prefix}/info'
85mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000086
87# Initialize some other variables.
88subdirs=
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000089MFLAGS= MAKEFLAGS=
Guido van Rossume6c2cf11999-01-08 21:08:33 +000090SHELL=${CONFIG_SHELL-/bin/sh}
Guido van Rossumf78abae1997-01-21 22:02:36 +000091# Maximum number of lines to put in a shell here document.
92ac_max_here_lines=12
Guido van Rossum7f43da71994-08-01 12:15:30 +000093
94ac_prev=
95for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +000096do
Guido van Rossum627b2d71993-12-24 10:39:16 +000097
Guido van Rossum7f43da71994-08-01 12:15:30 +000098 # If the previous option needs an argument, assign it.
99 if test -n "$ac_prev"; then
100 eval "$ac_prev=\$ac_option"
101 ac_prev=
102 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000103 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000104
Guido van Rossum7f43da71994-08-01 12:15:30 +0000105 case "$ac_option" in
106 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
107 *) ac_optarg= ;;
108 esac
109
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000110 # Accept the important Cygnus configure options, so we can diagnose typos.
111
Guido van Rossum7f43da71994-08-01 12:15:30 +0000112 case "$ac_option" in
113
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000114 -bindir | --bindir | --bindi | --bind | --bin | --bi)
115 ac_prev=bindir ;;
116 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
117 bindir="$ac_optarg" ;;
118
119 -build | --build | --buil | --bui | --bu)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000120 ac_prev=build ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000121 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000122 build="$ac_optarg" ;;
123
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000124 -cache-file | --cache-file | --cache-fil | --cache-fi \
125 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
126 ac_prev=cache_file ;;
127 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
128 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
129 cache_file="$ac_optarg" ;;
130
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000131 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
132 ac_prev=datadir ;;
133 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
134 | --da=*)
135 datadir="$ac_optarg" ;;
136
Guido van Rossum7f43da71994-08-01 12:15:30 +0000137 -disable-* | --disable-*)
138 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000139 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000140 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000141 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000142 fi
143 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
144 eval "enable_${ac_feature}=no" ;;
145
146 -enable-* | --enable-*)
147 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000148 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000149 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000150 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000151 fi
152 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
153 case "$ac_option" in
154 *=*) ;;
155 *) ac_optarg=yes ;;
156 esac
157 eval "enable_${ac_feature}='$ac_optarg'" ;;
158
Guido van Rossum7f43da71994-08-01 12:15:30 +0000159 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
160 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
161 | --exec | --exe | --ex)
162 ac_prev=exec_prefix ;;
163 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
164 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
165 | --exec=* | --exe=* | --ex=*)
166 exec_prefix="$ac_optarg" ;;
167
168 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000169 # Obsolete; use --with-gas.
170 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000171
172 -help | --help | --hel | --he)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000173 # Omit some internal or obsolete options to make the list less imposing.
174 # This message is too long to be a string in the A/UX 3.1 sh.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000175 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000176Usage: configure [options] [host]
177Options: [defaults in brackets after descriptions]
178Configuration:
179 --cache-file=FILE cache test results in FILE
180 --help print this message
181 --no-create do not create output files
182 --quiet, --silent do not print \`checking...' messages
183 --version print the version of autoconf that created configure
184Directory and file names:
185 --prefix=PREFIX install architecture-independent files in PREFIX
186 [$ac_default_prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000187 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000188 [same as prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000189 --bindir=DIR user executables in DIR [EPREFIX/bin]
190 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
191 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
192 --datadir=DIR read-only architecture-independent data in DIR
193 [PREFIX/share]
194 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
195 --sharedstatedir=DIR modifiable architecture-independent data in DIR
196 [PREFIX/com]
197 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
198 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
199 --includedir=DIR C header files in DIR [PREFIX/include]
200 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
201 --infodir=DIR info documentation in DIR [PREFIX/info]
202 --mandir=DIR man documentation in DIR [PREFIX/man]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000203 --srcdir=DIR find the sources in DIR [configure dir or ..]
204 --program-prefix=PREFIX prepend PREFIX to installed program names
205 --program-suffix=SUFFIX append SUFFIX to installed program names
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000206 --program-transform-name=PROGRAM
207 run sed PROGRAM on installed program names
208EOF
209 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000210Host type:
211 --build=BUILD configure for building on BUILD [BUILD=HOST]
212 --host=HOST configure for HOST [guessed]
213 --target=TARGET configure for TARGET [TARGET=HOST]
214Features and packages:
215 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
216 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
217 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
218 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
219 --x-includes=DIR X include files are in DIR
220 --x-libraries=DIR X library files are in DIR
Guido van Rossum7f43da71994-08-01 12:15:30 +0000221EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000222 if test -n "$ac_help"; then
223 echo "--enable and --with options recognized:$ac_help"
224 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000225 exit 0 ;;
226
227 -host | --host | --hos | --ho)
228 ac_prev=host ;;
229 -host=* | --host=* | --hos=* | --ho=*)
230 host="$ac_optarg" ;;
231
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000232 -includedir | --includedir | --includedi | --included | --include \
233 | --includ | --inclu | --incl | --inc)
234 ac_prev=includedir ;;
235 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
236 | --includ=* | --inclu=* | --incl=* | --inc=*)
237 includedir="$ac_optarg" ;;
238
239 -infodir | --infodir | --infodi | --infod | --info | --inf)
240 ac_prev=infodir ;;
241 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
242 infodir="$ac_optarg" ;;
243
244 -libdir | --libdir | --libdi | --libd)
245 ac_prev=libdir ;;
246 -libdir=* | --libdir=* | --libdi=* | --libd=*)
247 libdir="$ac_optarg" ;;
248
249 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
250 | --libexe | --libex | --libe)
251 ac_prev=libexecdir ;;
252 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
253 | --libexe=* | --libex=* | --libe=*)
254 libexecdir="$ac_optarg" ;;
255
256 -localstatedir | --localstatedir | --localstatedi | --localstated \
257 | --localstate | --localstat | --localsta | --localst \
258 | --locals | --local | --loca | --loc | --lo)
259 ac_prev=localstatedir ;;
260 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
261 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
262 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
263 localstatedir="$ac_optarg" ;;
264
265 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
266 ac_prev=mandir ;;
267 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
268 mandir="$ac_optarg" ;;
269
Guido van Rossum7f43da71994-08-01 12:15:30 +0000270 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000271 # Obsolete; use --without-fp.
272 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000273
274 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
275 | --no-cr | --no-c)
276 no_create=yes ;;
277
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000278 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
279 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
280 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000281
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000282 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
283 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
284 | --oldin | --oldi | --old | --ol | --o)
285 ac_prev=oldincludedir ;;
286 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
287 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
288 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
289 oldincludedir="$ac_optarg" ;;
290
Guido van Rossum7f43da71994-08-01 12:15:30 +0000291 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
292 ac_prev=prefix ;;
293 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
294 prefix="$ac_optarg" ;;
295
296 -program-prefix | --program-prefix | --program-prefi | --program-pref \
297 | --program-pre | --program-pr | --program-p)
298 ac_prev=program_prefix ;;
299 -program-prefix=* | --program-prefix=* | --program-prefi=* \
300 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
301 program_prefix="$ac_optarg" ;;
302
303 -program-suffix | --program-suffix | --program-suffi | --program-suff \
304 | --program-suf | --program-su | --program-s)
305 ac_prev=program_suffix ;;
306 -program-suffix=* | --program-suffix=* | --program-suffi=* \
307 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
308 program_suffix="$ac_optarg" ;;
309
310 -program-transform-name | --program-transform-name \
311 | --program-transform-nam | --program-transform-na \
312 | --program-transform-n | --program-transform- \
313 | --program-transform | --program-transfor \
314 | --program-transfo | --program-transf \
315 | --program-trans | --program-tran \
316 | --progr-tra | --program-tr | --program-t)
317 ac_prev=program_transform_name ;;
318 -program-transform-name=* | --program-transform-name=* \
319 | --program-transform-nam=* | --program-transform-na=* \
320 | --program-transform-n=* | --program-transform-=* \
321 | --program-transform=* | --program-transfor=* \
322 | --program-transfo=* | --program-transf=* \
323 | --program-trans=* | --program-tran=* \
324 | --progr-tra=* | --program-tr=* | --program-t=*)
325 program_transform_name="$ac_optarg" ;;
326
327 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
328 | -silent | --silent | --silen | --sile | --sil)
329 silent=yes ;;
330
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000331 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
332 ac_prev=sbindir ;;
333 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
334 | --sbi=* | --sb=*)
335 sbindir="$ac_optarg" ;;
336
337 -sharedstatedir | --sharedstatedir | --sharedstatedi \
338 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
339 | --sharedst | --shareds | --shared | --share | --shar \
340 | --sha | --sh)
341 ac_prev=sharedstatedir ;;
342 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
343 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
344 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
345 | --sha=* | --sh=*)
346 sharedstatedir="$ac_optarg" ;;
347
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000348 -site | --site | --sit)
349 ac_prev=site ;;
350 -site=* | --site=* | --sit=*)
351 site="$ac_optarg" ;;
352
Guido van Rossum7f43da71994-08-01 12:15:30 +0000353 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
354 ac_prev=srcdir ;;
355 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
356 srcdir="$ac_optarg" ;;
357
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000358 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
359 | --syscon | --sysco | --sysc | --sys | --sy)
360 ac_prev=sysconfdir ;;
361 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
362 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
363 sysconfdir="$ac_optarg" ;;
364
Guido van Rossum7f43da71994-08-01 12:15:30 +0000365 -target | --target | --targe | --targ | --tar | --ta | --t)
366 ac_prev=target ;;
367 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
368 target="$ac_optarg" ;;
369
370 -v | -verbose | --verbose | --verbos | --verbo | --verb)
371 verbose=yes ;;
372
373 -version | --version | --versio | --versi | --vers)
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +0000374 echo "configure generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000375 exit 0 ;;
376
377 -with-* | --with-*)
378 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000379 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000380 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000381 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000382 fi
383 ac_package=`echo $ac_package| sed 's/-/_/g'`
384 case "$ac_option" in
385 *=*) ;;
386 *) ac_optarg=yes ;;
387 esac
388 eval "with_${ac_package}='$ac_optarg'" ;;
389
390 -without-* | --without-*)
391 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000392 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000393 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000394 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000395 fi
396 ac_package=`echo $ac_package| sed 's/-/_/g'`
397 eval "with_${ac_package}=no" ;;
398
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000399 --x)
400 # Obsolete; use --with-x.
401 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000402
403 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
404 | --x-incl | --x-inc | --x-in | --x-i)
405 ac_prev=x_includes ;;
406 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
407 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
408 x_includes="$ac_optarg" ;;
409
410 -x-libraries | --x-libraries | --x-librarie | --x-librari \
411 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
412 ac_prev=x_libraries ;;
413 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
414 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
415 x_libraries="$ac_optarg" ;;
416
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000417 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000418 ;;
419
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000420 *)
Guido van Rossum0a516c91994-09-12 10:58:40 +0000421 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000422 echo "configure: warning: $ac_option: invalid host type" 1>&2
Guido van Rossum7f43da71994-08-01 12:15:30 +0000423 fi
Guido van Rossum0a516c91994-09-12 10:58:40 +0000424 if test "x$nonopt" != xNONE; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000425 { 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 +0000426 fi
427 nonopt="$ac_option"
428 ;;
429
430 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000431done
432
Guido van Rossum7f43da71994-08-01 12:15:30 +0000433if test -n "$ac_prev"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000434 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000435fi
436
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000437trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum7f43da71994-08-01 12:15:30 +0000438
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000439# File descriptor usage:
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000440# 0 standard input
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000441# 1 file creation
442# 2 errors and warnings
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000443# 3 some systems may open it to /dev/tty
444# 4 used on the Kubota Titan
445# 6 checking for... messages and results
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000446# 5 compiler messages saved in config.log
447if test "$silent" = yes; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000448 exec 6>/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000449else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000450 exec 6>&1
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000451fi
452exec 5>./config.log
453
454echo "\
455This file contains any messages produced by compilers while
456running configure, to aid debugging if configure makes a mistake.
457" 1>&5
458
459# Strip out --no-create and --no-recursion so they do not pile up.
460# Also quote any args containing shell metacharacters.
461ac_configure_args=
462for ac_arg
463do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000464 case "$ac_arg" in
465 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
466 | --no-cr | --no-c) ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000467 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
468 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
469 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
470 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
471 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000472 esac
473done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000474
475# NLS nuisances.
Guido van Rossumf78abae1997-01-21 22:02:36 +0000476# Only set these to C if already set. These must not be set unconditionally
477# because not all systems understand e.g. LANG=C (notably SCO).
478# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
479# Non-C LC_CTYPE values break the ctype check.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000480if test "${LANG+set}" = set; then LANG=C; export LANG; fi
Guido van Rossumf78abae1997-01-21 22:02:36 +0000481if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
482if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
483if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000484
Guido van Rossum7f43da71994-08-01 12:15:30 +0000485# confdefs.h avoids OS command line length limits that DEFS can exceed.
486rm -rf conftest* confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000487# AIX cpp loses on an empty file, so make sure it contains at least a newline.
488echo > confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000489
490# A filename unique to this package, relative to the directory that
491# configure is in, which we can look for to find out if srcdir is correct.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000492ac_unique_file=Include/object.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000493
494# Find the source files, if location was not specified.
495if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000496 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000497 # Try the directory containing this script, then its parent.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000498 ac_prog=$0
499 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
500 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
501 srcdir=$ac_confdir
502 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000503 srcdir=..
504 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000505else
506 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000507fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000508if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000509 if test "$ac_srcdir_defaulted" = yes; then
510 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000511 else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000512 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000513 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000514fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000515srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
516
517# Prefer explicitly selected file to automatically selected ones.
518if test -z "$CONFIG_SITE"; then
519 if test "x$prefix" != xNONE; then
520 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
521 else
522 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
523 fi
524fi
525for ac_site_file in $CONFIG_SITE; do
526 if test -r "$ac_site_file"; then
527 echo "loading site script $ac_site_file"
528 . "$ac_site_file"
529 fi
530done
531
532if test -r "$cache_file"; then
533 echo "loading cache $cache_file"
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +0000534 . $cache_file
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000535else
536 echo "creating cache $cache_file"
537 > $cache_file
538fi
539
Guido van Rossum7f43da71994-08-01 12:15:30 +0000540ac_ext=c
Guido van Rossum0a516c91994-09-12 10:58:40 +0000541# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000542ac_cpp='$CPP $CPPFLAGS'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000543ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000544ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000545cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000546
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000547ac_exeext=
548ac_objext=o
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000549if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
550 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
551 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
552 ac_n= ac_c='
553' ac_t=' '
554 else
555 ac_n=-n ac_c= ac_t=
556 fi
557else
558 ac_n= ac_c='\c' ac_t=
559fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000560
Guido van Rossum0a516c91994-09-12 10:58:40 +0000561
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000562
Guido van Rossum627b2d71993-12-24 10:39:16 +0000563
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000564# Set VERSION so we only need to edit in one place (i.e., here)
565
Guido van Rossumb9a22a12000-06-30 02:48:53 +0000566VERSION=2.0
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000567
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000568# NEXTSTEP stuff
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000569if test -f /usr/lib/NextStep/software_version -o -f /System/Library/CoreServices/software_version ; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000570
571 echo $ac_n "checking for --with-next-archs""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +0000572echo "configure:573: checking for --with-next-archs" >&5
Guido van Rossum563e7081996-09-10 18:20:48 +0000573 # Check whether --with-next-archs or --without-next-archs was given.
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000574if test "${with_next_archs+set}" = set; then
575 withval="$with_next_archs"
576
Guido van Rossum563e7081996-09-10 18:20:48 +0000577 if test -n "$withval"; then
578 ac_arch_flags=`/usr/lib/arch_tool -archify_list $withval`
579 # GCC does not currently support multi archs on the NeXT
580 with_gcc=no
581 fi
582 echo "$ac_t""$with_next_archs" 1>&6
583
584else
585 echo "$ac_t""none: using `arch`" 1>&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000586fi
587
Guido van Rossum563e7081996-09-10 18:20:48 +0000588
589 if test -z "$MACHDEP"
590 then
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000591 set X `hostinfo | egrep '(NeXT Mach|Kernel Release).*:' | \
Guido van Rossum563e7081996-09-10 18:20:48 +0000592 sed -e 's/://' -e 's/\./_/'` && \
593 ac_sys_system=next && ac_sys_release=$4
594
Guido van Rossumb97ef171997-09-28 05:44:03 +0000595 MACHDEP="$ac_sys_system$ac_sys_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000596 fi
597fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000598
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000599# Check whether --with-next-framework or --without-next-framework was given.
600if test "${with_next_framework+set}" = set; then
601 withval="$with_next_framework"
602 :
603fi
604
605# Check whether --with-dyld or --without-dyld was given.
606if test "${with_dyld+set}" = set; then
607 withval="$with_dyld"
608 :
609fi
610
Guido van Rossum91922671997-10-09 20:24:13 +0000611
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000612# Set name for machine-dependent library files
613
614echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +0000615echo "configure:616: checking MACHDEP" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000616if test -z "$MACHDEP"
617then
Guido van Rossum563e7081996-09-10 18:20:48 +0000618 ac_sys_system=`uname -s`
Trent Mick635f6fb2000-08-23 21:33:05 +0000619 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000620 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000621 else
Guido van Rossum563e7081996-09-10 18:20:48 +0000622 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000623 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000624 ac_md_system=`echo $ac_sys_system |
625 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
626 ac_md_release=`echo $ac_sys_release |
627 tr -d '/ ' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +0000628 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000629
Guido van Rossum07397971997-04-29 21:49:50 +0000630 case $MACHDEP in
Guido van Rossumb97ef171997-09-28 05:44:03 +0000631 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000632 esac
633fi
Guido van Rossum91922671997-10-09 20:24:13 +0000634
635#
636# SGI compilers allow the specification of the both the ABI and the
637# ISA on the command line. Depending on the values of these switches,
638# different and often incompatable code will be generated.
639#
640# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
641# thus supply support for various ABI/ISA combinations. The MACHDEP
642# variable is also adjusted.
643#
644
645if test ! -z "$SGI_ABI"
646then
647 CC="cc $SGI_ABI"
648 LDFLAGS="$SGI_ABI $LDFLAGS"
649 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
650fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000651echo "$ac_t""$MACHDEP" 1>&6
652
Guido van Rossum91922671997-10-09 20:24:13 +0000653#
654# CCC is the command that compiles C++ programs
655#
656# Not all make programs have this predefined.
657#
Guido van Rossum95012191999-12-16 17:50:52 +0000658#AC_SUBST(SET_CCC)
659#AC_MSG_CHECKING(CCC)
660#if test -z "$CCC"
661#then
662# case $ac_sys_system in
663# IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";;
664# Linux*) SET_CCC="CCC= g++";;
665# *) SET_CCC=""
666# esac
667#else
668# SET_CCC="CCC= ${CCC}"
669#fi
670#AC_MSG_RESULT($SET_CCC)
Guido van Rossum91922671997-10-09 20:24:13 +0000671
672
Guido van Rossum627b2d71993-12-24 10:39:16 +0000673# checks for alternative programs
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000674echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +0000675echo "configure:676: checking for --without-gcc" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000676# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000677if test "${with_gcc+set}" = set; then
678 withval="$with_gcc"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000679
680 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000681 no) CC=cc
682 without_gcc=yes;;
683 yes) CC=gcc
684 without_gcc=no;;
685 *) CC=$withval
686 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000687 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000688else
Guido van Rossume77438c1995-09-13 18:59:59 +0000689
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000690 case $ac_sys_system in
Guido van Rossume77438c1995-09-13 18:59:59 +0000691 OSF1) CC=cc
692 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000693 BeOS*)
694 # Dunno if it's a good idea to get this over with all at once, or
695 # to handle it in with the other goodies.
696 MACHDEP=beos
697
698 case $BE_HOST_CPU in
699 ppc)
Guido van Rossum81376801999-04-06 15:50:51 +0000700 CC="mwcc -I$PWD/BeOS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000701 without_gcc=yes
Guido van Rossum6b9da451999-03-24 17:48:12 +0000702 case `uname -r` in
703 4.0*) OPT="-DUSE_DL_EXPORT -O7 -opt schedule604 -export pragma" ;;
704 *) OPT="-DUSE_DL_EXPORT -O2 -proc 604e -export pragma" ;;
705 esac
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000706 CCSHARED=-UUSE_DL_EXPORT
707 LDFLAGS="$LDFLAGS -nodup"
708
709 AR="$PWD/BeOS/ar-fake"
710 RANLIB=:
711
712 cat >> confdefs.h <<\EOF
713#define DL_EXPORT_HEADER "dl_export.h"
714EOF
715
716 ;;
717 x86)
718 CC="gcc -I$PWD/BeOS"
719 without_gcc=no
Guido van Rossum32000e82000-05-22 21:31:50 +0000720 OPT="-DUSE_DL_EXPORT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000721 CCSHARED=-UUSE_DL_EXPORT
722
723 AR="$PWD/BeOS/ar-fake"
724 RANLIB=:
725
726 cat >> confdefs.h <<\EOF
727#define DL_EXPORT_HEADER "dl_export.h"
728EOF
729
730 ;;
731 *)
732 { echo "configure: error: Your BeOS system isn't PowerPC or x86... neat" 1>&2; exit 1; }
733 ;;
734 esac
735 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +0000736 Monterey*)
737 RANLIB=:
738 without_gcc=;;
Guido van Rossume77438c1995-09-13 18:59:59 +0000739 *) without_gcc=no;;
740 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000741fi
742
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000743echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000744
Guido van Rossum95012191999-12-16 17:50:52 +0000745
746
747MAINOBJ=python.o
748echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +0000749echo "configure:750: checking for --with-cxx=<compiler>" >&5
Guido van Rossum95012191999-12-16 17:50:52 +0000750# Check whether --with-cxx or --without-cxx was given.
751if test "${with_cxx+set}" = set; then
752 withval="$with_cxx"
753
754 case $withval in
755 no) CXX=
756 with_cxx=no;;
757 *) CXX=$withval
758 MAINOBJ=ccpython.o
759 with_cxx=$withval;;
760 esac
761else
762
763 with_cxx=no
764
765fi
766
767echo "$ac_t""$with_cxx" 1>&6
768SET_CXX="CXX = $CXX"
769
770#AC_MSG_CHECKING(CCC)
771#if test -z "$CCC"
772#then
773# case $ac_sys_system in
774# IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";;
775# Linux*) SET_CCC="CCC= g++";;
776# *) SET_CCC=""
777# esac
778#else
779# SET_CCC="CCC= ${CCC}"
780#fi
781#AC_MSG_RESULT($SET_CCC)
782
Guido van Rossum8b131c51995-03-09 14:10:13 +0000783# If the user switches compilers, we can't believe the cache
784if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
785then
786 { echo "configure: error: cached CC is different -- throw away $cache_file
787(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
788fi
789
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000790# Extract the first word of "gcc", so it can be a program name with args.
791set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000792echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +0000793echo "configure:794: checking for $ac_word" >&5
794if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000795 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000796else
797 if test -n "$CC"; then
798 ac_cv_prog_CC="$CC" # Let the user override the test.
799else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000800 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
801 ac_dummy="$PATH"
802 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000803 test -z "$ac_dir" && ac_dir=.
804 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000805 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000806 break
807 fi
808 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000809 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000810fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000811fi
812CC="$ac_cv_prog_CC"
813if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000814 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000815else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000816 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000817fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000818
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000819if test -z "$CC"; then
820 # Extract the first word of "cc", so it can be a program name with args.
821set dummy cc; ac_word=$2
822echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +0000823echo "configure:824: checking for $ac_word" >&5
824if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000825 echo $ac_n "(cached) $ac_c" 1>&6
826else
827 if test -n "$CC"; then
828 ac_cv_prog_CC="$CC" # Let the user override the test.
829else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000830 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000831 ac_prog_rejected=no
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000832 ac_dummy="$PATH"
833 for ac_dir in $ac_dummy; do
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000834 test -z "$ac_dir" && ac_dir=.
835 if test -f $ac_dir/$ac_word; then
836 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
837 ac_prog_rejected=yes
838 continue
839 fi
840 ac_cv_prog_CC="cc"
841 break
842 fi
843 done
844 IFS="$ac_save_ifs"
845if test $ac_prog_rejected = yes; then
846 # We found a bogon in the path, so make sure we never use it.
847 set dummy $ac_cv_prog_CC
848 shift
849 if test $# -gt 0; then
850 # We chose a different compiler from the bogus one.
851 # However, it has the same basename, so the bogon will be chosen
852 # first if we set CC to just the basename; use the full file name.
853 shift
854 set dummy "$ac_dir/$ac_word" "$@"
855 shift
856 ac_cv_prog_CC="$@"
857 fi
858fi
859fi
860fi
861CC="$ac_cv_prog_CC"
862if test -n "$CC"; then
863 echo "$ac_t""$CC" 1>&6
864else
865 echo "$ac_t""no" 1>&6
866fi
867
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000868 if test -z "$CC"; then
869 case "`uname -s`" in
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +0000870 *win32* | *WIN32*)
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000871 # Extract the first word of "cl", so it can be a program name with args.
872set dummy cl; ac_word=$2
873echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +0000874echo "configure:875: checking for $ac_word" >&5
875if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000876 echo $ac_n "(cached) $ac_c" 1>&6
877else
878 if test -n "$CC"; then
879 ac_cv_prog_CC="$CC" # Let the user override the test.
880else
881 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
882 ac_dummy="$PATH"
883 for ac_dir in $ac_dummy; do
884 test -z "$ac_dir" && ac_dir=.
885 if test -f $ac_dir/$ac_word; then
886 ac_cv_prog_CC="cl"
887 break
888 fi
889 done
890 IFS="$ac_save_ifs"
891fi
892fi
893CC="$ac_cv_prog_CC"
894if test -n "$CC"; then
895 echo "$ac_t""$CC" 1>&6
896else
897 echo "$ac_t""no" 1>&6
898fi
899 ;;
900 esac
901 fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000902 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
903fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000904
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +0000905echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
906echo "configure:907: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000907
908ac_ext=c
909# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
910ac_cpp='$CPP $CPPFLAGS'
911ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000912ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000913cross_compiling=$ac_cv_prog_cc_cross
914
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000915cat > conftest.$ac_ext << EOF
916
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +0000917#line 918 "configure"
Guido van Rossumf78abae1997-01-21 22:02:36 +0000918#include "confdefs.h"
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000919
Guido van Rossumf78abae1997-01-21 22:02:36 +0000920main(){return(0);}
921EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +0000922if { (eval echo configure:923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000923 ac_cv_prog_cc_works=yes
924 # If we can't run a trivial program, we are probably using a cross compiler.
925 if (./conftest; exit) 2>/dev/null; then
926 ac_cv_prog_cc_cross=no
927 else
928 ac_cv_prog_cc_cross=yes
929 fi
930else
931 echo "configure: failed program was:" >&5
932 cat conftest.$ac_ext >&5
933 ac_cv_prog_cc_works=no
934fi
935rm -fr conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000936ac_ext=c
937# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
938ac_cpp='$CPP $CPPFLAGS'
939ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
940ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
941cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossumf78abae1997-01-21 22:02:36 +0000942
943echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
944if test $ac_cv_prog_cc_works = no; then
945 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
946fi
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +0000947echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
948echo "configure:949: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000949echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
950cross_compiling=$ac_cv_prog_cc_cross
951
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000952echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +0000953echo "configure:954: checking whether we are using GNU C" >&5
954if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000955 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000956else
957 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000958#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000959 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +0000960#endif
961EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +0000962if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:963: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000963 ac_cv_prog_gcc=yes
964else
965 ac_cv_prog_gcc=no
966fi
967fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000968
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000969echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +0000970
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000971if test $ac_cv_prog_gcc = yes; then
972 GCC=yes
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000973else
974 GCC=
975fi
976
977ac_test_CFLAGS="${CFLAGS+set}"
978ac_save_CFLAGS="$CFLAGS"
979CFLAGS=
980echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +0000981echo "configure:982: checking whether ${CC-cc} accepts -g" >&5
982if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000983 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000984else
985 echo 'void f(){}' > conftest.c
986if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000987 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000988else
Guido van Rossumf78abae1997-01-21 22:02:36 +0000989 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000990fi
991rm -f conftest*
992
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000993fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000994
Guido van Rossumf78abae1997-01-21 22:02:36 +0000995echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000996if test "$ac_test_CFLAGS" = set; then
997 CFLAGS="$ac_save_CFLAGS"
998elif test $ac_cv_prog_cc_g = yes; then
999 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001000 CFLAGS="-g -O2"
1001 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001002 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001003 fi
1004else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001005 if test "$GCC" = yes; then
1006 CFLAGS="-O2"
1007 else
1008 CFLAGS=
1009 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001010fi
1011
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001012
Guido van Rossumdd997f71998-10-07 19:58:26 +00001013case $MACHDEP in
1014bsdos*)
1015 case $CC in
1016 gcc) CC="$CC -D_HAVE_BSDI";;
1017 esac;;
1018esac
1019
Guido van Rossum24b1e751997-08-21 02:29:16 +00001020case $ac_sys_system in
1021hp*|HP*)
1022 case $CC in
1023 cc|*/cc) CC="$CC -Aa -D_HPUX_SOURCE";;
1024 esac;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001025BeOS*)
1026 case $CC in
1027 cc) CC=cc;;
1028 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001029Monterey*)
1030 case $CC in
1031 cc) CC="$CC -Wl,-Bexport";;
1032 esac;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001033esac
1034
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001035# LDLIBRARY is the name of the library to link against (as opposed to the
1036# name of the library into which to insert object files). On systems
1037# without shared libraries, LDLIBRARY is the same as LIBRARY (defined in
1038# the Makefiles).
1039
1040
1041LDLIBRARY=''
1042
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001043# LINKCC is the command that links the python executable -- default is $(CC).
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001044# This is altered for AIX and BeOS in order to build the export list before
1045# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001046
1047echo $ac_n "checking LINKCC""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001048echo "configure:1049: checking LINKCC" >&5
Guido van Rossum95012191999-12-16 17:50:52 +00001049if test -z "$LINKCC" -a ! -z "$CXX"
1050then
1051 LINKCC="$CXX"
1052fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001053if test -z "$LINKCC"
1054then
1055 case $ac_sys_system in
1056 AIX*)
Guido van Rossum45140f91997-08-29 18:44:06 +00001057 LINKCC="\$(srcdir)/makexp_aix python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001058 BeOS*)
Guido van Rossumea516321998-12-17 18:08:55 +00001059 LINKCC="\$(srcdir)/../BeOS/linkcc \$(LIBRARY) \$(PURIFY) \$(CC) \$(OPT)"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001060 LDLIBRARY='libpython$(VERSION).so';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001061 dgux*)
1062 LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";;
Trent Mick635f6fb2000-08-23 21:33:05 +00001063 Monterey64*)
1064 LINKCC="\$(PURIFY) \$(CC) -L/usr/lib/ia64l64";;
Guido van Rossum25f93031997-08-18 16:00:04 +00001065 *) LINKCC="\$(PURIFY) \$(CC)";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001066 esac
1067fi
1068echo "$ac_t""$LINKCC" 1>&6
1069
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001070echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001071echo "configure:1072: checking LDLIBRARY" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001072
1073# NeXT framework builds require that the 'ar' library be converted into
1074# a bundle using libtool.
1075if test "$with_next_framework"
1076then
1077 LDLIBRARY='libpython$(VERSION).dylib'
1078fi
1079
1080# DG/UX requires some fancy ld contortions to produce a .so from an .a
1081if test "$MACHDEP" = "dguxR4"
1082then
1083 LDLIBRARY='libpython$(VERSION).so'
1084 OPT="$OPT -pic"
1085fi
1086echo "$ac_t""$LDLIBRARY" 1>&6
1087
1088# If LDLIBRARY is different from LIBRARY, emit a rule to build it.
1089if test -z "$LDLIBRARY"
1090then
1091 LDLIBRARY='libpython$(VERSION).a'
1092 MAKE_LDLIBRARY="true"
1093else
1094 MAKE_LDLIBRARY='$(MAKE) $(LDLIBRARY)'
1095fi
1096
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001097# Extract the first word of "ranlib", so it can be a program name with args.
1098set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001099echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001100echo "configure:1101: checking for $ac_word" >&5
1101if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001102 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001103else
1104 if test -n "$RANLIB"; then
1105 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1106else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001107 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1108 ac_dummy="$PATH"
1109 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001110 test -z "$ac_dir" && ac_dir=.
1111 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001112 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001113 break
1114 fi
1115 done
Guido van Rossum7f43da71994-08-01 12:15:30 +00001116 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001117 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001118fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001119fi
1120RANLIB="$ac_cv_prog_RANLIB"
1121if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001122 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001123else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001124 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001125fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001126
1127
Guido van Rossum7f43da71994-08-01 12:15:30 +00001128for ac_prog in ar aal
1129do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001130# Extract the first word of "$ac_prog", so it can be a program name with args.
1131set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001132echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001133echo "configure:1134: checking for $ac_word" >&5
1134if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001135 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001136else
1137 if test -n "$AR"; then
1138 ac_cv_prog_AR="$AR" # Let the user override the test.
1139else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001140 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1141 ac_dummy="$PATH"
1142 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143 test -z "$ac_dir" && ac_dir=.
1144 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001145 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001146 break
1147 fi
1148 done
1149 IFS="$ac_save_ifs"
1150fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001151fi
1152AR="$ac_cv_prog_AR"
1153if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001154 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001155else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001156 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001157fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001158
1159test -n "$AR" && break
1160done
1161test -n "$AR" || AR="ar"
1162
1163
Guido van Rossumda88dad1995-01-26 00:46:29 +00001164
1165
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001166# Install just never works :-(
1167if test -z "$INSTALL"
Guido van Rossumda88dad1995-01-26 00:46:29 +00001168then
1169 INSTALL=cp
1170 INSTALL_PROGRAM=cp
1171 INSTALL_DATA=cp
1172else
1173 INSTALL_PROGRAM="$INSTALL"
1174 INSTALL_DATA="$INSTALL -m 644"
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001175fi
1176
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001177# Not every filesystem supports hard links
1178
1179if test -z "$LN" ; then
1180 case $ac_sys_system in
1181 BeOS*) LN="ln -s";;
1182 *) LN=ln;;
1183 esac
1184fi
1185
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001186# Optimizer/debugger flags passed between Makefiles
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001187
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001188if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001189then
Guido van Rossumedca74a1997-07-18 23:29:40 +00001190 case $GCC in
1191 yes)
1192 case $ac_cv_prog_cc_g in
1193 yes) OPT="-g -O2";;
1194 *) OPT="-O2";;
1195 esac
1196 ;;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001197 *) OPT="-O";;
1198 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001199fi
1200
Trent Mick635f6fb2000-08-23 21:33:05 +00001201# The current (beta) Monterey compiler dies with optimizations
1202case $ac_sys_system in
1203Monterey*) OPT="";;
1204esac
1205
Guido van Rossum563e7081996-09-10 18:20:48 +00001206if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00001207then
1208 OPT="$OPT $ac_arch_flags"
1209fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001210# checks for UNIX variants that set C preprocessor variables
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001211echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001212echo "configure:1213: checking how to run the C preprocessor" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001213# On Suns, sometimes $CPP names a directory.
1214if test -n "$CPP" && test -d "$CPP"; then
1215 CPP=
1216fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001217if test -z "$CPP"; then
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001218if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001219 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001220else
1221 # This must be in double quotes, not single quotes, because CPP may get
1222 # substituted into the Makefile and "${CC-cc}" will confuse make.
Guido van Rossum627b2d71993-12-24 10:39:16 +00001223 CPP="${CC-cc} -E"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001224 # On the NeXT, cc -E runs the code through the compiler's parser,
1225 # not just through cpp.
1226 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001227#line 1228 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001228#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001229#include <assert.h>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001230Syntax Error
1231EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001232ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001233{ (eval echo configure:1234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001234ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001235if test -z "$ac_err"; then
1236 :
1237else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001238 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001239 echo "configure: failed program was:" >&5
1240 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00001241 rm -rf conftest*
1242 CPP="${CC-cc} -E -traditional-cpp"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001243 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001244#line 1245 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001245#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001246#include <assert.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001247Syntax Error
1248EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001249ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001250{ (eval echo configure:1251: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001251ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1252if test -z "$ac_err"; then
1253 :
1254else
1255 echo "$ac_err" >&5
1256 echo "configure: failed program was:" >&5
1257 cat conftest.$ac_ext >&5
1258 rm -rf conftest*
1259 CPP="${CC-cc} -nologo -E"
1260 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001261#line 1262 "configure"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001262#include "confdefs.h"
1263#include <assert.h>
1264Syntax Error
1265EOF
1266ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001267{ (eval echo configure:1268: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001268ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001269if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001270 :
1271else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001272 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001273 echo "configure: failed program was:" >&5
1274 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001275 rm -rf conftest*
1276 CPP=/lib/cpp
1277fi
1278rm -f conftest*
1279fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001280rm -f conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001281fi
1282rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001283 ac_cv_prog_CPP="$CPP"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001284fi
Guido van Rossume77438c1995-09-13 18:59:59 +00001285 CPP="$ac_cv_prog_CPP"
1286else
1287 ac_cv_prog_CPP="$CPP"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001288fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001289echo "$ac_t""$CPP" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001290
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001291echo $ac_n "checking for AIX""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001292echo "configure:1293: checking for AIX" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001293cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001294#line 1295 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001295#include "confdefs.h"
1296#ifdef _AIX
1297 yes
1298#endif
1299
1300EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001301if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1302 egrep "yes" >/dev/null 2>&1; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001303 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001304 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001305#define _ALL_SOURCE 1
1306EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001307
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001308else
1309 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001310 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001311fi
1312rm -f conftest*
1313
1314
Guido van Rossumf78abae1997-01-21 22:02:36 +00001315ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001316echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001317echo "configure:1318: checking for minix/config.h" >&5
1318if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001319 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001320else
1321 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001322#line 1323 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001323#include "confdefs.h"
1324#include <minix/config.h>
1325EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001326ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001327{ (eval echo configure:1328: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001328ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001329if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001330 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001331 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001332else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001333 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001334 echo "configure: failed program was:" >&5
1335 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001336 rm -rf conftest*
1337 eval "ac_cv_header_$ac_safe=no"
1338fi
1339rm -f conftest*
1340fi
1341if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001342 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001343 MINIX=yes
1344else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001345 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001346MINIX=
Guido van Rossum627b2d71993-12-24 10:39:16 +00001347fi
1348
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001349if test "$MINIX" = yes; then
1350 cat >> confdefs.h <<\EOF
1351#define _POSIX_SOURCE 1
1352EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001353
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001354 cat >> confdefs.h <<\EOF
1355#define _POSIX_1_SOURCE 2
1356EOF
1357
1358 cat >> confdefs.h <<\EOF
1359#define _MINIX 1
1360EOF
1361
1362fi
1363
Guido van Rossumda88dad1995-01-26 00:46:29 +00001364
Guido van Rossum91922671997-10-09 20:24:13 +00001365echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001366echo "configure:1367: checking whether $CC accepts -OPT:Olimit=0" >&5
1367if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then
Guido van Rossum91922671997-10-09 20:24:13 +00001368 echo $ac_n "(cached) $ac_c" 1>&6
1369else
1370 ac_save_cc="$CC"
1371CC="$CC -OPT:Olimit=0"
1372if test "$cross_compiling" = yes; then
1373 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1374else
1375 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001376#line 1377 "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00001377#include "confdefs.h"
1378int main() { return 0; }
1379EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001380if { (eval echo configure:1381: \"$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 +00001381then
1382 ac_cv_opt_olimit_ok=yes
1383else
1384 echo "configure: failed program was:" >&5
1385 cat conftest.$ac_ext >&5
1386 rm -fr conftest*
1387 ac_cv_opt_olimit_ok=no
1388fi
1389rm -fr conftest*
1390fi
1391
1392CC="$ac_save_cc"
1393fi
1394
1395echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00001396if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum304dd2d1997-10-20 23:10:56 +00001397 OPT="$OPT -OPT:Olimit=0"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001398else
1399 echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001400echo "configure:1401: checking whether $CC accepts -Olimit 1500" >&5
1401 if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001402 echo $ac_n "(cached) $ac_c" 1>&6
1403else
1404 ac_save_cc="$CC"
1405 CC="$CC -Olimit 1500"
1406 if test "$cross_compiling" = yes; then
1407 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1408else
1409 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001410#line 1411 "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001411#include "confdefs.h"
1412int main() { return 0; }
1413EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001414if { (eval echo configure:1415: \"$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 +00001415then
1416 ac_cv_olimit_ok=yes
1417else
1418 echo "configure: failed program was:" >&5
1419 cat conftest.$ac_ext >&5
1420 rm -fr conftest*
1421 ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00001422fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001423rm -fr conftest*
1424fi
1425
1426 CC="$ac_save_cc"
1427fi
1428
1429 echo "$ac_t""$ac_cv_olimit_ok" 1>&6
1430 if test $ac_cv_olimit_ok = yes; then
1431 OPT="$OPT -Olimit 1500"
1432 fi
1433fi
1434
Guido van Rossum84e7b241996-08-19 21:59:00 +00001435
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001436# checks for header files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001437echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001438echo "configure:1439: checking for ANSI C header files" >&5
1439if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001440 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001441else
1442 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001443#line 1444 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001444#include "confdefs.h"
1445#include <stdlib.h>
1446#include <stdarg.h>
1447#include <string.h>
1448#include <float.h>
1449EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001450ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001451{ (eval echo configure:1452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001452ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001453if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001454 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001455 ac_cv_header_stdc=yes
1456else
1457 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001458 echo "configure: failed program was:" >&5
1459 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001460 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001461 ac_cv_header_stdc=no
1462fi
1463rm -f conftest*
1464
1465if test $ac_cv_header_stdc = yes; then
1466 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1467cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001468#line 1469 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001469#include "confdefs.h"
1470#include <string.h>
1471EOF
1472if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1473 egrep "memchr" >/dev/null 2>&1; then
1474 :
1475else
1476 rm -rf conftest*
1477 ac_cv_header_stdc=no
1478fi
1479rm -f conftest*
1480
1481fi
1482
1483if test $ac_cv_header_stdc = yes; then
1484 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1485cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001486#line 1487 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001487#include "confdefs.h"
1488#include <stdlib.h>
1489EOF
1490if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1491 egrep "free" >/dev/null 2>&1; then
1492 :
1493else
1494 rm -rf conftest*
1495 ac_cv_header_stdc=no
1496fi
1497rm -f conftest*
1498
1499fi
1500
1501if test $ac_cv_header_stdc = yes; then
1502 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1503if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001504 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001505else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001506 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001507#line 1508 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001508#include "confdefs.h"
1509#include <ctype.h>
1510#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1511#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001512#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00001513int main () { int i; for (i = 0; i < 256; i++)
1514if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1515exit (0); }
1516
1517EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001518if { (eval echo configure:1519: \"$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 +00001519then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001520 :
1521else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001522 echo "configure: failed program was:" >&5
1523 cat conftest.$ac_ext >&5
1524 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001525 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001526fi
1527rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001528fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001529
1530fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001531fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001532
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001533echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001534if test $ac_cv_header_stdc = yes; then
1535 cat >> confdefs.h <<\EOF
1536#define STDC_HEADERS 1
1537EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001538
1539fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001540
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00001541for 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 +00001542signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h \
Fred Drakea50d6ec2000-08-31 16:13:20 +00001543sys/audioio.h sys/file.h sys/lock.h db_185.h db.h \
Guido van Rossum95713eb2000-05-18 20:53:31 +00001544sys/param.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Fred Drake8cef4cf2000-06-28 16:40:38 +00001545sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001546do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001547ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001548echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001549echo "configure:1550: checking for $ac_hdr" >&5
1550if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001551 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001552else
1553 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001554#line 1555 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001555#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001556#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001557EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001558ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001559{ (eval echo configure:1560: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001560ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001561if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001562 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001563 eval "ac_cv_header_$ac_safe=yes"
1564else
1565 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001566 echo "configure: failed program was:" >&5
1567 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001568 rm -rf conftest*
1569 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001570fi
1571rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001572fi
1573if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001574 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001575 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001576 cat >> confdefs.h <<EOF
1577#define $ac_tr_hdr 1
1578EOF
1579
1580else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001581 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001582fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001583done
1584
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001585ac_header_dirent=no
1586for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1587do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001588ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001589echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001590echo "configure:1591: checking for $ac_hdr that defines DIR" >&5
1591if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001592 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001593else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001594 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001595#line 1596 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001596#include "confdefs.h"
1597#include <sys/types.h>
1598#include <$ac_hdr>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001599int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001600DIR *dirp = 0;
1601; return 0; }
1602EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001603if { (eval echo configure:1604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001604 rm -rf conftest*
1605 eval "ac_cv_header_dirent_$ac_safe=yes"
1606else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001607 echo "configure: failed program was:" >&5
1608 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001609 rm -rf conftest*
1610 eval "ac_cv_header_dirent_$ac_safe=no"
1611fi
1612rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001613fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001614if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001615 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001616 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001617 cat >> confdefs.h <<EOF
1618#define $ac_tr_hdr 1
1619EOF
1620 ac_header_dirent=$ac_hdr; break
1621else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001622 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001623fi
1624done
1625# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1626if test $ac_header_dirent = dirent.h; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001627echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001628echo "configure:1629: checking for opendir in -ldir" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001629ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001630if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001631 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001632else
1633 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001634LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001635cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001636#line 1637 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001637#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001638/* Override any gcc2 internal prototype to avoid an error. */
1639/* We use char because int might match the return type of a gcc2
1640 builtin and then its argument prototype would still apply. */
1641char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001642
Guido van Rossumf78abae1997-01-21 22:02:36 +00001643int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001644opendir()
1645; return 0; }
1646EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001647if { (eval echo configure:1648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001648 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001649 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001650else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001651 echo "configure: failed program was:" >&5
1652 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001653 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001654 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001655fi
1656rm -f conftest*
1657LIBS="$ac_save_LIBS"
1658
1659fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001660if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001661 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001662 LIBS="$LIBS -ldir"
1663else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001664 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001665fi
1666
1667else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001668echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001669echo "configure:1670: checking for opendir in -lx" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001670ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001671if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001672 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001673else
1674 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001675LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001676cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001677#line 1678 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001678#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001679/* Override any gcc2 internal prototype to avoid an error. */
1680/* We use char because int might match the return type of a gcc2
1681 builtin and then its argument prototype would still apply. */
1682char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001683
Guido van Rossumf78abae1997-01-21 22:02:36 +00001684int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001685opendir()
1686; return 0; }
1687EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001688if { (eval echo configure:1689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001689 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001690 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001691else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001692 echo "configure: failed program was:" >&5
1693 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001694 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001695 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001696fi
1697rm -f conftest*
1698LIBS="$ac_save_LIBS"
1699
1700fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001701if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001702 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001703 LIBS="$LIBS -lx"
1704else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001705 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001706fi
1707
1708fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001709
1710
1711# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00001712was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001713echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001714echo "configure:1715: checking for clock_t in time.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001715cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001716#line 1717 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001717#include "confdefs.h"
1718#include <time.h>
1719EOF
1720if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1721 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00001722 rm -rf conftest*
1723 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001724else
1725 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001726 cat >> confdefs.h <<\EOF
1727#define clock_t long
1728EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001729
1730fi
1731rm -f conftest*
1732
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001733echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00001734
Guido van Rossum84e7b241996-08-19 21:59:00 +00001735# Add some code to confdefs.h so that the test for off_t works on SCO
1736cat >> confdefs.h <<\EOF
1737#if defined(SCO_DS)
1738#undef _OFF_T
1739#endif
1740EOF
1741
Guido van Rossumef2255b2000-03-10 22:30:29 +00001742# Type availability checks
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001743echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001744echo "configure:1745: checking for mode_t" >&5
1745if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001746 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001747else
1748 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001749#line 1750 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001750#include "confdefs.h"
1751#include <sys/types.h>
1752#if STDC_HEADERS
1753#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001754#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001755#endif
1756EOF
1757if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001758 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 +00001759 rm -rf conftest*
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001760 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001761else
1762 rm -rf conftest*
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001763 ac_cv_type_mode_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001764fi
1765rm -f conftest*
1766
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001767fi
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001768echo "$ac_t""$ac_cv_type_mode_t" 1>&6
1769if test $ac_cv_type_mode_t = no; then
1770 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001771#define mode_t int
1772EOF
1773
1774fi
1775
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001776echo $ac_n "checking for off_t""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001777echo "configure:1778: checking for off_t" >&5
1778if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001779 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001780else
1781 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001782#line 1783 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001783#include "confdefs.h"
1784#include <sys/types.h>
1785#if STDC_HEADERS
1786#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001787#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001788#endif
1789EOF
1790if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001791 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 +00001792 rm -rf conftest*
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001793 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001794else
1795 rm -rf conftest*
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001796 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001797fi
1798rm -f conftest*
1799
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001800fi
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001801echo "$ac_t""$ac_cv_type_off_t" 1>&6
1802if test $ac_cv_type_off_t = no; then
1803 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001804#define off_t long
1805EOF
1806
1807fi
1808
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001809echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001810echo "configure:1811: checking for pid_t" >&5
1811if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001812 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001813else
1814 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001815#line 1816 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001816#include "confdefs.h"
1817#include <sys/types.h>
1818#if STDC_HEADERS
1819#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001820#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001821#endif
1822EOF
1823if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001824 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 +00001825 rm -rf conftest*
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001826 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001827else
1828 rm -rf conftest*
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001829 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001830fi
1831rm -f conftest*
1832
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001833fi
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001834echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1835if test $ac_cv_type_pid_t = no; then
1836 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001837#define pid_t int
1838EOF
1839
1840fi
1841
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001842echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001843echo "configure:1844: checking return type of signal handlers" >&5
1844if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001845 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001846else
1847 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001848#line 1849 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001849#include "confdefs.h"
1850#include <sys/types.h>
1851#include <signal.h>
1852#ifdef signal
1853#undef signal
1854#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001855#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001856extern "C" void (*signal (int, void (*)(int)))(int);
1857#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001858void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001859#endif
1860
Guido van Rossumf78abae1997-01-21 22:02:36 +00001861int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001862int i;
1863; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001864EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001865if { (eval echo configure:1866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001866 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001867 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00001868else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001869 echo "configure: failed program was:" >&5
1870 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001871 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001872 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00001873fi
1874rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001875fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001876
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001877echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001878cat >> confdefs.h <<EOF
1879#define RETSIGTYPE $ac_cv_type_signal
1880EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001881
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001882
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001883echo $ac_n "checking for size_t""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001884echo "configure:1885: checking for size_t" >&5
1885if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001886 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001887else
1888 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001889#line 1890 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001890#include "confdefs.h"
1891#include <sys/types.h>
1892#if STDC_HEADERS
1893#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001894#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001895#endif
1896EOF
1897if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001898 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 +00001899 rm -rf conftest*
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001900 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001901else
1902 rm -rf conftest*
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001903 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001904fi
1905rm -f conftest*
1906
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001907fi
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001908echo "$ac_t""$ac_cv_type_size_t" 1>&6
1909if test $ac_cv_type_size_t = no; then
1910 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001911#define size_t unsigned
1912EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001913
1914fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001915
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001916echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001917echo "configure:1918: checking for uid_t in sys/types.h" >&5
1918if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001919 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001920else
1921 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001922#line 1923 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001923#include "confdefs.h"
1924#include <sys/types.h>
1925EOF
1926if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1927 egrep "uid_t" >/dev/null 2>&1; then
1928 rm -rf conftest*
1929 ac_cv_type_uid_t=yes
1930else
1931 rm -rf conftest*
1932 ac_cv_type_uid_t=no
1933fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001934rm -f conftest*
1935
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001936fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001937
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001938echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001939if test $ac_cv_type_uid_t = no; then
1940 cat >> confdefs.h <<\EOF
1941#define uid_t int
1942EOF
1943
1944 cat >> confdefs.h <<\EOF
1945#define gid_t int
1946EOF
1947
1948fi
1949
Guido van Rossum627b2d71993-12-24 10:39:16 +00001950
Guido van Rossumef2255b2000-03-10 22:30:29 +00001951# Sizes of various common basic types
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001952echo $ac_n "checking size of int""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001953echo "configure:1954: checking size of int" >&5
1954if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001955 echo $ac_n "(cached) $ac_c" 1>&6
1956else
1957 if test "$cross_compiling" = yes; then
1958 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1959else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001960 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001961#line 1962 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001962#include "confdefs.h"
1963#include <stdio.h>
1964main()
1965{
1966 FILE *f=fopen("conftestval", "w");
1967 if (!f) exit(1);
1968 fprintf(f, "%d\n", sizeof(int));
1969 exit(0);
1970}
1971EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001972if { (eval echo configure:1973: \"$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 +00001973then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001974 ac_cv_sizeof_int=`cat conftestval`
1975else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001976 echo "configure: failed program was:" >&5
1977 cat conftest.$ac_ext >&5
1978 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001979 ac_cv_sizeof_int=0
1980fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001981rm -fr conftest*
1982fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001983
1984fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001985echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1986cat >> confdefs.h <<EOF
1987#define SIZEOF_INT $ac_cv_sizeof_int
1988EOF
1989
1990
1991echo $ac_n "checking size of long""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001992echo "configure:1993: checking size of long" >&5
1993if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001994 echo $ac_n "(cached) $ac_c" 1>&6
1995else
1996 if test "$cross_compiling" = yes; then
1997 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1998else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001999 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002000#line 2001 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002001#include "confdefs.h"
2002#include <stdio.h>
2003main()
2004{
2005 FILE *f=fopen("conftestval", "w");
2006 if (!f) exit(1);
2007 fprintf(f, "%d\n", sizeof(long));
2008 exit(0);
2009}
2010EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002011if { (eval echo configure:2012: \"$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 +00002012then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002013 ac_cv_sizeof_long=`cat conftestval`
2014else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002015 echo "configure: failed program was:" >&5
2016 cat conftest.$ac_ext >&5
2017 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002018 ac_cv_sizeof_long=0
2019fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002020rm -fr conftest*
2021fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002022
2023fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002024echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2025cat >> confdefs.h <<EOF
2026#define SIZEOF_LONG $ac_cv_sizeof_long
2027EOF
2028
2029
Guido van Rossumad678af1998-10-02 14:42:15 +00002030echo $ac_n "checking size of void *""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002031echo "configure:2032: checking size of void *" >&5
2032if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002033 echo $ac_n "(cached) $ac_c" 1>&6
2034else
2035 if test "$cross_compiling" = yes; then
2036 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2037else
2038 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002039#line 2040 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002040#include "confdefs.h"
2041#include <stdio.h>
2042main()
2043{
2044 FILE *f=fopen("conftestval", "w");
2045 if (!f) exit(1);
2046 fprintf(f, "%d\n", sizeof(void *));
2047 exit(0);
2048}
2049EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002050if { (eval echo configure:2051: \"$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 +00002051then
2052 ac_cv_sizeof_void_p=`cat conftestval`
2053else
2054 echo "configure: failed program was:" >&5
2055 cat conftest.$ac_ext >&5
2056 rm -fr conftest*
2057 ac_cv_sizeof_void_p=0
2058fi
2059rm -fr conftest*
2060fi
2061
2062fi
2063echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2064cat >> confdefs.h <<EOF
2065#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2066EOF
2067
2068
Guido van Rossumef2255b2000-03-10 22:30:29 +00002069echo $ac_n "checking size of char""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002070echo "configure:2071: checking size of char" >&5
2071if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002072 echo $ac_n "(cached) $ac_c" 1>&6
2073else
2074 if test "$cross_compiling" = yes; then
2075 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2076else
2077 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002078#line 2079 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002079#include "confdefs.h"
2080#include <stdio.h>
2081main()
2082{
2083 FILE *f=fopen("conftestval", "w");
2084 if (!f) exit(1);
2085 fprintf(f, "%d\n", sizeof(char));
2086 exit(0);
2087}
2088EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002089if { (eval echo configure:2090: \"$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 +00002090then
2091 ac_cv_sizeof_char=`cat conftestval`
2092else
2093 echo "configure: failed program was:" >&5
2094 cat conftest.$ac_ext >&5
2095 rm -fr conftest*
2096 ac_cv_sizeof_char=0
2097fi
2098rm -fr conftest*
2099fi
2100
2101fi
2102echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2103cat >> confdefs.h <<EOF
2104#define SIZEOF_CHAR $ac_cv_sizeof_char
2105EOF
2106
2107
2108echo $ac_n "checking size of short""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002109echo "configure:2110: checking size of short" >&5
2110if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002111 echo $ac_n "(cached) $ac_c" 1>&6
2112else
2113 if test "$cross_compiling" = yes; then
2114 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2115else
2116 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002117#line 2118 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002118#include "confdefs.h"
2119#include <stdio.h>
2120main()
2121{
2122 FILE *f=fopen("conftestval", "w");
2123 if (!f) exit(1);
2124 fprintf(f, "%d\n", sizeof(short));
2125 exit(0);
2126}
2127EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002128if { (eval echo configure:2129: \"$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 +00002129then
2130 ac_cv_sizeof_short=`cat conftestval`
2131else
2132 echo "configure: failed program was:" >&5
2133 cat conftest.$ac_ext >&5
2134 rm -fr conftest*
2135 ac_cv_sizeof_short=0
2136fi
2137rm -fr conftest*
2138fi
2139
2140fi
2141echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2142cat >> confdefs.h <<EOF
2143#define SIZEOF_SHORT $ac_cv_sizeof_short
2144EOF
2145
2146
2147echo $ac_n "checking size of float""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002148echo "configure:2149: checking size of float" >&5
2149if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002150 echo $ac_n "(cached) $ac_c" 1>&6
2151else
2152 if test "$cross_compiling" = yes; then
2153 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2154else
2155 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002156#line 2157 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002157#include "confdefs.h"
2158#include <stdio.h>
2159main()
2160{
2161 FILE *f=fopen("conftestval", "w");
2162 if (!f) exit(1);
2163 fprintf(f, "%d\n", sizeof(float));
2164 exit(0);
2165}
2166EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002167if { (eval echo configure:2168: \"$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 +00002168then
2169 ac_cv_sizeof_float=`cat conftestval`
2170else
2171 echo "configure: failed program was:" >&5
2172 cat conftest.$ac_ext >&5
2173 rm -fr conftest*
2174 ac_cv_sizeof_float=0
2175fi
2176rm -fr conftest*
2177fi
2178
2179fi
2180echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2181cat >> confdefs.h <<EOF
2182#define SIZEOF_FLOAT $ac_cv_sizeof_float
2183EOF
2184
2185
2186echo $ac_n "checking size of double""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002187echo "configure:2188: checking size of double" >&5
2188if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002189 echo $ac_n "(cached) $ac_c" 1>&6
2190else
2191 if test "$cross_compiling" = yes; then
2192 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2193else
2194 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002195#line 2196 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002196#include "confdefs.h"
2197#include <stdio.h>
2198main()
2199{
2200 FILE *f=fopen("conftestval", "w");
2201 if (!f) exit(1);
2202 fprintf(f, "%d\n", sizeof(double));
2203 exit(0);
2204}
2205EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002206if { (eval echo configure:2207: \"$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 +00002207then
2208 ac_cv_sizeof_double=`cat conftestval`
2209else
2210 echo "configure: failed program was:" >&5
2211 cat conftest.$ac_ext >&5
2212 rm -fr conftest*
2213 ac_cv_sizeof_double=0
2214fi
2215rm -fr conftest*
2216fi
2217
2218fi
2219echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2220cat >> confdefs.h <<EOF
2221#define SIZEOF_DOUBLE $ac_cv_sizeof_double
2222EOF
2223
2224
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002225echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002226echo "configure:2227: checking size of fpos_t" >&5
2227if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002228 echo $ac_n "(cached) $ac_c" 1>&6
2229else
2230 if test "$cross_compiling" = yes; then
2231 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2232else
2233 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002234#line 2235 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002235#include "confdefs.h"
2236#include <stdio.h>
2237main()
2238{
2239 FILE *f=fopen("conftestval", "w");
2240 if (!f) exit(1);
2241 fprintf(f, "%d\n", sizeof(fpos_t));
2242 exit(0);
2243}
2244EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002245if { (eval echo configure:2246: \"$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 +00002246then
2247 ac_cv_sizeof_fpos_t=`cat conftestval`
2248else
2249 echo "configure: failed program was:" >&5
2250 cat conftest.$ac_ext >&5
2251 rm -fr conftest*
2252 ac_cv_sizeof_fpos_t=0
2253fi
2254rm -fr conftest*
2255fi
2256
2257fi
2258echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6
2259cat >> confdefs.h <<EOF
2260#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
2261EOF
2262
2263
Guido van Rossum0a516c91994-09-12 10:58:40 +00002264
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002265echo $ac_n "checking for long long support""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002266echo "configure:2267: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002267have_long_long=no
2268cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002269#line 2270 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002270#include "confdefs.h"
2271
2272int main() {
2273long long x; x = (long long)0;
2274; return 0; }
2275EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002276if { (eval echo configure:2277: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002277 rm -rf conftest*
2278 cat >> confdefs.h <<\EOF
2279#define HAVE_LONG_LONG 1
2280EOF
2281 have_long_long=yes
2282else
2283 echo "configure: failed program was:" >&5
2284 cat conftest.$ac_ext >&5
2285fi
2286rm -f conftest*
2287echo "$ac_t""$have_long_long" 1>&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002288if test "$have_long_long" = yes ; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002289echo $ac_n "checking size of long long""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002290echo "configure:2291: checking size of long long" >&5
2291if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002292 echo $ac_n "(cached) $ac_c" 1>&6
2293else
2294 if test "$cross_compiling" = yes; then
2295 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2296else
2297 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002298#line 2299 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002299#include "confdefs.h"
2300#include <stdio.h>
2301main()
2302{
2303 FILE *f=fopen("conftestval", "w");
2304 if (!f) exit(1);
2305 fprintf(f, "%d\n", sizeof(long long));
2306 exit(0);
2307}
2308EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002309if { (eval echo configure:2310: \"$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 +00002310then
2311 ac_cv_sizeof_long_long=`cat conftestval`
2312else
2313 echo "configure: failed program was:" >&5
2314 cat conftest.$ac_ext >&5
2315 rm -fr conftest*
2316 ac_cv_sizeof_long_long=0
2317fi
2318rm -fr conftest*
2319fi
2320
2321fi
2322echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2323cat >> confdefs.h <<EOF
2324#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2325EOF
2326
2327
2328fi
2329
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002330echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002331echo "configure:2332: checking for uintptr_t support" >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002332have_uintptr_t=no
2333cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002334#line 2335 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002335#include "confdefs.h"
2336
2337int main() {
2338uintptr_t x; x = (uintptr_t)0;
2339; return 0; }
2340EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002341if { (eval echo configure:2342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002342 rm -rf conftest*
2343 cat >> confdefs.h <<\EOF
2344#define HAVE_UINTPTR_T 1
2345EOF
2346 have_uintptr_t=yes
2347else
2348 echo "configure: failed program was:" >&5
2349 cat conftest.$ac_ext >&5
2350fi
2351rm -f conftest*
2352echo "$ac_t""$have_uintptr_t" 1>&6
2353if test "$have_uintptr_t" = yes ; then
2354echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002355echo "configure:2356: checking size of uintptr_t" >&5
2356if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002357 echo $ac_n "(cached) $ac_c" 1>&6
2358else
2359 if test "$cross_compiling" = yes; then
2360 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2361else
2362 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002363#line 2364 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002364#include "confdefs.h"
2365#include <stdio.h>
2366main()
2367{
2368 FILE *f=fopen("conftestval", "w");
2369 if (!f) exit(1);
2370 fprintf(f, "%d\n", sizeof(uintptr_t));
2371 exit(0);
2372}
2373EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002374if { (eval echo configure:2375: \"$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 +00002375then
2376 ac_cv_sizeof_uintptr_t=`cat conftestval`
2377else
2378 echo "configure: failed program was:" >&5
2379 cat conftest.$ac_ext >&5
2380 rm -fr conftest*
2381 ac_cv_sizeof_uintptr_t=0
2382fi
2383rm -fr conftest*
2384fi
2385
2386fi
2387echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6
2388cat >> confdefs.h <<EOF
2389#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
2390EOF
2391
2392
2393fi
2394
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002395# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
2396echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002397echo "configure:2398: checking size of off_t" >&5
2398if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002399 echo $ac_n "(cached) $ac_c" 1>&6
2400else
2401 if test "$cross_compiling" = yes; then
2402 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2403else
2404 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002405#line 2406 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002406#include "confdefs.h"
2407#include <stdio.h>
2408#include <sys/types.h>
2409main()
2410{
2411 FILE *f=fopen("conftestval", "w");
2412 if (!f) exit(1);
2413 fprintf(f, "%d\n", sizeof(off_t));
2414 exit(0);
2415}
2416EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002417if { (eval echo configure:2418: \"$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 +00002418then
2419 ac_cv_sizeof_off_t=`cat conftestval`
2420else
2421 echo "configure: failed program was:" >&5
2422 cat conftest.$ac_ext >&5
2423 rm -fr conftest*
2424 ac_cv_sizeof_off_t=0
2425fi
2426rm -fr conftest*
2427fi
2428
2429
2430fi
2431
2432echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2433cat >> confdefs.h <<EOF
2434#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2435EOF
2436
2437
2438echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002439echo "configure:2440: checking whether to enable large file support" >&5
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002440if test "$have_long_long" = yes -a \
2441 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2442 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002443 cat >> confdefs.h <<\EOF
2444#define HAVE_LARGEFILE_SUPPORT 1
2445EOF
2446
2447 echo "$ac_t""yes" 1>&6
2448else
2449 echo "$ac_t""no" 1>&6
2450fi
2451
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002452# AC_CHECK_SIZEOF() doesn't include <time.h>.
2453echo $ac_n "checking size of time_t""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002454echo "configure:2455: checking size of time_t" >&5
2455if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002456 echo $ac_n "(cached) $ac_c" 1>&6
2457else
2458 if test "$cross_compiling" = yes; then
2459 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2460else
2461 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002462#line 2463 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002463#include "confdefs.h"
2464#include <stdio.h>
2465#include <time.h>
2466main()
2467{
2468 FILE *f=fopen("conftestval", "w");
2469 if (!f) exit(1);
2470 fprintf(f, "%d\n", sizeof(time_t));
2471 exit(0);
2472}
2473EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002474if { (eval echo configure:2475: \"$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 +00002475then
2476 ac_cv_sizeof_time_t=`cat conftestval`
2477else
2478 echo "configure: failed program was:" >&5
2479 cat conftest.$ac_ext >&5
2480 rm -fr conftest*
2481 ac_cv_sizeof_time_t=0
2482fi
2483rm -fr conftest*
2484fi
2485
2486
2487fi
2488
2489echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6
2490cat >> confdefs.h <<EOF
2491#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
2492EOF
2493
2494
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002495
Trent Mick635f6fb2000-08-23 21:33:05 +00002496# if have pthread_t then define SIZEOF_PTHREAD_T
2497echo $ac_n "checking for pthread_t""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002498echo "configure:2499: checking for pthread_t" >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00002499have_pthread_t=no
2500cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002501#line 2502 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002502#include "confdefs.h"
2503#include <pthread.h>
2504int main() {
2505pthread_t x; x = (pthread_t)0;
2506; return 0; }
2507EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002508if { (eval echo configure:2509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002509 rm -rf conftest*
2510 have_pthread_t=yes
2511else
2512 echo "configure: failed program was:" >&5
2513 cat conftest.$ac_ext >&5
2514fi
2515rm -f conftest*
2516echo "$ac_t""$have_pthread_t" 1>&6
2517if test "$have_pthread_t" = yes ; then
2518 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
2519 echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002520echo "configure:2521: checking size of pthread_t" >&5
2521 if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002522 echo $ac_n "(cached) $ac_c" 1>&6
2523else
2524 if test "$cross_compiling" = yes; then
2525 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2526else
2527 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002528#line 2529 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002529#include "confdefs.h"
2530#include <stdio.h>
2531 #include <pthread.h>
2532 main()
2533 {
2534 FILE *f=fopen("conftestval", "w");
2535 if (!f) exit(1);
2536 fprintf(f, "%d\n", sizeof(pthread_t));
2537 exit(0);
2538 }
2539EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002540if { (eval echo configure:2541: \"$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 +00002541then
2542 ac_cv_sizeof_pthread_t=`cat conftestval`
2543else
2544 echo "configure: failed program was:" >&5
2545 cat conftest.$ac_ext >&5
2546 rm -fr conftest*
2547 ac_cv_sizeof_pthread_t=0
2548fi
2549rm -fr conftest*
2550fi
2551
2552
2553fi
2554
2555 echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6
2556 cat >> confdefs.h <<EOF
2557#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
2558EOF
2559
2560fi
2561
2562
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002563# Minor variations in building a framework between NextStep versions 4 and 5
2564
2565case $ac_sys_system/$ac_sys_release in
2566 next/4*)
2567 ns_undef_sym='__environ'
2568 LIBTOOL_CRUFT="-U $ns_undef_sym" ;;
2569 next/5*)
2570 ns_undef_sym='_environ'
2571 LIBTOOL_CRUFT="-lcc_dynamic -U $ns_undef_sym" ;;
2572esac
2573
2574echo $ac_n "checking for --with-next-framework""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002575echo "configure:2576: checking for --with-next-framework" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002576if test "$with_next_framework"
2577then
2578 OPT="$OPT -fno-common"
2579 # -U __environ is needed since bundles don't have access
2580 # to crt0 when built but will always be linked against it
2581 LDFLAGS="$LDFLAGS -Wl,-U,$ns_undef_sym"
2582 cat >> confdefs.h <<\EOF
2583#define WITH_NEXT_FRAMEWORK 1
2584EOF
2585
2586 echo "$ac_t""yes" 1>&6
2587else
2588 echo "$ac_t""no" 1>&6
2589fi
2590
2591echo $ac_n "checking for --with-dyld""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002592echo "configure:2593: checking for --with-dyld" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002593if test "$with_next_framework" -o "$with_dyld"
2594then
2595 if test "$with_dyld"
2596 then
2597 echo "$ac_t""yes" 1>&6
2598 else
2599 echo "$ac_t""required for framework build" 1>&6
2600 fi
2601 cat >> confdefs.h <<\EOF
2602#define WITH_DYLD 1
2603EOF
2604
2605 ns_dyld='set'
2606else
2607 echo "$ac_t""no" 1>&6
2608fi
2609
Guido van Rossum0a516c91994-09-12 10:58:40 +00002610# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00002611
2612
2613
2614
Guido van Rossum0a516c91994-09-12 10:58:40 +00002615# SO is the extension of shared libraries `(including the dot!)
2616# -- usually .so, .sl on HP-UX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002617echo $ac_n "checking SO""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002618echo "configure:2619: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002619if test -z "$SO"
2620then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002621 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00002622 hp*|HP*) SO=.sl;;
2623 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002624 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002625fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002626echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002627# LDSHARED is the ld *command* used to create shared library
2628# -- "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 +00002629# (Shared libraries in this instance are shared modules to be loaded into
2630# Python, as opposed to building Python itself as a shared library.)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002631echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002632echo "configure:2633: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002633if test -z "$LDSHARED"
2634then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002635 case $ac_sys_system/$ac_sys_release in
Guido van Rossum45140f91997-08-29 18:44:06 +00002636 AIX*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002637 BeOS*) LDSHARED="\$(srcdir)/../BeOS/linkmodule -L.. -lpython\$(VERSION)";;
Guido van Rossum07397971997-04-29 21:49:50 +00002638 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00002639 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002640 SunOS/4*) LDSHARED="ld";;
Greg Ward57c9a6632000-05-26 12:22:54 +00002641 SunOS/5*)
2642 if test "$GCC" = "yes"
2643 then LDSHARED='$(CC) -G'
2644 else LDSHARED="ld -G";
2645 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002646 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00002647 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
2648 DYNIX/ptx*) LDSHARED="ld -G";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002649 next/*)
2650 if test "$ns_dyld"
2651 then LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind'
2652 else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';
2653 fi
2654 if test "$with_next_framework" ; then
2655 LDSHARED="$LDSHARED \$(LDLIBRARY)"
2656 fi ;;
Guido van Rossum81652ab1996-07-21 02:53:27 +00002657 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002658 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00002659 BSD/OS*/4*) LDSHARED="gcc -shared";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002660 OpenBSD*) LDSHARED="ld -Bshareable";;
Guido van Rossumdf693651999-01-07 21:50:41 +00002661 NetBSD*)
2662 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2663 then
2664 LDSHARED="cc -shared"
2665 else
2666 LDSHARED="ld -Bshareable"
2667 fi;;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002668 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00002669 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00002670 then
2671 LDSHARED="cc -shared ${LDFLAGS}"
2672 else
2673 LDSHARED="ld -Bshareable ${LDFLAGS}"
2674 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002675 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00002676 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002677 *) LDSHARED="ld";;
2678 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002679fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002680echo "$ac_t""$LDSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002681# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002682# library (module) -- this is only needed for a few systems
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002683echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002684echo "configure:2685: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002685if test -z "$CCSHARED"
2686then
Guido van Rossum07397971997-04-29 21:49:50 +00002687 case $ac_sys_system/$ac_sys_release in
Guido van Rossumaf07a441995-02-13 19:45:27 +00002688 hp*|HP*) if test "$GCC" = yes;
2689 then CCSHARED="-fpic";
2690 else CCSHARED="+z";
2691 fi;;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002692 Linux*) CCSHARED="-fpic";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002693 BSD/OS*/4*) CCSHARED="-fpic";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002694 OpenBSD*) CCSHARED="-fpic";;
2695 FreeBSD*|NetBSD*) CCSHARED="-fPIC";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002696 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00002697 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002698 IRIX*/6*) case $CC in
2699 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00002700 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002701 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002702 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002703fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002704echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002705# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002706# the python executable -- this is only needed for a few systems
2707echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002708echo "configure:2709: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002709if test -z "$LINKFORSHARED"
2710then
Guido van Rossum07397971997-04-29 21:49:50 +00002711 case $ac_sys_system/$ac_sys_release in
Guido van Rossum69f65801998-03-03 21:47:00 +00002712 AIX*) LINKFORSHARED='-Wl,-bE:python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002713 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00002714 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002715 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum2d9feed1997-11-24 17:36:21 +00002716 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002717 # -u libsys_s pulls in all symbols in libsys
2718 next/2*|next/3*) LINKFORSHARED="-u libsys_s";;
2719 # -u __dummy makes the linker aware of the objc runtime
2720 # in System.framework; otherwise, __objcInit (referenced in
2721 # crt1.o) gets erroneously defined as common, which breaks dynamic
2722 # loading of any modules which reference it in System.framework
2723 next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System" ;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002724 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002725 FreeBSD*|NetBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00002726 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2727 then
2728 LINKFORSHARED="-Wl,--export-dynamic"
2729 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002730 SunOS/5*) case $CC in
2731 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00002732 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00002733 then
2734 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002735 fi;;
2736 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002737 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002738fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002739echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002740
Guido van Rossum627b2d71993-12-24 10:39:16 +00002741# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00002742echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002743echo "configure:2744: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002744ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002745if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002746 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002747else
2748 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002749LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002750cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002751#line 2752 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002752#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002753/* Override any gcc2 internal prototype to avoid an error. */
2754/* We use char because int might match the return type of a gcc2
2755 builtin and then its argument prototype would still apply. */
2756char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002757
Guido van Rossumf78abae1997-01-21 22:02:36 +00002758int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002759dlopen()
2760; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002761EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002762if { (eval echo configure:2763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002763 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002764 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002765else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002766 echo "configure: failed program was:" >&5
2767 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002768 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002769 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002770fi
2771rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002772LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002773
Guido van Rossum627b2d71993-12-24 10:39:16 +00002774fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002775if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002776 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002777 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2778 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002779 cat >> confdefs.h <<EOF
2780#define $ac_tr_lib 1
2781EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002782
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002783 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002784
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002785else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002786 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002787fi
2788 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00002789echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002790echo "configure:2791: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002791ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002792if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002793 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002794else
2795 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002796LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002797cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002798#line 2799 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002799#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002800/* Override any gcc2 internal prototype to avoid an error. */
2801/* We use char because int might match the return type of a gcc2
2802 builtin and then its argument prototype would still apply. */
2803char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002804
Guido van Rossumf78abae1997-01-21 22:02:36 +00002805int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002806shl_load()
2807; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002808EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002809if { (eval echo configure:2810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002810 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002811 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002812else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002813 echo "configure: failed program was:" >&5
2814 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002815 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002816 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002817fi
2818rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002819LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002820
Guido van Rossum627b2d71993-12-24 10:39:16 +00002821fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002822if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002823 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002824 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2825 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002826 cat >> confdefs.h <<EOF
2827#define $ac_tr_lib 1
2828EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002829
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002830 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002831
2832else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002833 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002834fi
2835 # Dynamic linking for HP-UX
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002836
Skip Montanarocb853262000-08-30 22:29:48 +00002837# Check for --with-pydebug
2838echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002839echo "configure:2840: checking for --with-pydebug" >&5
Skip Montanarocb853262000-08-30 22:29:48 +00002840# Check whether --with-pydebug or --without-pydebug was given.
2841if test "${with_pydebug+set}" = set; then
2842 withval="$with_pydebug"
2843
2844if test "$withval" != no
2845then cat >> confdefs.h <<\EOF
2846#define Py_DEBUG 1
2847EOF
2848 echo "$ac_t""yes" 1>&6
2849else echo "$ac_t""no" 1>&6
2850fi
2851else
2852 echo "$ac_t""no" 1>&6
2853fi
2854
2855
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002856# checks for system dependent C++ extensions support
2857case "$ac_sys_system" in
2858 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002859echo "configure:2860: checking for genuine AIX C++ extensions support" >&5
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002860 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002861#line 2862 "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002862#include "confdefs.h"
2863#include "/usr/lpp/xlC/include/load.h"
2864int main() {
2865loadAndInit("", 0, "")
2866; return 0; }
2867EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002868if { (eval echo configure:2869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002869 rm -rf conftest*
2870 cat >> confdefs.h <<\EOF
2871#define AIX_GENUINE_CPLUSPLUS 1
2872EOF
2873
2874 echo "$ac_t""yes" 1>&6
2875else
2876 echo "configure: failed program was:" >&5
2877 cat conftest.$ac_ext >&5
2878 rm -rf conftest*
2879 echo "$ac_t""no" 1>&6
2880fi
2881rm -f conftest*;;
2882 *) ;;
2883esac
2884
Guido van Rossum70c7f481998-03-26 18:44:10 +00002885# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
2886# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002887# BeOS' sockets are stashed in libnet.
2888case "$ac_sys_system" in
2889IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00002890*)
Guido van Rossumf78abae1997-01-21 22:02:36 +00002891echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002892echo "configure:2893: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002893ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002894if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002895 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002896else
2897 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002898LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002899cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002900#line 2901 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002901#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002902/* Override any gcc2 internal prototype to avoid an error. */
2903/* We use char because int might match the return type of a gcc2
2904 builtin and then its argument prototype would still apply. */
2905char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002906
Guido van Rossumf78abae1997-01-21 22:02:36 +00002907int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002908t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002909; return 0; }
2910EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002911if { (eval echo configure:2912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002912 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002913 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002914else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002915 echo "configure: failed program was:" >&5
2916 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002917 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002918 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002919fi
2920rm -f conftest*
2921LIBS="$ac_save_LIBS"
2922
2923fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002924if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002925 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002926 LIBS="-lnsl $LIBS"
2927else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002928 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002929fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002930 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00002931echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002932echo "configure:2933: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002933ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002934if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002935 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002936else
2937 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002938LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002939cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002940#line 2941 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002941#include "confdefs.h"
2942/* Override any gcc2 internal prototype to avoid an error. */
2943/* We use char because int might match the return type of a gcc2
2944 builtin and then its argument prototype would still apply. */
2945char socket();
2946
2947int main() {
2948socket()
2949; return 0; }
2950EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002951if { (eval echo configure:2952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002952 rm -rf conftest*
2953 eval "ac_cv_lib_$ac_lib_var=yes"
2954else
2955 echo "configure: failed program was:" >&5
2956 cat conftest.$ac_ext >&5
2957 rm -rf conftest*
2958 eval "ac_cv_lib_$ac_lib_var=no"
2959fi
2960rm -f conftest*
2961LIBS="$ac_save_LIBS"
2962
2963fi
2964if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2965 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00002966 LIBS="-lsocket $LIBS"
2967else
2968 echo "$ac_t""no" 1>&6
2969fi
2970 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00002971;;
2972esac
2973case "$ac_sys_system" in
2974BeOS*)
Guido van Rossumad678af1998-10-02 14:42:15 +00002975echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002976echo "configure:2977: checking for socket in -lnet" >&5
Guido van Rossumad678af1998-10-02 14:42:15 +00002977ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002978if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002979 echo $ac_n "(cached) $ac_c" 1>&6
2980else
2981 ac_save_LIBS="$LIBS"
2982LIBS="-lnet $LIBS $LIBS"
2983cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002984#line 2985 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002985#include "confdefs.h"
2986/* Override any gcc2 internal prototype to avoid an error. */
2987/* We use char because int might match the return type of a gcc2
2988 builtin and then its argument prototype would still apply. */
2989char socket();
2990
2991int main() {
2992socket()
2993; return 0; }
2994EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00002995if { (eval echo configure:2996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002996 rm -rf conftest*
2997 eval "ac_cv_lib_$ac_lib_var=yes"
2998else
2999 echo "configure: failed program was:" >&5
3000 cat conftest.$ac_ext >&5
3001 rm -rf conftest*
3002 eval "ac_cv_lib_$ac_lib_var=no"
3003fi
3004rm -f conftest*
3005LIBS="$ac_save_LIBS"
3006
3007fi
3008if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3009 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003010 LIBS="-lnet $LIBS"
3011else
3012 echo "$ac_t""no" 1>&6
3013fi
3014 # BeOS
3015;;
3016esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00003017
Guido van Rossuma68acba1996-07-31 17:36:39 +00003018echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003019echo "configure:3020: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00003020# Check whether --with-libs or --without-libs was given.
3021if test "${with_libs+set}" = set; then
3022 withval="$with_libs"
3023
3024echo "$ac_t""$withval" 1>&6
3025LIBS="$withval $LIBS"
3026
3027else
3028 echo "$ac_t""no" 1>&6
3029fi
3030
Guido van Rossum7f43da71994-08-01 12:15:30 +00003031
Guido van Rossum009f7871997-12-04 00:51:42 +00003032
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003033USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00003034
Guido van Rossumec2f0731997-01-22 20:54:01 +00003035echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003036echo "configure:3037: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003037
3038# Check whether --with-dec-threads or --without-dec-threads was given.
3039if test "${with_dec_threads+set}" = set; then
3040 withval="$with_dec_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003041
3042echo "$ac_t""$withval" 1>&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00003043LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00003044if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00003045 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00003046fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003047else
3048 echo "$ac_t""no" 1>&6
3049fi
3050
3051
3052echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003053echo "configure:3054: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003054# Check whether --with-threads or --without-threads was given.
3055if test "${with_threads+set}" = set; then
3056 withval="$with_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003057 :
Guido van Rossumec2f0731997-01-22 20:54:01 +00003058fi
3059
3060
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003061# --with-thread is deprecated, but check for it anyway
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003062# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003063if test "${with_thread+set}" = set; then
3064 withval="$with_thread"
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003065
3066with_threads=$with_thread
Guido van Rossum7f43da71994-08-01 12:15:30 +00003067fi
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003068
3069
3070if test -z "$with_threads"
3071then with_threads="yes"
3072fi
3073echo "$ac_t""$with_threads" 1>&6
3074
3075if test "$with_threads" = "no"
3076then
3077 USE_THREAD_MODULE="#"
3078else
3079 if test -d "$with_threads"
3080 then LDFLAGS="$LDFLAGS -L$with_threads"
3081 fi
3082 if test -d "$withval"
3083 then LDFLAGS="$LDFLAGS -L$withval"
3084 fi
3085 cat >> confdefs.h <<\EOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00003086#define _REENTRANT 1
3087EOF
3088
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003089 ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003090echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003091echo "configure:3092: checking for mach/cthreads.h" >&5
3092if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003093 echo $ac_n "(cached) $ac_c" 1>&6
3094else
3095 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003096#line 3097 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003097#include "confdefs.h"
3098#include <mach/cthreads.h>
3099EOF
3100ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003101{ (eval echo configure:3102: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003102ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003103if test -z "$ac_err"; then
3104 rm -rf conftest*
3105 eval "ac_cv_header_$ac_safe=yes"
3106else
3107 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003108 echo "configure: failed program was:" >&5
3109 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003110 rm -rf conftest*
3111 eval "ac_cv_header_$ac_safe=no"
3112fi
3113rm -f conftest*
3114fi
3115if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3116 echo "$ac_t""yes" 1>&6
3117 cat >> confdefs.h <<\EOF
3118#define WITH_THREAD 1
3119EOF
3120
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003121 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003122#define C_THREADS 1
3123EOF
3124
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003125 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003126else
3127 echo "$ac_t""no" 1>&6
3128
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003129 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003130echo "configure:3131: checking for pthread_create in -lpthread" >&5
Guido van Rossum02a1c402000-02-25 19:26:31 +00003131ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003132if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003133 echo $ac_n "(cached) $ac_c" 1>&6
3134else
3135 ac_save_LIBS="$LIBS"
3136LIBS="-lpthread $LIBS"
3137cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003138#line 3139 "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003139#include "confdefs.h"
3140/* Override any gcc2 internal prototype to avoid an error. */
3141/* We use char because int might match the return type of a gcc2
3142 builtin and then its argument prototype would still apply. */
3143char pthread_create();
3144
3145int main() {
3146pthread_create()
3147; return 0; }
3148EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003149if { (eval echo configure:3150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003150 rm -rf conftest*
3151 eval "ac_cv_lib_$ac_lib_var=yes"
3152else
3153 echo "configure: failed program was:" >&5
3154 cat conftest.$ac_ext >&5
3155 rm -rf conftest*
3156 eval "ac_cv_lib_$ac_lib_var=no"
3157fi
3158rm -f conftest*
3159LIBS="$ac_save_LIBS"
3160
3161fi
3162if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3163 echo "$ac_t""yes" 1>&6
3164 cat >> confdefs.h <<\EOF
3165#define WITH_THREAD 1
3166EOF
3167
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003168 cat >> confdefs.h <<\EOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00003169#define _POSIX_THREADS 1
3170EOF
3171
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003172 LIBS="-lpthread $LIBS"
3173 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003174else
3175 echo "$ac_t""no" 1>&6
3176
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003177 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003178echo "configure:3179: checking for pthread_detach" >&5
3179if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003180 echo $ac_n "(cached) $ac_c" 1>&6
3181else
3182 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003183#line 3184 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003184#include "confdefs.h"
3185/* System header to define __stub macros and hopefully few prototypes,
Guido van Rossumea516321998-12-17 18:08:55 +00003186 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00003187#include <assert.h>
3188/* Override any gcc2 internal prototype to avoid an error. */
3189/* We use char because int might match the return type of a gcc2
3190 builtin and then its argument prototype would still apply. */
Guido van Rossumea516321998-12-17 18:08:55 +00003191char pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003192
3193int main() {
3194
3195/* The GNU C library defines this for functions which it implements
3196 to always fail with ENOSYS. Some functions are actually named
3197 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00003198#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00003199choke me
3200#else
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003201pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003202#endif
3203
3204; return 0; }
3205EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003206if { (eval echo configure:3207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003207 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003208 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003209else
3210 echo "configure: failed program was:" >&5
3211 cat conftest.$ac_ext >&5
3212 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003213 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003214fi
3215rm -f conftest*
3216fi
3217
Guido van Rossumea516321998-12-17 18:08:55 +00003218if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003219 echo "$ac_t""yes" 1>&6
3220 cat >> confdefs.h <<\EOF
3221#define WITH_THREAD 1
3222EOF
3223
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003224 cat >> confdefs.h <<\EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00003225#define _POSIX_THREADS 1
3226EOF
3227
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003228 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00003229else
3230 echo "$ac_t""no" 1>&6
3231
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003232 ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003233echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003234echo "configure:3235: checking for kernel/OS.h" >&5
3235if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003236 echo $ac_n "(cached) $ac_c" 1>&6
3237else
3238 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003239#line 3240 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003240#include "confdefs.h"
3241#include <kernel/OS.h>
3242EOF
3243ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003244{ (eval echo configure:3245: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003245ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003246if test -z "$ac_err"; then
3247 rm -rf conftest*
3248 eval "ac_cv_header_$ac_safe=yes"
3249else
3250 echo "$ac_err" >&5
3251 echo "configure: failed program was:" >&5
3252 cat conftest.$ac_ext >&5
3253 rm -rf conftest*
3254 eval "ac_cv_header_$ac_safe=no"
3255fi
3256rm -f conftest*
3257fi
3258if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3259 echo "$ac_t""yes" 1>&6
3260 cat >> confdefs.h <<\EOF
3261#define WITH_THREAD 1
3262EOF
3263
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003264 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003265#define BEOS_THREADS 1
3266EOF
3267
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003268 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003269else
3270 echo "$ac_t""no" 1>&6
3271
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003272 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003273echo "configure:3274: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003274ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003275if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003276 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003277else
3278 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003279LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003280cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003281#line 3282 "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00003282#include "confdefs.h"
3283/* Override any gcc2 internal prototype to avoid an error. */
3284/* We use char because int might match the return type of a gcc2
3285 builtin and then its argument prototype would still apply. */
3286char pthread_create();
3287
3288int main() {
3289pthread_create()
3290; return 0; }
3291EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003292if { (eval echo configure:3293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Greg Steinadf63d62000-07-05 10:38:09 +00003293 rm -rf conftest*
3294 eval "ac_cv_lib_$ac_lib_var=yes"
3295else
3296 echo "configure: failed program was:" >&5
3297 cat conftest.$ac_ext >&5
3298 rm -rf conftest*
3299 eval "ac_cv_lib_$ac_lib_var=no"
3300fi
3301rm -f conftest*
3302LIBS="$ac_save_LIBS"
3303
3304fi
3305if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3306 echo "$ac_t""yes" 1>&6
3307 cat >> confdefs.h <<\EOF
3308#define WITH_THREAD 1
3309EOF
3310
3311 cat >> confdefs.h <<\EOF
3312#define _POSIX_THREADS 1
3313EOF
3314
3315 LIBS="$LIBS -lpthreads"
3316 LIBOBJS="$LIBOBJS thread.o"
3317else
3318 echo "$ac_t""no" 1>&6
3319
3320 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003321echo "configure:3322: checking for pthread_create in -lc_r" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003322ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003323if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Greg Steinadf63d62000-07-05 10:38:09 +00003324 echo $ac_n "(cached) $ac_c" 1>&6
3325else
3326 ac_save_LIBS="$LIBS"
3327LIBS="-lc_r $LIBS"
3328cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003329#line 3330 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00003330#include "confdefs.h"
3331/* Override any gcc2 internal prototype to avoid an error. */
3332/* We use char because int might match the return type of a gcc2
3333 builtin and then its argument prototype would still apply. */
3334char pthread_create();
3335
3336int main() {
3337pthread_create()
3338; return 0; }
3339EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003340if { (eval echo configure:3341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum49545951997-12-02 19:28:29 +00003341 rm -rf conftest*
3342 eval "ac_cv_lib_$ac_lib_var=yes"
3343else
3344 echo "configure: failed program was:" >&5
3345 cat conftest.$ac_ext >&5
3346 rm -rf conftest*
3347 eval "ac_cv_lib_$ac_lib_var=no"
3348fi
3349rm -f conftest*
3350LIBS="$ac_save_LIBS"
3351
3352fi
3353if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3354 echo "$ac_t""yes" 1>&6
3355 cat >> confdefs.h <<\EOF
3356#define WITH_THREAD 1
3357EOF
3358
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003359 cat >> confdefs.h <<\EOF
Guido van Rossum49545951997-12-02 19:28:29 +00003360#define _POSIX_THREADS 1
3361EOF
3362
Greg Steinadf63d62000-07-05 10:38:09 +00003363 LIBS="$LIBS -lc_r"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003364 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003365else
3366 echo "$ac_t""no" 1>&6
3367
Greg Steinadf63d62000-07-05 10:38:09 +00003368 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003369echo "configure:3370: checking for __d6_pthread_create in -lthread" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003370ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003371if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003372 echo $ac_n "(cached) $ac_c" 1>&6
3373else
3374 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00003375LIBS="-lthread $LIBS"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003376cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003377#line 3378 "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003378#include "confdefs.h"
3379/* Override any gcc2 internal prototype to avoid an error. */
3380/* We use char because int might match the return type of a gcc2
3381 builtin and then its argument prototype would still apply. */
Greg Steinadf63d62000-07-05 10:38:09 +00003382char __d6_pthread_create();
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003383
3384int main() {
Greg Steinadf63d62000-07-05 10:38:09 +00003385__d6_pthread_create()
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003386; return 0; }
3387EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003388if { (eval echo configure:3389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003389 rm -rf conftest*
3390 eval "ac_cv_lib_$ac_lib_var=yes"
3391else
3392 echo "configure: failed program was:" >&5
3393 cat conftest.$ac_ext >&5
3394 rm -rf conftest*
3395 eval "ac_cv_lib_$ac_lib_var=no"
3396fi
3397rm -f conftest*
3398LIBS="$ac_save_LIBS"
3399
3400fi
3401if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3402 echo "$ac_t""yes" 1>&6
3403 cat >> confdefs.h <<\EOF
3404#define WITH_THREAD 1
3405EOF
3406
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003407 cat >> confdefs.h <<\EOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003408#define _POSIX_THREADS 1
3409EOF
3410
Greg Steinadf63d62000-07-05 10:38:09 +00003411 LIBS="$LIBS -lthread"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003412 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +00003413else
3414 echo "$ac_t""no" 1>&6
3415
Greg Steinadf63d62000-07-05 10:38:09 +00003416 echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003417echo "configure:3418: checking for pth_init in -lpth" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003418ac_lib_var=`echo pth'_'pth_init | sed 'y%./+-%__p_%'`
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003419if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum0be3e491997-05-22 20:33:33 +00003420 echo $ac_n "(cached) $ac_c" 1>&6
3421else
3422 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00003423LIBS="-lpth $LIBS"
Guido van Rossum0be3e491997-05-22 20:33:33 +00003424cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003425#line 3426 "configure"
Guido van Rossum0be3e491997-05-22 20:33:33 +00003426#include "confdefs.h"
3427/* Override any gcc2 internal prototype to avoid an error. */
3428/* We use char because int might match the return type of a gcc2
3429 builtin and then its argument prototype would still apply. */
Greg Steinadf63d62000-07-05 10:38:09 +00003430char pth_init();
Guido van Rossum0be3e491997-05-22 20:33:33 +00003431
3432int main() {
Greg Steinadf63d62000-07-05 10:38:09 +00003433pth_init()
Guido van Rossum0be3e491997-05-22 20:33:33 +00003434; return 0; }
3435EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003436if { (eval echo configure:3437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0be3e491997-05-22 20:33:33 +00003437 rm -rf conftest*
3438 eval "ac_cv_lib_$ac_lib_var=yes"
3439else
3440 echo "configure: failed program was:" >&5
3441 cat conftest.$ac_ext >&5
3442 rm -rf conftest*
3443 eval "ac_cv_lib_$ac_lib_var=no"
3444fi
3445rm -f conftest*
3446LIBS="$ac_save_LIBS"
3447
3448fi
3449if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3450 echo "$ac_t""yes" 1>&6
3451 cat >> confdefs.h <<\EOF
3452#define WITH_THREAD 1
3453EOF
3454
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003455 cat >> confdefs.h <<\EOF
Greg Steinadf63d62000-07-05 10:38:09 +00003456#define _GNU_PTH 1
Guido van Rossum0be3e491997-05-22 20:33:33 +00003457EOF
3458
Greg Steinadf63d62000-07-05 10:38:09 +00003459 LIBS="-lpth $LIBS"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003460 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum0be3e491997-05-22 20:33:33 +00003461else
3462 echo "$ac_t""no" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00003463
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003464 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003465echo "configure:3466: checking for pthread_create in -lcma" >&5
Guido van Rossumb93a8621998-05-07 13:27:32 +00003466ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003467if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003468 echo $ac_n "(cached) $ac_c" 1>&6
3469else
3470 ac_save_LIBS="$LIBS"
3471LIBS="-lcma $LIBS"
3472cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003473#line 3474 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003474#include "confdefs.h"
3475/* Override any gcc2 internal prototype to avoid an error. */
3476/* We use char because int might match the return type of a gcc2
3477 builtin and then its argument prototype would still apply. */
3478char pthread_create();
3479
3480int main() {
3481pthread_create()
3482; return 0; }
3483EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003484if { (eval echo configure:3485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003485 rm -rf conftest*
3486 eval "ac_cv_lib_$ac_lib_var=yes"
3487else
3488 echo "configure: failed program was:" >&5
3489 cat conftest.$ac_ext >&5
3490 rm -rf conftest*
3491 eval "ac_cv_lib_$ac_lib_var=no"
3492fi
3493rm -f conftest*
3494LIBS="$ac_save_LIBS"
3495
3496fi
3497if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3498 echo "$ac_t""yes" 1>&6
3499 cat >> confdefs.h <<\EOF
3500#define WITH_THREAD 1
3501EOF
3502
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003503 cat >> confdefs.h <<\EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003504#define _POSIX_THREADS 1
3505EOF
3506
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003507 LIBS="$LIBS -lcma"
3508 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003509else
3510 echo "$ac_t""no" 1>&6
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003511
3512 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00003513fi
3514
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003515
Guido van Rossum627b2d71993-12-24 10:39:16 +00003516fi
3517
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003518fi
3519
Guido van Rossum0be3e491997-05-22 20:33:33 +00003520fi
3521
Guido van Rossum49545951997-12-02 19:28:29 +00003522fi
3523
Guido van Rossumb93a8621998-05-07 13:27:32 +00003524fi
3525
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003526fi
3527
Guido van Rossumad678af1998-10-02 14:42:15 +00003528fi
3529
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003530fi
3531
Guido van Rossum0be3e491997-05-22 20:33:33 +00003532
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003533 echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003534echo "configure:3535: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003535ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003536if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003537 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003538else
3539 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003540LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003541cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003542#line 3543 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003543#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003544/* Override any gcc2 internal prototype to avoid an error. */
3545/* We use char because int might match the return type of a gcc2
3546 builtin and then its argument prototype would still apply. */
3547char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003548
Guido van Rossumf78abae1997-01-21 22:02:36 +00003549int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003550usconfig()
3551; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003552EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003553if { (eval echo configure:3554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003554 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003555 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003556else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003557 echo "configure: failed program was:" >&5
3558 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003559 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003560 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003561fi
3562rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003563LIBS="$ac_save_LIBS"
3564
3565fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003566if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003567 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003568 cat >> confdefs.h <<\EOF
3569#define WITH_THREAD 1
3570EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003571
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003572 LIBS="$LIBS -lmpc"
3573 LIBOBJS="$LIBOBJS thread.o"
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003574 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00003575else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003576 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003577fi
3578
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003579 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003580echo "configure:3581: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003581ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003582if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003583 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003584else
3585 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003586LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003587cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003588#line 3589 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003589#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003590/* Override any gcc2 internal prototype to avoid an error. */
3591/* We use char because int might match the return type of a gcc2
3592 builtin and then its argument prototype would still apply. */
3593char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003594
Guido van Rossumf78abae1997-01-21 22:02:36 +00003595int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003596thr_create()
3597; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003598EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003599if { (eval echo configure:3600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003600 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003601 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003602else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003603 echo "configure: failed program was:" >&5
3604 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003605 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003606 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003607fi
3608rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003609LIBS="$ac_save_LIBS"
3610
3611fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003612if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003613 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003614 cat >> confdefs.h <<\EOF
3615#define WITH_THREAD 1
3616EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003617
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003618 LIBS="$LIBS -lthread"
3619 LIBOBJS="$LIBOBJS thread.o"
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003620 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00003621else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003622 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003623fi
3624
Guido van Rossum627b2d71993-12-24 10:39:16 +00003625fi
3626
Barry Warsawef82cd72000-06-30 16:21:01 +00003627# Check for GC support
3628
3629USE_GC_MODULE=""
3630echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003631echo "configure:3632: checking for --with-cycle-gc" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00003632# Check whether --with-cycle-gc or --without-cycle-gc was given.
3633if test "${with_cycle_gc+set}" = set; then
3634 withval="$with_cycle_gc"
3635 :
3636fi
3637
3638
3639if test -z "$with_cycle_gc"
3640then with_cycle_gc="yes"
3641fi
3642if test "$with_cycle_gc" = "no"
3643then
3644 USE_GC_MODULE="#"
3645else
3646 cat >> confdefs.h <<\EOF
3647#define WITH_CYCLE_GC 1
3648EOF
3649
3650fi
3651echo "$ac_t""$with_cycle_gc" 1>&6
3652
Fred Drakea50d6ec2000-08-31 16:13:20 +00003653# Check for LIBDB support
3654# either --with-libdb or, in its absence, the presence of db.h
3655
3656USE_BSDDB_MODULE=""
3657echo $ac_n "checking for --with-libdb""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003658echo "configure:3659: checking for --with-libdb" >&5
Fred Drakea50d6ec2000-08-31 16:13:20 +00003659# Check whether --with-libdb or --without-libdb was given.
3660if test "${with_libdb+set}" = set; then
3661 withval="$with_libdb"
3662 :
3663fi
3664
3665
3666# default is enabled
3667if test -z "$with_libdb"
3668then with_libdb="yes"
3669fi
3670# if we found db.h, enable, unless with_libdb is expressly set to "no"
3671if test "$ac_cv_header_db_h" = "yes" -a "$with_libdb" != "no"
3672then with_libdb="yes"
3673fi
3674if test "$with_libdb" = "no"
3675then
3676 USE_BSDDB_MODULE="#"
3677else
3678 cat >> confdefs.h <<\EOF
3679#define WITH_LIBDB 1
3680EOF
3681
3682fi
3683echo "$ac_t""$with_libdb" 1>&6
3684
Barry Warsawef82cd72000-06-30 16:21:01 +00003685# Check for --with-wctype-functions
3686echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003687echo "configure:3688: checking for --with-wctype-functions" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00003688# Check whether --with-wctype-functions or --without-wctype-functions was given.
3689if test "${with_wctype_functions+set}" = set; then
3690 withval="$with_wctype_functions"
3691
3692if test "$withval" != no
3693then cat >> confdefs.h <<\EOF
3694#define WANT_WCTYPE_FUNCTIONS 1
3695EOF
3696 echo "$ac_t""yes" 1>&6
3697else echo "$ac_t""no" 1>&6
3698fi
3699else
3700 echo "$ac_t""no" 1>&6
3701fi
3702
3703
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003704# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00003705
3706DLINCLDIR=/
3707
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003708echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003709echo "configure:3710: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003710# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003711if test "${with_sgi_dl+set}" = set; then
3712 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003713
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003714echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003715cat >> confdefs.h <<\EOF
3716#define WITH_SGI_DL 1
3717EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003718
Guido van Rossume97ee181999-12-20 21:27:22 +00003719DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003720dldir=$withval
3721if test -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00003722then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003723else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003724fi
3725DLINCLDIR=${dldir}
3726LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003727else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003728 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003729fi
3730
3731
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003732echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003733echo "configure:3734: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003734# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003735if test "${with_dl_dld+set}" = set; then
3736 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003737
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003738echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003739cat >> confdefs.h <<\EOF
3740#define WITH_DL_DLD 1
3741EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003742
Guido van Rossume97ee181999-12-20 21:27:22 +00003743DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003744dldir=`echo "$withval" | sed 's/,.*//'`
3745dlddir=`echo "$withval" | sed 's/.*,//'`
3746if test -d "$dldir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00003747then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003748else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003749fi
3750DLINCLDIR=${dldir}
3751LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003752else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003753 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003754fi
3755
3756
Guido van Rossume97ee181999-12-20 21:27:22 +00003757# the dlopen() function means we might want to use dynload_shlib.o. some
3758# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00003759for ac_func in dlopen
3760do
3761echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003762echo "configure:3763: checking for $ac_func" >&5
3763if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00003764 echo $ac_n "(cached) $ac_c" 1>&6
3765else
3766 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003767#line 3768 "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +00003768#include "confdefs.h"
3769/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00003770 which can conflict with char $ac_func(); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +00003771#include <assert.h>
3772/* Override any gcc2 internal prototype to avoid an error. */
3773/* We use char because int might match the return type of a gcc2
3774 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00003775char $ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00003776
3777int main() {
3778
3779/* The GNU C library defines this for functions which it implements
3780 to always fail with ENOSYS. Some functions are actually named
3781 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00003782#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +00003783choke me
3784#else
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003785$ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00003786#endif
3787
3788; return 0; }
3789EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003790if { (eval echo configure:3791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossume97ee181999-12-20 21:27:22 +00003791 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00003792 eval "ac_cv_func_$ac_func=yes"
Guido van Rossume97ee181999-12-20 21:27:22 +00003793else
3794 echo "configure: failed program was:" >&5
3795 cat conftest.$ac_ext >&5
3796 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00003797 eval "ac_cv_func_$ac_func=no"
Guido van Rossume97ee181999-12-20 21:27:22 +00003798fi
3799rm -f conftest*
3800fi
3801
Thomas Wouters3a584202000-08-05 23:28:51 +00003802if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00003803 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00003804 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3805 cat >> confdefs.h <<EOF
3806#define $ac_tr_func 1
3807EOF
3808
Guido van Rossume97ee181999-12-20 21:27:22 +00003809else
3810 echo "$ac_t""no" 1>&6
3811fi
Thomas Wouters3a584202000-08-05 23:28:51 +00003812done
Guido van Rossume97ee181999-12-20 21:27:22 +00003813
3814
3815# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
3816# loading of modules.
3817
3818echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003819echo "configure:3820: checking DYNLOADFILE" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00003820if test -z "$DYNLOADFILE"
3821then
3822 case $ac_sys_system/$ac_sys_release in
3823 AIX*) DYNLOADFILE="dynload_aix.o";;
3824 BeOS*) DYNLOADFILE="dynload_beos.o";;
3825 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
3826 next/*) DYNLOADFILE="dynload_next.o";;
3827 *)
3828 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
3829 # out any dynamic loading
3830 if test "$ac_cv_func_dlopen" = yes
3831 then DYNLOADFILE="dynload_shlib.o"
3832 else DYNLOADFILE="dynload_stub.o"
3833 fi
3834 ;;
3835 esac
3836fi
3837echo "$ac_t""$DYNLOADFILE" 1>&6
3838if test "$DYNLOADFILE" != "dynload_stub.o"
3839then
3840 cat >> confdefs.h <<\EOF
3841#define HAVE_DYNAMIC_LOADING 1
3842EOF
3843
3844fi
3845
Guido van Rossum627b2d71993-12-24 10:39:16 +00003846# checks for library functions
Thomas Wouters3a584202000-08-05 23:28:51 +00003847for ac_func in alarm chown clock confstr ctermid ctermid_r execv \
Fred Drake35a092f1999-12-13 16:23:35 +00003848 flock fork fsync fdatasync fpathconf ftime ftruncate \
Thomas Wouters3a584202000-08-05 23:28:51 +00003849 getgroups getlogin getpeername getpid getpwent getwd \
Andrew M. Kuchling22c69342000-06-18 15:07:40 +00003850 kill link lstat mkfifo mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00003851 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +00003852 putenv readlink \
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00003853 select setegid seteuid setgid \
Thomas Wouters3a584202000-08-05 23:28:51 +00003854 setlocale setregid setreuid setsid setpgid setuid setvbuf \
Fred Drake35a092f1999-12-13 16:23:35 +00003855 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00003856 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Thomas Wouters70c21a12000-07-14 14:28:33 +00003857 truncate uname waitpid _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00003858do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003859echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003860echo "configure:3861: checking for $ac_func" >&5
3861if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003862 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003863else
3864 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003865#line 3866 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003866#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003867/* System header to define __stub macros and hopefully few prototypes,
3868 which can conflict with char $ac_func(); below. */
3869#include <assert.h>
3870/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003871/* We use char because int might match the return type of a gcc2
3872 builtin and then its argument prototype would still apply. */
3873char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003874
Guido van Rossumf78abae1997-01-21 22:02:36 +00003875int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003876
Guido van Rossum627b2d71993-12-24 10:39:16 +00003877/* The GNU C library defines this for functions which it implements
3878 to always fail with ENOSYS. Some functions are actually named
3879 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003880#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00003881choke me
3882#else
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003883$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003884#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003885
Guido van Rossum7f43da71994-08-01 12:15:30 +00003886; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003887EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003888if { (eval echo configure:3889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003889 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003890 eval "ac_cv_func_$ac_func=yes"
3891else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003892 echo "configure: failed program was:" >&5
3893 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003894 rm -rf conftest*
3895 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003896fi
3897rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003898fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003899
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003900if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003901 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003902 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003903 cat >> confdefs.h <<EOF
3904#define $ac_tr_func 1
3905EOF
3906
3907else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003908 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003909fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003910done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003911
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003912
Fred Drake8cef4cf2000-06-28 16:40:38 +00003913# check for openpty and forkpty
3914
3915for ac_func in openpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00003916do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003917echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003918echo "configure:3919: checking for $ac_func" >&5
3919if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003920 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003921else
3922 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003923#line 3924 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003924#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003925/* System header to define __stub macros and hopefully few prototypes,
3926 which can conflict with char $ac_func(); below. */
3927#include <assert.h>
3928/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003929/* We use char because int might match the return type of a gcc2
3930 builtin and then its argument prototype would still apply. */
3931char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003932
Guido van Rossumf78abae1997-01-21 22:02:36 +00003933int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003934
Guido van Rossum627b2d71993-12-24 10:39:16 +00003935/* The GNU C library defines this for functions which it implements
3936 to always fail with ENOSYS. Some functions are actually named
3937 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003938#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00003939choke me
3940#else
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003941$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003942#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003943
Guido van Rossum7f43da71994-08-01 12:15:30 +00003944; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003945EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003946if { (eval echo configure:3947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00003947 rm -rf conftest*
3948 eval "ac_cv_func_$ac_func=yes"
3949else
3950 echo "configure: failed program was:" >&5
3951 cat conftest.$ac_ext >&5
3952 rm -rf conftest*
3953 eval "ac_cv_func_$ac_func=no"
3954fi
3955rm -f conftest*
3956fi
3957
3958if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3959 echo "$ac_t""yes" 1>&6
3960 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3961 cat >> confdefs.h <<EOF
3962#define $ac_tr_func 1
3963EOF
3964
3965else
3966 echo "$ac_t""no" 1>&6
3967echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003968echo "configure:3969: checking for openpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00003969ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003970if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00003971 echo $ac_n "(cached) $ac_c" 1>&6
3972else
3973 ac_save_LIBS="$LIBS"
3974LIBS="-lutil $LIBS"
3975cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003976#line 3977 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00003977#include "confdefs.h"
3978/* Override any gcc2 internal prototype to avoid an error. */
3979/* We use char because int might match the return type of a gcc2
3980 builtin and then its argument prototype would still apply. */
3981char openpty();
3982
3983int main() {
3984openpty()
3985; return 0; }
3986EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00003987if { (eval echo configure:3988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00003988 rm -rf conftest*
3989 eval "ac_cv_lib_$ac_lib_var=yes"
3990else
3991 echo "configure: failed program was:" >&5
3992 cat conftest.$ac_ext >&5
3993 rm -rf conftest*
3994 eval "ac_cv_lib_$ac_lib_var=no"
3995fi
3996rm -f conftest*
3997LIBS="$ac_save_LIBS"
3998
3999fi
4000if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4001 echo "$ac_t""yes" 1>&6
4002 cat >> confdefs.h <<\EOF
4003#define HAVE_OPENPTY 1
4004EOF
4005 LIBS="$LIBS -lutil"
4006else
4007 echo "$ac_t""no" 1>&6
4008fi
4009
4010fi
4011done
4012
4013for ac_func in forkpty
4014do
4015echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004016echo "configure:4017: checking for $ac_func" >&5
4017if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004018 echo $ac_n "(cached) $ac_c" 1>&6
4019else
4020 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004021#line 4022 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004022#include "confdefs.h"
4023/* System header to define __stub macros and hopefully few prototypes,
4024 which can conflict with char $ac_func(); below. */
4025#include <assert.h>
4026/* Override any gcc2 internal prototype to avoid an error. */
4027/* We use char because int might match the return type of a gcc2
4028 builtin and then its argument prototype would still apply. */
4029char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004030
4031int main() {
4032
4033/* The GNU C library defines this for functions which it implements
4034 to always fail with ENOSYS. Some functions are actually named
4035 something starting with __ and the normal name is an alias. */
4036#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4037choke me
4038#else
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004039$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004040#endif
4041
4042; return 0; }
4043EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004044if { (eval echo configure:4045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004045 rm -rf conftest*
4046 eval "ac_cv_func_$ac_func=yes"
4047else
4048 echo "configure: failed program was:" >&5
4049 cat conftest.$ac_ext >&5
4050 rm -rf conftest*
4051 eval "ac_cv_func_$ac_func=no"
4052fi
4053rm -f conftest*
4054fi
4055
4056if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4057 echo "$ac_t""yes" 1>&6
4058 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4059 cat >> confdefs.h <<EOF
4060#define $ac_tr_func 1
4061EOF
4062
4063else
4064 echo "$ac_t""no" 1>&6
4065echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004066echo "configure:4067: checking for forkpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004067ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004068if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004069 echo $ac_n "(cached) $ac_c" 1>&6
4070else
4071 ac_save_LIBS="$LIBS"
4072LIBS="-lutil $LIBS"
4073cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004074#line 4075 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004075#include "confdefs.h"
4076/* Override any gcc2 internal prototype to avoid an error. */
4077/* We use char because int might match the return type of a gcc2
4078 builtin and then its argument prototype would still apply. */
4079char forkpty();
4080
4081int main() {
4082forkpty()
4083; return 0; }
4084EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004085if { (eval echo configure:4086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004086 rm -rf conftest*
4087 eval "ac_cv_lib_$ac_lib_var=yes"
4088else
4089 echo "configure: failed program was:" >&5
4090 cat conftest.$ac_ext >&5
4091 rm -rf conftest*
4092 eval "ac_cv_lib_$ac_lib_var=no"
4093fi
4094rm -f conftest*
4095LIBS="$ac_save_LIBS"
4096
4097fi
4098if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4099 echo "$ac_t""yes" 1>&6
4100 cat >> confdefs.h <<\EOF
4101#define HAVE_FORKPTY 1
4102EOF
4103 LIBS="$LIBS -lutil"
4104else
4105 echo "$ac_t""no" 1>&6
4106fi
4107
4108fi
4109done
4110
4111
4112# check for long file support functions
4113for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
4114do
4115echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004116echo "configure:4117: checking for $ac_func" >&5
4117if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004118 echo $ac_n "(cached) $ac_c" 1>&6
4119else
4120 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004121#line 4122 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004122#include "confdefs.h"
4123/* System header to define __stub macros and hopefully few prototypes,
4124 which can conflict with char $ac_func(); below. */
4125#include <assert.h>
4126/* Override any gcc2 internal prototype to avoid an error. */
4127/* We use char because int might match the return type of a gcc2
4128 builtin and then its argument prototype would still apply. */
4129char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004130
4131int main() {
4132
4133/* The GNU C library defines this for functions which it implements
4134 to always fail with ENOSYS. Some functions are actually named
4135 something starting with __ and the normal name is an alias. */
4136#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4137choke me
4138#else
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004139$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004140#endif
4141
4142; return 0; }
4143EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004144if { (eval echo configure:4145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004145 rm -rf conftest*
4146 eval "ac_cv_func_$ac_func=yes"
4147else
4148 echo "configure: failed program was:" >&5
4149 cat conftest.$ac_ext >&5
4150 rm -rf conftest*
4151 eval "ac_cv_func_$ac_func=no"
4152fi
4153rm -f conftest*
4154fi
4155
4156if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4157 echo "$ac_t""yes" 1>&6
4158 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4159 cat >> confdefs.h <<EOF
4160#define $ac_tr_func 1
4161EOF
4162
4163else
4164 echo "$ac_t""no" 1>&6
4165fi
4166done
4167
4168
4169for ac_func in dup2 getcwd strdup strerror memmove
4170do
4171echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004172echo "configure:4173: checking for $ac_func" >&5
4173if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004174 echo $ac_n "(cached) $ac_c" 1>&6
4175else
4176 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004177#line 4178 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004178#include "confdefs.h"
4179/* System header to define __stub macros and hopefully few prototypes,
4180 which can conflict with char $ac_func(); below. */
4181#include <assert.h>
4182/* Override any gcc2 internal prototype to avoid an error. */
4183/* We use char because int might match the return type of a gcc2
4184 builtin and then its argument prototype would still apply. */
4185char $ac_func();
4186
4187int main() {
4188
4189/* The GNU C library defines this for functions which it implements
4190 to always fail with ENOSYS. Some functions are actually named
4191 something starting with __ and the normal name is an alias. */
4192#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4193choke me
4194#else
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004195$ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004196#endif
4197
4198; return 0; }
4199EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004200if { (eval echo configure:4201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004201 rm -rf conftest*
4202 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004203else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004204 echo "configure: failed program was:" >&5
4205 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004206 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004207 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004208fi
4209rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004210fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004211
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004212if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004213 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00004214 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4215 cat >> confdefs.h <<EOF
4216#define $ac_tr_func 1
4217EOF
4218
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004219else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004220 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004221LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004222fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004223done
4224
Guido van Rossumf78abae1997-01-21 22:02:36 +00004225
Thomas Wouters3a584202000-08-05 23:28:51 +00004226for ac_func in getpgrp
4227do
4228echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004229echo "configure:4230: checking for $ac_func" >&5
4230if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004231 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004232else
4233 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004234#line 4235 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004235#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004236/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004237 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004238#include <assert.h>
4239/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004240/* We use char because int might match the return type of a gcc2
4241 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004242char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004243
Guido van Rossumf78abae1997-01-21 22:02:36 +00004244int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004245
Guido van Rossum627b2d71993-12-24 10:39:16 +00004246/* The GNU C library defines this for functions which it implements
4247 to always fail with ENOSYS. Some functions are actually named
4248 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004249#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004250choke me
4251#else
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004252$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004253#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004254
4255; return 0; }
4256EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004257if { (eval echo configure:4258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004258 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004259 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004260else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004261 echo "configure: failed program was:" >&5
4262 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004263 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004264 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004265fi
4266rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004267fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004268
Thomas Wouters3a584202000-08-05 23:28:51 +00004269if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004270 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004271 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4272 cat >> confdefs.h <<EOF
4273#define $ac_tr_func 1
4274EOF
4275 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004276#line 4277 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004277#include "confdefs.h"
4278#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004279int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004280getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00004281; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004282EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004283if { (eval echo configure:4284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004284 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004285 cat >> confdefs.h <<\EOF
4286#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00004287EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004288
Guido van Rossumf78abae1997-01-21 22:02:36 +00004289else
4290 echo "configure: failed program was:" >&5
4291 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004292fi
4293rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004294else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004295 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004296fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004297done
Guido van Rossum627b2d71993-12-24 10:39:16 +00004298
Thomas Wouters3a584202000-08-05 23:28:51 +00004299for ac_func in setpgrp
4300do
4301echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004302echo "configure:4303: checking for $ac_func" >&5
4303if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004304 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004305else
4306 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004307#line 4308 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004308#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004309/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004310 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004311#include <assert.h>
4312/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004313/* We use char because int might match the return type of a gcc2
4314 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004315char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004316
Guido van Rossumf78abae1997-01-21 22:02:36 +00004317int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004318
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004319/* The GNU C library defines this for functions which it implements
4320 to always fail with ENOSYS. Some functions are actually named
4321 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004322#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004323choke me
4324#else
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004325$ac_func();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004326#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004327
4328; return 0; }
4329EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004330if { (eval echo configure:4331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004331 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004332 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004333else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004334 echo "configure: failed program was:" >&5
4335 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004336 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004337 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004338fi
4339rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004340fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004341
Thomas Wouters3a584202000-08-05 23:28:51 +00004342if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004343 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004344 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4345 cat >> confdefs.h <<EOF
4346#define $ac_tr_func 1
4347EOF
4348 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004349#line 4350 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004350#include "confdefs.h"
4351#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004352int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004353setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004354; return 0; }
4355EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004356if { (eval echo configure:4357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004357 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004358 cat >> confdefs.h <<\EOF
4359#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004360EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004361
Guido van Rossumf78abae1997-01-21 22:02:36 +00004362else
4363 echo "configure: failed program was:" >&5
4364 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004365fi
4366rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004367else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004368 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004369fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004370done
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004371
Thomas Wouters3a584202000-08-05 23:28:51 +00004372for ac_func in gettimeofday
4373do
4374echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004375echo "configure:4376: checking for $ac_func" >&5
4376if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004377 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004378else
4379 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004380#line 4381 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004381#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004382/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004383 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004384#include <assert.h>
4385/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004386/* We use char because int might match the return type of a gcc2
4387 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004388char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004389
Guido van Rossumf78abae1997-01-21 22:02:36 +00004390int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004391
4392/* The GNU C library defines this for functions which it implements
4393 to always fail with ENOSYS. Some functions are actually named
4394 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004395#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004396choke me
4397#else
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004398$ac_func();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004399#endif
4400
4401; return 0; }
4402EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004403if { (eval echo configure:4404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004404 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004405 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004406else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004407 echo "configure: failed program was:" >&5
4408 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004409 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004410 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004411fi
4412rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004413fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004414
Thomas Wouters3a584202000-08-05 23:28:51 +00004415if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004416 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004417 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4418 cat >> confdefs.h <<EOF
4419#define $ac_tr_func 1
4420EOF
4421 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004422#line 4423 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004423#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004424#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004425int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004426gettimeofday((struct timeval*)0,(struct timezone*)0);
4427; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004428EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004429if { (eval echo configure:4430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004430 :
4431else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004432 echo "configure: failed program was:" >&5
4433 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004434 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004435 cat >> confdefs.h <<\EOF
4436#define GETTIMEOFDAY_NO_TZ 1
4437EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004438
4439fi
4440rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004441else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004442 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004443fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004444done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004445
4446
4447# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004448echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004449echo "configure:4450: checking whether time.h and sys/time.h may both be included" >&5
4450if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004451 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004452else
4453 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004454#line 4455 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004455#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004456#include <sys/types.h>
4457#include <sys/time.h>
4458#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004459int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004460struct tm *tp;
4461; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004462EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004463if { (eval echo configure:4464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004464 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004465 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004466else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004467 echo "configure: failed program was:" >&5
4468 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004469 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004470 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004471fi
4472rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004473fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004474
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004475echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004476if test $ac_cv_header_time = yes; then
4477 cat >> confdefs.h <<\EOF
4478#define TIME_WITH_SYS_TIME 1
4479EOF
4480
4481fi
4482
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004483echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004484echo "configure:4485: checking whether struct tm is in sys/time.h or time.h" >&5
4485if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004486 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004487else
4488 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004489#line 4490 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004490#include "confdefs.h"
4491#include <sys/types.h>
4492#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004493int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004494struct tm *tp; tp->tm_sec;
4495; return 0; }
4496EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004497if { (eval echo configure:4498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004498 rm -rf conftest*
4499 ac_cv_struct_tm=time.h
4500else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004501 echo "configure: failed program was:" >&5
4502 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004503 rm -rf conftest*
4504 ac_cv_struct_tm=sys/time.h
4505fi
4506rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004507fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004508
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004509echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004510if test $ac_cv_struct_tm = sys/time.h; then
4511 cat >> confdefs.h <<\EOF
4512#define TM_IN_SYS_TIME 1
4513EOF
4514
4515fi
4516
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004517echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4518echo "configure:4519: checking for tm_zone in struct tm" >&5
4519if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004520 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004521else
4522 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004523#line 4524 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004524#include "confdefs.h"
4525#include <sys/types.h>
4526#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004527int main() {
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004528struct tm tm; tm.tm_zone;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004529; return 0; }
4530EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004531if { (eval echo configure:4532: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004532 rm -rf conftest*
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004533 ac_cv_struct_tm_zone=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004534else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004535 echo "configure: failed program was:" >&5
4536 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004537 rm -rf conftest*
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004538 ac_cv_struct_tm_zone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004539fi
4540rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004541fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004542
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004543echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4544if test "$ac_cv_struct_tm_zone" = yes; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004545 cat >> confdefs.h <<\EOF
4546#define HAVE_TM_ZONE 1
4547EOF
4548
4549else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004550 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004551echo "configure:4552: checking for tzname" >&5
4552if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004553 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004554else
4555 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004556#line 4557 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004557#include "confdefs.h"
4558#include <time.h>
4559#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004560extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004561#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00004562int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004563atoi(*tzname);
4564; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004565EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004566if { (eval echo configure:4567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004567 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004568 ac_cv_var_tzname=yes
4569else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004570 echo "configure: failed program was:" >&5
4571 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004572 rm -rf conftest*
4573 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004574fi
4575rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00004576fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004577
4578echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004579 if test $ac_cv_var_tzname = yes; then
4580 cat >> confdefs.h <<\EOF
4581#define HAVE_TZNAME 1
4582EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004583
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004584 fi
4585fi
4586
4587
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004588echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004589echo "configure:4590: checking for time.h that defines altzone" >&5
4590if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004591 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004592else
4593 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004594#line 4595 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004595#include "confdefs.h"
4596#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004597int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004598return altzone;
4599; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004600EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004601if { (eval echo configure:4602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004602 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004603 ac_cv_header_time_altzone=yes
4604else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004605 echo "configure: failed program was:" >&5
4606 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004607 rm -rf conftest*
4608 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00004609fi
4610rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004611fi
4612
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004613echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004614if test $ac_cv_header_time_altzone = yes; then
4615 cat >> confdefs.h <<\EOF
4616#define HAVE_ALTZONE 1
4617EOF
4618
4619fi
4620
Guido van Rossumda88dad1995-01-26 00:46:29 +00004621was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004622echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004623echo "configure:4624: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004624cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004625#line 4626 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004626#include "confdefs.h"
4627
4628#include <sys/types.h>
4629#include <sys/select.h>
4630#include <sys/time.h>
4631
Guido van Rossumf78abae1997-01-21 22:02:36 +00004632int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004633;
4634; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004635EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004636if { (eval echo configure:4637: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004637 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004638 cat >> confdefs.h <<\EOF
4639#define SYS_SELECT_WITH_SYS_TIME 1
4640EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004641 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004642else
4643 echo "configure: failed program was:" >&5
4644 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00004645fi
4646rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004647echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004648
4649# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00004650
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004651echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004652echo "configure:4653: checking whether char is unsigned" >&5
4653if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004654 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004655else
4656 if test "$GCC" = yes; then
4657 # GCC predefines this symbol on systems where it applies.
4658cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004659#line 4660 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004660#include "confdefs.h"
4661#ifdef __CHAR_UNSIGNED__
4662 yes
4663#endif
4664
4665EOF
4666if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4667 egrep "yes" >/dev/null 2>&1; then
4668 rm -rf conftest*
4669 ac_cv_c_char_unsigned=yes
4670else
4671 rm -rf conftest*
4672 ac_cv_c_char_unsigned=no
4673fi
4674rm -f conftest*
4675
4676else
4677if test "$cross_compiling" = yes; then
4678 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4679else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004680 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004681#line 4682 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004682#include "confdefs.h"
4683/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004684#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00004685#define volatile
4686#endif
4687main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00004688 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00004689}
4690EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004691if { (eval echo configure:4692: \"$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 +00004692then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004693 ac_cv_c_char_unsigned=yes
4694else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004695 echo "configure: failed program was:" >&5
4696 cat conftest.$ac_ext >&5
4697 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004698 ac_cv_c_char_unsigned=no
4699fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004700rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004701fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004702
4703fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004704fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004705
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004706echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004707if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
4708 cat >> confdefs.h <<\EOF
4709#define __CHAR_UNSIGNED__ 1
4710EOF
4711
4712fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004713
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004714echo $ac_n "checking for working const""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004715echo "configure:4716: checking for working const" >&5
4716if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004717 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004718else
4719 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004720#line 4721 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004721#include "confdefs.h"
4722
Guido van Rossumf78abae1997-01-21 22:02:36 +00004723int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004724
4725/* Ultrix mips cc rejects this. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004726typedef int charset[2]; const charset x;
4727/* SunOS 4.1.1 cc rejects this. */
4728char const *const *ccp;
4729char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004730/* NEC SVR4.0.2 mips cc rejects this. */
4731struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004732static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00004733/* AIX XL C 1.02.0.0 rejects this.
4734 It does not let you subtract one const X* pointer from another in an arm
4735 of an if-expression whose if-part is not a constant expression */
4736const char *g = "string";
4737ccp = &g + (g ? g-g : 0);
4738/* HPUX 7.0 cc rejects these. */
4739++ccp;
4740p = (char**) ccp;
4741ccp = (char const *const *) p;
4742{ /* SCO 3.2v4 cc rejects this. */
4743 char *t;
4744 char const *s = 0 ? (char *) 0 : (char const *) 0;
4745
4746 *t++ = 0;
4747}
4748{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004749 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00004750 const int *foo = &x[0];
4751 ++foo;
4752}
4753{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4754 typedef const int *iptr;
4755 iptr p = 0;
4756 ++p;
4757}
4758{ /* AIX XL C 1.02.0.0 rejects this saying
4759 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4760 struct s { int j; const int *ap[3]; };
4761 struct s *b; b->j = 5;
4762}
4763{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4764 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004765}
4766
4767; return 0; }
4768EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004769if { (eval echo configure:4770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004770 rm -rf conftest*
4771 ac_cv_c_const=yes
4772else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004773 echo "configure: failed program was:" >&5
4774 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004775 rm -rf conftest*
4776 ac_cv_c_const=no
4777fi
4778rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004779fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004780
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004781echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004782if test $ac_cv_c_const = no; then
4783 cat >> confdefs.h <<\EOF
4784#define const
4785EOF
4786
4787fi
4788
Guido van Rossumef2255b2000-03-10 22:30:29 +00004789echo $ac_n "checking for inline""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004790echo "configure:4791: checking for inline" >&5
4791if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00004792 echo $ac_n "(cached) $ac_c" 1>&6
4793else
4794 ac_cv_c_inline=no
4795for ac_kw in inline __inline__ __inline; do
4796 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004797#line 4798 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00004798#include "confdefs.h"
4799
4800int main() {
4801} $ac_kw foo() {
4802; return 0; }
4803EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004804if { (eval echo configure:4805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00004805 rm -rf conftest*
4806 ac_cv_c_inline=$ac_kw; break
4807else
4808 echo "configure: failed program was:" >&5
4809 cat conftest.$ac_ext >&5
4810fi
4811rm -f conftest*
4812done
4813
4814fi
4815
4816echo "$ac_t""$ac_cv_c_inline" 1>&6
4817case "$ac_cv_c_inline" in
4818 inline | yes) ;;
4819 no) cat >> confdefs.h <<\EOF
4820#define inline
4821EOF
4822 ;;
4823 *) cat >> confdefs.h <<EOF
4824#define inline $ac_cv_c_inline
4825EOF
4826 ;;
4827esac
4828
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004829
Guido van Rossumda88dad1995-01-26 00:46:29 +00004830works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004831echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004832echo "configure:4833: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004833cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004834#line 4835 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004835#include "confdefs.h"
4836
Guido van Rossumf78abae1997-01-21 22:02:36 +00004837int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004838volatile int x; x = 0;
4839; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004840EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004841if { (eval echo configure:4842: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004842 rm -rf conftest*
4843 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004844else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004845 echo "configure: failed program was:" >&5
4846 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004847 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004848 cat >> confdefs.h <<\EOF
4849#define volatile
4850EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004851
4852fi
4853rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004854echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004855
Guido van Rossumda88dad1995-01-26 00:46:29 +00004856works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004857echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004858echo "configure:4859: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004859cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004860#line 4861 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004861#include "confdefs.h"
4862
Guido van Rossumf78abae1997-01-21 22:02:36 +00004863int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004864signed char c;
4865; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004866EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004867if { (eval echo configure:4868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004868 rm -rf conftest*
4869 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004870else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004871 echo "configure: failed program was:" >&5
4872 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004873 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004874 cat >> confdefs.h <<\EOF
4875#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00004876EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004877
4878fi
4879rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004880echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004881
Guido van Rossumda88dad1995-01-26 00:46:29 +00004882have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004883echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004884echo "configure:4885: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004885cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004886#line 4887 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004887#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004888int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00004889int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004890return foo(10);
4891; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004892EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004893if { (eval echo configure:4894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004894 rm -rf conftest*
4895 cat >> confdefs.h <<\EOF
4896#define HAVE_PROTOTYPES 1
4897EOF
4898 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004899else
4900 echo "configure: failed program was:" >&5
4901 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00004902fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004903rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004904echo "$ac_t""$have_prototypes" 1>&6
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 variable length prototypes and stdarg.h""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004908echo "configure:4909: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004909cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004910#line 4911 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004911#include "confdefs.h"
4912
4913#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00004914int foo(int x, ...) {
4915 va_list va;
4916 va_start(va, x);
4917 va_arg(va, int);
4918 va_arg(va, char *);
4919 va_arg(va, double);
4920 return 0;
4921}
Guido van Rossum7f43da71994-08-01 12:15:30 +00004922
Guido van Rossumf78abae1997-01-21 22:02:36 +00004923int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00004924return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004925; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004926EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004927if { (eval echo configure:4928: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004928 rm -rf conftest*
4929 cat >> confdefs.h <<\EOF
4930#define HAVE_STDARG_PROTOTYPES 1
4931EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004932 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004933else
4934 echo "configure: failed program was:" >&5
4935 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004936fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004937rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004938echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004939
Guido van Rossumda88dad1995-01-26 00:46:29 +00004940if test "$have_prototypes" = yes; then
4941bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004942echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004943echo "configure:4944: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004944cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004945#line 4946 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004946#include "confdefs.h"
4947#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004948int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004949char **t;execve("@",t,t);
4950; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004951EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004952if { (eval echo configure:4953: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004953 :
4954else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004955 echo "configure: failed program was:" >&5
4956 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004957 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004958 cat >> confdefs.h <<\EOF
4959#define BAD_EXEC_PROTOTYPES 1
4960EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004961 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004962fi
4963rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004964echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004965fi
4966
Guido van Rossumda88dad1995-01-26 00:46:29 +00004967bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004968echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004969echo "configure:4970: checking for bad static forward" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004970if test "$cross_compiling" = yes; then
4971 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4972else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004973 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004974#line 4975 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004975#include "confdefs.h"
4976
4977struct s { int a; int b; };
4978static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004979int foobar() {
4980 static int random;
4981 random = (int) &foo;
4982 return random;
4983}
Guido van Rossum7f43da71994-08-01 12:15:30 +00004984static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004985main() {
4986 exit(!((int)&foo == foobar()));
4987}
Guido van Rossum7f43da71994-08-01 12:15:30 +00004988
4989EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00004990if { (eval echo configure:4991: \"$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 +00004991then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004992 :
4993else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004994 echo "configure: failed program was:" >&5
4995 cat conftest.$ac_ext >&5
4996 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004997 cat >> confdefs.h <<\EOF
4998#define BAD_STATIC_FORWARD 1
4999EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005000 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005001fi
5002rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00005003fi
5004
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005005echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005006
Guido van Rossumda88dad1995-01-26 00:46:29 +00005007va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005008echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005009echo "configure:5010: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005010cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005011#line 5012 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005012#include "confdefs.h"
5013
5014#ifdef HAVE_STDARG_PROTOTYPES
5015#include <stdarg.h>
5016#else
5017#include <varargs.h>
5018#endif
5019
Guido van Rossumf78abae1997-01-21 22:02:36 +00005020int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005021va_list list1, list2; list1 = list2;
5022; return 0; }
5023EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005024if { (eval echo configure:5025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005025 :
5026else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005027 echo "configure: failed program was:" >&5
5028 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005029 rm -rf conftest*
5030 cat >> confdefs.h <<\EOF
5031#define VA_LIST_IS_ARRAY 1
5032EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005033 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005034fi
5035rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005036echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005037
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005038# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
5039echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005040echo "configure:5041: checking for gethostbyname_r" >&5
5041if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005042 echo $ac_n "(cached) $ac_c" 1>&6
5043else
5044 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005045#line 5046 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005046#include "confdefs.h"
5047/* System header to define __stub macros and hopefully few prototypes,
5048 which can conflict with char gethostbyname_r(); below. */
5049#include <assert.h>
5050/* Override any gcc2 internal prototype to avoid an error. */
5051/* We use char because int might match the return type of a gcc2
5052 builtin and then its argument prototype would still apply. */
5053char gethostbyname_r();
5054
5055int main() {
5056
5057/* The GNU C library defines this for functions which it implements
5058 to always fail with ENOSYS. Some functions are actually named
5059 something starting with __ and the normal name is an alias. */
5060#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
5061choke me
5062#else
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005063gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005064#endif
5065
5066; return 0; }
5067EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005068if { (eval echo configure:5069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005069 rm -rf conftest*
5070 eval "ac_cv_func_gethostbyname_r=yes"
5071else
5072 echo "configure: failed program was:" >&5
5073 cat conftest.$ac_ext >&5
5074 rm -rf conftest*
5075 eval "ac_cv_func_gethostbyname_r=no"
5076fi
5077rm -f conftest*
5078fi
5079
5080if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
5081 echo "$ac_t""yes" 1>&6
5082
5083 cat >> confdefs.h <<\EOF
5084#define HAVE_GETHOSTBYNAME_R 1
5085EOF
5086
5087 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005088echo "configure:5089: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005089 OLD_CFLAGS=$CFLAGS
5090 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
5091 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005092#line 5093 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005093#include "confdefs.h"
5094
5095# include <netdb.h>
5096
5097int main() {
5098
5099 char *name;
5100 struct hostent *he, *res;
5101 char buffer[2048];
5102 int buflen = 2048;
5103 int h_errnop;
5104
5105 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
5106
5107; return 0; }
5108EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005109if { (eval echo configure:5110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005110 rm -rf conftest*
5111
5112 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005113#define HAVE_GETHOSTBYNAME_R 1
5114EOF
5115
5116 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005117#define HAVE_GETHOSTBYNAME_R_6_ARG 1
5118EOF
5119
5120 echo "$ac_t""yes" 1>&6
5121
5122else
5123 echo "configure: failed program was:" >&5
5124 cat conftest.$ac_ext >&5
5125 rm -rf conftest*
5126
5127 echo "$ac_t""no" 1>&6
5128 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005129echo "configure:5130: checking gethostbyname_r with 5 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005130 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005131#line 5132 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005132#include "confdefs.h"
5133
5134# include <netdb.h>
5135
5136int main() {
5137
5138 char *name;
5139 struct hostent *he;
5140 char buffer[2048];
5141 int buflen = 2048;
5142 int h_errnop;
5143
5144 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
5145
5146; return 0; }
5147EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005148if { (eval echo configure:5149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005149 rm -rf conftest*
5150
5151 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005152#define HAVE_GETHOSTBYNAME_R 1
5153EOF
5154
5155 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005156#define HAVE_GETHOSTBYNAME_R_5_ARG 1
5157EOF
5158
5159 echo "$ac_t""yes" 1>&6
5160
5161else
5162 echo "configure: failed program was:" >&5
5163 cat conftest.$ac_ext >&5
5164 rm -rf conftest*
5165
5166 echo "$ac_t""no" 1>&6
5167 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005168echo "configure:5169: checking gethostbyname_r with 3 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005169 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005170#line 5171 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005171#include "confdefs.h"
5172
5173# include <netdb.h>
5174
5175int main() {
5176
5177 char *name;
5178 struct hostent *he;
5179 struct hostent_data data;
5180
5181 (void) gethostbyname_r(name, he, &data);
5182
5183; return 0; }
5184EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +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_3_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
5205fi
5206rm -f conftest*
5207
5208fi
5209rm -f conftest*
5210
5211fi
5212rm -f conftest*
5213 CFLAGS=$OLD_CFLAGS
5214
5215else
5216 echo "$ac_t""no" 1>&6
5217
Thomas Wouters3a584202000-08-05 23:28:51 +00005218 for ac_func in gethostbyname
5219do
5220echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005221echo "configure:5222: checking for $ac_func" >&5
5222if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005223 echo $ac_n "(cached) $ac_c" 1>&6
5224else
5225 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005226#line 5227 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005227#include "confdefs.h"
5228/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005229 which can conflict with char $ac_func(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005230#include <assert.h>
5231/* Override any gcc2 internal prototype to avoid an error. */
5232/* We use char because int might match the return type of a gcc2
5233 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005234char $ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005235
5236int main() {
5237
5238/* The GNU C library defines this for functions which it implements
5239 to always fail with ENOSYS. Some functions are actually named
5240 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005241#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005242choke me
5243#else
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005244$ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005245#endif
5246
5247; return 0; }
5248EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005249if { (eval echo configure:5250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005250 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005251 eval "ac_cv_func_$ac_func=yes"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005252else
5253 echo "configure: failed program was:" >&5
5254 cat conftest.$ac_ext >&5
5255 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005256 eval "ac_cv_func_$ac_func=no"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005257fi
5258rm -f conftest*
5259fi
5260
Thomas Wouters3a584202000-08-05 23:28:51 +00005261if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005262 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005263 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5264 cat >> confdefs.h <<EOF
5265#define $ac_tr_func 1
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005266EOF
Thomas Wouters3a584202000-08-05 23:28:51 +00005267
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005268else
5269 echo "$ac_t""no" 1>&6
5270fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005271done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005272
5273
5274fi
5275
5276
5277
5278
5279
5280
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005281
Guido van Rossum627b2d71993-12-24 10:39:16 +00005282# checks for system services
5283# (none yet)
5284
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005285# Linux requires this for correct f.p. operations
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005286echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005287echo "configure:5288: checking for __fpu_control" >&5
5288if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005289 echo $ac_n "(cached) $ac_c" 1>&6
5290else
5291 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005292#line 5293 "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005293#include "confdefs.h"
5294/* System header to define __stub macros and hopefully few prototypes,
5295 which can conflict with char __fpu_control(); below. */
5296#include <assert.h>
5297/* Override any gcc2 internal prototype to avoid an error. */
5298/* We use char because int might match the return type of a gcc2
5299 builtin and then its argument prototype would still apply. */
5300char __fpu_control();
5301
5302int main() {
5303
5304/* The GNU C library defines this for functions which it implements
5305 to always fail with ENOSYS. Some functions are actually named
5306 something starting with __ and the normal name is an alias. */
5307#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
5308choke me
5309#else
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005310__fpu_control();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005311#endif
5312
5313; return 0; }
5314EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005315if { (eval echo configure:5316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005316 rm -rf conftest*
5317 eval "ac_cv_func___fpu_control=yes"
5318else
5319 echo "configure: failed program was:" >&5
5320 cat conftest.$ac_ext >&5
5321 rm -rf conftest*
5322 eval "ac_cv_func___fpu_control=no"
5323fi
5324rm -f conftest*
5325fi
5326
5327if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
5328 echo "$ac_t""yes" 1>&6
5329 :
5330else
5331 echo "$ac_t""no" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005332echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005333echo "configure:5334: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00005334ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005335if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005336 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005337else
5338 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005339LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005340cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005341#line 5342 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005342#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005343/* Override any gcc2 internal prototype to avoid an error. */
5344/* We use char because int might match the return type of a gcc2
5345 builtin and then its argument prototype would still apply. */
5346char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00005347
Guido van Rossumf78abae1997-01-21 22:02:36 +00005348int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005349__fpu_control()
5350; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005351EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005352if { (eval echo configure:5353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005353 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005354 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005355else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005356 echo "configure: failed program was:" >&5
5357 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005358 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005359 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005360fi
5361rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005362LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005363
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005364fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005365if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005366 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005367 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5368 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005369 cat >> confdefs.h <<EOF
5370#define $ac_tr_lib 1
5371EOF
5372
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005373 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005374
5375else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005376 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005377fi
5378
5379
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005380fi
5381
5382
Guido van Rossum7f253911997-05-09 02:42:48 +00005383# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00005384echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005385echo "configure:5386: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00005386# Check whether --with-fpectl or --without-fpectl was given.
5387if test "${with_fpectl+set}" = set; then
5388 withval="$with_fpectl"
5389
5390if test "$withval" != no
5391then cat >> confdefs.h <<\EOF
5392#define WANT_SIGFPE_HANDLER 1
5393EOF
5394 echo "$ac_t""yes" 1>&6
5395else echo "$ac_t""no" 1>&6
5396fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00005397else
5398 echo "$ac_t""no" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00005399fi
5400
5401
Guido van Rossum7f43da71994-08-01 12:15:30 +00005402# check for --with-libm=...
5403
Guido van Rossum563e7081996-09-10 18:20:48 +00005404case $ac_sys_system in
5405next) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00005406BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00005407*) LIBM=-lm
5408esac
Guido van Rossum7f253911997-05-09 02:42:48 +00005409echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005410echo "configure:5411: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005411# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005412if test "${with_libm+set}" = set; then
5413 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005414
Guido van Rossum7f253911997-05-09 02:42:48 +00005415if test "$withval" = no
5416then LIBM=
5417 echo "$ac_t""force LIBM empty" 1>&6
5418elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005419then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00005420 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005421else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005422fi
Guido van Rossum7f253911997-05-09 02:42:48 +00005423else
5424 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005425fi
5426
5427
5428# check for --with-libc=...
5429
Guido van Rossum7f253911997-05-09 02:42:48 +00005430echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005431echo "configure:5432: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005432# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005433if test "${with_libc+set}" = set; then
5434 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005435
Guido van Rossum7f253911997-05-09 02:42:48 +00005436if test "$withval" = no
5437then LIBC=
5438 echo "$ac_t""force LIBC empty" 1>&6
5439elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005440then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00005441 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005442else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005443fi
Guido van Rossum7f253911997-05-09 02:42:48 +00005444else
5445 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005446fi
5447
5448
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005449# check for hypot() in math library
5450LIBS_SAVE=$LIBS
5451LIBS="$LIBS $LIBM"
5452for ac_func in hypot
5453do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005454echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005455echo "configure:5456: checking for $ac_func" >&5
5456if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005457 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005458else
5459 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005460#line 5461 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005461#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005462/* System header to define __stub macros and hopefully few prototypes,
5463 which can conflict with char $ac_func(); below. */
5464#include <assert.h>
5465/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005466/* We use char because int might match the return type of a gcc2
5467 builtin and then its argument prototype would still apply. */
5468char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005469
Guido van Rossumf78abae1997-01-21 22:02:36 +00005470int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005471
5472/* The GNU C library defines this for functions which it implements
5473 to always fail with ENOSYS. Some functions are actually named
5474 something starting with __ and the normal name is an alias. */
5475#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5476choke me
5477#else
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005478$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005479#endif
5480
5481; return 0; }
5482EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005483if { (eval echo configure:5484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005484 rm -rf conftest*
5485 eval "ac_cv_func_$ac_func=yes"
5486else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005487 echo "configure: failed program was:" >&5
5488 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005489 rm -rf conftest*
5490 eval "ac_cv_func_$ac_func=no"
5491fi
5492rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005493fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005494
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005495if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5496 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005497 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5498 cat >> confdefs.h <<EOF
5499#define $ac_tr_func 1
5500EOF
5501
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005502else
5503 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005504LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005505fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005506done
5507
Guido van Rossumf78abae1997-01-21 22:02:36 +00005508
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005509LIBS=$LIBS_SAVE
5510
Guido van Rossumda88dad1995-01-26 00:46:29 +00005511# check for getopt
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005512echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005513echo "configure:5514: checking for genuine getopt" >&5
5514if eval "test \"`echo '$''{'ac_cv_func_getopt'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005515 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005516else
5517 if test "$cross_compiling" = yes; then
5518 ac_cv_func_getopt=no
5519else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005520 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005521#line 5522 "configure"
Guido van Rossumda88dad1995-01-26 00:46:29 +00005522#include "confdefs.h"
5523#include <stdio.h>
5524extern int optind, opterr, getopt();
5525extern char* optarg;
5526int main() {
5527 char* av[] = { "testprog", "parameter", "-fFlag", NULL };
5528 opterr = 0;
5529 if (getopt(3, av, "f:") == 'f') { exit(1); }
5530 exit(0);
5531}
5532EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005533if { (eval echo configure:5534: \"$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 +00005534then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005535 ac_cv_func_getopt=yes
5536else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005537 echo "configure: failed program was:" >&5
5538 cat conftest.$ac_ext >&5
5539 rm -fr conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00005540 ac_cv_func_getopt=no
5541fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00005542rm -fr conftest*
5543fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005544
5545fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005546echo "$ac_t""$ac_cv_func_getopt" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005547test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o"
5548
Guido van Rossumad713701997-07-10 22:42:38 +00005549# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00005550echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005551echo "configure:5552: checking what malloc(0) returns" >&5
5552if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
Guido van Rossumad713701997-07-10 22:42:38 +00005553 echo $ac_n "(cached) $ac_c" 1>&6
5554else
5555 if test "$cross_compiling" = yes; then
5556 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5557else
5558 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005559#line 5560 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00005560#include "confdefs.h"
5561#include <stdio.h>
5562#ifdef HAVE_STDLIB
5563#include <stdlib.h>
5564#else
5565char *malloc(), *realloc();
5566int *free();
5567#endif
5568main() {
5569 char *p;
5570 p = malloc(0);
5571 if (p == NULL) exit(1);
5572 p = realloc(p, 0);
5573 if (p == NULL) exit(1);
5574 free(p);
5575 exit(0);
5576}
5577EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005578if { (eval echo configure:5579: \"$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 +00005579then
5580 ac_cv_malloc_zero=nonnull
5581else
5582 echo "configure: failed program was:" >&5
5583 cat conftest.$ac_ext >&5
5584 rm -fr conftest*
5585 ac_cv_malloc_zero=null
5586fi
5587rm -fr conftest*
5588fi
5589
5590fi
5591
5592echo "$ac_t""$ac_cv_malloc_zero" 1>&6
5593if test "$ac_cv_malloc_zero" = null
5594then
5595 cat >> confdefs.h <<\EOF
5596#define MALLOC_ZERO_RETURNS_NULL 1
5597EOF
5598
5599fi
5600
Guido van Rossumef2255b2000-03-10 22:30:29 +00005601# check for wchar.h
5602ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
5603echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005604echo "configure:5605: checking for wchar.h" >&5
5605if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005606 echo $ac_n "(cached) $ac_c" 1>&6
5607else
5608 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005609#line 5610 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005610#include "confdefs.h"
5611#include <wchar.h>
5612EOF
5613ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005614{ (eval echo configure:5615: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00005615ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5616if test -z "$ac_err"; then
5617 rm -rf conftest*
5618 eval "ac_cv_header_$ac_safe=yes"
5619else
5620 echo "$ac_err" >&5
5621 echo "configure: failed program was:" >&5
5622 cat conftest.$ac_ext >&5
5623 rm -rf conftest*
5624 eval "ac_cv_header_$ac_safe=no"
5625fi
5626rm -f conftest*
5627fi
5628if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5629 echo "$ac_t""yes" 1>&6
5630 cat >> confdefs.h <<\EOF
5631#define HAVE_WCHAR_H 1
5632EOF
5633 wchar_h="yes"
5634else
5635 echo "$ac_t""no" 1>&6
5636wchar_h="no"
5637
5638fi
5639
5640
5641# check for usable wchar_t
5642usable_wchar_t="unkown"
5643echo $ac_n "checking for usable wchar_t""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005644echo "configure:5645: checking for usable wchar_t" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +00005645if test "$cross_compiling" = yes; then
5646 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5647else
5648 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005649#line 5650 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005650#include "confdefs.h"
5651
5652#include "wchar.h"
5653#include "wctype.h"
5654main() {
5655 wchar_t s;
5656 if (sizeof(s) == 2)
5657 exit(0);
5658 else
5659 exit(1);
5660}
5661
5662EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005663if { (eval echo configure:5664: \"$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 +00005664then
5665 cat >> confdefs.h <<\EOF
5666#define HAVE_USABLE_WCHAR_T 1
5667EOF
5668 usable_wchar_t="yes"
5669else
5670 echo "configure: failed program was:" >&5
5671 cat conftest.$ac_ext >&5
5672 rm -fr conftest*
5673 usable_wchar_t="no"
5674fi
5675rm -fr conftest*
5676fi
5677
5678echo "$ac_t""$usable_wchar_t" 1>&6
5679
5680# check for endianness
5681echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005682echo "configure:5683: checking whether byte ordering is bigendian" >&5
5683if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005684 echo $ac_n "(cached) $ac_c" 1>&6
5685else
5686 ac_cv_c_bigendian=unknown
5687# See if sys/param.h defines the BYTE_ORDER macro.
5688cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005689#line 5690 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005690#include "confdefs.h"
5691#include <sys/types.h>
5692#include <sys/param.h>
5693int main() {
5694
5695#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
5696 bogus endian macros
5697#endif
5698; return 0; }
5699EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005700if { (eval echo configure:5701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005701 rm -rf conftest*
5702 # It does; now see whether it defined to BIG_ENDIAN or not.
5703cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005704#line 5705 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005705#include "confdefs.h"
5706#include <sys/types.h>
5707#include <sys/param.h>
5708int main() {
5709
5710#if BYTE_ORDER != BIG_ENDIAN
5711 not big endian
5712#endif
5713; return 0; }
5714EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005715if { (eval echo configure:5716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005716 rm -rf conftest*
5717 ac_cv_c_bigendian=yes
5718else
5719 echo "configure: failed program was:" >&5
5720 cat conftest.$ac_ext >&5
5721 rm -rf conftest*
5722 ac_cv_c_bigendian=no
5723fi
5724rm -f conftest*
5725else
5726 echo "configure: failed program was:" >&5
5727 cat conftest.$ac_ext >&5
5728fi
5729rm -f conftest*
5730if test $ac_cv_c_bigendian = unknown; then
5731if test "$cross_compiling" = yes; then
5732 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5733else
5734 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005735#line 5736 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005736#include "confdefs.h"
5737main () {
5738 /* Are we little or big endian? From Harbison&Steele. */
5739 union
5740 {
5741 long l;
5742 char c[sizeof (long)];
5743 } u;
5744 u.l = 1;
5745 exit (u.c[sizeof (long) - 1] == 1);
5746}
5747EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005748if { (eval echo configure:5749: \"$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 +00005749then
5750 ac_cv_c_bigendian=no
5751else
5752 echo "configure: failed program was:" >&5
5753 cat conftest.$ac_ext >&5
5754 rm -fr conftest*
5755 ac_cv_c_bigendian=yes
5756fi
5757rm -fr conftest*
5758fi
5759
5760fi
5761fi
5762
5763echo "$ac_t""$ac_cv_c_bigendian" 1>&6
5764if test $ac_cv_c_bigendian = yes; then
5765 cat >> confdefs.h <<\EOF
5766#define WORDS_BIGENDIAN 1
5767EOF
5768
5769fi
5770
5771
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005772# Check whether right shifting a negative integer extends the sign bit
5773# or fills with zeros (like the Cray J90, according to Tim Peters).
5774echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005775echo "configure:5776: checking whether right shift extends the sign bit" >&5
5776if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
Vladimir Marangozova6180282000-07-12 05:05:06 +00005777 echo $ac_n "(cached) $ac_c" 1>&6
5778else
5779
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005780if test "$cross_compiling" = yes; then
5781 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5782else
5783 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005784#line 5785 "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005785#include "confdefs.h"
5786
5787int main()
5788{
Vladimir Marangozova6180282000-07-12 05:05:06 +00005789 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005790}
5791
5792EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005793if { (eval echo configure:5794: \"$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 +00005794then
5795 ac_cv_rshift_extends_sign=yes
5796else
5797 echo "configure: failed program was:" >&5
5798 cat conftest.$ac_ext >&5
5799 rm -fr conftest*
5800 ac_cv_rshift_extends_sign=no
5801fi
5802rm -fr conftest*
5803fi
5804
5805fi
5806
5807echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
5808if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005809then
5810 cat >> confdefs.h <<\EOF
5811#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
5812EOF
5813
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005814fi
5815
5816
Guido van Rossum95713eb2000-05-18 20:53:31 +00005817# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
5818# Add sys/socket.h to confdefs.h
5819cat >> confdefs.h <<\EOF
5820#ifdef HAVE_SYS_SOCKET_H
5821#include <sys/socket.h>
5822#endif
5823EOF
5824echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005825echo "configure:5826: checking for socklen_t" >&5
5826if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
Guido van Rossum95713eb2000-05-18 20:53:31 +00005827 echo $ac_n "(cached) $ac_c" 1>&6
5828else
5829 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005830#line 5831 "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +00005831#include "confdefs.h"
5832#include <sys/types.h>
5833#if STDC_HEADERS
5834#include <stdlib.h>
5835#include <stddef.h>
5836#endif
5837EOF
5838if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5839 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5840 rm -rf conftest*
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005841 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +00005842else
5843 rm -rf conftest*
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005844 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +00005845fi
5846rm -f conftest*
5847
5848fi
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005849echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
5850if test $ac_cv_type_socklen_t = no; then
5851 cat >> confdefs.h <<\EOF
Guido van Rossum95713eb2000-05-18 20:53:31 +00005852#define socklen_t int
5853EOF
5854
5855fi
5856
5857
Guido van Rossum627b2d71993-12-24 10:39:16 +00005858# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005859trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005860cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005861# This file is a shell script that caches the results of configure
5862# tests run on this system so they can be shared between configure
5863# scripts and configure runs. It is not useful on other systems.
5864# If it contains results you don't want to keep, you may remove or edit it.
5865#
5866# By default, configure uses ./config.cache as the cache file,
5867# creating it if it does not exist already. You can give configure
5868# the --cache-file=FILE option to use a different cache file; that is
5869# what configure does when it calls configure scripts in
5870# subdirectories, so they share the cache.
5871# Giving --cache-file=/dev/null disables caching, for debugging configure.
5872# config.status only pays attention to the cache file if you give it the
5873# --recheck option to rerun configure.
5874#
5875EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00005876# The following way of writing the cache mishandles newlines in values,
5877# but we know of no workaround that is simple, portable, and efficient.
5878# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005879# Ultrix sh set writes to stderr and can't be redirected directly,
5880# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005881(set) 2>&1 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005882 case `(ac_space=' '; set | grep ac_space) 2>&1` in
Guido van Rossumf78abae1997-01-21 22:02:36 +00005883 *ac_space=\ *)
5884 # `set' does not quote correctly, so add quotes (double-quote substitution
5885 # turns \\\\ into \\, and sed turns \\ into \).
5886 sed -n \
5887 -e "s/'/'\\\\''/g" \
5888 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5889 ;;
5890 *)
5891 # `set' quotes correctly as required by POSIX, so do not add quotes.
5892 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5893 ;;
5894 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005895if cmp -s $cache_file confcache; then
5896 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005897else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005898 if test -w $cache_file; then
5899 echo "updating cache $cache_file"
5900 cat confcache > $cache_file
5901 else
5902 echo "not updating unwritable cache $cache_file"
5903 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005904fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005905rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00005906
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005907trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005908
5909test "x$prefix" = xNONE && prefix=$ac_default_prefix
5910# Let make expand exec_prefix.
5911test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00005912
Guido van Rossum7f43da71994-08-01 12:15:30 +00005913# Any assignment to VPATH causes Sun make to only execute
5914# the first set of double-colon rules, so remove it if not needed.
5915# If there is a colon in the path, we need to keep it.
5916if test "x$srcdir" = x.; then
5917 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
5918fi
5919
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005920trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00005921
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005922DEFS=-DHAVE_CONFIG_H
5923
5924# Without the "./", some shells look in PATH for config.status.
5925: ${CONFIG_STATUS=./config.status}
5926
5927echo creating $CONFIG_STATUS
5928rm -f $CONFIG_STATUS
5929cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005930#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00005931# Generated automatically by configure.
5932# Run this file to recreate the current configuration.
5933# This directory was configured as follows,
5934# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5935#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005936# $0 $ac_configure_args
5937#
5938# Compiler output produced by configure, useful for debugging
5939# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00005940
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005941ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005942for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00005943do
Guido van Rossum7f43da71994-08-01 12:15:30 +00005944 case "\$ac_option" in
5945 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005946 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5947 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00005948 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00005949 echo "$CONFIG_STATUS generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005950 exit 0 ;;
5951 -help | --help | --hel | --he | --h)
5952 echo "\$ac_cs_usage"; exit 0 ;;
5953 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00005954 esac
5955done
5956
Guido van Rossum7f43da71994-08-01 12:15:30 +00005957ac_given_srcdir=$srcdir
Guido van Rossum627b2d71993-12-24 10:39:16 +00005958
Guido van Rossum7b3853f1996-07-30 18:09:35 +00005959trap 'rm -fr `echo "Makefile \
5960 Objects/Makefile \
5961 Parser/Makefile \
Sjoerd Mullendera1795032000-08-17 11:41:06 +00005962 Grammar/Makefile \
Guido van Rossum7b3853f1996-07-30 18:09:35 +00005963 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00005964 Modules/Makefile.pre \
Barry Warsawef82cd72000-06-30 16:21:01 +00005965 Modules/Setup.config config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005966EOF
5967cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00005968
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005969# Protect against being on the right side of a sed subst in config.status.
5970sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5971 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00005972$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00005973$extrasub
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005974s%@SHELL@%$SHELL%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005975s%@CFLAGS@%$CFLAGS%g
5976s%@CPPFLAGS@%$CPPFLAGS%g
5977s%@CXXFLAGS@%$CXXFLAGS%g
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005978s%@FFLAGS@%$FFLAGS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005979s%@DEFS@%$DEFS%g
5980s%@LDFLAGS@%$LDFLAGS%g
5981s%@LIBS@%$LIBS%g
5982s%@exec_prefix@%$exec_prefix%g
5983s%@prefix@%$prefix%g
5984s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005985s%@bindir@%$bindir%g
5986s%@sbindir@%$sbindir%g
5987s%@libexecdir@%$libexecdir%g
5988s%@datadir@%$datadir%g
5989s%@sysconfdir@%$sysconfdir%g
5990s%@sharedstatedir@%$sharedstatedir%g
5991s%@localstatedir@%$localstatedir%g
5992s%@libdir@%$libdir%g
5993s%@includedir@%$includedir%g
5994s%@oldincludedir@%$oldincludedir%g
5995s%@infodir@%$infodir%g
5996s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00005997s%@VERSION@%$VERSION%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00005998s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00005999s%@SGI_ABI@%$SGI_ABI%g
Guido van Rossum95012191999-12-16 17:50:52 +00006000s%@SET_CXX@%$SET_CXX%g
6001s%@MAINOBJ@%$MAINOBJ%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006002s%@CC@%$CC%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00006003s%@MAKE_LDLIBRARY@%$MAKE_LDLIBRARY%g
6004s%@LDLIBRARY@%$LDLIBRARY%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00006005s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006006s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006007s%@AR@%$AR%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00006008s%@INSTALL@%$INSTALL%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00006009s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6010s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006011s%@LN@%$LN%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00006012s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006013s%@CPP@%$CPP%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00006014s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00006015s%@SO@%$SO%g
6016s%@LDSHARED@%$LDSHARED%g
6017s%@CCSHARED@%$CCSHARED%g
6018s%@LINKFORSHARED@%$LINKFORSHARED%g
Guido van Rossum009f7871997-12-04 00:51:42 +00006019s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00006020s%@LDLAST@%$LDLAST%g
Barry Warsawef82cd72000-06-30 16:21:01 +00006021s%@USE_GC_MODULE@%$USE_GC_MODULE%g
Fred Drakea50d6ec2000-08-31 16:13:20 +00006022s%@USE_BSDDB_MODULE@%$USE_BSDDB_MODULE%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006023s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossume97ee181999-12-20 21:27:22 +00006024s%@DYNLOADFILE@%$DYNLOADFILE%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006025s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006026s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
6027s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
6028s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006029s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006030s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006031s%@LIBM@%$LIBM%g
6032s%@LIBC@%$LIBC%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006033
6034CEOF
6035EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00006036
6037cat >> $CONFIG_STATUS <<\EOF
6038
6039# Split the substitutions into bite-sized pieces for seds with
6040# small command number limits, like on Digital OSF/1 and HP-UX.
6041ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6042ac_file=1 # Number of current file.
6043ac_beg=1 # First line for current file.
6044ac_end=$ac_max_sed_cmds # Line after last line for current file.
6045ac_more_lines=:
6046ac_sed_cmds=""
6047while $ac_more_lines; do
6048 if test $ac_beg -gt 1; then
6049 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6050 else
6051 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6052 fi
6053 if test ! -s conftest.s$ac_file; then
6054 ac_more_lines=false
6055 rm -f conftest.s$ac_file
6056 else
6057 if test -z "$ac_sed_cmds"; then
6058 ac_sed_cmds="sed -f conftest.s$ac_file"
6059 else
6060 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6061 fi
6062 ac_file=`expr $ac_file + 1`
6063 ac_beg=$ac_end
6064 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6065 fi
6066done
6067if test -z "$ac_sed_cmds"; then
6068 ac_sed_cmds=cat
6069fi
6070EOF
6071
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006072cat >> $CONFIG_STATUS <<EOF
6073
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006074CONFIG_FILES=\${CONFIG_FILES-"Makefile \
6075 Objects/Makefile \
6076 Parser/Makefile \
Sjoerd Mullendera1795032000-08-17 11:41:06 +00006077 Grammar/Makefile \
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006078 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00006079 Modules/Makefile.pre \
Barry Warsawef82cd72000-06-30 16:21:01 +00006080 Modules/Setup.config"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006081EOF
6082cat >> $CONFIG_STATUS <<\EOF
6083for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00006084 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006085 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00006086 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006087 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6088 *) ac_file_in="${ac_file}.in" ;;
6089 esac
6090
Guido van Rossumf78abae1997-01-21 22:02:36 +00006091 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006092
6093 # Remove last slash and all that follows it. Not all systems have dirname.
6094 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6095 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6096 # The file is in a subdirectory.
6097 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006098 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006099 # A "../" for each directory in $ac_dir_suffix.
6100 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6101 else
6102 ac_dir_suffix= ac_dots=
6103 fi
6104
6105 case "$ac_given_srcdir" in
6106 .) srcdir=.
6107 if test -z "$ac_dots"; then top_srcdir=.
6108 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6109 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6110 *) # Relative path.
6111 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6112 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6113 esac
6114
Guido van Rossumf78abae1997-01-21 22:02:36 +00006115
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006116 echo creating "$ac_file"
6117 rm -f "$ac_file"
6118 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6119 case "$ac_file" in
6120 *Makefile*) ac_comsub="1i\\
6121# $configure_input" ;;
6122 *) ac_comsub= ;;
6123 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00006124
6125 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 +00006126 sed -e "$ac_comsub
6127s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006128s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006129s%@top_srcdir@%$top_srcdir%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00006130" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00006131fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00006132rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006133
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006134# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6135# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00006136#
6137# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006138ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
6139ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006140ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006141ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006142# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006143ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6144ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006145ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006146ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006147# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006148ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6149ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006150ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006151ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006152
Guido van Rossumf78abae1997-01-21 22:02:36 +00006153if test "${CONFIG_HEADERS+set}" != set; then
6154EOF
6155cat >> $CONFIG_STATUS <<EOF
6156 CONFIG_HEADERS="config.h"
6157EOF
6158cat >> $CONFIG_STATUS <<\EOF
6159fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006160for ac_file in .. $CONFIG_HEADERS; 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 Rossum7f43da71994-08-01 12:15:30 +00006168 echo creating $ac_file
6169
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006170 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00006171 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6172 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006173
6174EOF
6175
6176# Transform confdefs.h into a sed script conftest.vals that substitutes
6177# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006178# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006179# Protect against being in an unquoted here document in config.status.
6180rm -f conftest.vals
6181cat > conftest.hdr <<\EOF
6182s/[\\&%]/\\&/g
6183s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006184s%#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 +00006185s%ac_d%ac_u%gp
6186s%ac_u%ac_e%gp
6187EOF
6188sed -n -f conftest.hdr confdefs.h > conftest.vals
6189rm -f conftest.hdr
6190
6191# This sed command replaces #undef with comments. This is necessary, for
6192# example, in the case of _POSIX_SOURCE, which is predefined and required
6193# on some systems where configure will not decide to define it.
6194cat >> conftest.vals <<\EOF
6195s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6196EOF
6197
6198# Break up conftest.vals because some shells have a limit on
6199# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006200
6201rm -f conftest.tail
6202while :
6203do
6204 ac_lines=`grep -c . conftest.vals`
6205 # grep -c gives empty output for an empty file on some AIX systems.
6206 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6207 # Write a limited-size here document to conftest.frag.
6208 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6209 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6210 echo 'CEOF
6211 sed -f conftest.frag conftest.in > conftest.out
6212 rm -f conftest.in
6213 mv conftest.out conftest.in
6214' >> $CONFIG_STATUS
6215 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6216 rm -f conftest.vals
6217 mv conftest.tail conftest.vals
6218done
6219rm -f conftest.vals
6220
6221cat >> $CONFIG_STATUS <<\EOF
6222 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00006223 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006224 cat conftest.in >> conftest.h
6225 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00006226 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00006227 echo "$ac_file is unchanged"
6228 rm -f conftest.h
6229 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006230 # Remove last slash and all that follows it. Not all systems have dirname.
6231 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6232 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6233 # The file is in a subdirectory.
6234 test ! -d "$ac_dir" && mkdir "$ac_dir"
6235 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006236 rm -f $ac_file
6237 mv conftest.h $ac_file
6238 fi
6239fi; done
6240
Guido van Rossumf78abae1997-01-21 22:02:36 +00006241EOF
6242cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006243
Guido van Rossumf78abae1997-01-21 22:02:36 +00006244EOF
6245cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006246
6247exit 0
6248EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006249chmod +x $CONFIG_STATUS
6250rm -fr confdefs* $ac_clean_files
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00006251test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00006252