blob: d9e71afc24425e16103b42057fdd2cdd5959397c [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002
Guido van Rossumea516321998-12-17 18:08:55 +00003# From configure.in Revision: 1.92
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004
Guido van Rossum627b2d71993-12-24 10:39:16 +00005# Guess values for system-dependent variables and create Makefiles.
Guido van Rossumf78abae1997-01-21 22:02:36 +00006# Generated automatically using autoconf version 2.12
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
Guido van Rossum7b3853f1996-07-30 18:09:35 +000017--with-next-archs='arch1 arch2 ..' build MAB binary"
18ac_help="$ac_help
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019--without-gcc never use gcc"
20ac_help="$ac_help
Guido van Rossuma68acba1996-07-31 17:36:39 +000021--with-libs='lib1 ...' link against additional libs"
22ac_help="$ac_help
Guido van Rossumb06df271997-08-05 21:50:20 +000023--with(out)-readline obsolete, edit Modules/Setup instead"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024ac_help="$ac_help
Guido van Rossumec2f0731997-01-22 20:54:01 +000025--with-dec-threads use DEC Alpha/OSF1 thread-safe libraries"
26ac_help="$ac_help
27--with-threads alias for --with-thread"
28ac_help="$ac_help
Guido van Rossum76be6ed1995-01-02 18:33:54 +000029--with-thread[=DIRECTORY] make interpreter thread-safe"
30ac_help="$ac_help
31--with-sgi-dl=DIRECTORY IRIX 4 dynamic linking"
32ac_help="$ac_help
33--with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking"
34ac_help="$ac_help
Guido van Rossum7f253911997-05-09 02:42:48 +000035--with-fpectl enable SIGFPE catching"
36ac_help="$ac_help
Guido van Rossum76be6ed1995-01-02 18:33:54 +000037--with-libm=STRING math library"
38ac_help="$ac_help
39--with-libc=STRING C library"
Guido van Rossum627b2d71993-12-24 10:39:16 +000040
Guido van Rossum7f43da71994-08-01 12:15:30 +000041# Initialize some variables set by options.
42# The variables have the same names as the options, with
43# dashes changed to underlines.
44build=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000045cache_file=./config.cache
46exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +000047host=NONE
48no_create=
49nonopt=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000050no_recursion=
51prefix=NONE
52program_prefix=NONE
53program_suffix=NONE
54program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +000055silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000056site=
Guido van Rossum7f43da71994-08-01 12:15:30 +000057srcdir=
58target=NONE
59verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000060x_includes=NONE
61x_libraries=NONE
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000062bindir='${exec_prefix}/bin'
63sbindir='${exec_prefix}/sbin'
64libexecdir='${exec_prefix}/libexec'
65datadir='${prefix}/share'
66sysconfdir='${prefix}/etc'
67sharedstatedir='${prefix}/com'
68localstatedir='${prefix}/var'
69libdir='${exec_prefix}/lib'
70includedir='${prefix}/include'
71oldincludedir='/usr/include'
72infodir='${prefix}/info'
73mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000074
75# Initialize some other variables.
76subdirs=
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000077MFLAGS= MAKEFLAGS=
Guido van Rossumf78abae1997-01-21 22:02:36 +000078# Maximum number of lines to put in a shell here document.
79ac_max_here_lines=12
Guido van Rossum7f43da71994-08-01 12:15:30 +000080
81ac_prev=
82for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +000083do
Guido van Rossum627b2d71993-12-24 10:39:16 +000084
Guido van Rossum7f43da71994-08-01 12:15:30 +000085 # If the previous option needs an argument, assign it.
86 if test -n "$ac_prev"; then
87 eval "$ac_prev=\$ac_option"
88 ac_prev=
89 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +000090 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000091
Guido van Rossum7f43da71994-08-01 12:15:30 +000092 case "$ac_option" in
93 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
94 *) ac_optarg= ;;
95 esac
96
Guido van Rossum76be6ed1995-01-02 18:33:54 +000097 # Accept the important Cygnus configure options, so we can diagnose typos.
98
Guido van Rossum7f43da71994-08-01 12:15:30 +000099 case "$ac_option" in
100
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000101 -bindir | --bindir | --bindi | --bind | --bin | --bi)
102 ac_prev=bindir ;;
103 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
104 bindir="$ac_optarg" ;;
105
106 -build | --build | --buil | --bui | --bu)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000107 ac_prev=build ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000108 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000109 build="$ac_optarg" ;;
110
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000111 -cache-file | --cache-file | --cache-fil | --cache-fi \
112 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
113 ac_prev=cache_file ;;
114 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
115 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
116 cache_file="$ac_optarg" ;;
117
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000118 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
119 ac_prev=datadir ;;
120 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
121 | --da=*)
122 datadir="$ac_optarg" ;;
123
Guido van Rossum7f43da71994-08-01 12:15:30 +0000124 -disable-* | --disable-*)
125 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000126 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000127 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000128 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000129 fi
130 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
131 eval "enable_${ac_feature}=no" ;;
132
133 -enable-* | --enable-*)
134 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000135 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000136 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000137 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000138 fi
139 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
140 case "$ac_option" in
141 *=*) ;;
142 *) ac_optarg=yes ;;
143 esac
144 eval "enable_${ac_feature}='$ac_optarg'" ;;
145
Guido van Rossum7f43da71994-08-01 12:15:30 +0000146 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
147 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
148 | --exec | --exe | --ex)
149 ac_prev=exec_prefix ;;
150 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
151 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
152 | --exec=* | --exe=* | --ex=*)
153 exec_prefix="$ac_optarg" ;;
154
155 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000156 # Obsolete; use --with-gas.
157 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000158
159 -help | --help | --hel | --he)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000160 # Omit some internal or obsolete options to make the list less imposing.
161 # This message is too long to be a string in the A/UX 3.1 sh.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000162 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000163Usage: configure [options] [host]
164Options: [defaults in brackets after descriptions]
165Configuration:
166 --cache-file=FILE cache test results in FILE
167 --help print this message
168 --no-create do not create output files
169 --quiet, --silent do not print \`checking...' messages
170 --version print the version of autoconf that created configure
171Directory and file names:
172 --prefix=PREFIX install architecture-independent files in PREFIX
173 [$ac_default_prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000174 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000175 [same as prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000176 --bindir=DIR user executables in DIR [EPREFIX/bin]
177 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
178 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
179 --datadir=DIR read-only architecture-independent data in DIR
180 [PREFIX/share]
181 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
182 --sharedstatedir=DIR modifiable architecture-independent data in DIR
183 [PREFIX/com]
184 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
185 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
186 --includedir=DIR C header files in DIR [PREFIX/include]
187 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
188 --infodir=DIR info documentation in DIR [PREFIX/info]
189 --mandir=DIR man documentation in DIR [PREFIX/man]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000190 --srcdir=DIR find the sources in DIR [configure dir or ..]
191 --program-prefix=PREFIX prepend PREFIX to installed program names
192 --program-suffix=SUFFIX append SUFFIX to installed program names
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000193 --program-transform-name=PROGRAM
194 run sed PROGRAM on installed program names
195EOF
196 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000197Host type:
198 --build=BUILD configure for building on BUILD [BUILD=HOST]
199 --host=HOST configure for HOST [guessed]
200 --target=TARGET configure for TARGET [TARGET=HOST]
201Features and packages:
202 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
203 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
204 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
205 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
206 --x-includes=DIR X include files are in DIR
207 --x-libraries=DIR X library files are in DIR
Guido van Rossum7f43da71994-08-01 12:15:30 +0000208EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000209 if test -n "$ac_help"; then
210 echo "--enable and --with options recognized:$ac_help"
211 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000212 exit 0 ;;
213
214 -host | --host | --hos | --ho)
215 ac_prev=host ;;
216 -host=* | --host=* | --hos=* | --ho=*)
217 host="$ac_optarg" ;;
218
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000219 -includedir | --includedir | --includedi | --included | --include \
220 | --includ | --inclu | --incl | --inc)
221 ac_prev=includedir ;;
222 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
223 | --includ=* | --inclu=* | --incl=* | --inc=*)
224 includedir="$ac_optarg" ;;
225
226 -infodir | --infodir | --infodi | --infod | --info | --inf)
227 ac_prev=infodir ;;
228 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
229 infodir="$ac_optarg" ;;
230
231 -libdir | --libdir | --libdi | --libd)
232 ac_prev=libdir ;;
233 -libdir=* | --libdir=* | --libdi=* | --libd=*)
234 libdir="$ac_optarg" ;;
235
236 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
237 | --libexe | --libex | --libe)
238 ac_prev=libexecdir ;;
239 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
240 | --libexe=* | --libex=* | --libe=*)
241 libexecdir="$ac_optarg" ;;
242
243 -localstatedir | --localstatedir | --localstatedi | --localstated \
244 | --localstate | --localstat | --localsta | --localst \
245 | --locals | --local | --loca | --loc | --lo)
246 ac_prev=localstatedir ;;
247 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
248 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
249 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
250 localstatedir="$ac_optarg" ;;
251
252 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
253 ac_prev=mandir ;;
254 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
255 mandir="$ac_optarg" ;;
256
Guido van Rossum7f43da71994-08-01 12:15:30 +0000257 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000258 # Obsolete; use --without-fp.
259 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000260
261 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
262 | --no-cr | --no-c)
263 no_create=yes ;;
264
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000265 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
266 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
267 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000268
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000269 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
270 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
271 | --oldin | --oldi | --old | --ol | --o)
272 ac_prev=oldincludedir ;;
273 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
274 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
275 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
276 oldincludedir="$ac_optarg" ;;
277
Guido van Rossum7f43da71994-08-01 12:15:30 +0000278 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
279 ac_prev=prefix ;;
280 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
281 prefix="$ac_optarg" ;;
282
283 -program-prefix | --program-prefix | --program-prefi | --program-pref \
284 | --program-pre | --program-pr | --program-p)
285 ac_prev=program_prefix ;;
286 -program-prefix=* | --program-prefix=* | --program-prefi=* \
287 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
288 program_prefix="$ac_optarg" ;;
289
290 -program-suffix | --program-suffix | --program-suffi | --program-suff \
291 | --program-suf | --program-su | --program-s)
292 ac_prev=program_suffix ;;
293 -program-suffix=* | --program-suffix=* | --program-suffi=* \
294 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
295 program_suffix="$ac_optarg" ;;
296
297 -program-transform-name | --program-transform-name \
298 | --program-transform-nam | --program-transform-na \
299 | --program-transform-n | --program-transform- \
300 | --program-transform | --program-transfor \
301 | --program-transfo | --program-transf \
302 | --program-trans | --program-tran \
303 | --progr-tra | --program-tr | --program-t)
304 ac_prev=program_transform_name ;;
305 -program-transform-name=* | --program-transform-name=* \
306 | --program-transform-nam=* | --program-transform-na=* \
307 | --program-transform-n=* | --program-transform-=* \
308 | --program-transform=* | --program-transfor=* \
309 | --program-transfo=* | --program-transf=* \
310 | --program-trans=* | --program-tran=* \
311 | --progr-tra=* | --program-tr=* | --program-t=*)
312 program_transform_name="$ac_optarg" ;;
313
314 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
315 | -silent | --silent | --silen | --sile | --sil)
316 silent=yes ;;
317
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000318 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
319 ac_prev=sbindir ;;
320 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
321 | --sbi=* | --sb=*)
322 sbindir="$ac_optarg" ;;
323
324 -sharedstatedir | --sharedstatedir | --sharedstatedi \
325 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
326 | --sharedst | --shareds | --shared | --share | --shar \
327 | --sha | --sh)
328 ac_prev=sharedstatedir ;;
329 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
330 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
331 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
332 | --sha=* | --sh=*)
333 sharedstatedir="$ac_optarg" ;;
334
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000335 -site | --site | --sit)
336 ac_prev=site ;;
337 -site=* | --site=* | --sit=*)
338 site="$ac_optarg" ;;
339
Guido van Rossum7f43da71994-08-01 12:15:30 +0000340 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
341 ac_prev=srcdir ;;
342 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
343 srcdir="$ac_optarg" ;;
344
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000345 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
346 | --syscon | --sysco | --sysc | --sys | --sy)
347 ac_prev=sysconfdir ;;
348 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
349 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
350 sysconfdir="$ac_optarg" ;;
351
Guido van Rossum7f43da71994-08-01 12:15:30 +0000352 -target | --target | --targe | --targ | --tar | --ta | --t)
353 ac_prev=target ;;
354 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
355 target="$ac_optarg" ;;
356
357 -v | -verbose | --verbose | --verbos | --verbo | --verb)
358 verbose=yes ;;
359
360 -version | --version | --versio | --versi | --vers)
Guido van Rossumf78abae1997-01-21 22:02:36 +0000361 echo "configure generated by autoconf version 2.12"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000362 exit 0 ;;
363
364 -with-* | --with-*)
365 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000366 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000367 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000368 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000369 fi
370 ac_package=`echo $ac_package| sed 's/-/_/g'`
371 case "$ac_option" in
372 *=*) ;;
373 *) ac_optarg=yes ;;
374 esac
375 eval "with_${ac_package}='$ac_optarg'" ;;
376
377 -without-* | --without-*)
378 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
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 eval "with_${ac_package}=no" ;;
385
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000386 --x)
387 # Obsolete; use --with-x.
388 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000389
390 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
391 | --x-incl | --x-inc | --x-in | --x-i)
392 ac_prev=x_includes ;;
393 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
394 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
395 x_includes="$ac_optarg" ;;
396
397 -x-libraries | --x-libraries | --x-librarie | --x-librari \
398 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
399 ac_prev=x_libraries ;;
400 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
401 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
402 x_libraries="$ac_optarg" ;;
403
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000404 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000405 ;;
406
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000407 *)
Guido van Rossum0a516c91994-09-12 10:58:40 +0000408 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000409 echo "configure: warning: $ac_option: invalid host type" 1>&2
Guido van Rossum7f43da71994-08-01 12:15:30 +0000410 fi
Guido van Rossum0a516c91994-09-12 10:58:40 +0000411 if test "x$nonopt" != xNONE; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000412 { 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 +0000413 fi
414 nonopt="$ac_option"
415 ;;
416
417 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000418done
419
Guido van Rossum7f43da71994-08-01 12:15:30 +0000420if test -n "$ac_prev"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000421 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000422fi
423
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000424trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum7f43da71994-08-01 12:15:30 +0000425
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000426# File descriptor usage:
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000427# 0 standard input
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000428# 1 file creation
429# 2 errors and warnings
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000430# 3 some systems may open it to /dev/tty
431# 4 used on the Kubota Titan
432# 6 checking for... messages and results
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000433# 5 compiler messages saved in config.log
434if test "$silent" = yes; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000435 exec 6>/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000436else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000437 exec 6>&1
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000438fi
439exec 5>./config.log
440
441echo "\
442This file contains any messages produced by compilers while
443running configure, to aid debugging if configure makes a mistake.
444" 1>&5
445
446# Strip out --no-create and --no-recursion so they do not pile up.
447# Also quote any args containing shell metacharacters.
448ac_configure_args=
449for ac_arg
450do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000451 case "$ac_arg" in
452 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
453 | --no-cr | --no-c) ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000454 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
455 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
456 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
457 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
458 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000459 esac
460done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000461
462# NLS nuisances.
Guido van Rossumf78abae1997-01-21 22:02:36 +0000463# Only set these to C if already set. These must not be set unconditionally
464# because not all systems understand e.g. LANG=C (notably SCO).
465# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
466# Non-C LC_CTYPE values break the ctype check.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000467if test "${LANG+set}" = set; then LANG=C; export LANG; fi
Guido van Rossumf78abae1997-01-21 22:02:36 +0000468if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
469if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
470if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000471
Guido van Rossum7f43da71994-08-01 12:15:30 +0000472# confdefs.h avoids OS command line length limits that DEFS can exceed.
473rm -rf conftest* confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000474# AIX cpp loses on an empty file, so make sure it contains at least a newline.
475echo > confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000476
477# A filename unique to this package, relative to the directory that
478# configure is in, which we can look for to find out if srcdir is correct.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000479ac_unique_file=Include/object.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000480
481# Find the source files, if location was not specified.
482if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000483 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000484 # Try the directory containing this script, then its parent.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000485 ac_prog=$0
486 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
487 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
488 srcdir=$ac_confdir
489 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000490 srcdir=..
491 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000492else
493 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000494fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000495if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000496 if test "$ac_srcdir_defaulted" = yes; then
497 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000498 else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000499 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000500 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000501fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000502srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
503
504# Prefer explicitly selected file to automatically selected ones.
505if test -z "$CONFIG_SITE"; then
506 if test "x$prefix" != xNONE; then
507 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
508 else
509 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
510 fi
511fi
512for ac_site_file in $CONFIG_SITE; do
513 if test -r "$ac_site_file"; then
514 echo "loading site script $ac_site_file"
515 . "$ac_site_file"
516 fi
517done
518
519if test -r "$cache_file"; then
520 echo "loading cache $cache_file"
521 . $cache_file
522else
523 echo "creating cache $cache_file"
524 > $cache_file
525fi
526
Guido van Rossum7f43da71994-08-01 12:15:30 +0000527ac_ext=c
Guido van Rossum0a516c91994-09-12 10:58:40 +0000528# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000529ac_cpp='$CPP $CPPFLAGS'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000530ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
531ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000532cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000533
534if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
535 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
536 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
537 ac_n= ac_c='
538' ac_t=' '
539 else
540 ac_n=-n ac_c= ac_t=
541 fi
542else
543 ac_n= ac_c='\c' ac_t=
544fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000545
Guido van Rossum0a516c91994-09-12 10:58:40 +0000546
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000547
Guido van Rossum627b2d71993-12-24 10:39:16 +0000548
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000549# Set VERSION so we only need to edit in one place (i.e., here)
550
551VERSION=1.5
552
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000553# NEXTSTEP stuff
Guido van Rossum563e7081996-09-10 18:20:48 +0000554if test -f /usr/lib/NextStep/software_version; then
555
556 echo $ac_n "checking for --with-next-archs""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +0000557echo "configure:558: checking for --with-next-archs" >&5
Guido van Rossum563e7081996-09-10 18:20:48 +0000558 # Check whether --with-next-archs or --without-next-archs was given.
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000559if test "${with_next_archs+set}" = set; then
560 withval="$with_next_archs"
561
Guido van Rossum563e7081996-09-10 18:20:48 +0000562 if test -n "$withval"; then
563 ac_arch_flags=`/usr/lib/arch_tool -archify_list $withval`
564 # GCC does not currently support multi archs on the NeXT
565 with_gcc=no
566 fi
567 echo "$ac_t""$with_next_archs" 1>&6
568
569else
570 echo "$ac_t""none: using `arch`" 1>&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000571fi
572
Guido van Rossum563e7081996-09-10 18:20:48 +0000573
574 if test -z "$MACHDEP"
575 then
576 set X `hostinfo | grep 'NeXT Mach.*:' | \
577 sed -e 's/://' -e 's/\./_/'` && \
578 ac_sys_system=next && ac_sys_release=$4
579
Guido van Rossumb97ef171997-09-28 05:44:03 +0000580 MACHDEP="$ac_sys_system$ac_sys_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000581 fi
582fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000583
Guido van Rossum91922671997-10-09 20:24:13 +0000584
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000585# Set name for machine-dependent library files
586
587echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
Guido van Rossum91922671997-10-09 20:24:13 +0000588echo "configure:589: checking MACHDEP" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000589if test -z "$MACHDEP"
590then
Guido van Rossum563e7081996-09-10 18:20:48 +0000591 ac_sys_system=`uname -s`
592 if test "$ac_sys_system" = "AIX" ; then
593 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000594 else
Guido van Rossum563e7081996-09-10 18:20:48 +0000595 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000596 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000597 ac_md_system=`echo $ac_sys_system |
598 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
599 ac_md_release=`echo $ac_sys_release |
600 tr -d '/ ' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +0000601 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000602
Guido van Rossum07397971997-04-29 21:49:50 +0000603 case $MACHDEP in
Guido van Rossumb97ef171997-09-28 05:44:03 +0000604 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000605 esac
606fi
Guido van Rossum91922671997-10-09 20:24:13 +0000607
608#
609# SGI compilers allow the specification of the both the ABI and the
610# ISA on the command line. Depending on the values of these switches,
611# different and often incompatable code will be generated.
612#
613# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
614# thus supply support for various ABI/ISA combinations. The MACHDEP
615# variable is also adjusted.
616#
617
618if test ! -z "$SGI_ABI"
619then
620 CC="cc $SGI_ABI"
621 LDFLAGS="$SGI_ABI $LDFLAGS"
622 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
623fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000624echo "$ac_t""$MACHDEP" 1>&6
625
Guido van Rossum91922671997-10-09 20:24:13 +0000626#
627# CCC is the command that compiles C++ programs
628#
629# Not all make programs have this predefined.
630#
631
632echo $ac_n "checking CCC""... $ac_c" 1>&6
633echo "configure:634: checking CCC" >&5
634if test -z "$CCC"
635then
636 case $ac_sys_system in
637 IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";;
Guido van Rossumad678af1998-10-02 14:42:15 +0000638 Linux*) SET_CCC="CCC= g++";;
Guido van Rossum91922671997-10-09 20:24:13 +0000639 *) SET_CCC=""
640 esac
641else
642 SET_CCC="CCC= ${CCC}"
643fi
644echo "$ac_t""$SET_CCC" 1>&6
645
646
Guido van Rossum627b2d71993-12-24 10:39:16 +0000647# checks for alternative programs
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000648echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +0000649echo "configure:650: checking for --without-gcc" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000650# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000651if test "${with_gcc+set}" = set; then
652 withval="$with_gcc"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000653
654 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000655 no) CC=cc
656 without_gcc=yes;;
657 yes) CC=gcc
658 without_gcc=no;;
659 *) CC=$withval
660 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000661 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000662else
Guido van Rossume77438c1995-09-13 18:59:59 +0000663
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000664 case $ac_sys_system in
Guido van Rossume77438c1995-09-13 18:59:59 +0000665 OSF1) CC=cc
666 without_gcc=;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +0000667 BeOS*) CC=cc
668 without_gcc=;;
Guido van Rossume77438c1995-09-13 18:59:59 +0000669 *) without_gcc=no;;
670 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000671fi
672
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000673echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000674
Guido van Rossum8b131c51995-03-09 14:10:13 +0000675# If the user switches compilers, we can't believe the cache
676if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
677then
678 { echo "configure: error: cached CC is different -- throw away $cache_file
679(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
680fi
681
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000682# Extract the first word of "gcc", so it can be a program name with args.
683set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000684echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +0000685echo "configure:686: checking for $ac_word" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000686if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
687 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000688else
689 if test -n "$CC"; then
690 ac_cv_prog_CC="$CC" # Let the user override the test.
691else
Guido van Rossum7f43da71994-08-01 12:15:30 +0000692 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
693 for ac_dir in $PATH; do
694 test -z "$ac_dir" && ac_dir=.
695 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000696 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000697 break
698 fi
699 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000700 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000701fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000702fi
703CC="$ac_cv_prog_CC"
704if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000705 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000706else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000707 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000708fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000709
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000710if test -z "$CC"; then
711 # Extract the first word of "cc", so it can be a program name with args.
712set dummy cc; ac_word=$2
713echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +0000714echo "configure:715: checking for $ac_word" >&5
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000715if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
716 echo $ac_n "(cached) $ac_c" 1>&6
717else
718 if test -n "$CC"; then
719 ac_cv_prog_CC="$CC" # Let the user override the test.
720else
721 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
722 ac_prog_rejected=no
723 for ac_dir in $PATH; do
724 test -z "$ac_dir" && ac_dir=.
725 if test -f $ac_dir/$ac_word; then
726 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
727 ac_prog_rejected=yes
728 continue
729 fi
730 ac_cv_prog_CC="cc"
731 break
732 fi
733 done
734 IFS="$ac_save_ifs"
735if test $ac_prog_rejected = yes; then
736 # We found a bogon in the path, so make sure we never use it.
737 set dummy $ac_cv_prog_CC
738 shift
739 if test $# -gt 0; then
740 # We chose a different compiler from the bogus one.
741 # However, it has the same basename, so the bogon will be chosen
742 # first if we set CC to just the basename; use the full file name.
743 shift
744 set dummy "$ac_dir/$ac_word" "$@"
745 shift
746 ac_cv_prog_CC="$@"
747 fi
748fi
749fi
750fi
751CC="$ac_cv_prog_CC"
752if test -n "$CC"; then
753 echo "$ac_t""$CC" 1>&6
754else
755 echo "$ac_t""no" 1>&6
756fi
757
758 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
759fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000760
Guido van Rossumf78abae1997-01-21 22:02:36 +0000761echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +0000762echo "configure:763: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000763
764ac_ext=c
765# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
766ac_cpp='$CPP $CPPFLAGS'
767ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
768ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
769cross_compiling=$ac_cv_prog_cc_cross
770
771cat > conftest.$ac_ext <<EOF
Guido van Rossumad678af1998-10-02 14:42:15 +0000772#line 773 "configure"
Guido van Rossumf78abae1997-01-21 22:02:36 +0000773#include "confdefs.h"
774main(){return(0);}
775EOF
Guido van Rossumad678af1998-10-02 14:42:15 +0000776if { (eval echo configure:777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000777 ac_cv_prog_cc_works=yes
778 # If we can't run a trivial program, we are probably using a cross compiler.
779 if (./conftest; exit) 2>/dev/null; then
780 ac_cv_prog_cc_cross=no
781 else
782 ac_cv_prog_cc_cross=yes
783 fi
784else
785 echo "configure: failed program was:" >&5
786 cat conftest.$ac_ext >&5
787 ac_cv_prog_cc_works=no
788fi
789rm -fr conftest*
790
791echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
792if test $ac_cv_prog_cc_works = no; then
793 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
794fi
795echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +0000796echo "configure:797: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000797echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
798cross_compiling=$ac_cv_prog_cc_cross
799
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000800echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +0000801echo "configure:802: checking whether we are using GNU C" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000802if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
803 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000804else
805 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000806#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000807 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +0000808#endif
809EOF
Guido van Rossumad678af1998-10-02 14:42:15 +0000810if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:811: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000811 ac_cv_prog_gcc=yes
812else
813 ac_cv_prog_gcc=no
814fi
815fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000816
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000817echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +0000818
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000819if test $ac_cv_prog_gcc = yes; then
820 GCC=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +0000821 ac_test_CFLAGS="${CFLAGS+set}"
822 ac_save_CFLAGS="$CFLAGS"
823 CFLAGS=
824 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +0000825echo "configure:826: checking whether ${CC-cc} accepts -g" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000826if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000827 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000828else
829 echo 'void f(){}' > conftest.c
830if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000831 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000832else
Guido van Rossumf78abae1997-01-21 22:02:36 +0000833 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000834fi
835rm -f conftest*
836
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000837fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000838
Guido van Rossumf78abae1997-01-21 22:02:36 +0000839echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
840 if test "$ac_test_CFLAGS" = set; then
841 CFLAGS="$ac_save_CFLAGS"
842 elif test $ac_cv_prog_cc_g = yes; then
843 CFLAGS="-g -O2"
844 else
845 CFLAGS="-O2"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000846 fi
847else
848 GCC=
849 test "${CFLAGS+set}" = set || CFLAGS="-g"
850fi
851
Guido van Rossum76c5fe21997-08-14 19:45:07 +0000852
Guido van Rossumdd997f71998-10-07 19:58:26 +0000853case $MACHDEP in
854bsdos*)
855 case $CC in
856 gcc) CC="$CC -D_HAVE_BSDI";;
857 esac;;
858esac
859
Guido van Rossum24b1e751997-08-21 02:29:16 +0000860case $ac_sys_system in
861hp*|HP*)
862 case $CC in
863 cc|*/cc) CC="$CC -Aa -D_HPUX_SOURCE";;
864 esac;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +0000865BeOS*)
866 case $CC in
867 cc) CC=cc;;
868 esac;;
Guido van Rossum24b1e751997-08-21 02:29:16 +0000869esac
870
Guido van Rossum76c5fe21997-08-14 19:45:07 +0000871# LINKCC is the command that links the python executable -- default is $(CC).
Guido van Rossumec95c7b1998-08-04 17:59:56 +0000872# This is altered for AIX and BeOS in order to build the export list before
873# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +0000874
875echo $ac_n "checking LINKCC""... $ac_c" 1>&6
Guido van Rossumdd997f71998-10-07 19:58:26 +0000876echo "configure:877: checking LINKCC" >&5
Guido van Rossum76c5fe21997-08-14 19:45:07 +0000877if test -z "$LINKCC"
878then
879 case $ac_sys_system in
880 AIX*)
Guido van Rossum45140f91997-08-29 18:44:06 +0000881 LINKCC="\$(srcdir)/makexp_aix python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +0000882 BeOS*)
Guido van Rossumea516321998-12-17 18:08:55 +0000883 LINKCC="\$(srcdir)/../BeOS/linkcc \$(LIBRARY) \$(PURIFY) \$(CC) \$(OPT)"
Guido van Rossumec95c7b1998-08-04 17:59:56 +0000884 REALLIBRARY='libpython$(VERSION).so';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +0000885 dgux*)
886 LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";;
Guido van Rossum25f93031997-08-18 16:00:04 +0000887 *) LINKCC="\$(PURIFY) \$(CC)";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +0000888 esac
889fi
890echo "$ac_t""$LINKCC" 1>&6
891
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000892# Extract the first word of "ranlib", so it can be a program name with args.
893set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000894echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossumdd997f71998-10-07 19:58:26 +0000895echo "configure:896: checking for $ac_word" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000896if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
897 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000898else
899 if test -n "$RANLIB"; then
900 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
901else
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
903 for ac_dir in $PATH; do
904 test -z "$ac_dir" && ac_dir=.
905 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000906 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000907 break
908 fi
909 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000910 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000911 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000912fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000913fi
914RANLIB="$ac_cv_prog_RANLIB"
915if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000916 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000917else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000918 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000919fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000920
921
Guido van Rossum7f43da71994-08-01 12:15:30 +0000922for ac_prog in ar aal
923do
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000924# Extract the first word of "$ac_prog", so it can be a program name with args.
925set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000926echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossumdd997f71998-10-07 19:58:26 +0000927echo "configure:928: checking for $ac_word" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000928if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
929 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000930else
931 if test -n "$AR"; then
932 ac_cv_prog_AR="$AR" # Let the user override the test.
933else
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
935 for ac_dir in $PATH; do
936 test -z "$ac_dir" && ac_dir=.
937 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000938 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000939 break
940 fi
941 done
942 IFS="$ac_save_ifs"
943fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000944fi
945AR="$ac_cv_prog_AR"
946if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000947 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000948else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000949 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000950fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000951
952test -n "$AR" && break
953done
954test -n "$AR" || AR="ar"
955
956
Guido van Rossumda88dad1995-01-26 00:46:29 +0000957
958
Guido van Rossum3c4bb801997-12-18 23:55:32 +0000959
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000960# Install just never works :-(
961if test -z "$INSTALL"
Guido van Rossumda88dad1995-01-26 00:46:29 +0000962then
963 INSTALL=cp
964 INSTALL_PROGRAM=cp
965 INSTALL_DATA=cp
966else
967 INSTALL_PROGRAM="$INSTALL"
968 INSTALL_DATA="$INSTALL -m 644"
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000969fi
970
Guido van Rossumec95c7b1998-08-04 17:59:56 +0000971# Not every filesystem supports hard links
972
973if test -z "$LN" ; then
974 case $ac_sys_system in
975 BeOS*) LN="ln -s";;
976 *) LN=ln;;
977 esac
978fi
979
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000980# Optimizer/debugger flags passed between Makefiles
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000981
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000982if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000983then
Guido van Rossumedca74a1997-07-18 23:29:40 +0000984 case $GCC in
985 yes)
986 case $ac_cv_prog_cc_g in
987 yes) OPT="-g -O2";;
988 *) OPT="-O2";;
989 esac
990 ;;
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000991 *) OPT="-O";;
992 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000993fi
994
Guido van Rossum563e7081996-09-10 18:20:48 +0000995if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +0000996then
997 OPT="$OPT $ac_arch_flags"
998fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000999# checks for UNIX variants that set C preprocessor variables
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001000echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Guido van Rossumdd997f71998-10-07 19:58:26 +00001001echo "configure:1002: checking how to run the C preprocessor" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001002# On Suns, sometimes $CPP names a directory.
1003if test -n "$CPP" && test -d "$CPP"; then
1004 CPP=
1005fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001006if test -z "$CPP"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001007if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1008 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001009else
1010 # This must be in double quotes, not single quotes, because CPP may get
1011 # substituted into the Makefile and "${CC-cc}" will confuse make.
Guido van Rossum627b2d71993-12-24 10:39:16 +00001012 CPP="${CC-cc} -E"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001013 # On the NeXT, cc -E runs the code through the compiler's parser,
1014 # not just through cpp.
1015 cat > conftest.$ac_ext <<EOF
Guido van Rossumdd997f71998-10-07 19:58:26 +00001016#line 1017 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001017#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001018#include <assert.h>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001019Syntax Error
1020EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001021ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumdd997f71998-10-07 19:58:26 +00001022{ (eval echo configure:1023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001023ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001024if test -z "$ac_err"; then
1025 :
1026else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001027 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001028 echo "configure: failed program was:" >&5
1029 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00001030 rm -rf conftest*
1031 CPP="${CC-cc} -E -traditional-cpp"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001032 cat > conftest.$ac_ext <<EOF
Guido van Rossumdd997f71998-10-07 19:58:26 +00001033#line 1034 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001034#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001035#include <assert.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001036Syntax Error
1037EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001038ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumdd997f71998-10-07 19:58:26 +00001039{ (eval echo configure:1040: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001040ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001041if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001042 :
1043else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001044 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001045 echo "configure: failed program was:" >&5
1046 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001047 rm -rf conftest*
1048 CPP=/lib/cpp
1049fi
1050rm -f conftest*
1051fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001052rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001053 ac_cv_prog_CPP="$CPP"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001054fi
Guido van Rossume77438c1995-09-13 18:59:59 +00001055 CPP="$ac_cv_prog_CPP"
1056else
1057 ac_cv_prog_CPP="$CPP"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001058fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001059echo "$ac_t""$CPP" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001060
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001061echo $ac_n "checking for AIX""... $ac_c" 1>&6
Guido van Rossumdd997f71998-10-07 19:58:26 +00001062echo "configure:1063: checking for AIX" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001063cat > conftest.$ac_ext <<EOF
Guido van Rossumdd997f71998-10-07 19:58:26 +00001064#line 1065 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001065#include "confdefs.h"
1066#ifdef _AIX
1067 yes
1068#endif
1069
1070EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001071if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1072 egrep "yes" >/dev/null 2>&1; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001073 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001074 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001075#define _ALL_SOURCE 1
1076EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001077
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001078else
1079 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001080 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001081fi
1082rm -f conftest*
1083
1084
Guido van Rossumf78abae1997-01-21 22:02:36 +00001085ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001086echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
Guido van Rossumdd997f71998-10-07 19:58:26 +00001087echo "configure:1088: checking for minix/config.h" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001088if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1089 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001090else
1091 cat > conftest.$ac_ext <<EOF
Guido van Rossumdd997f71998-10-07 19:58:26 +00001092#line 1093 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001093#include "confdefs.h"
1094#include <minix/config.h>
1095EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001096ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumdd997f71998-10-07 19:58:26 +00001097{ (eval echo configure:1098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001098ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001100 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001101 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001102else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001103 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001104 echo "configure: failed program was:" >&5
1105 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001106 rm -rf conftest*
1107 eval "ac_cv_header_$ac_safe=no"
1108fi
1109rm -f conftest*
1110fi
1111if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001112 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001113 MINIX=yes
1114else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001115 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001116MINIX=
Guido van Rossum627b2d71993-12-24 10:39:16 +00001117fi
1118
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001119if test "$MINIX" = yes; then
1120 cat >> confdefs.h <<\EOF
1121#define _POSIX_SOURCE 1
1122EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001123
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001124 cat >> confdefs.h <<\EOF
1125#define _POSIX_1_SOURCE 2
1126EOF
1127
1128 cat >> confdefs.h <<\EOF
1129#define _MINIX 1
1130EOF
1131
1132fi
1133
Guido van Rossumda88dad1995-01-26 00:46:29 +00001134
Guido van Rossum91922671997-10-09 20:24:13 +00001135echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
Guido van Rossumdd997f71998-10-07 19:58:26 +00001136echo "configure:1137: checking whether $CC accepts -OPT:Olimit=0" >&5
Guido van Rossum91922671997-10-09 20:24:13 +00001137if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then
1138 echo $ac_n "(cached) $ac_c" 1>&6
1139else
1140 ac_save_cc="$CC"
1141CC="$CC -OPT:Olimit=0"
1142if test "$cross_compiling" = yes; then
1143 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1144else
1145 cat > conftest.$ac_ext <<EOF
Guido van Rossumdd997f71998-10-07 19:58:26 +00001146#line 1147 "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00001147#include "confdefs.h"
1148int main() { return 0; }
1149EOF
Guido van Rossumdd997f71998-10-07 19:58:26 +00001150if { (eval echo configure:1151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
Guido van Rossum91922671997-10-09 20:24:13 +00001151then
1152 ac_cv_opt_olimit_ok=yes
1153else
1154 echo "configure: failed program was:" >&5
1155 cat conftest.$ac_ext >&5
1156 rm -fr conftest*
1157 ac_cv_opt_olimit_ok=no
1158fi
1159rm -fr conftest*
1160fi
1161
1162CC="$ac_save_cc"
1163fi
1164
1165echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00001166if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum304dd2d1997-10-20 23:10:56 +00001167 OPT="$OPT -OPT:Olimit=0"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001168else
1169 echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
Guido van Rossumdd997f71998-10-07 19:58:26 +00001170echo "configure:1171: checking whether $CC accepts -Olimit 1500" >&5
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001171 if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
1172 echo $ac_n "(cached) $ac_c" 1>&6
1173else
1174 ac_save_cc="$CC"
1175 CC="$CC -Olimit 1500"
1176 if test "$cross_compiling" = yes; then
1177 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1178else
1179 cat > conftest.$ac_ext <<EOF
Guido van Rossumdd997f71998-10-07 19:58:26 +00001180#line 1181 "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001181#include "confdefs.h"
1182int main() { return 0; }
1183EOF
Guido van Rossumdd997f71998-10-07 19:58:26 +00001184if { (eval echo configure:1185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001185then
1186 ac_cv_olimit_ok=yes
1187else
1188 echo "configure: failed program was:" >&5
1189 cat conftest.$ac_ext >&5
1190 rm -fr conftest*
1191 ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00001192fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001193rm -fr conftest*
1194fi
1195
1196 CC="$ac_save_cc"
1197fi
1198
1199 echo "$ac_t""$ac_cv_olimit_ok" 1>&6
1200 if test $ac_cv_olimit_ok = yes; then
1201 OPT="$OPT -Olimit 1500"
1202 fi
1203fi
1204
1205
1206if test "$MACHDEP" != "dguxR4"
1207then
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001208 REALLIBRARY='libpython$(VERSION).a'
Guido van Rossum35742851998-02-19 21:32:40 +00001209 DGUX_IS_BROKEN="true"
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001210else
1211 REALLIBRARY='libpython$(VERSION).so'
1212 OPT="$OPT -pic"
Guido van Rossum35742851998-02-19 21:32:40 +00001213 DGUX_IS_BROKEN="make $REALLIBRARY"
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001214fi
Guido van Rossum201afe51997-05-14 21:14:44 +00001215
Guido van Rossum84e7b241996-08-19 21:59:00 +00001216# check for ANSI or K&R ("traditional") preprocessor
1217echo $ac_n "checking for C preprocessor type""... $ac_c" 1>&6
Guido van Rossumdd997f71998-10-07 19:58:26 +00001218echo "configure:1219: checking for C preprocessor type" >&5
Guido van Rossum84e7b241996-08-19 21:59:00 +00001219cat > conftest.$ac_ext <<EOF
Guido van Rossumdd997f71998-10-07 19:58:26 +00001220#line 1221 "configure"
Guido van Rossum84e7b241996-08-19 21:59:00 +00001221#include "confdefs.h"
1222
1223#define spam(name, doc) {#name, &name, #name "() -- " doc}
1224int foo;
1225struct {char *name; int *addr; char *doc;} desc = spam(foo, "something");
1226
Guido van Rossumf78abae1997-01-21 22:02:36 +00001227int main() {
Guido van Rossum84e7b241996-08-19 21:59:00 +00001228;
1229; return 0; }
1230EOF
Guido van Rossumdd997f71998-10-07 19:58:26 +00001231if { (eval echo configure:1232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum84e7b241996-08-19 21:59:00 +00001232 rm -rf conftest*
1233 cpp_type=ansi
1234else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001235 echo "configure: failed program was:" >&5
1236 cat conftest.$ac_ext >&5
Guido van Rossum84e7b241996-08-19 21:59:00 +00001237 rm -rf conftest*
1238 cat >> confdefs.h <<\EOF
1239#define HAVE_OLD_CPP 1
1240EOF
1241 cpp_type=traditional
1242fi
1243rm -f conftest*
Guido van Rossum84e7b241996-08-19 21:59:00 +00001244echo "$ac_t""$cpp_type" 1>&6
1245
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001246# checks for header files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001247echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Guido van Rossumdd997f71998-10-07 19:58:26 +00001248echo "configure:1249: checking for ANSI C header files" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001249if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1250 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001251else
1252 cat > conftest.$ac_ext <<EOF
Guido van Rossumdd997f71998-10-07 19:58:26 +00001253#line 1254 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001254#include "confdefs.h"
1255#include <stdlib.h>
1256#include <stdarg.h>
1257#include <string.h>
1258#include <float.h>
1259EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001260ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumdd997f71998-10-07 19:58:26 +00001261{ (eval echo configure:1262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001262ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001263if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001264 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001265 ac_cv_header_stdc=yes
1266else
1267 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001268 echo "configure: failed program was:" >&5
1269 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001270 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001271 ac_cv_header_stdc=no
1272fi
1273rm -f conftest*
1274
1275if test $ac_cv_header_stdc = yes; then
1276 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1277cat > conftest.$ac_ext <<EOF
Guido van Rossumdd997f71998-10-07 19:58:26 +00001278#line 1279 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001279#include "confdefs.h"
1280#include <string.h>
1281EOF
1282if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1283 egrep "memchr" >/dev/null 2>&1; then
1284 :
1285else
1286 rm -rf conftest*
1287 ac_cv_header_stdc=no
1288fi
1289rm -f conftest*
1290
1291fi
1292
1293if test $ac_cv_header_stdc = yes; then
1294 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1295cat > conftest.$ac_ext <<EOF
Guido van Rossumdd997f71998-10-07 19:58:26 +00001296#line 1297 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001297#include "confdefs.h"
1298#include <stdlib.h>
1299EOF
1300if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1301 egrep "free" >/dev/null 2>&1; then
1302 :
1303else
1304 rm -rf conftest*
1305 ac_cv_header_stdc=no
1306fi
1307rm -f conftest*
1308
1309fi
1310
1311if test $ac_cv_header_stdc = yes; then
1312 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1313if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001314 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001315else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001316 cat > conftest.$ac_ext <<EOF
Guido van Rossumdd997f71998-10-07 19:58:26 +00001317#line 1318 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001318#include "confdefs.h"
1319#include <ctype.h>
1320#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1321#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001322#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00001323int main () { int i; for (i = 0; i < 256; i++)
1324if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1325exit (0); }
1326
1327EOF
Guido van Rossumdd997f71998-10-07 19:58:26 +00001328if { (eval echo configure:1329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00001329then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001330 :
1331else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001332 echo "configure: failed program was:" >&5
1333 cat conftest.$ac_ext >&5
1334 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001335 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001336fi
1337rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001338fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001339
1340fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001341fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001342
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001343echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001344if test $ac_cv_header_stdc = yes; then
1345 cat >> confdefs.h <<\EOF
1346#define STDC_HEADERS 1
1347EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001348
1349fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001350
Guido van Rossum96013151997-10-08 22:47:52 +00001351for ac_hdr in dlfcn.h fcntl.h limits.h locale.h ncurses.h pthread.h \
Guido van Rossum2d38f911996-06-26 19:47:01 +00001352signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h \
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001353sys/audioio.h sys/file.h sys/lock.h \
1354sys/param.h sys/select.h sys/time.h sys/times.h \
Guido van Rossum2d38f911996-06-26 19:47:01 +00001355sys/un.h sys/utsname.h sys/wait.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001356do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001357ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001358echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Guido van Rossumdd997f71998-10-07 19:58:26 +00001359echo "configure:1360: checking for $ac_hdr" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001360if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1361 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001362else
1363 cat > conftest.$ac_ext <<EOF
Guido van Rossumdd997f71998-10-07 19:58:26 +00001364#line 1365 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001365#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001366#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001367EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001368ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumdd997f71998-10-07 19:58:26 +00001369{ (eval echo configure:1370: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001370ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001371if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001372 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001373 eval "ac_cv_header_$ac_safe=yes"
1374else
1375 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001376 echo "configure: failed program was:" >&5
1377 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001378 rm -rf conftest*
1379 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001380fi
1381rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001382fi
1383if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001384 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001385 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001386 cat >> confdefs.h <<EOF
1387#define $ac_tr_hdr 1
1388EOF
1389
1390else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001391 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001392fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001393done
1394
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001395ac_header_dirent=no
1396for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1397do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001398ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001399echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Guido van Rossumdd997f71998-10-07 19:58:26 +00001400echo "configure:1401: checking for $ac_hdr that defines DIR" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001401if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1402 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001403else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001404 cat > conftest.$ac_ext <<EOF
Guido van Rossumdd997f71998-10-07 19:58:26 +00001405#line 1406 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001406#include "confdefs.h"
1407#include <sys/types.h>
1408#include <$ac_hdr>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001409int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001410DIR *dirp = 0;
1411; return 0; }
1412EOF
Guido van Rossumdd997f71998-10-07 19:58:26 +00001413if { (eval echo configure:1414: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001414 rm -rf conftest*
1415 eval "ac_cv_header_dirent_$ac_safe=yes"
1416else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001417 echo "configure: failed program was:" >&5
1418 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001419 rm -rf conftest*
1420 eval "ac_cv_header_dirent_$ac_safe=no"
1421fi
1422rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001423fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001424if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001425 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001426 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001427 cat >> confdefs.h <<EOF
1428#define $ac_tr_hdr 1
1429EOF
1430 ac_header_dirent=$ac_hdr; break
1431else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001432 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001433fi
1434done
1435# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1436if test $ac_header_dirent = dirent.h; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001437echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Guido van Rossumdd997f71998-10-07 19:58:26 +00001438echo "configure:1439: checking for opendir in -ldir" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001439ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001440if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001441 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001442else
1443 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001444LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001445cat > conftest.$ac_ext <<EOF
Guido van Rossumdd997f71998-10-07 19:58:26 +00001446#line 1447 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001447#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001448/* Override any gcc2 internal prototype to avoid an error. */
1449/* We use char because int might match the return type of a gcc2
1450 builtin and then its argument prototype would still apply. */
1451char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001452
Guido van Rossumf78abae1997-01-21 22:02:36 +00001453int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001454opendir()
1455; return 0; }
1456EOF
Guido van Rossumdd997f71998-10-07 19:58:26 +00001457if { (eval echo configure:1458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001458 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001459 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001460else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001461 echo "configure: failed program was:" >&5
1462 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001463 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001464 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001465fi
1466rm -f conftest*
1467LIBS="$ac_save_LIBS"
1468
1469fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001470if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001471 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001472 LIBS="$LIBS -ldir"
1473else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001474 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001475fi
1476
1477else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001478echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Guido van Rossumdd997f71998-10-07 19:58:26 +00001479echo "configure:1480: checking for opendir in -lx" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001480ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001481if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001482 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001483else
1484 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001485LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001486cat > conftest.$ac_ext <<EOF
Guido van Rossumdd997f71998-10-07 19:58:26 +00001487#line 1488 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001488#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001489/* Override any gcc2 internal prototype to avoid an error. */
1490/* We use char because int might match the return type of a gcc2
1491 builtin and then its argument prototype would still apply. */
1492char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001493
Guido van Rossumf78abae1997-01-21 22:02:36 +00001494int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001495opendir()
1496; return 0; }
1497EOF
Guido van Rossumdd997f71998-10-07 19:58:26 +00001498if { (eval echo configure:1499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001499 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001500 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001501else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001502 echo "configure: failed program was:" >&5
1503 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001504 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001505 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001506fi
1507rm -f conftest*
1508LIBS="$ac_save_LIBS"
1509
1510fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001511if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001512 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001513 LIBS="$LIBS -lx"
1514else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001515 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001516fi
1517
1518fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001519
1520
1521# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00001522was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001523echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Guido van Rossumdd997f71998-10-07 19:58:26 +00001524echo "configure:1525: checking for clock_t in time.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001525cat > conftest.$ac_ext <<EOF
Guido van Rossumdd997f71998-10-07 19:58:26 +00001526#line 1527 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001527#include "confdefs.h"
1528#include <time.h>
1529EOF
1530if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1531 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00001532 rm -rf conftest*
1533 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001534else
1535 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001536 cat >> confdefs.h <<\EOF
1537#define clock_t long
1538EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001539
1540fi
1541rm -f conftest*
1542
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001543echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00001544
Guido van Rossum84e7b241996-08-19 21:59:00 +00001545# Add some code to confdefs.h so that the test for off_t works on SCO
1546cat >> confdefs.h <<\EOF
1547#if defined(SCO_DS)
1548#undef _OFF_T
1549#endif
1550EOF
1551
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001552echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Guido van Rossumdd997f71998-10-07 19:58:26 +00001553echo "configure:1554: checking for mode_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001554if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1555 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001556else
1557 cat > conftest.$ac_ext <<EOF
Guido van Rossumdd997f71998-10-07 19:58:26 +00001558#line 1559 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001559#include "confdefs.h"
1560#include <sys/types.h>
1561#if STDC_HEADERS
1562#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001563#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001564#endif
1565EOF
1566if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossumf78abae1997-01-21 22:02:36 +00001567 egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001568 rm -rf conftest*
1569 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001570else
1571 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001572 ac_cv_type_mode_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001573fi
1574rm -f conftest*
1575
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001576fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001577echo "$ac_t""$ac_cv_type_mode_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001578if test $ac_cv_type_mode_t = no; then
1579 cat >> confdefs.h <<\EOF
1580#define mode_t int
1581EOF
1582
1583fi
1584
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001585echo $ac_n "checking for off_t""... $ac_c" 1>&6
Guido van Rossumdd997f71998-10-07 19:58:26 +00001586echo "configure:1587: checking for off_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001587if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1588 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001589else
1590 cat > conftest.$ac_ext <<EOF
Guido van Rossumdd997f71998-10-07 19:58:26 +00001591#line 1592 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001592#include "confdefs.h"
1593#include <sys/types.h>
1594#if STDC_HEADERS
1595#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001596#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001597#endif
1598EOF
1599if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossumf78abae1997-01-21 22:02:36 +00001600 egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001601 rm -rf conftest*
1602 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001603else
1604 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001605 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001606fi
1607rm -f conftest*
1608
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001609fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001610echo "$ac_t""$ac_cv_type_off_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001611if test $ac_cv_type_off_t = no; then
1612 cat >> confdefs.h <<\EOF
1613#define off_t long
1614EOF
1615
1616fi
1617
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001618echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Guido van Rossumdd997f71998-10-07 19:58:26 +00001619echo "configure:1620: checking for pid_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001620if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1621 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001622else
1623 cat > conftest.$ac_ext <<EOF
Guido van Rossumdd997f71998-10-07 19:58:26 +00001624#line 1625 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001625#include "confdefs.h"
1626#include <sys/types.h>
1627#if STDC_HEADERS
1628#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001629#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001630#endif
1631EOF
1632if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossumf78abae1997-01-21 22:02:36 +00001633 egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001634 rm -rf conftest*
1635 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001636else
1637 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001638 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001639fi
1640rm -f conftest*
1641
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001642fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001643echo "$ac_t""$ac_cv_type_pid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001644if test $ac_cv_type_pid_t = no; then
1645 cat >> confdefs.h <<\EOF
1646#define pid_t int
1647EOF
1648
1649fi
1650
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001651echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Guido van Rossumdd997f71998-10-07 19:58:26 +00001652echo "configure:1653: checking return type of signal handlers" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001653if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1654 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001655else
1656 cat > conftest.$ac_ext <<EOF
Guido van Rossumdd997f71998-10-07 19:58:26 +00001657#line 1658 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001658#include "confdefs.h"
1659#include <sys/types.h>
1660#include <signal.h>
1661#ifdef signal
1662#undef signal
1663#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001664#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001665extern "C" void (*signal (int, void (*)(int)))(int);
1666#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001667void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001668#endif
1669
Guido van Rossumf78abae1997-01-21 22:02:36 +00001670int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001671int i;
1672; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001673EOF
Guido van Rossumdd997f71998-10-07 19:58:26 +00001674if { (eval echo configure:1675: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001675 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001676 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00001677else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001678 echo "configure: failed program was:" >&5
1679 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001680 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001681 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00001682fi
1683rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001684fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001685
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001686echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001687cat >> confdefs.h <<EOF
1688#define RETSIGTYPE $ac_cv_type_signal
1689EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001690
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001691
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001692echo $ac_n "checking for size_t""... $ac_c" 1>&6
Guido van Rossumdd997f71998-10-07 19:58:26 +00001693echo "configure:1694: checking for size_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001694if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1695 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001696else
1697 cat > conftest.$ac_ext <<EOF
Guido van Rossumdd997f71998-10-07 19:58:26 +00001698#line 1699 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001699#include "confdefs.h"
1700#include <sys/types.h>
1701#if STDC_HEADERS
1702#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001703#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001704#endif
1705EOF
1706if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossumf78abae1997-01-21 22:02:36 +00001707 egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001708 rm -rf conftest*
1709 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001710else
1711 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001712 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001713fi
1714rm -f conftest*
1715
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001716fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001717echo "$ac_t""$ac_cv_type_size_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001718if test $ac_cv_type_size_t = no; then
1719 cat >> confdefs.h <<\EOF
1720#define size_t unsigned
1721EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001722
1723fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001724
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001725echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Guido van Rossumdd997f71998-10-07 19:58:26 +00001726echo "configure:1727: checking for uid_t in sys/types.h" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001727if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
1728 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001729else
1730 cat > conftest.$ac_ext <<EOF
Guido van Rossumdd997f71998-10-07 19:58:26 +00001731#line 1732 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001732#include "confdefs.h"
1733#include <sys/types.h>
1734EOF
1735if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1736 egrep "uid_t" >/dev/null 2>&1; then
1737 rm -rf conftest*
1738 ac_cv_type_uid_t=yes
1739else
1740 rm -rf conftest*
1741 ac_cv_type_uid_t=no
1742fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001743rm -f conftest*
1744
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001745fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001746
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001747echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001748if test $ac_cv_type_uid_t = no; then
1749 cat >> confdefs.h <<\EOF
1750#define uid_t int
1751EOF
1752
1753 cat >> confdefs.h <<\EOF
1754#define gid_t int
1755EOF
1756
1757fi
1758
Guido van Rossum627b2d71993-12-24 10:39:16 +00001759
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001760echo $ac_n "checking size of int""... $ac_c" 1>&6
Guido van Rossumdd997f71998-10-07 19:58:26 +00001761echo "configure:1762: checking size of int" >&5
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001762if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1763 echo $ac_n "(cached) $ac_c" 1>&6
1764else
1765 if test "$cross_compiling" = yes; then
1766 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1767else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001768 cat > conftest.$ac_ext <<EOF
Guido van Rossumdd997f71998-10-07 19:58:26 +00001769#line 1770 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001770#include "confdefs.h"
1771#include <stdio.h>
1772main()
1773{
1774 FILE *f=fopen("conftestval", "w");
1775 if (!f) exit(1);
1776 fprintf(f, "%d\n", sizeof(int));
1777 exit(0);
1778}
1779EOF
Guido van Rossumdd997f71998-10-07 19:58:26 +00001780if { (eval echo configure:1781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00001781then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001782 ac_cv_sizeof_int=`cat conftestval`
1783else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001784 echo "configure: failed program was:" >&5
1785 cat conftest.$ac_ext >&5
1786 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001787 ac_cv_sizeof_int=0
1788fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001789rm -fr conftest*
1790fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001791
1792fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001793echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1794cat >> confdefs.h <<EOF
1795#define SIZEOF_INT $ac_cv_sizeof_int
1796EOF
1797
1798
1799echo $ac_n "checking size of long""... $ac_c" 1>&6
Guido van Rossumdd997f71998-10-07 19:58:26 +00001800echo "configure:1801: checking size of long" >&5
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001801if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1802 echo $ac_n "(cached) $ac_c" 1>&6
1803else
1804 if test "$cross_compiling" = yes; then
1805 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1806else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001807 cat > conftest.$ac_ext <<EOF
Guido van Rossumdd997f71998-10-07 19:58:26 +00001808#line 1809 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001809#include "confdefs.h"
1810#include <stdio.h>
1811main()
1812{
1813 FILE *f=fopen("conftestval", "w");
1814 if (!f) exit(1);
1815 fprintf(f, "%d\n", sizeof(long));
1816 exit(0);
1817}
1818EOF
Guido van Rossumdd997f71998-10-07 19:58:26 +00001819if { (eval echo configure:1820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00001820then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001821 ac_cv_sizeof_long=`cat conftestval`
1822else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001823 echo "configure: failed program was:" >&5
1824 cat conftest.$ac_ext >&5
1825 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001826 ac_cv_sizeof_long=0
1827fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001828rm -fr conftest*
1829fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001830
1831fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001832echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1833cat >> confdefs.h <<EOF
1834#define SIZEOF_LONG $ac_cv_sizeof_long
1835EOF
1836
1837
Guido van Rossumad678af1998-10-02 14:42:15 +00001838echo $ac_n "checking size of void *""... $ac_c" 1>&6
Guido van Rossumdd997f71998-10-07 19:58:26 +00001839echo "configure:1840: checking size of void *" >&5
Guido van Rossumad678af1998-10-02 14:42:15 +00001840if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
1841 echo $ac_n "(cached) $ac_c" 1>&6
1842else
1843 if test "$cross_compiling" = yes; then
1844 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1845else
1846 cat > conftest.$ac_ext <<EOF
Guido van Rossumdd997f71998-10-07 19:58:26 +00001847#line 1848 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00001848#include "confdefs.h"
1849#include <stdio.h>
1850main()
1851{
1852 FILE *f=fopen("conftestval", "w");
1853 if (!f) exit(1);
1854 fprintf(f, "%d\n", sizeof(void *));
1855 exit(0);
1856}
1857EOF
Guido van Rossumdd997f71998-10-07 19:58:26 +00001858if { (eval echo configure:1859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
Guido van Rossumad678af1998-10-02 14:42:15 +00001859then
1860 ac_cv_sizeof_void_p=`cat conftestval`
1861else
1862 echo "configure: failed program was:" >&5
1863 cat conftest.$ac_ext >&5
1864 rm -fr conftest*
1865 ac_cv_sizeof_void_p=0
1866fi
1867rm -fr conftest*
1868fi
1869
1870fi
1871echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
1872cat >> confdefs.h <<EOF
1873#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
1874EOF
1875
1876
Guido van Rossum0a516c91994-09-12 10:58:40 +00001877
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001878echo $ac_n "checking for long long support""... $ac_c" 1>&6
Guido van Rossumdd997f71998-10-07 19:58:26 +00001879echo "configure:1880: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001880have_long_long=no
1881cat > conftest.$ac_ext <<EOF
Guido van Rossumdd997f71998-10-07 19:58:26 +00001882#line 1883 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001883#include "confdefs.h"
1884
1885int main() {
1886long long x; x = (long long)0;
1887; return 0; }
1888EOF
Guido van Rossumdd997f71998-10-07 19:58:26 +00001889if { (eval echo configure:1890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001890 rm -rf conftest*
1891 cat >> confdefs.h <<\EOF
1892#define HAVE_LONG_LONG 1
1893EOF
1894 have_long_long=yes
1895else
1896 echo "configure: failed program was:" >&5
1897 cat conftest.$ac_ext >&5
1898fi
1899rm -f conftest*
1900echo "$ac_t""$have_long_long" 1>&6
1901if test $have_long_long = yes ; then
1902echo $ac_n "checking size of long long""... $ac_c" 1>&6
Guido van Rossumdd997f71998-10-07 19:58:26 +00001903echo "configure:1904: checking size of long long" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001904if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
1905 echo $ac_n "(cached) $ac_c" 1>&6
1906else
1907 if test "$cross_compiling" = yes; then
1908 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1909else
1910 cat > conftest.$ac_ext <<EOF
Guido van Rossumdd997f71998-10-07 19:58:26 +00001911#line 1912 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001912#include "confdefs.h"
1913#include <stdio.h>
1914main()
1915{
1916 FILE *f=fopen("conftestval", "w");
1917 if (!f) exit(1);
1918 fprintf(f, "%d\n", sizeof(long long));
1919 exit(0);
1920}
1921EOF
Guido van Rossumdd997f71998-10-07 19:58:26 +00001922if { (eval echo configure:1923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001923then
1924 ac_cv_sizeof_long_long=`cat conftestval`
1925else
1926 echo "configure: failed program was:" >&5
1927 cat conftest.$ac_ext >&5
1928 rm -fr conftest*
1929 ac_cv_sizeof_long_long=0
1930fi
1931rm -fr conftest*
1932fi
1933
1934fi
1935echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
1936cat >> confdefs.h <<EOF
1937#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
1938EOF
1939
1940
1941fi
1942
Guido van Rossum0a516c91994-09-12 10:58:40 +00001943# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00001944
1945
1946
1947
Guido van Rossum0a516c91994-09-12 10:58:40 +00001948# SO is the extension of shared libraries `(including the dot!)
1949# -- usually .so, .sl on HP-UX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001950echo $ac_n "checking SO""... $ac_c" 1>&6
Guido van Rossumdd997f71998-10-07 19:58:26 +00001951echo "configure:1952: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00001952if test -z "$SO"
1953then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001954 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00001955 hp*|HP*) SO=.sl;;
1956 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001957 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001958fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001959echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001960# LDSHARED is the ld *command* used to create shared library
1961# -- "ld" on SunOS 4.x.x, "ld -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001962echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Guido van Rossumdd997f71998-10-07 19:58:26 +00001963echo "configure:1964: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00001964if test -z "$LDSHARED"
1965then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001966 case $ac_sys_system/$ac_sys_release in
Guido van Rossum45140f91997-08-29 18:44:06 +00001967 AIX*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001968 BeOS*) LDSHARED="\$(srcdir)/../BeOS/linkmodule -L.. -lpython\$(VERSION)";;
Guido van Rossum07397971997-04-29 21:49:50 +00001969 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00001970 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001971 SunOS/4*) LDSHARED="ld";;
1972 SunOS/5*) LDSHARED="ld -G";;
1973 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00001974 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
1975 DYNIX/ptx*) LDSHARED="ld -G";;
Guido van Rossum563e7081996-09-10 18:20:48 +00001976 next/*) LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';;
Guido van Rossum81652ab1996-07-21 02:53:27 +00001977 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001978 dgux*) LDSHARED="ld -G";;
Guido van Rossumea516321998-12-17 18:08:55 +00001979 FreeBSD*/3*) LDSHARED="gcc -shared";;
Guido van Rossum1f740161998-04-13 15:27:21 +00001980 FreeBSD*|NetBSD*|OpenBSD*) LDSHARED="ld -Bshareable";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00001981 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001982 *) LDSHARED="ld";;
1983 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001984fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001985echo "$ac_t""$LDSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001986# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001987# library -- this is only needed for a few systems
1988echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00001989echo "configure:1990: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00001990if test -z "$CCSHARED"
1991then
Guido van Rossum07397971997-04-29 21:49:50 +00001992 case $ac_sys_system/$ac_sys_release in
Guido van Rossumaf07a441995-02-13 19:45:27 +00001993 hp*|HP*) if test "$GCC" = yes;
1994 then CCSHARED="-fpic";
1995 else CCSHARED="+z";
1996 fi;;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001997 Linux*) CCSHARED="-fpic";;
Guido van Rossum1f740161998-04-13 15:27:21 +00001998 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fpic";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00001999 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002000 IRIX*/6*) case $CC in
2001 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00002002 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002003 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002004 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002005fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002006echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002007# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002008# the python executable -- this is only needed for a few systems
2009echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00002010echo "configure:2011: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002011if test -z "$LINKFORSHARED"
2012then
Guido van Rossum07397971997-04-29 21:49:50 +00002013 case $ac_sys_system/$ac_sys_release in
Guido van Rossum69f65801998-03-03 21:47:00 +00002014 AIX*) LINKFORSHARED='-Wl,-bE:python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002015 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00002016 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumea516321998-12-17 18:08:55 +00002017 FreeBSD/3*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum2d9feed1997-11-24 17:36:21 +00002018 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum749af7c1997-08-16 14:35:52 +00002019 next/*) LINKFORSHARED="-u libsys_s";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002020 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002021 SunOS/5*) case $CC in
2022 *gcc*)
2023 if $CC -Xlinker -V 2>/dev/null | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00002024 then
2025 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002026 fi;;
2027 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002028 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002029fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002030echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002031
Guido van Rossum627b2d71993-12-24 10:39:16 +00002032# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00002033echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00002034echo "configure:2035: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002035ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002036if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002037 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002038else
2039 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002040LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002041cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00002042#line 2043 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002043#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002044/* Override any gcc2 internal prototype to avoid an error. */
2045/* We use char because int might match the return type of a gcc2
2046 builtin and then its argument prototype would still apply. */
2047char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002048
Guido van Rossumf78abae1997-01-21 22:02:36 +00002049int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002050dlopen()
2051; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002052EOF
Guido van Rossumea516321998-12-17 18:08:55 +00002053if { (eval echo configure:2054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002054 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002055 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002056else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002057 echo "configure: failed program was:" >&5
2058 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002059 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002060 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002061fi
2062rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002063LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002064
Guido van Rossum627b2d71993-12-24 10:39:16 +00002065fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002066if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002067 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002068 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2069 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002070 cat >> confdefs.h <<EOF
2071#define $ac_tr_lib 1
2072EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002073
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002074 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002075
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002076else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002077 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002078fi
2079 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00002080echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00002081echo "configure:2082: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002082ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002083if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002084 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002085else
2086 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002087LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002088cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00002089#line 2090 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002090#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002091/* Override any gcc2 internal prototype to avoid an error. */
2092/* We use char because int might match the return type of a gcc2
2093 builtin and then its argument prototype would still apply. */
2094char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002095
Guido van Rossumf78abae1997-01-21 22:02:36 +00002096int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002097shl_load()
2098; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002099EOF
Guido van Rossumea516321998-12-17 18:08:55 +00002100if { (eval echo configure:2101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002101 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002102 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002103else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002104 echo "configure: failed program was:" >&5
2105 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002106 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002107 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002108fi
2109rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002110LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002111
Guido van Rossum627b2d71993-12-24 10:39:16 +00002112fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002113if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002114 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002115 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2116 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002117 cat >> confdefs.h <<EOF
2118#define $ac_tr_lib 1
2119EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002120
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002121 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002122
2123else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002124 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002125fi
2126 # Dynamic linking for HP-UX
Guido van Rossumb93a8621998-05-07 13:27:32 +00002127echo $ac_n "checking for pow in -lm""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00002128echo "configure:2129: checking for pow in -lm" >&5
Guido van Rossumb93a8621998-05-07 13:27:32 +00002129ac_lib_var=`echo m'_'pow | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002130if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002131 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002132else
2133 ac_save_LIBS="$LIBS"
Guido van Rossumb93a8621998-05-07 13:27:32 +00002134LIBS="-lm $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002135cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00002136#line 2137 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002137#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002138/* Override any gcc2 internal prototype to avoid an error. */
2139/* We use char because int might match the return type of a gcc2
2140 builtin and then its argument prototype would still apply. */
Guido van Rossumb93a8621998-05-07 13:27:32 +00002141char pow();
Guido van Rossum7f43da71994-08-01 12:15:30 +00002142
Guido van Rossumf78abae1997-01-21 22:02:36 +00002143int main() {
Guido van Rossumb93a8621998-05-07 13:27:32 +00002144pow()
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002145; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002146EOF
Guido van Rossumea516321998-12-17 18:08:55 +00002147if { (eval echo configure:2148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002148 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002149 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002150else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002151 echo "configure: failed program was:" >&5
2152 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002153 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002154 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002155fi
2156rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002157LIBS="$ac_save_LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002158
Guido van Rossum7f43da71994-08-01 12:15:30 +00002159fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002160if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002161 echo "$ac_t""yes" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00002162 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
Guido van Rossumf78abae1997-01-21 22:02:36 +00002163 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002164 cat >> confdefs.h <<EOF
2165#define $ac_tr_lib 1
2166EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002167
Guido van Rossumb93a8621998-05-07 13:27:32 +00002168 LIBS="-lm $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002169
2170else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002171 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002172fi
Guido van Rossumb93a8621998-05-07 13:27:32 +00002173 # Std math lib -- assume needed if it exists
Guido van Rossum70c7f481998-03-26 18:44:10 +00002174# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
2175# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002176# BeOS' sockets are stashed in libnet.
2177case "$ac_sys_system" in
2178IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00002179*)
Guido van Rossumf78abae1997-01-21 22:02:36 +00002180echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00002181echo "configure:2182: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002182ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002183if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002184 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002185else
2186 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002187LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002188cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00002189#line 2190 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002190#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002191/* Override any gcc2 internal prototype to avoid an error. */
2192/* We use char because int might match the return type of a gcc2
2193 builtin and then its argument prototype would still apply. */
2194char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002195
Guido van Rossumf78abae1997-01-21 22:02:36 +00002196int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002197t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002198; return 0; }
2199EOF
Guido van Rossumea516321998-12-17 18:08:55 +00002200if { (eval echo configure:2201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002201 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002202 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002203else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002204 echo "configure: failed program was:" >&5
2205 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002206 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002207 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002208fi
2209rm -f conftest*
2210LIBS="$ac_save_LIBS"
2211
2212fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002213if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002214 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002215 LIBS="-lnsl $LIBS"
2216else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002217 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002218fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002219 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00002220echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00002221echo "configure:2222: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002222ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002223if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002224 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002225else
2226 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002227LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002228cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00002229#line 2230 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002230#include "confdefs.h"
2231/* Override any gcc2 internal prototype to avoid an error. */
2232/* We use char because int might match the return type of a gcc2
2233 builtin and then its argument prototype would still apply. */
2234char socket();
2235
2236int main() {
2237socket()
2238; return 0; }
2239EOF
Guido van Rossumea516321998-12-17 18:08:55 +00002240if { (eval echo configure:2241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002241 rm -rf conftest*
2242 eval "ac_cv_lib_$ac_lib_var=yes"
2243else
2244 echo "configure: failed program was:" >&5
2245 cat conftest.$ac_ext >&5
2246 rm -rf conftest*
2247 eval "ac_cv_lib_$ac_lib_var=no"
2248fi
2249rm -f conftest*
2250LIBS="$ac_save_LIBS"
2251
2252fi
2253if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2254 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00002255 LIBS="-lsocket $LIBS"
2256else
2257 echo "$ac_t""no" 1>&6
2258fi
2259 # SVR4 sockets
2260echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00002261echo "configure:2262: checking for socket in -lnet" >&5
Guido van Rossumad678af1998-10-02 14:42:15 +00002262ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
2263if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2264 echo $ac_n "(cached) $ac_c" 1>&6
2265else
2266 ac_save_LIBS="$LIBS"
2267LIBS="-lnet $LIBS $LIBS"
2268cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00002269#line 2270 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002270#include "confdefs.h"
2271/* Override any gcc2 internal prototype to avoid an error. */
2272/* We use char because int might match the return type of a gcc2
2273 builtin and then its argument prototype would still apply. */
2274char socket();
2275
2276int main() {
2277socket()
2278; return 0; }
2279EOF
Guido van Rossumea516321998-12-17 18:08:55 +00002280if { (eval echo configure:2281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002281 rm -rf conftest*
2282 eval "ac_cv_lib_$ac_lib_var=yes"
2283else
2284 echo "configure: failed program was:" >&5
2285 cat conftest.$ac_ext >&5
2286 rm -rf conftest*
2287 eval "ac_cv_lib_$ac_lib_var=no"
2288fi
2289rm -f conftest*
2290LIBS="$ac_save_LIBS"
2291
2292fi
2293if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2294 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002295 LIBS="-lnet $LIBS"
2296else
2297 echo "$ac_t""no" 1>&6
2298fi
2299 # BeOS
2300;;
2301esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00002302
Guido van Rossuma68acba1996-07-31 17:36:39 +00002303echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00002304echo "configure:2305: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00002305# Check whether --with-libs or --without-libs was given.
2306if test "${with_libs+set}" = set; then
2307 withval="$with_libs"
2308
2309echo "$ac_t""$withval" 1>&6
2310LIBS="$withval $LIBS"
2311
2312else
2313 echo "$ac_t""no" 1>&6
2314fi
2315
Guido van Rossum7f43da71994-08-01 12:15:30 +00002316
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002317echo $ac_n "checking for --with(out)-readline""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00002318echo "configure:2319: checking for --with(out)-readline" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002319# Check whether --with-readline or --without-readline was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002320if test "${with_readline+set}" = set; then
2321 withval="$with_readline"
Guido van Rossumb06df271997-08-05 21:50:20 +00002322 echo "$ac_t""$withval" 1>&6
2323{ echo "configure: error: --with(out)-readline is obsolete" 1>&2; exit 1; }
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002324else
Guido van Rossumb06df271997-08-05 21:50:20 +00002325 echo "$ac_t""not specified." 1>&6
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002326fi
2327
Guido van Rossum7f43da71994-08-01 12:15:30 +00002328
Guido van Rossum009f7871997-12-04 00:51:42 +00002329
2330USE_THREAD_MODULE="#"
2331
Guido van Rossumec2f0731997-01-22 20:54:01 +00002332echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00002333echo "configure:2334: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00002334
2335# Check whether --with-dec-threads or --without-dec-threads was given.
2336if test "${with_dec_threads+set}" = set; then
2337 withval="$with_dec_threads"
2338 echo "$ac_t""$withval" 1>&6
2339LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00002340if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00002341 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00002342fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00002343else
2344 echo "$ac_t""no" 1>&6
2345fi
2346
2347
2348echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00002349echo "configure:2350: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00002350# Check whether --with-threads or --without-threads was given.
2351if test "${with_threads+set}" = set; then
2352 withval="$with_threads"
2353 echo "$ac_t""$withval" 1>&6
2354if test "${with_thread+set}" != set; then
2355 with_thread="$withval";
2356fi
2357else
2358 echo "$ac_t""no" 1>&6
2359fi
2360
2361
2362echo $ac_n "checking for --with-thread""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00002363echo "configure:2364: checking for --with-thread" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002364# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002365if test "${with_thread+set}" = set; then
2366 withval="$with_thread"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002367
Guido van Rossum009f7871997-12-04 00:51:42 +00002368USE_THREAD_MODULE=
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002369echo "$ac_t""$withval" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002370if test -d "$withval"
Guido van Rossum84e7b241996-08-19 21:59:00 +00002371then LDFLAGS="$LDFLAGS -L$withval"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002372fi
Guido van Rossum9caf77a1996-08-01 00:52:26 +00002373cat >> confdefs.h <<\EOF
2374#define _REENTRANT 1
2375EOF
2376
Guido van Rossumf78abae1997-01-21 22:02:36 +00002377ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002378echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00002379echo "configure:2380: checking for mach/cthreads.h" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002380if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2381 echo $ac_n "(cached) $ac_c" 1>&6
2382else
2383 cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00002384#line 2385 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002385#include "confdefs.h"
2386#include <mach/cthreads.h>
2387EOF
2388ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumea516321998-12-17 18:08:55 +00002389{ (eval echo configure:2390: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002390ac_err=`grep -v '^ *+' conftest.out`
2391if test -z "$ac_err"; then
2392 rm -rf conftest*
2393 eval "ac_cv_header_$ac_safe=yes"
2394else
2395 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002396 echo "configure: failed program was:" >&5
2397 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002398 rm -rf conftest*
2399 eval "ac_cv_header_$ac_safe=no"
2400fi
2401rm -f conftest*
2402fi
2403if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2404 echo "$ac_t""yes" 1>&6
2405 cat >> confdefs.h <<\EOF
2406#define WITH_THREAD 1
2407EOF
2408
2409cat >> confdefs.h <<\EOF
2410#define C_THREADS 1
2411EOF
2412
2413LIBOBJS="$LIBOBJS thread.o"
2414else
2415 echo "$ac_t""no" 1>&6
2416
Guido van Rossumea516321998-12-17 18:08:55 +00002417echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
2418echo "configure:2419: checking for pthread_detach" >&5
2419if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002420 echo $ac_n "(cached) $ac_c" 1>&6
2421else
2422 cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00002423#line 2424 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002424#include "confdefs.h"
2425/* System header to define __stub macros and hopefully few prototypes,
Guido van Rossumea516321998-12-17 18:08:55 +00002426 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00002427#include <assert.h>
2428/* Override any gcc2 internal prototype to avoid an error. */
2429/* We use char because int might match the return type of a gcc2
2430 builtin and then its argument prototype would still apply. */
Guido van Rossumea516321998-12-17 18:08:55 +00002431char pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00002432
2433int main() {
2434
2435/* The GNU C library defines this for functions which it implements
2436 to always fail with ENOSYS. Some functions are actually named
2437 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00002438#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00002439choke me
2440#else
Guido van Rossumea516321998-12-17 18:08:55 +00002441pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00002442#endif
2443
2444; return 0; }
2445EOF
Guido van Rossumea516321998-12-17 18:08:55 +00002446if { (eval echo configure:2447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002447 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00002448 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00002449else
2450 echo "configure: failed program was:" >&5
2451 cat conftest.$ac_ext >&5
2452 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00002453 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00002454fi
2455rm -f conftest*
2456fi
2457
Guido van Rossumea516321998-12-17 18:08:55 +00002458if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002459 echo "$ac_t""yes" 1>&6
2460 cat >> confdefs.h <<\EOF
2461#define WITH_THREAD 1
2462EOF
2463
2464cat >> confdefs.h <<\EOF
2465#define _POSIX_THREADS 1
2466EOF
2467
2468LIBOBJS="$LIBOBJS thread.o"
2469else
2470 echo "$ac_t""no" 1>&6
2471
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002472ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
2473echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00002474echo "configure:2475: checking for kernel/OS.h" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002475if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2476 echo $ac_n "(cached) $ac_c" 1>&6
2477else
2478 cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00002479#line 2480 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002480#include "confdefs.h"
2481#include <kernel/OS.h>
2482EOF
2483ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumea516321998-12-17 18:08:55 +00002484{ (eval echo configure:2485: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002485ac_err=`grep -v '^ *+' conftest.out`
2486if test -z "$ac_err"; then
2487 rm -rf conftest*
2488 eval "ac_cv_header_$ac_safe=yes"
2489else
2490 echo "$ac_err" >&5
2491 echo "configure: failed program was:" >&5
2492 cat conftest.$ac_ext >&5
2493 rm -rf conftest*
2494 eval "ac_cv_header_$ac_safe=no"
2495fi
2496rm -f conftest*
2497fi
2498if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2499 echo "$ac_t""yes" 1>&6
2500 cat >> confdefs.h <<\EOF
2501#define WITH_THREAD 1
2502EOF
2503
2504cat >> confdefs.h <<\EOF
2505#define BEOS_THREADS 1
2506EOF
2507
2508LIBOBJS="$LIBOBJS thread.o"
2509else
2510 echo "$ac_t""no" 1>&6
2511
Guido van Rossumf78abae1997-01-21 22:02:36 +00002512echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00002513echo "configure:2514: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002514ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002515if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002516 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002517else
2518 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002519LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002520cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00002521#line 2522 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002522#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002523/* Override any gcc2 internal prototype to avoid an error. */
2524/* We use char because int might match the return type of a gcc2
2525 builtin and then its argument prototype would still apply. */
2526char pthread_create();
Guido van Rossum7f43da71994-08-01 12:15:30 +00002527
Guido van Rossumf78abae1997-01-21 22:02:36 +00002528int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002529pthread_create()
2530; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002531EOF
Guido van Rossumea516321998-12-17 18:08:55 +00002532if { (eval echo configure:2533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002533 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002534 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002535else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002536 echo "configure: failed program was:" >&5
2537 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002538 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002539 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002540fi
2541rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002542LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002543
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002544fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002545if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002546 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002547 cat >> confdefs.h <<\EOF
2548#define WITH_THREAD 1
2549EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002550
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002551cat >> confdefs.h <<\EOF
2552#define _POSIX_THREADS 1
2553EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002554
2555LIBS="$LIBS -lpthreads"
2556LIBOBJS="$LIBOBJS thread.o"
2557else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002558 echo "$ac_t""no" 1>&6
Guido van Rossum2d38f911996-06-26 19:47:01 +00002559
Guido van Rossumf78abae1997-01-21 22:02:36 +00002560echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00002561echo "configure:2562: checking for pthread_create in -lpthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002562ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum2d38f911996-06-26 19:47:01 +00002563if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2564 echo $ac_n "(cached) $ac_c" 1>&6
2565else
2566 ac_save_LIBS="$LIBS"
2567LIBS="-lpthread $LIBS"
2568cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00002569#line 2570 "configure"
Guido van Rossum2d38f911996-06-26 19:47:01 +00002570#include "confdefs.h"
2571/* Override any gcc2 internal prototype to avoid an error. */
2572/* We use char because int might match the return type of a gcc2
2573 builtin and then its argument prototype would still apply. */
2574char pthread_create();
2575
Guido van Rossumf78abae1997-01-21 22:02:36 +00002576int main() {
Guido van Rossum2d38f911996-06-26 19:47:01 +00002577pthread_create()
2578; return 0; }
2579EOF
Guido van Rossumea516321998-12-17 18:08:55 +00002580if { (eval echo configure:2581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum2d38f911996-06-26 19:47:01 +00002581 rm -rf conftest*
2582 eval "ac_cv_lib_$ac_lib_var=yes"
2583else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002584 echo "configure: failed program was:" >&5
2585 cat conftest.$ac_ext >&5
Guido van Rossum2d38f911996-06-26 19:47:01 +00002586 rm -rf conftest*
2587 eval "ac_cv_lib_$ac_lib_var=no"
2588fi
2589rm -f conftest*
2590LIBS="$ac_save_LIBS"
2591
2592fi
2593if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2594 echo "$ac_t""yes" 1>&6
2595 cat >> confdefs.h <<\EOF
2596#define WITH_THREAD 1
2597EOF
2598
2599cat >> confdefs.h <<\EOF
2600#define _POSIX_THREADS 1
2601EOF
2602
2603LIBS="$LIBS -lpthread"
2604LIBOBJS="$LIBOBJS thread.o"
2605else
2606 echo "$ac_t""no" 1>&6
Guido van Rossum0be3e491997-05-22 20:33:33 +00002607
Guido van Rossum49545951997-12-02 19:28:29 +00002608echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00002609echo "configure:2610: checking for pthread_create in -lc_r" >&5
Guido van Rossum49545951997-12-02 19:28:29 +00002610ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
2611if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2612 echo $ac_n "(cached) $ac_c" 1>&6
2613else
2614 ac_save_LIBS="$LIBS"
2615LIBS="-lc_r $LIBS"
2616cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00002617#line 2618 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00002618#include "confdefs.h"
2619/* Override any gcc2 internal prototype to avoid an error. */
2620/* We use char because int might match the return type of a gcc2
2621 builtin and then its argument prototype would still apply. */
2622char pthread_create();
2623
2624int main() {
2625pthread_create()
2626; return 0; }
2627EOF
Guido van Rossumea516321998-12-17 18:08:55 +00002628if { (eval echo configure:2629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum49545951997-12-02 19:28:29 +00002629 rm -rf conftest*
2630 eval "ac_cv_lib_$ac_lib_var=yes"
2631else
2632 echo "configure: failed program was:" >&5
2633 cat conftest.$ac_ext >&5
2634 rm -rf conftest*
2635 eval "ac_cv_lib_$ac_lib_var=no"
2636fi
2637rm -f conftest*
2638LIBS="$ac_save_LIBS"
2639
2640fi
2641if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2642 echo "$ac_t""yes" 1>&6
2643 cat >> confdefs.h <<\EOF
2644#define WITH_THREAD 1
2645EOF
2646
2647cat >> confdefs.h <<\EOF
2648#define _POSIX_THREADS 1
2649EOF
2650
2651LIBS="$LIBS -lc_r"
2652LIBOBJS="$LIBOBJS thread.o"
2653else
2654 echo "$ac_t""no" 1>&6
2655
Guido van Rossum0be3e491997-05-22 20:33:33 +00002656echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00002657echo "configure:2658: checking for __d6_pthread_create in -lthread" >&5
Guido van Rossum0be3e491997-05-22 20:33:33 +00002658ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
2659if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2660 echo $ac_n "(cached) $ac_c" 1>&6
2661else
2662 ac_save_LIBS="$LIBS"
2663LIBS="-lthread $LIBS"
2664cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00002665#line 2666 "configure"
Guido van Rossum0be3e491997-05-22 20:33:33 +00002666#include "confdefs.h"
2667/* Override any gcc2 internal prototype to avoid an error. */
2668/* We use char because int might match the return type of a gcc2
2669 builtin and then its argument prototype would still apply. */
2670char __d6_pthread_create();
2671
2672int main() {
2673__d6_pthread_create()
2674; return 0; }
2675EOF
Guido van Rossumea516321998-12-17 18:08:55 +00002676if { (eval echo configure:2677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum0be3e491997-05-22 20:33:33 +00002677 rm -rf conftest*
2678 eval "ac_cv_lib_$ac_lib_var=yes"
2679else
2680 echo "configure: failed program was:" >&5
2681 cat conftest.$ac_ext >&5
2682 rm -rf conftest*
2683 eval "ac_cv_lib_$ac_lib_var=no"
2684fi
2685rm -f conftest*
2686LIBS="$ac_save_LIBS"
2687
2688fi
2689if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2690 echo "$ac_t""yes" 1>&6
2691 cat >> confdefs.h <<\EOF
2692#define WITH_THREAD 1
2693EOF
2694
2695cat >> confdefs.h <<\EOF
2696#define _POSIX_THREADS 1
2697EOF
2698
2699LIBS="$LIBS -lthread"
2700LIBOBJS="$LIBOBJS thread.o"
2701else
2702 echo "$ac_t""no" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00002703
2704echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00002705echo "configure:2706: checking for pthread_create in -lcma" >&5
Guido van Rossumb93a8621998-05-07 13:27:32 +00002706ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
2707if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2708 echo $ac_n "(cached) $ac_c" 1>&6
2709else
2710 ac_save_LIBS="$LIBS"
2711LIBS="-lcma $LIBS"
2712cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00002713#line 2714 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00002714#include "confdefs.h"
2715/* Override any gcc2 internal prototype to avoid an error. */
2716/* We use char because int might match the return type of a gcc2
2717 builtin and then its argument prototype would still apply. */
2718char pthread_create();
2719
2720int main() {
2721pthread_create()
2722; return 0; }
2723EOF
Guido van Rossumea516321998-12-17 18:08:55 +00002724if { (eval echo configure:2725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00002725 rm -rf conftest*
2726 eval "ac_cv_lib_$ac_lib_var=yes"
2727else
2728 echo "configure: failed program was:" >&5
2729 cat conftest.$ac_ext >&5
2730 rm -rf conftest*
2731 eval "ac_cv_lib_$ac_lib_var=no"
2732fi
2733rm -f conftest*
2734LIBS="$ac_save_LIBS"
2735
2736fi
2737if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2738 echo "$ac_t""yes" 1>&6
2739 cat >> confdefs.h <<\EOF
2740#define WITH_THREAD 1
2741EOF
2742
2743cat >> confdefs.h <<\EOF
2744#define _POSIX_THREADS 1
2745EOF
2746
2747LIBS="$LIBS -lcma"
2748LIBOBJS="$LIBOBJS thread.o"
2749else
2750 echo "$ac_t""no" 1>&6
Guido van Rossum2d38f911996-06-26 19:47:01 +00002751fi
2752
2753
Guido van Rossum627b2d71993-12-24 10:39:16 +00002754fi
2755
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002756fi
2757
Guido van Rossum0be3e491997-05-22 20:33:33 +00002758fi
2759
Guido van Rossum49545951997-12-02 19:28:29 +00002760fi
2761
Guido van Rossumb93a8621998-05-07 13:27:32 +00002762fi
2763
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002764fi
2765
Guido van Rossumad678af1998-10-02 14:42:15 +00002766fi
2767
Guido van Rossum0be3e491997-05-22 20:33:33 +00002768
Guido van Rossumf78abae1997-01-21 22:02:36 +00002769echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00002770echo "configure:2771: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002771ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002772if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002773 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002774else
2775 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002776LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002777cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00002778#line 2779 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002779#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002780/* Override any gcc2 internal prototype to avoid an error. */
2781/* We use char because int might match the return type of a gcc2
2782 builtin and then its argument prototype would still apply. */
2783char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002784
Guido van Rossumf78abae1997-01-21 22:02:36 +00002785int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002786usconfig()
2787; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002788EOF
Guido van Rossumea516321998-12-17 18:08:55 +00002789if { (eval echo configure:2790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002790 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002791 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002792else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002793 echo "configure: failed program was:" >&5
2794 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002795 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002796 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002797fi
2798rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002799LIBS="$ac_save_LIBS"
2800
2801fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002802if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002803 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002804 cat >> confdefs.h <<\EOF
2805#define WITH_THREAD 1
2806EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002807
Guido van Rossum7f43da71994-08-01 12:15:30 +00002808LIBS="$LIBS -lmpc"
2809LIBOBJS="$LIBOBJS thread.o"
2810else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002811 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002812fi
2813
Guido van Rossumf78abae1997-01-21 22:02:36 +00002814echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00002815echo "configure:2816: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002816ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002817if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002818 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002819else
2820 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002821LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002822cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00002823#line 2824 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002824#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002825/* Override any gcc2 internal prototype to avoid an error. */
2826/* We use char because int might match the return type of a gcc2
2827 builtin and then its argument prototype would still apply. */
2828char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002829
Guido van Rossumf78abae1997-01-21 22:02:36 +00002830int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002831thr_create()
2832; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002833EOF
Guido van Rossumea516321998-12-17 18:08:55 +00002834if { (eval echo configure:2835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002835 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002836 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002837else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002838 echo "configure: failed program was:" >&5
2839 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002840 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002841 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002842fi
2843rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002844LIBS="$ac_save_LIBS"
2845
2846fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002847if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002848 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002849 cat >> confdefs.h <<\EOF
2850#define WITH_THREAD 1
2851EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002852
Guido van Rossum7f43da71994-08-01 12:15:30 +00002853LIBS="$LIBS -lthread"
2854LIBOBJS="$LIBOBJS thread.o"
2855else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002856 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002857fi
2858
Guido van Rossum7f43da71994-08-01 12:15:30 +00002859
Guido van Rossumda88dad1995-01-26 00:46:29 +00002860else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002861 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002862fi
2863
Guido van Rossum7f43da71994-08-01 12:15:30 +00002864
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002865# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00002866
2867DLINCLDIR=/
2868
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002869echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00002870echo "configure:2871: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002871# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002872if test "${with_sgi_dl+set}" = set; then
2873 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002874
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002875echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002876cat >> confdefs.h <<\EOF
2877#define WITH_SGI_DL 1
2878EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002879
2880dldir=$withval
2881if test -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00002882then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002883else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002884fi
2885DLINCLDIR=${dldir}
2886LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00002887else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002888 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002889fi
2890
2891
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002892echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00002893echo "configure:2894: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002894# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002895if test "${with_dl_dld+set}" = set; then
2896 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002897
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002898echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002899cat >> confdefs.h <<\EOF
2900#define WITH_DL_DLD 1
2901EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002902
2903dldir=`echo "$withval" | sed 's/,.*//'`
2904dlddir=`echo "$withval" | sed 's/.*,//'`
2905if test -d "$dldir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00002906then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002907else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002908fi
2909DLINCLDIR=${dldir}
2910LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00002911else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002912 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002913fi
2914
2915
Guido van Rossum627b2d71993-12-24 10:39:16 +00002916# checks for library functions
Guido van Rossum1171ee61997-08-22 20:42:00 +00002917for ac_func in alarm chown clock dlopen execv flock fork ftime ftruncate \
2918 gethostname_r getpeername getpgrp getpid getpwent gettimeofday getwd \
Guido van Rossumad678af1998-10-02 14:42:15 +00002919 kill link lstat mkfifo mktime nice pause plock pthread_init putenv readlink \
Guido van Rossum96013151997-10-08 22:47:52 +00002920 select setgid setlocale setuid setsid setpgid setpgrp setvbuf \
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00002921 sigaction siginterrupt sigrelse strftime strptime symlink \
Guido van Rossum08d6be41998-06-11 15:19:05 +00002922 tcgetpgrp tcsetpgrp timegm times truncate uname waitpid
Guido van Rossum627b2d71993-12-24 10:39:16 +00002923do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002924echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00002925echo "configure:2926: checking for $ac_func" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002926if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2927 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002928else
2929 cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00002930#line 2931 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002931#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002932/* System header to define __stub macros and hopefully few prototypes,
2933 which can conflict with char $ac_func(); below. */
2934#include <assert.h>
2935/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002936/* We use char because int might match the return type of a gcc2
2937 builtin and then its argument prototype would still apply. */
2938char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002939
Guido van Rossumf78abae1997-01-21 22:02:36 +00002940int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002941
Guido van Rossum627b2d71993-12-24 10:39:16 +00002942/* The GNU C library defines this for functions which it implements
2943 to always fail with ENOSYS. Some functions are actually named
2944 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002945#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00002946choke me
2947#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002948$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002949#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002950
Guido van Rossum7f43da71994-08-01 12:15:30 +00002951; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002952EOF
Guido van Rossumea516321998-12-17 18:08:55 +00002953if { (eval echo configure:2954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002954 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002955 eval "ac_cv_func_$ac_func=yes"
2956else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002957 echo "configure: failed program was:" >&5
2958 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002959 rm -rf conftest*
2960 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002961fi
2962rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002963fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002964
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002965if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002966 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002967 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002968 cat >> confdefs.h <<EOF
2969#define $ac_tr_func 1
2970EOF
2971
2972else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002973 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002974fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002975done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002976
Guido van Rossum2b3ac691996-08-30 15:18:41 +00002977for ac_func in dup2 getcwd strdup strerror memmove
Guido van Rossum627b2d71993-12-24 10:39:16 +00002978do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002979echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00002980echo "configure:2981: checking for $ac_func" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002981if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2982 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002983else
2984 cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00002985#line 2986 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002986#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002987/* System header to define __stub macros and hopefully few prototypes,
2988 which can conflict with char $ac_func(); below. */
2989#include <assert.h>
2990/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002991/* We use char because int might match the return type of a gcc2
2992 builtin and then its argument prototype would still apply. */
2993char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002994
Guido van Rossumf78abae1997-01-21 22:02:36 +00002995int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002996
Guido van Rossum627b2d71993-12-24 10:39:16 +00002997/* The GNU C library defines this for functions which it implements
2998 to always fail with ENOSYS. Some functions are actually named
2999 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003000#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00003001choke me
3002#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003003$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003004#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003005
Guido van Rossum7f43da71994-08-01 12:15:30 +00003006; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003007EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003008if { (eval echo configure:3009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003009 rm -rf conftest*
3010 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003011else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003012 echo "configure: failed program was:" >&5
3013 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003014 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003015 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003016fi
3017rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003018fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003019
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003020if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003021 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003022 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3023 cat >> confdefs.h <<EOF
3024#define $ac_tr_func 1
3025EOF
3026
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003027else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003028 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003029LIBOBJS="$LIBOBJS ${ac_func}.o"
3030fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003031done
3032
Guido van Rossumf78abae1997-01-21 22:02:36 +00003033
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003034echo $ac_n "checking for getpgrp""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00003035echo "configure:3036: checking for getpgrp" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003036if eval "test \"`echo '$''{'ac_cv_func_getpgrp'+set}'`\" = set"; then
3037 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003038else
3039 cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003040#line 3041 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003041#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003042/* System header to define __stub macros and hopefully few prototypes,
3043 which can conflict with char getpgrp(); below. */
3044#include <assert.h>
3045/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003046/* We use char because int might match the return type of a gcc2
3047 builtin and then its argument prototype would still apply. */
3048char getpgrp();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003049
Guido van Rossumf78abae1997-01-21 22:02:36 +00003050int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003051
Guido van Rossum627b2d71993-12-24 10:39:16 +00003052/* The GNU C library defines this for functions which it implements
3053 to always fail with ENOSYS. Some functions are actually named
3054 something starting with __ and the normal name is an alias. */
3055#if defined (__stub_getpgrp) || defined (__stub___getpgrp)
3056choke me
3057#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003058getpgrp();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003059#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003060
3061; return 0; }
3062EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003063if { (eval echo configure:3064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003064 rm -rf conftest*
3065 eval "ac_cv_func_getpgrp=yes"
3066else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003067 echo "configure: failed program was:" >&5
3068 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003069 rm -rf conftest*
3070 eval "ac_cv_func_getpgrp=no"
3071fi
3072rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003073fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003074
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003075if eval "test \"`echo '$ac_cv_func_'getpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003076 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003077 cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003078#line 3079 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003079#include "confdefs.h"
3080#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003081int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003082getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00003083; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003084EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003085if { (eval echo configure:3086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003086 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003087 cat >> confdefs.h <<\EOF
3088#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00003089EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003090
Guido van Rossumf78abae1997-01-21 22:02:36 +00003091else
3092 echo "configure: failed program was:" >&5
3093 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003094fi
3095rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003096else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003097 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003098fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003099
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003100echo $ac_n "checking for setpgrp""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00003101echo "configure:3102: checking for setpgrp" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003102if eval "test \"`echo '$''{'ac_cv_func_setpgrp'+set}'`\" = set"; then
3103 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003104else
3105 cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003106#line 3107 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003107#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003108/* System header to define __stub macros and hopefully few prototypes,
3109 which can conflict with char setpgrp(); below. */
3110#include <assert.h>
3111/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003112/* We use char because int might match the return type of a gcc2
3113 builtin and then its argument prototype would still apply. */
3114char setpgrp();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003115
Guido van Rossumf78abae1997-01-21 22:02:36 +00003116int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003117
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003118/* The GNU C library defines this for functions which it implements
3119 to always fail with ENOSYS. Some functions are actually named
3120 something starting with __ and the normal name is an alias. */
3121#if defined (__stub_setpgrp) || defined (__stub___setpgrp)
3122choke me
3123#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003124setpgrp();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003125#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003126
3127; return 0; }
3128EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003129if { (eval echo configure:3130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003130 rm -rf conftest*
3131 eval "ac_cv_func_setpgrp=yes"
3132else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003133 echo "configure: failed program was:" >&5
3134 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003135 rm -rf conftest*
3136 eval "ac_cv_func_setpgrp=no"
3137fi
3138rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003139fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003140
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003141if eval "test \"`echo '$ac_cv_func_'setpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003142 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003143 cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003144#line 3145 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003145#include "confdefs.h"
3146#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003147int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003148setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003149; return 0; }
3150EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003151if { (eval echo configure:3152: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003152 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003153 cat >> confdefs.h <<\EOF
3154#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003155EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003156
Guido van Rossumf78abae1997-01-21 22:02:36 +00003157else
3158 echo "configure: failed program was:" >&5
3159 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003160fi
3161rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003162else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003163 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003164fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003165
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003166echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00003167echo "configure:3168: checking for gettimeofday" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003168if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
3169 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003170else
3171 cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003172#line 3173 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003173#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003174/* System header to define __stub macros and hopefully few prototypes,
3175 which can conflict with char gettimeofday(); below. */
3176#include <assert.h>
3177/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003178/* We use char because int might match the return type of a gcc2
3179 builtin and then its argument prototype would still apply. */
3180char gettimeofday();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003181
Guido van Rossumf78abae1997-01-21 22:02:36 +00003182int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003183
3184/* The GNU C library defines this for functions which it implements
3185 to always fail with ENOSYS. Some functions are actually named
3186 something starting with __ and the normal name is an alias. */
3187#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
3188choke me
3189#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003190gettimeofday();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003191#endif
3192
3193; return 0; }
3194EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003195if { (eval echo configure:3196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003196 rm -rf conftest*
3197 eval "ac_cv_func_gettimeofday=yes"
3198else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003199 echo "configure: failed program was:" >&5
3200 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003201 rm -rf conftest*
3202 eval "ac_cv_func_gettimeofday=no"
3203fi
3204rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003205fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003206
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003207if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003208 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003209 cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003210#line 3211 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003211#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003212#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003213int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003214gettimeofday((struct timeval*)0,(struct timezone*)0);
3215; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003216EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003217if { (eval echo configure:3218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003218 :
3219else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003220 echo "configure: failed program was:" >&5
3221 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003222 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003223 cat >> confdefs.h <<\EOF
3224#define GETTIMEOFDAY_NO_TZ 1
3225EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003226
3227fi
3228rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003229else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003230 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003231fi
3232
3233
3234# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003235echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00003236echo "configure:3237: checking whether time.h and sys/time.h may both be included" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003237if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
3238 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003239else
3240 cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003241#line 3242 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003242#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003243#include <sys/types.h>
3244#include <sys/time.h>
3245#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003246int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003247struct tm *tp;
3248; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003249EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003250if { (eval echo configure:3251: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003251 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003252 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003253else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003254 echo "configure: failed program was:" >&5
3255 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003256 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003257 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003258fi
3259rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003260fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003261
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003262echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003263if test $ac_cv_header_time = yes; then
3264 cat >> confdefs.h <<\EOF
3265#define TIME_WITH_SYS_TIME 1
3266EOF
3267
3268fi
3269
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003270echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00003271echo "configure:3272: checking whether struct tm is in sys/time.h or time.h" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003272if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
3273 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003274else
3275 cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003276#line 3277 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003277#include "confdefs.h"
3278#include <sys/types.h>
3279#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003280int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003281struct tm *tp; tp->tm_sec;
3282; return 0; }
3283EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003284if { (eval echo configure:3285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003285 rm -rf conftest*
3286 ac_cv_struct_tm=time.h
3287else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003288 echo "configure: failed program was:" >&5
3289 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003290 rm -rf conftest*
3291 ac_cv_struct_tm=sys/time.h
3292fi
3293rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003294fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003295
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003296echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003297if test $ac_cv_struct_tm = sys/time.h; then
3298 cat >> confdefs.h <<\EOF
3299#define TM_IN_SYS_TIME 1
3300EOF
3301
3302fi
3303
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003304echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00003305echo "configure:3306: checking for tm_zone in struct tm" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003306if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
3307 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003308else
3309 cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003310#line 3311 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003311#include "confdefs.h"
3312#include <sys/types.h>
3313#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003314int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003315struct tm tm; tm.tm_zone;
3316; return 0; }
3317EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003318if { (eval echo configure:3319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003319 rm -rf conftest*
3320 ac_cv_struct_tm_zone=yes
3321else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003322 echo "configure: failed program was:" >&5
3323 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003324 rm -rf conftest*
3325 ac_cv_struct_tm_zone=no
3326fi
3327rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003328fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003329
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003330echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003331if test "$ac_cv_struct_tm_zone" = yes; then
3332 cat >> confdefs.h <<\EOF
3333#define HAVE_TM_ZONE 1
3334EOF
3335
3336else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003337 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00003338echo "configure:3339: checking for tzname" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003339if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
3340 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003341else
3342 cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003343#line 3344 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003344#include "confdefs.h"
3345#include <time.h>
3346#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003347extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00003348#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00003349int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003350atoi(*tzname);
3351; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003352EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003353if { (eval echo configure:3354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003354 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003355 ac_cv_var_tzname=yes
3356else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003357 echo "configure: failed program was:" >&5
3358 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003359 rm -rf conftest*
3360 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003361fi
3362rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00003363fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003364
3365echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003366 if test $ac_cv_var_tzname = yes; then
3367 cat >> confdefs.h <<\EOF
3368#define HAVE_TZNAME 1
3369EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003370
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003371 fi
3372fi
3373
3374
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003375echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00003376echo "configure:3377: checking for time.h that defines altzone" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003377if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
3378 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003379else
3380 cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003381#line 3382 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003382#include "confdefs.h"
3383#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003384int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003385return altzone;
3386; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003387EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003388if { (eval echo configure:3389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00003389 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003390 ac_cv_header_time_altzone=yes
3391else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003392 echo "configure: failed program was:" >&5
3393 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003394 rm -rf conftest*
3395 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00003396fi
3397rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003398fi
3399
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003400echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003401if test $ac_cv_header_time_altzone = yes; then
3402 cat >> confdefs.h <<\EOF
3403#define HAVE_ALTZONE 1
3404EOF
3405
3406fi
3407
Guido van Rossumda88dad1995-01-26 00:46:29 +00003408was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003409echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00003410echo "configure:3411: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003411cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003412#line 3413 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003413#include "confdefs.h"
3414
3415#include <sys/types.h>
3416#include <sys/select.h>
3417#include <sys/time.h>
3418
Guido van Rossumf78abae1997-01-21 22:02:36 +00003419int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003420;
3421; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003422EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003423if { (eval echo configure:3424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00003424 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003425 cat >> confdefs.h <<\EOF
3426#define SYS_SELECT_WITH_SYS_TIME 1
3427EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003428 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00003429else
3430 echo "configure: failed program was:" >&5
3431 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00003432fi
3433rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003434echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003435
3436# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00003437
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003438echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00003439echo "configure:3440: checking whether char is unsigned" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003440if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
3441 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003442else
3443 if test "$GCC" = yes; then
3444 # GCC predefines this symbol on systems where it applies.
3445cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003446#line 3447 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003447#include "confdefs.h"
3448#ifdef __CHAR_UNSIGNED__
3449 yes
3450#endif
3451
3452EOF
3453if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3454 egrep "yes" >/dev/null 2>&1; then
3455 rm -rf conftest*
3456 ac_cv_c_char_unsigned=yes
3457else
3458 rm -rf conftest*
3459 ac_cv_c_char_unsigned=no
3460fi
3461rm -f conftest*
3462
3463else
3464if test "$cross_compiling" = yes; then
3465 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3466else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003467 cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003468#line 3469 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003469#include "confdefs.h"
3470/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003471#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00003472#define volatile
3473#endif
3474main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00003475 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00003476}
3477EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003478if { (eval echo configure:3479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00003479then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003480 ac_cv_c_char_unsigned=yes
3481else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003482 echo "configure: failed program was:" >&5
3483 cat conftest.$ac_ext >&5
3484 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003485 ac_cv_c_char_unsigned=no
3486fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003487rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003488fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003489
3490fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003491fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003492
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003493echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003494if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
3495 cat >> confdefs.h <<\EOF
3496#define __CHAR_UNSIGNED__ 1
3497EOF
3498
3499fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003500
3501
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003502echo $ac_n "checking for working const""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00003503echo "configure:3504: checking for working const" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003504if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3505 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003506else
3507 cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003508#line 3509 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003509#include "confdefs.h"
3510
Guido van Rossumf78abae1997-01-21 22:02:36 +00003511int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003512
3513/* Ultrix mips cc rejects this. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00003514typedef int charset[2]; const charset x;
3515/* SunOS 4.1.1 cc rejects this. */
3516char const *const *ccp;
3517char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003518/* NEC SVR4.0.2 mips cc rejects this. */
3519struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003520static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00003521/* AIX XL C 1.02.0.0 rejects this.
3522 It does not let you subtract one const X* pointer from another in an arm
3523 of an if-expression whose if-part is not a constant expression */
3524const char *g = "string";
3525ccp = &g + (g ? g-g : 0);
3526/* HPUX 7.0 cc rejects these. */
3527++ccp;
3528p = (char**) ccp;
3529ccp = (char const *const *) p;
3530{ /* SCO 3.2v4 cc rejects this. */
3531 char *t;
3532 char const *s = 0 ? (char *) 0 : (char const *) 0;
3533
3534 *t++ = 0;
3535}
3536{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003537 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00003538 const int *foo = &x[0];
3539 ++foo;
3540}
3541{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3542 typedef const int *iptr;
3543 iptr p = 0;
3544 ++p;
3545}
3546{ /* AIX XL C 1.02.0.0 rejects this saying
3547 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3548 struct s { int j; const int *ap[3]; };
3549 struct s *b; b->j = 5;
3550}
3551{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3552 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003553}
3554
3555; return 0; }
3556EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003557if { (eval echo configure:3558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003558 rm -rf conftest*
3559 ac_cv_c_const=yes
3560else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003561 echo "configure: failed program was:" >&5
3562 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003563 rm -rf conftest*
3564 ac_cv_c_const=no
3565fi
3566rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003567fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003568
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003569echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003570if test $ac_cv_c_const = no; then
3571 cat >> confdefs.h <<\EOF
3572#define const
3573EOF
3574
3575fi
3576
3577
Guido van Rossumda88dad1995-01-26 00:46:29 +00003578works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003579echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00003580echo "configure:3581: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003581cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003582#line 3583 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003583#include "confdefs.h"
3584
Guido van Rossumf78abae1997-01-21 22:02:36 +00003585int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003586volatile int x; x = 0;
3587; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003588EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003589if { (eval echo configure:3590: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00003590 rm -rf conftest*
3591 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003592else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003593 echo "configure: failed program was:" >&5
3594 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003595 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003596 cat >> confdefs.h <<\EOF
3597#define volatile
3598EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003599
3600fi
3601rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003602echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003603
Guido van Rossumda88dad1995-01-26 00:46:29 +00003604works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003605echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00003606echo "configure:3607: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003607cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003608#line 3609 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003609#include "confdefs.h"
3610
Guido van Rossumf78abae1997-01-21 22:02:36 +00003611int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003612signed char c;
3613; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003614EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003615if { (eval echo configure:3616: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00003616 rm -rf conftest*
3617 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003618else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003619 echo "configure: failed program was:" >&5
3620 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003621 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003622 cat >> confdefs.h <<\EOF
3623#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00003624EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003625
3626fi
3627rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003628echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003629
Guido van Rossumda88dad1995-01-26 00:46:29 +00003630have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003631echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00003632echo "configure:3633: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003633cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003634#line 3635 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003635#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003636int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00003637int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003638return foo(10);
3639; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003640EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003641if { (eval echo configure:3642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003642 rm -rf conftest*
3643 cat >> confdefs.h <<\EOF
3644#define HAVE_PROTOTYPES 1
3645EOF
3646 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00003647else
3648 echo "configure: failed program was:" >&5
3649 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00003650fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003651rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003652echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003653
Guido van Rossumda88dad1995-01-26 00:46:29 +00003654works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003655echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00003656echo "configure:3657: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003657cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003658#line 3659 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003659#include "confdefs.h"
3660
3661#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00003662int foo(int x, ...) {
3663 va_list va;
3664 va_start(va, x);
3665 va_arg(va, int);
3666 va_arg(va, char *);
3667 va_arg(va, double);
3668 return 0;
3669}
Guido van Rossum7f43da71994-08-01 12:15:30 +00003670
Guido van Rossumf78abae1997-01-21 22:02:36 +00003671int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00003672return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003673; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003674EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003675if { (eval echo configure:3676: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003676 rm -rf conftest*
3677 cat >> confdefs.h <<\EOF
3678#define HAVE_STDARG_PROTOTYPES 1
3679EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003680 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00003681else
3682 echo "configure: failed program was:" >&5
3683 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003684fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003685rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003686echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003687
Guido van Rossumda88dad1995-01-26 00:46:29 +00003688if test "$have_prototypes" = yes; then
3689bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003690echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00003691echo "configure:3692: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003692cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003693#line 3694 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003694#include "confdefs.h"
3695#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003696int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003697char **t;execve("@",t,t);
3698; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003699EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003700if { (eval echo configure:3701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003701 :
3702else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003703 echo "configure: failed program was:" >&5
3704 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003705 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003706 cat >> confdefs.h <<\EOF
3707#define BAD_EXEC_PROTOTYPES 1
3708EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003709 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003710fi
3711rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003712echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003713fi
3714
Guido van Rossumda88dad1995-01-26 00:46:29 +00003715bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003716echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00003717echo "configure:3718: checking for bad static forward" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003718if test "$cross_compiling" = yes; then
3719 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3720else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003721 cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003722#line 3723 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003723#include "confdefs.h"
3724
3725struct s { int a; int b; };
3726static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003727int foobar() {
3728 static int random;
3729 random = (int) &foo;
3730 return random;
3731}
Guido van Rossum7f43da71994-08-01 12:15:30 +00003732static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003733main() {
3734 exit(!((int)&foo == foobar()));
3735}
Guido van Rossum7f43da71994-08-01 12:15:30 +00003736
3737EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003738if { (eval echo configure:3739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00003739then
Guido van Rossum7f43da71994-08-01 12:15:30 +00003740 :
3741else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003742 echo "configure: failed program was:" >&5
3743 cat conftest.$ac_ext >&5
3744 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003745 cat >> confdefs.h <<\EOF
3746#define BAD_STATIC_FORWARD 1
3747EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003748 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00003749fi
3750rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00003751fi
3752
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003753echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003754
Guido van Rossumda88dad1995-01-26 00:46:29 +00003755va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003756echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00003757echo "configure:3758: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003758cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003759#line 3760 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003760#include "confdefs.h"
3761
3762#ifdef HAVE_STDARG_PROTOTYPES
3763#include <stdarg.h>
3764#else
3765#include <varargs.h>
3766#endif
3767
Guido van Rossumf78abae1997-01-21 22:02:36 +00003768int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003769va_list list1, list2; list1 = list2;
3770; return 0; }
3771EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003772if { (eval echo configure:3773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003773 :
3774else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003775 echo "configure: failed program was:" >&5
3776 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003777 rm -rf conftest*
3778 cat >> confdefs.h <<\EOF
3779#define VA_LIST_IS_ARRAY 1
3780EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003781 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003782fi
3783rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003784echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003785
Guido van Rossum627b2d71993-12-24 10:39:16 +00003786# checks for system services
3787# (none yet)
3788
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003789# Linux requires this for correct f.p. operations
Guido van Rossumf78abae1997-01-21 22:02:36 +00003790echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00003791echo "configure:3792: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003792ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003793if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003794 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003795else
3796 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003797LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003798cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003799#line 3800 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003800#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003801/* Override any gcc2 internal prototype to avoid an error. */
3802/* We use char because int might match the return type of a gcc2
3803 builtin and then its argument prototype would still apply. */
3804char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003805
Guido van Rossumf78abae1997-01-21 22:02:36 +00003806int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003807__fpu_control()
3808; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003809EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003810if { (eval echo configure:3811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003811 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003812 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003813else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003814 echo "configure: failed program was:" >&5
3815 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003816 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003817 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003818fi
3819rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003820LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003821
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003822fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003823if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003824 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003825 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3826 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003827 cat >> confdefs.h <<EOF
3828#define $ac_tr_lib 1
3829EOF
3830
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003831 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003832
3833else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003834 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003835fi
3836
3837
Guido van Rossum7f253911997-05-09 02:42:48 +00003838# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00003839echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00003840echo "configure:3841: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00003841# Check whether --with-fpectl or --without-fpectl was given.
3842if test "${with_fpectl+set}" = set; then
3843 withval="$with_fpectl"
3844
3845if test "$withval" != no
3846then cat >> confdefs.h <<\EOF
3847#define WANT_SIGFPE_HANDLER 1
3848EOF
3849 echo "$ac_t""yes" 1>&6
3850else echo "$ac_t""no" 1>&6
3851fi
3852fi
3853
3854
Guido van Rossum7f43da71994-08-01 12:15:30 +00003855# check for --with-libm=...
3856
Guido van Rossum563e7081996-09-10 18:20:48 +00003857case $ac_sys_system in
3858next) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003859BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00003860*) LIBM=-lm
3861esac
Guido van Rossum7f253911997-05-09 02:42:48 +00003862echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00003863echo "configure:3864: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003864# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003865if test "${with_libm+set}" = set; then
3866 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003867
Guido van Rossum7f253911997-05-09 02:42:48 +00003868if test "$withval" = no
3869then LIBM=
3870 echo "$ac_t""force LIBM empty" 1>&6
3871elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00003872then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00003873 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003874else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003875fi
Guido van Rossum7f253911997-05-09 02:42:48 +00003876else
3877 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003878fi
3879
3880
3881# check for --with-libc=...
3882
Guido van Rossum7f253911997-05-09 02:42:48 +00003883echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00003884echo "configure:3885: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003885# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003886if test "${with_libc+set}" = set; then
3887 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003888
Guido van Rossum7f253911997-05-09 02:42:48 +00003889if test "$withval" = no
3890then LIBC=
3891 echo "$ac_t""force LIBC empty" 1>&6
3892elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00003893then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00003894 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003895else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003896fi
Guido van Rossum7f253911997-05-09 02:42:48 +00003897else
3898 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003899fi
3900
3901
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003902# check for hypot() in math library
3903LIBS_SAVE=$LIBS
3904LIBS="$LIBS $LIBM"
3905for ac_func in hypot
3906do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003907echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00003908echo "configure:3909: checking for $ac_func" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003909if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3910 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003911else
3912 cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003913#line 3914 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003914#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003915/* System header to define __stub macros and hopefully few prototypes,
3916 which can conflict with char $ac_func(); below. */
3917#include <assert.h>
3918/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003919/* We use char because int might match the return type of a gcc2
3920 builtin and then its argument prototype would still apply. */
3921char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003922
Guido van Rossumf78abae1997-01-21 22:02:36 +00003923int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003924
3925/* The GNU C library defines this for functions which it implements
3926 to always fail with ENOSYS. Some functions are actually named
3927 something starting with __ and the normal name is an alias. */
3928#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3929choke me
3930#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003931$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003932#endif
3933
3934; return 0; }
3935EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003936if { (eval echo configure:3937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003937 rm -rf conftest*
3938 eval "ac_cv_func_$ac_func=yes"
3939else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003940 echo "configure: failed program was:" >&5
3941 cat conftest.$ac_ext >&5
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003942 rm -rf conftest*
3943 eval "ac_cv_func_$ac_func=no"
3944fi
3945rm -f conftest*
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003946fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003947
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003948if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003949 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003950 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003951 cat >> confdefs.h <<EOF
3952#define $ac_tr_func 1
3953EOF
3954
3955else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003956 echo "$ac_t""no" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003957fi
3958done
3959
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003960for ac_func in hypot
3961do
3962echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00003963echo "configure:3964: checking for $ac_func" >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003964if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3965 echo $ac_n "(cached) $ac_c" 1>&6
3966else
3967 cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003968#line 3969 "configure"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003969#include "confdefs.h"
3970/* System header to define __stub macros and hopefully few prototypes,
3971 which can conflict with char $ac_func(); below. */
3972#include <assert.h>
3973/* Override any gcc2 internal prototype to avoid an error. */
3974/* We use char because int might match the return type of a gcc2
3975 builtin and then its argument prototype would still apply. */
3976char $ac_func();
3977
Guido van Rossumf78abae1997-01-21 22:02:36 +00003978int main() {
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003979
3980/* The GNU C library defines this for functions which it implements
3981 to always fail with ENOSYS. Some functions are actually named
3982 something starting with __ and the normal name is an alias. */
3983#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3984choke me
3985#else
3986$ac_func();
3987#endif
3988
3989; return 0; }
3990EOF
Guido van Rossumea516321998-12-17 18:08:55 +00003991if { (eval echo configure:3992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003992 rm -rf conftest*
3993 eval "ac_cv_func_$ac_func=yes"
3994else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003995 echo "configure: failed program was:" >&5
3996 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003997 rm -rf conftest*
3998 eval "ac_cv_func_$ac_func=no"
3999fi
4000rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004001fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004002
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004003if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4004 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00004005 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4006 cat >> confdefs.h <<EOF
4007#define $ac_tr_func 1
4008EOF
4009
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004010else
4011 echo "$ac_t""no" 1>&6
4012LIBOBJS="$LIBOBJS ${ac_func}.o"
4013fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00004014done
4015
Guido van Rossumf78abae1997-01-21 22:02:36 +00004016
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00004017LIBS=$LIBS_SAVE
4018
Guido van Rossumda88dad1995-01-26 00:46:29 +00004019# check for getopt
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004020echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00004021echo "configure:4022: checking for genuine getopt" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004022if eval "test \"`echo '$''{'ac_cv_func_getopt'+set}'`\" = set"; then
4023 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004024else
4025 if test "$cross_compiling" = yes; then
4026 ac_cv_func_getopt=no
4027else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004028 cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00004029#line 4030 "configure"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004030#include "confdefs.h"
4031#include <stdio.h>
4032extern int optind, opterr, getopt();
4033extern char* optarg;
4034int main() {
4035 char* av[] = { "testprog", "parameter", "-fFlag", NULL };
4036 opterr = 0;
4037 if (getopt(3, av, "f:") == 'f') { exit(1); }
4038 exit(0);
4039}
4040EOF
Guido van Rossumea516321998-12-17 18:08:55 +00004041if { (eval echo configure:4042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00004042then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004043 ac_cv_func_getopt=yes
4044else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004045 echo "configure: failed program was:" >&5
4046 cat conftest.$ac_ext >&5
4047 rm -fr conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00004048 ac_cv_func_getopt=no
4049fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00004050rm -fr conftest*
4051fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004052
4053fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004054echo "$ac_t""$ac_cv_func_getopt" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004055test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o"
4056
Guido van Rossumad713701997-07-10 22:42:38 +00004057# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00004058echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Guido van Rossumea516321998-12-17 18:08:55 +00004059echo "configure:4060: checking what malloc(0) returns" >&5
Guido van Rossumad713701997-07-10 22:42:38 +00004060if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
4061 echo $ac_n "(cached) $ac_c" 1>&6
4062else
4063 if test "$cross_compiling" = yes; then
4064 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4065else
4066 cat > conftest.$ac_ext <<EOF
Guido van Rossumea516321998-12-17 18:08:55 +00004067#line 4068 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00004068#include "confdefs.h"
4069#include <stdio.h>
4070#ifdef HAVE_STDLIB
4071#include <stdlib.h>
4072#else
4073char *malloc(), *realloc();
4074int *free();
4075#endif
4076main() {
4077 char *p;
4078 p = malloc(0);
4079 if (p == NULL) exit(1);
4080 p = realloc(p, 0);
4081 if (p == NULL) exit(1);
4082 free(p);
4083 exit(0);
4084}
4085EOF
Guido van Rossumea516321998-12-17 18:08:55 +00004086if { (eval echo configure:4087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
Guido van Rossumad713701997-07-10 22:42:38 +00004087then
4088 ac_cv_malloc_zero=nonnull
4089else
4090 echo "configure: failed program was:" >&5
4091 cat conftest.$ac_ext >&5
4092 rm -fr conftest*
4093 ac_cv_malloc_zero=null
4094fi
4095rm -fr conftest*
4096fi
4097
4098fi
4099
4100echo "$ac_t""$ac_cv_malloc_zero" 1>&6
4101if test "$ac_cv_malloc_zero" = null
4102then
4103 cat >> confdefs.h <<\EOF
4104#define MALLOC_ZERO_RETURNS_NULL 1
4105EOF
4106
4107fi
4108
Guido van Rossum627b2d71993-12-24 10:39:16 +00004109# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004110trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004111cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004112# This file is a shell script that caches the results of configure
4113# tests run on this system so they can be shared between configure
4114# scripts and configure runs. It is not useful on other systems.
4115# If it contains results you don't want to keep, you may remove or edit it.
4116#
4117# By default, configure uses ./config.cache as the cache file,
4118# creating it if it does not exist already. You can give configure
4119# the --cache-file=FILE option to use a different cache file; that is
4120# what configure does when it calls configure scripts in
4121# subdirectories, so they share the cache.
4122# Giving --cache-file=/dev/null disables caching, for debugging configure.
4123# config.status only pays attention to the cache file if you give it the
4124# --recheck option to rerun configure.
4125#
4126EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00004127# The following way of writing the cache mishandles newlines in values,
4128# but we know of no workaround that is simple, portable, and efficient.
4129# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004130# Ultrix sh set writes to stderr and can't be redirected directly,
4131# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004132(set) 2>&1 |
Guido van Rossumf78abae1997-01-21 22:02:36 +00004133 case `(ac_space=' '; set) 2>&1` in
4134 *ac_space=\ *)
4135 # `set' does not quote correctly, so add quotes (double-quote substitution
4136 # turns \\\\ into \\, and sed turns \\ into \).
4137 sed -n \
4138 -e "s/'/'\\\\''/g" \
4139 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4140 ;;
4141 *)
4142 # `set' quotes correctly as required by POSIX, so do not add quotes.
4143 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4144 ;;
4145 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004146if cmp -s $cache_file confcache; then
4147 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004148else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004149 if test -w $cache_file; then
4150 echo "updating cache $cache_file"
4151 cat confcache > $cache_file
4152 else
4153 echo "not updating unwritable cache $cache_file"
4154 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004155fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004156rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00004157
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004158trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004159
4160test "x$prefix" = xNONE && prefix=$ac_default_prefix
4161# Let make expand exec_prefix.
4162test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00004163
Guido van Rossum7f43da71994-08-01 12:15:30 +00004164# Any assignment to VPATH causes Sun make to only execute
4165# the first set of double-colon rules, so remove it if not needed.
4166# If there is a colon in the path, we need to keep it.
4167if test "x$srcdir" = x.; then
4168 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
4169fi
4170
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004171trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00004172
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004173DEFS=-DHAVE_CONFIG_H
4174
4175# Without the "./", some shells look in PATH for config.status.
4176: ${CONFIG_STATUS=./config.status}
4177
4178echo creating $CONFIG_STATUS
4179rm -f $CONFIG_STATUS
4180cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004181#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00004182# Generated automatically by configure.
4183# Run this file to recreate the current configuration.
4184# This directory was configured as follows,
4185# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4186#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004187# $0 $ac_configure_args
4188#
4189# Compiler output produced by configure, useful for debugging
4190# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00004191
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004192ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004193for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00004194do
Guido van Rossum7f43da71994-08-01 12:15:30 +00004195 case "\$ac_option" in
4196 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004197 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4198 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00004199 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossumf78abae1997-01-21 22:02:36 +00004200 echo "$CONFIG_STATUS generated by autoconf version 2.12"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004201 exit 0 ;;
4202 -help | --help | --hel | --he | --h)
4203 echo "\$ac_cs_usage"; exit 0 ;;
4204 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00004205 esac
4206done
4207
Guido van Rossum7f43da71994-08-01 12:15:30 +00004208ac_given_srcdir=$srcdir
Guido van Rossum627b2d71993-12-24 10:39:16 +00004209
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004210trap 'rm -fr `echo "Makefile \
4211 Objects/Makefile \
4212 Parser/Makefile \
4213 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00004214 Modules/Makefile.pre \
4215 Modules/Setup.thread config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004216EOF
4217cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004218
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004219# Protect against being on the right side of a sed subst in config.status.
4220sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4221 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004222$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00004223$extrasub
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004224s%@CFLAGS@%$CFLAGS%g
4225s%@CPPFLAGS@%$CPPFLAGS%g
4226s%@CXXFLAGS@%$CXXFLAGS%g
4227s%@DEFS@%$DEFS%g
4228s%@LDFLAGS@%$LDFLAGS%g
4229s%@LIBS@%$LIBS%g
4230s%@exec_prefix@%$exec_prefix%g
4231s%@prefix@%$prefix%g
4232s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004233s%@bindir@%$bindir%g
4234s%@sbindir@%$sbindir%g
4235s%@libexecdir@%$libexecdir%g
4236s%@datadir@%$datadir%g
4237s%@sysconfdir@%$sysconfdir%g
4238s%@sharedstatedir@%$sharedstatedir%g
4239s%@localstatedir@%$localstatedir%g
4240s%@libdir@%$libdir%g
4241s%@includedir@%$includedir%g
4242s%@oldincludedir@%$oldincludedir%g
4243s%@infodir@%$infodir%g
4244s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00004245s%@VERSION@%$VERSION%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004246s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00004247s%@SGI_ABI@%$SGI_ABI%g
4248s%@SET_CCC@%$SET_CCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00004249s%@CC@%$CC%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00004250s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00004251s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00004252s%@AR@%$AR%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004253s%@INSTALL@%$INSTALL%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00004254s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4255s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossum3c4bb801997-12-18 23:55:32 +00004256s%@REALLIBRARY@%$REALLIBRARY%g
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004257s%@LN@%$LN%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004258s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00004259s%@CPP@%$CPP%g
Guido van Rossum3c4bb801997-12-18 23:55:32 +00004260s%@DGUX_IS_BROKEN@%$DGUX_IS_BROKEN%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00004261s%@SO@%$SO%g
4262s%@LDSHARED@%$LDSHARED%g
4263s%@CCSHARED@%$CCSHARED%g
4264s%@LINKFORSHARED@%$LINKFORSHARED%g
Guido van Rossum009f7871997-12-04 00:51:42 +00004265s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00004266s%@LDLAST@%$LDLAST%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00004267s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00004268s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00004269s%@LIBM@%$LIBM%g
4270s%@LIBC@%$LIBC%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004271
4272CEOF
4273EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00004274
4275cat >> $CONFIG_STATUS <<\EOF
4276
4277# Split the substitutions into bite-sized pieces for seds with
4278# small command number limits, like on Digital OSF/1 and HP-UX.
4279ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4280ac_file=1 # Number of current file.
4281ac_beg=1 # First line for current file.
4282ac_end=$ac_max_sed_cmds # Line after last line for current file.
4283ac_more_lines=:
4284ac_sed_cmds=""
4285while $ac_more_lines; do
4286 if test $ac_beg -gt 1; then
4287 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4288 else
4289 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4290 fi
4291 if test ! -s conftest.s$ac_file; then
4292 ac_more_lines=false
4293 rm -f conftest.s$ac_file
4294 else
4295 if test -z "$ac_sed_cmds"; then
4296 ac_sed_cmds="sed -f conftest.s$ac_file"
4297 else
4298 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4299 fi
4300 ac_file=`expr $ac_file + 1`
4301 ac_beg=$ac_end
4302 ac_end=`expr $ac_end + $ac_max_sed_cmds`
4303 fi
4304done
4305if test -z "$ac_sed_cmds"; then
4306 ac_sed_cmds=cat
4307fi
4308EOF
4309
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004310cat >> $CONFIG_STATUS <<EOF
4311
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004312CONFIG_FILES=\${CONFIG_FILES-"Makefile \
4313 Objects/Makefile \
4314 Parser/Makefile \
4315 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00004316 Modules/Makefile.pre \
4317 Modules/Setup.thread"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004318EOF
4319cat >> $CONFIG_STATUS <<\EOF
4320for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004321 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004322 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00004323 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004324 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4325 *) ac_file_in="${ac_file}.in" ;;
4326 esac
4327
Guido van Rossumf78abae1997-01-21 22:02:36 +00004328 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004329
4330 # Remove last slash and all that follows it. Not all systems have dirname.
4331 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4332 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4333 # The file is in a subdirectory.
4334 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004335 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004336 # A "../" for each directory in $ac_dir_suffix.
4337 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4338 else
4339 ac_dir_suffix= ac_dots=
4340 fi
4341
4342 case "$ac_given_srcdir" in
4343 .) srcdir=.
4344 if test -z "$ac_dots"; then top_srcdir=.
4345 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4346 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4347 *) # Relative path.
4348 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4349 top_srcdir="$ac_dots$ac_given_srcdir" ;;
4350 esac
4351
Guido van Rossumf78abae1997-01-21 22:02:36 +00004352
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004353 echo creating "$ac_file"
4354 rm -f "$ac_file"
4355 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4356 case "$ac_file" in
4357 *Makefile*) ac_comsub="1i\\
4358# $configure_input" ;;
4359 *) ac_comsub= ;;
4360 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00004361
4362 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 +00004363 sed -e "$ac_comsub
4364s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00004365s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00004366s%@top_srcdir@%$top_srcdir%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00004367" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00004368fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00004369rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00004370
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004371# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4372# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00004373#
4374# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004375ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
4376ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00004377ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004378ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00004379# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004380ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4381ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00004382ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004383ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00004384# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004385ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4386ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00004387ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004388ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00004389
Guido van Rossumf78abae1997-01-21 22:02:36 +00004390if test "${CONFIG_HEADERS+set}" != set; then
4391EOF
4392cat >> $CONFIG_STATUS <<EOF
4393 CONFIG_HEADERS="config.h"
4394EOF
4395cat >> $CONFIG_STATUS <<\EOF
4396fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004397for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004398 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004399 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00004400 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004401 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4402 *) ac_file_in="${ac_file}.in" ;;
4403 esac
4404
Guido van Rossum7f43da71994-08-01 12:15:30 +00004405 echo creating $ac_file
4406
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004407 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00004408 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4409 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004410
4411EOF
4412
4413# Transform confdefs.h into a sed script conftest.vals that substitutes
4414# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004415# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004416# Protect against being in an unquoted here document in config.status.
4417rm -f conftest.vals
4418cat > conftest.hdr <<\EOF
4419s/[\\&%]/\\&/g
4420s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004421s%#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 +00004422s%ac_d%ac_u%gp
4423s%ac_u%ac_e%gp
4424EOF
4425sed -n -f conftest.hdr confdefs.h > conftest.vals
4426rm -f conftest.hdr
4427
4428# This sed command replaces #undef with comments. This is necessary, for
4429# example, in the case of _POSIX_SOURCE, which is predefined and required
4430# on some systems where configure will not decide to define it.
4431cat >> conftest.vals <<\EOF
4432s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4433EOF
4434
4435# Break up conftest.vals because some shells have a limit on
4436# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004437
4438rm -f conftest.tail
4439while :
4440do
4441 ac_lines=`grep -c . conftest.vals`
4442 # grep -c gives empty output for an empty file on some AIX systems.
4443 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4444 # Write a limited-size here document to conftest.frag.
4445 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4446 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4447 echo 'CEOF
4448 sed -f conftest.frag conftest.in > conftest.out
4449 rm -f conftest.in
4450 mv conftest.out conftest.in
4451' >> $CONFIG_STATUS
4452 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4453 rm -f conftest.vals
4454 mv conftest.tail conftest.vals
4455done
4456rm -f conftest.vals
4457
4458cat >> $CONFIG_STATUS <<\EOF
4459 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00004460 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004461 cat conftest.in >> conftest.h
4462 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00004463 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004464 echo "$ac_file is unchanged"
4465 rm -f conftest.h
4466 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004467 # Remove last slash and all that follows it. Not all systems have dirname.
4468 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4469 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4470 # The file is in a subdirectory.
4471 test ! -d "$ac_dir" && mkdir "$ac_dir"
4472 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004473 rm -f $ac_file
4474 mv conftest.h $ac_file
4475 fi
4476fi; done
4477
Guido van Rossumf78abae1997-01-21 22:02:36 +00004478EOF
4479cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004480
Guido van Rossumf78abae1997-01-21 22:02:36 +00004481EOF
4482cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004483
4484exit 0
4485EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004486chmod +x $CONFIG_STATUS
4487rm -fr confdefs* $ac_clean_files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004488test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00004489