blob: e201cfb109c1b05fa10e3b40deb6fad7d350e82b [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 Rossumec95c7b1998-08-04 17:59:56 +00003# From configure.in Revision: 1.89
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}";;
638 *) SET_CCC=""
639 esac
640else
641 SET_CCC="CCC= ${CCC}"
642fi
643echo "$ac_t""$SET_CCC" 1>&6
644
645
Guido van Rossum627b2d71993-12-24 10:39:16 +0000646# checks for alternative programs
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000647echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
Guido van Rossum91922671997-10-09 20:24:13 +0000648echo "configure:649: checking for --without-gcc" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000649# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000650if test "${with_gcc+set}" = set; then
651 withval="$with_gcc"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000652
653 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000654 no) CC=cc
655 without_gcc=yes;;
656 yes) CC=gcc
657 without_gcc=no;;
658 *) CC=$withval
659 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000660 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000661else
Guido van Rossume77438c1995-09-13 18:59:59 +0000662
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000663 case $ac_sys_system in
Guido van Rossume77438c1995-09-13 18:59:59 +0000664 OSF1) CC=cc
665 without_gcc=;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +0000666 BeOS*) CC=cc
667 without_gcc=;;
Guido van Rossume77438c1995-09-13 18:59:59 +0000668 *) without_gcc=no;;
669 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000670fi
671
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000672echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000673
Guido van Rossum8b131c51995-03-09 14:10:13 +0000674# If the user switches compilers, we can't believe the cache
675if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
676then
677 { echo "configure: error: cached CC is different -- throw away $cache_file
678(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
679fi
680
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000681# Extract the first word of "gcc", so it can be a program name with args.
682set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000683echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +0000684echo "configure:685: checking for $ac_word" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000685if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
686 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000687else
688 if test -n "$CC"; then
689 ac_cv_prog_CC="$CC" # Let the user override the test.
690else
Guido van Rossum7f43da71994-08-01 12:15:30 +0000691 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
692 for ac_dir in $PATH; do
693 test -z "$ac_dir" && ac_dir=.
694 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000695 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000696 break
697 fi
698 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000699 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000700fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000701fi
702CC="$ac_cv_prog_CC"
703if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000704 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000705else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000706 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000707fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000708
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000709if test -z "$CC"; then
710 # Extract the first word of "cc", so it can be a program name with args.
711set dummy cc; ac_word=$2
712echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +0000713echo "configure:714: checking for $ac_word" >&5
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000714if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
715 echo $ac_n "(cached) $ac_c" 1>&6
716else
717 if test -n "$CC"; then
718 ac_cv_prog_CC="$CC" # Let the user override the test.
719else
720 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
721 ac_prog_rejected=no
722 for ac_dir in $PATH; do
723 test -z "$ac_dir" && ac_dir=.
724 if test -f $ac_dir/$ac_word; then
725 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
726 ac_prog_rejected=yes
727 continue
728 fi
729 ac_cv_prog_CC="cc"
730 break
731 fi
732 done
733 IFS="$ac_save_ifs"
734if test $ac_prog_rejected = yes; then
735 # We found a bogon in the path, so make sure we never use it.
736 set dummy $ac_cv_prog_CC
737 shift
738 if test $# -gt 0; then
739 # We chose a different compiler from the bogus one.
740 # However, it has the same basename, so the bogon will be chosen
741 # first if we set CC to just the basename; use the full file name.
742 shift
743 set dummy "$ac_dir/$ac_word" "$@"
744 shift
745 ac_cv_prog_CC="$@"
746 fi
747fi
748fi
749fi
750CC="$ac_cv_prog_CC"
751if test -n "$CC"; then
752 echo "$ac_t""$CC" 1>&6
753else
754 echo "$ac_t""no" 1>&6
755fi
756
757 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
758fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000759
Guido van Rossumf78abae1997-01-21 22:02:36 +0000760echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +0000761echo "configure:762: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000762
763ac_ext=c
764# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
765ac_cpp='$CPP $CPPFLAGS'
766ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
767ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
768cross_compiling=$ac_cv_prog_cc_cross
769
770cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +0000771#line 772 "configure"
Guido van Rossumf78abae1997-01-21 22:02:36 +0000772#include "confdefs.h"
773main(){return(0);}
774EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +0000775if { (eval echo configure:776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000776 ac_cv_prog_cc_works=yes
777 # If we can't run a trivial program, we are probably using a cross compiler.
778 if (./conftest; exit) 2>/dev/null; then
779 ac_cv_prog_cc_cross=no
780 else
781 ac_cv_prog_cc_cross=yes
782 fi
783else
784 echo "configure: failed program was:" >&5
785 cat conftest.$ac_ext >&5
786 ac_cv_prog_cc_works=no
787fi
788rm -fr conftest*
789
790echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
791if test $ac_cv_prog_cc_works = no; then
792 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
793fi
794echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +0000795echo "configure:796: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000796echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
797cross_compiling=$ac_cv_prog_cc_cross
798
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000799echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +0000800echo "configure:801: checking whether we are using GNU C" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000801if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
802 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000803else
804 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000805#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000806 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +0000807#endif
808EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +0000809if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:810: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000810 ac_cv_prog_gcc=yes
811else
812 ac_cv_prog_gcc=no
813fi
814fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000815
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000816echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +0000817
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000818if test $ac_cv_prog_gcc = yes; then
819 GCC=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +0000820 ac_test_CFLAGS="${CFLAGS+set}"
821 ac_save_CFLAGS="$CFLAGS"
822 CFLAGS=
823 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +0000824echo "configure:825: checking whether ${CC-cc} accepts -g" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000825if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000826 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000827else
828 echo 'void f(){}' > conftest.c
829if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000830 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000831else
Guido van Rossumf78abae1997-01-21 22:02:36 +0000832 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000833fi
834rm -f conftest*
835
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000836fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000837
Guido van Rossumf78abae1997-01-21 22:02:36 +0000838echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
839 if test "$ac_test_CFLAGS" = set; then
840 CFLAGS="$ac_save_CFLAGS"
841 elif test $ac_cv_prog_cc_g = yes; then
842 CFLAGS="-g -O2"
843 else
844 CFLAGS="-O2"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000845 fi
846else
847 GCC=
848 test "${CFLAGS+set}" = set || CFLAGS="-g"
849fi
850
Guido van Rossum76c5fe21997-08-14 19:45:07 +0000851
Guido van Rossum24b1e751997-08-21 02:29:16 +0000852case $ac_sys_system in
853hp*|HP*)
854 case $CC in
855 cc|*/cc) CC="$CC -Aa -D_HPUX_SOURCE";;
856 esac;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +0000857BeOS*)
858 case $CC in
859 cc) CC=cc;;
860 esac;;
Guido van Rossum24b1e751997-08-21 02:29:16 +0000861esac
862
Guido van Rossum76c5fe21997-08-14 19:45:07 +0000863# LINKCC is the command that links the python executable -- default is $(CC).
Guido van Rossumec95c7b1998-08-04 17:59:56 +0000864# This is altered for AIX and BeOS in order to build the export list before
865# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +0000866
867echo $ac_n "checking LINKCC""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +0000868echo "configure:869: checking LINKCC" >&5
Guido van Rossum76c5fe21997-08-14 19:45:07 +0000869if test -z "$LINKCC"
870then
871 case $ac_sys_system in
872 AIX*)
Guido van Rossum45140f91997-08-29 18:44:06 +0000873 LINKCC="\$(srcdir)/makexp_aix python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +0000874 BeOS*)
875 LINKCC="\$(srcdir)/../BeOS/linkcc \$(LIBRARY) \$(PURIFY) \$(CC) -nodup \$(OPT)"
876 REALLIBRARY='libpython$(VERSION).so';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +0000877 dgux*)
878 LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";;
Guido van Rossum25f93031997-08-18 16:00:04 +0000879 *) LINKCC="\$(PURIFY) \$(CC)";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +0000880 esac
881fi
882echo "$ac_t""$LINKCC" 1>&6
883
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000884# Extract the first word of "ranlib", so it can be a program name with args.
885set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000886echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +0000887echo "configure:888: checking for $ac_word" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000888if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
889 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000890else
891 if test -n "$RANLIB"; then
892 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
893else
Guido van Rossum7f43da71994-08-01 12:15:30 +0000894 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
895 for ac_dir in $PATH; do
896 test -z "$ac_dir" && ac_dir=.
897 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000898 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000899 break
900 fi
901 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000903 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000904fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000905fi
906RANLIB="$ac_cv_prog_RANLIB"
907if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000908 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000909else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000910 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000911fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000912
913
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914for ac_prog in ar aal
915do
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000916# Extract the first word of "$ac_prog", so it can be a program name with args.
917set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000918echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +0000919echo "configure:920: checking for $ac_word" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000920if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
921 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000922else
923 if test -n "$AR"; then
924 ac_cv_prog_AR="$AR" # Let the user override the test.
925else
Guido van Rossum7f43da71994-08-01 12:15:30 +0000926 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
927 for ac_dir in $PATH; do
928 test -z "$ac_dir" && ac_dir=.
929 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000930 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000931 break
932 fi
933 done
934 IFS="$ac_save_ifs"
935fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000936fi
937AR="$ac_cv_prog_AR"
938if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000939 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000940else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000941 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000942fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000943
944test -n "$AR" && break
945done
946test -n "$AR" || AR="ar"
947
948
Guido van Rossumda88dad1995-01-26 00:46:29 +0000949
950
Guido van Rossum3c4bb801997-12-18 23:55:32 +0000951
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000952# Install just never works :-(
953if test -z "$INSTALL"
Guido van Rossumda88dad1995-01-26 00:46:29 +0000954then
955 INSTALL=cp
956 INSTALL_PROGRAM=cp
957 INSTALL_DATA=cp
958else
959 INSTALL_PROGRAM="$INSTALL"
960 INSTALL_DATA="$INSTALL -m 644"
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000961fi
962
Guido van Rossumec95c7b1998-08-04 17:59:56 +0000963# Not every filesystem supports hard links
964
965if test -z "$LN" ; then
966 case $ac_sys_system in
967 BeOS*) LN="ln -s";;
968 *) LN=ln;;
969 esac
970fi
971
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000972# Optimizer/debugger flags passed between Makefiles
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000973
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000974if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000975then
Guido van Rossumedca74a1997-07-18 23:29:40 +0000976 case $GCC in
977 yes)
978 case $ac_cv_prog_cc_g in
979 yes) OPT="-g -O2";;
980 *) OPT="-O2";;
981 esac
982 ;;
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000983 *) OPT="-O";;
984 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000985fi
986
Guido van Rossum563e7081996-09-10 18:20:48 +0000987if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +0000988then
989 OPT="$OPT $ac_arch_flags"
990fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000991# checks for UNIX variants that set C preprocessor variables
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000992echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +0000993echo "configure:994: checking how to run the C preprocessor" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000994# On Suns, sometimes $CPP names a directory.
995if test -n "$CPP" && test -d "$CPP"; then
996 CPP=
997fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000998if test -z "$CPP"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000999if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1000 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001001else
1002 # This must be in double quotes, not single quotes, because CPP may get
1003 # substituted into the Makefile and "${CC-cc}" will confuse make.
Guido van Rossum627b2d71993-12-24 10:39:16 +00001004 CPP="${CC-cc} -E"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001005 # On the NeXT, cc -E runs the code through the compiler's parser,
1006 # not just through cpp.
1007 cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001008#line 1009 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001009#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001010#include <assert.h>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001011Syntax Error
1012EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001013ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001014{ (eval echo configure:1015: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001015ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016if test -z "$ac_err"; then
1017 :
1018else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001019 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001020 echo "configure: failed program was:" >&5
1021 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022 rm -rf conftest*
1023 CPP="${CC-cc} -E -traditional-cpp"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001024 cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001025#line 1026 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001027#include <assert.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028Syntax Error
1029EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001030ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001031{ (eval echo configure:1032: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001032ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001033if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001034 :
1035else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001036 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001037 echo "configure: failed program was:" >&5
1038 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001039 rm -rf conftest*
1040 CPP=/lib/cpp
1041fi
1042rm -f conftest*
1043fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001044rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001045 ac_cv_prog_CPP="$CPP"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001046fi
Guido van Rossume77438c1995-09-13 18:59:59 +00001047 CPP="$ac_cv_prog_CPP"
1048else
1049 ac_cv_prog_CPP="$CPP"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001050fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001051echo "$ac_t""$CPP" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001052
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001053echo $ac_n "checking for AIX""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001054echo "configure:1055: checking for AIX" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001055cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001056#line 1057 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001057#include "confdefs.h"
1058#ifdef _AIX
1059 yes
1060#endif
1061
1062EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001063if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1064 egrep "yes" >/dev/null 2>&1; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001065 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001066 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001067#define _ALL_SOURCE 1
1068EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001069
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001070else
1071 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001072 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001073fi
1074rm -f conftest*
1075
1076
Guido van Rossumf78abae1997-01-21 22:02:36 +00001077ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001078echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001079echo "configure:1080: checking for minix/config.h" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001080if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1081 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001082else
1083 cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001084#line 1085 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001085#include "confdefs.h"
1086#include <minix/config.h>
1087EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001088ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001089{ (eval echo configure:1090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001090ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001092 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001093 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001094else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001095 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001096 echo "configure: failed program was:" >&5
1097 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001098 rm -rf conftest*
1099 eval "ac_cv_header_$ac_safe=no"
1100fi
1101rm -f conftest*
1102fi
1103if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001104 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001105 MINIX=yes
1106else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001107 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001108MINIX=
Guido van Rossum627b2d71993-12-24 10:39:16 +00001109fi
1110
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001111if test "$MINIX" = yes; then
1112 cat >> confdefs.h <<\EOF
1113#define _POSIX_SOURCE 1
1114EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001115
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001116 cat >> confdefs.h <<\EOF
1117#define _POSIX_1_SOURCE 2
1118EOF
1119
1120 cat >> confdefs.h <<\EOF
1121#define _MINIX 1
1122EOF
1123
1124fi
1125
Guido van Rossumda88dad1995-01-26 00:46:29 +00001126
Guido van Rossum91922671997-10-09 20:24:13 +00001127echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001128echo "configure:1129: checking whether $CC accepts -OPT:Olimit=0" >&5
Guido van Rossum91922671997-10-09 20:24:13 +00001129if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then
1130 echo $ac_n "(cached) $ac_c" 1>&6
1131else
1132 ac_save_cc="$CC"
1133CC="$CC -OPT:Olimit=0"
1134if test "$cross_compiling" = yes; then
1135 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1136else
1137 cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001138#line 1139 "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00001139#include "confdefs.h"
1140int main() { return 0; }
1141EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001142if { (eval echo configure:1143: \"$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 +00001143then
1144 ac_cv_opt_olimit_ok=yes
1145else
1146 echo "configure: failed program was:" >&5
1147 cat conftest.$ac_ext >&5
1148 rm -fr conftest*
1149 ac_cv_opt_olimit_ok=no
1150fi
1151rm -fr conftest*
1152fi
1153
1154CC="$ac_save_cc"
1155fi
1156
1157echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00001158if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum304dd2d1997-10-20 23:10:56 +00001159 OPT="$OPT -OPT:Olimit=0"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001160else
1161 echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001162echo "configure:1163: checking whether $CC accepts -Olimit 1500" >&5
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001163 if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
1164 echo $ac_n "(cached) $ac_c" 1>&6
1165else
1166 ac_save_cc="$CC"
1167 CC="$CC -Olimit 1500"
1168 if test "$cross_compiling" = yes; then
1169 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1170else
1171 cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001172#line 1173 "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001173#include "confdefs.h"
1174int main() { return 0; }
1175EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001176if { (eval echo configure:1177: \"$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 +00001177then
1178 ac_cv_olimit_ok=yes
1179else
1180 echo "configure: failed program was:" >&5
1181 cat conftest.$ac_ext >&5
1182 rm -fr conftest*
1183 ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00001184fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001185rm -fr conftest*
1186fi
1187
1188 CC="$ac_save_cc"
1189fi
1190
1191 echo "$ac_t""$ac_cv_olimit_ok" 1>&6
1192 if test $ac_cv_olimit_ok = yes; then
1193 OPT="$OPT -Olimit 1500"
1194 fi
1195fi
1196
1197
1198if test "$MACHDEP" != "dguxR4"
1199then
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001200 REALLIBRARY='libpython$(VERSION).a'
Guido van Rossum35742851998-02-19 21:32:40 +00001201 DGUX_IS_BROKEN="true"
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001202else
1203 REALLIBRARY='libpython$(VERSION).so'
1204 OPT="$OPT -pic"
Guido van Rossum35742851998-02-19 21:32:40 +00001205 DGUX_IS_BROKEN="make $REALLIBRARY"
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001206fi
Guido van Rossum201afe51997-05-14 21:14:44 +00001207
Guido van Rossum84e7b241996-08-19 21:59:00 +00001208# check for ANSI or K&R ("traditional") preprocessor
1209echo $ac_n "checking for C preprocessor type""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001210echo "configure:1211: checking for C preprocessor type" >&5
Guido van Rossum84e7b241996-08-19 21:59:00 +00001211cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001212#line 1213 "configure"
Guido van Rossum84e7b241996-08-19 21:59:00 +00001213#include "confdefs.h"
1214
1215#define spam(name, doc) {#name, &name, #name "() -- " doc}
1216int foo;
1217struct {char *name; int *addr; char *doc;} desc = spam(foo, "something");
1218
Guido van Rossumf78abae1997-01-21 22:02:36 +00001219int main() {
Guido van Rossum84e7b241996-08-19 21:59:00 +00001220;
1221; return 0; }
1222EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001223if { (eval echo configure:1224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum84e7b241996-08-19 21:59:00 +00001224 rm -rf conftest*
1225 cpp_type=ansi
1226else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001227 echo "configure: failed program was:" >&5
1228 cat conftest.$ac_ext >&5
Guido van Rossum84e7b241996-08-19 21:59:00 +00001229 rm -rf conftest*
1230 cat >> confdefs.h <<\EOF
1231#define HAVE_OLD_CPP 1
1232EOF
1233 cpp_type=traditional
1234fi
1235rm -f conftest*
Guido van Rossum84e7b241996-08-19 21:59:00 +00001236echo "$ac_t""$cpp_type" 1>&6
1237
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001238# checks for header files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001239echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001240echo "configure:1241: checking for ANSI C header files" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001241if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1242 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001243else
1244 cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001245#line 1246 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001246#include "confdefs.h"
1247#include <stdlib.h>
1248#include <stdarg.h>
1249#include <string.h>
1250#include <float.h>
1251EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001252ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001253{ (eval echo configure:1254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001254ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001255if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001256 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001257 ac_cv_header_stdc=yes
1258else
1259 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001260 echo "configure: failed program was:" >&5
1261 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001262 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001263 ac_cv_header_stdc=no
1264fi
1265rm -f conftest*
1266
1267if test $ac_cv_header_stdc = yes; then
1268 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1269cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001270#line 1271 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001271#include "confdefs.h"
1272#include <string.h>
1273EOF
1274if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1275 egrep "memchr" >/dev/null 2>&1; then
1276 :
1277else
1278 rm -rf conftest*
1279 ac_cv_header_stdc=no
1280fi
1281rm -f conftest*
1282
1283fi
1284
1285if test $ac_cv_header_stdc = yes; then
1286 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1287cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001288#line 1289 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001289#include "confdefs.h"
1290#include <stdlib.h>
1291EOF
1292if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1293 egrep "free" >/dev/null 2>&1; then
1294 :
1295else
1296 rm -rf conftest*
1297 ac_cv_header_stdc=no
1298fi
1299rm -f conftest*
1300
1301fi
1302
1303if test $ac_cv_header_stdc = yes; then
1304 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1305if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001306 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001307else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001308 cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001309#line 1310 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001310#include "confdefs.h"
1311#include <ctype.h>
1312#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1313#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001314#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00001315int main () { int i; for (i = 0; i < 256; i++)
1316if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1317exit (0); }
1318
1319EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001320if { (eval echo configure:1321: \"$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 +00001321then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001322 :
1323else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001324 echo "configure: failed program was:" >&5
1325 cat conftest.$ac_ext >&5
1326 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001327 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001328fi
1329rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001330fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001331
1332fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001333fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001334
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001335echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001336if test $ac_cv_header_stdc = yes; then
1337 cat >> confdefs.h <<\EOF
1338#define STDC_HEADERS 1
1339EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001340
1341fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001342
Guido van Rossum96013151997-10-08 22:47:52 +00001343for ac_hdr in dlfcn.h fcntl.h limits.h locale.h ncurses.h pthread.h \
Guido van Rossum2d38f911996-06-26 19:47:01 +00001344signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h \
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001345sys/audioio.h sys/file.h sys/lock.h \
1346sys/param.h sys/select.h sys/time.h sys/times.h \
Guido van Rossum2d38f911996-06-26 19:47:01 +00001347sys/un.h sys/utsname.h sys/wait.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001348do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001349ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001350echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001351echo "configure:1352: checking for $ac_hdr" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001352if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1353 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001354else
1355 cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001356#line 1357 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001357#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001358#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001359EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001360ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001361{ (eval echo configure:1362: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001362ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001363if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001364 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001365 eval "ac_cv_header_$ac_safe=yes"
1366else
1367 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001368 echo "configure: failed program was:" >&5
1369 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001370 rm -rf conftest*
1371 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001372fi
1373rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001374fi
1375if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001376 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001377 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001378 cat >> confdefs.h <<EOF
1379#define $ac_tr_hdr 1
1380EOF
1381
1382else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001383 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001384fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001385done
1386
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001387ac_header_dirent=no
1388for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1389do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001390ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001391echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001392echo "configure:1393: checking for $ac_hdr that defines DIR" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001393if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1394 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001395else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001396 cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001397#line 1398 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001398#include "confdefs.h"
1399#include <sys/types.h>
1400#include <$ac_hdr>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001401int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001402DIR *dirp = 0;
1403; return 0; }
1404EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001405if { (eval echo configure:1406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001406 rm -rf conftest*
1407 eval "ac_cv_header_dirent_$ac_safe=yes"
1408else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001409 echo "configure: failed program was:" >&5
1410 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001411 rm -rf conftest*
1412 eval "ac_cv_header_dirent_$ac_safe=no"
1413fi
1414rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001415fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001416if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001417 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001418 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001419 cat >> confdefs.h <<EOF
1420#define $ac_tr_hdr 1
1421EOF
1422 ac_header_dirent=$ac_hdr; break
1423else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001424 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001425fi
1426done
1427# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1428if test $ac_header_dirent = dirent.h; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001429echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001430echo "configure:1431: checking for opendir in -ldir" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001431ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001432if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001433 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001434else
1435 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001436LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001437cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001438#line 1439 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001439#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001440/* Override any gcc2 internal prototype to avoid an error. */
1441/* We use char because int might match the return type of a gcc2
1442 builtin and then its argument prototype would still apply. */
1443char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001444
Guido van Rossumf78abae1997-01-21 22:02:36 +00001445int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001446opendir()
1447; return 0; }
1448EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001449if { (eval echo configure:1450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001450 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001451 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001452else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001453 echo "configure: failed program was:" >&5
1454 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001455 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001456 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001457fi
1458rm -f conftest*
1459LIBS="$ac_save_LIBS"
1460
1461fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001462if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001463 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001464 LIBS="$LIBS -ldir"
1465else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001466 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001467fi
1468
1469else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001470echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001471echo "configure:1472: checking for opendir in -lx" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001472ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001473if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001474 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001475else
1476 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001477LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001478cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001479#line 1480 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001480#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001481/* Override any gcc2 internal prototype to avoid an error. */
1482/* We use char because int might match the return type of a gcc2
1483 builtin and then its argument prototype would still apply. */
1484char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001485
Guido van Rossumf78abae1997-01-21 22:02:36 +00001486int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001487opendir()
1488; return 0; }
1489EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001490if { (eval echo configure:1491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001491 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001492 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001493else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001494 echo "configure: failed program was:" >&5
1495 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001496 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001497 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001498fi
1499rm -f conftest*
1500LIBS="$ac_save_LIBS"
1501
1502fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001503if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001504 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001505 LIBS="$LIBS -lx"
1506else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001507 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001508fi
1509
1510fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001511
1512
1513# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00001514was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001515echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001516echo "configure:1517: checking for clock_t in time.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001517cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001518#line 1519 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001519#include "confdefs.h"
1520#include <time.h>
1521EOF
1522if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1523 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00001524 rm -rf conftest*
1525 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001526else
1527 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001528 cat >> confdefs.h <<\EOF
1529#define clock_t long
1530EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001531
1532fi
1533rm -f conftest*
1534
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001535echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00001536
Guido van Rossum84e7b241996-08-19 21:59:00 +00001537# Add some code to confdefs.h so that the test for off_t works on SCO
1538cat >> confdefs.h <<\EOF
1539#if defined(SCO_DS)
1540#undef _OFF_T
1541#endif
1542EOF
1543
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001544echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001545echo "configure:1546: checking for mode_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001546if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1547 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001548else
1549 cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001550#line 1551 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001551#include "confdefs.h"
1552#include <sys/types.h>
1553#if STDC_HEADERS
1554#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001555#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001556#endif
1557EOF
1558if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossumf78abae1997-01-21 22:02:36 +00001559 egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001560 rm -rf conftest*
1561 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001562else
1563 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001564 ac_cv_type_mode_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001565fi
1566rm -f conftest*
1567
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001568fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001569echo "$ac_t""$ac_cv_type_mode_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001570if test $ac_cv_type_mode_t = no; then
1571 cat >> confdefs.h <<\EOF
1572#define mode_t int
1573EOF
1574
1575fi
1576
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001577echo $ac_n "checking for off_t""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001578echo "configure:1579: checking for off_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001579if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1580 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001581else
1582 cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001583#line 1584 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001584#include "confdefs.h"
1585#include <sys/types.h>
1586#if STDC_HEADERS
1587#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001588#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001589#endif
1590EOF
1591if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossumf78abae1997-01-21 22:02:36 +00001592 egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001593 rm -rf conftest*
1594 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001595else
1596 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001597 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001598fi
1599rm -f conftest*
1600
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001601fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001602echo "$ac_t""$ac_cv_type_off_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001603if test $ac_cv_type_off_t = no; then
1604 cat >> confdefs.h <<\EOF
1605#define off_t long
1606EOF
1607
1608fi
1609
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001610echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001611echo "configure:1612: checking for pid_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001612if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1613 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001614else
1615 cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001616#line 1617 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001617#include "confdefs.h"
1618#include <sys/types.h>
1619#if STDC_HEADERS
1620#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001621#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001622#endif
1623EOF
1624if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossumf78abae1997-01-21 22:02:36 +00001625 egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001626 rm -rf conftest*
1627 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001628else
1629 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001630 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001631fi
1632rm -f conftest*
1633
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001634fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001635echo "$ac_t""$ac_cv_type_pid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001636if test $ac_cv_type_pid_t = no; then
1637 cat >> confdefs.h <<\EOF
1638#define pid_t int
1639EOF
1640
1641fi
1642
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001643echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001644echo "configure:1645: checking return type of signal handlers" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001645if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1646 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001647else
1648 cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001649#line 1650 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001650#include "confdefs.h"
1651#include <sys/types.h>
1652#include <signal.h>
1653#ifdef signal
1654#undef signal
1655#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001656#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001657extern "C" void (*signal (int, void (*)(int)))(int);
1658#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001659void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001660#endif
1661
Guido van Rossumf78abae1997-01-21 22:02:36 +00001662int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001663int i;
1664; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001665EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001666if { (eval echo configure:1667: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001667 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001668 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00001669else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001670 echo "configure: failed program was:" >&5
1671 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001672 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001673 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00001674fi
1675rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001676fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001677
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001678echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001679cat >> confdefs.h <<EOF
1680#define RETSIGTYPE $ac_cv_type_signal
1681EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001682
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001683
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001684echo $ac_n "checking for size_t""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001685echo "configure:1686: checking for size_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001686if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1687 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001688else
1689 cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001690#line 1691 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001691#include "confdefs.h"
1692#include <sys/types.h>
1693#if STDC_HEADERS
1694#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001695#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001696#endif
1697EOF
1698if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossumf78abae1997-01-21 22:02:36 +00001699 egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001700 rm -rf conftest*
1701 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001702else
1703 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001704 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001705fi
1706rm -f conftest*
1707
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001708fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001709echo "$ac_t""$ac_cv_type_size_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001710if test $ac_cv_type_size_t = no; then
1711 cat >> confdefs.h <<\EOF
1712#define size_t unsigned
1713EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001714
1715fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001716
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001717echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001718echo "configure:1719: checking for uid_t in sys/types.h" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001719if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
1720 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001721else
1722 cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001723#line 1724 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001724#include "confdefs.h"
1725#include <sys/types.h>
1726EOF
1727if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1728 egrep "uid_t" >/dev/null 2>&1; then
1729 rm -rf conftest*
1730 ac_cv_type_uid_t=yes
1731else
1732 rm -rf conftest*
1733 ac_cv_type_uid_t=no
1734fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001735rm -f conftest*
1736
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001737fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001738
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001739echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001740if test $ac_cv_type_uid_t = no; then
1741 cat >> confdefs.h <<\EOF
1742#define uid_t int
1743EOF
1744
1745 cat >> confdefs.h <<\EOF
1746#define gid_t int
1747EOF
1748
1749fi
1750
Guido van Rossum627b2d71993-12-24 10:39:16 +00001751
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001752echo $ac_n "checking size of int""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001753echo "configure:1754: checking size of int" >&5
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001754if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1755 echo $ac_n "(cached) $ac_c" 1>&6
1756else
1757 if test "$cross_compiling" = yes; then
1758 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1759else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001760 cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001761#line 1762 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001762#include "confdefs.h"
1763#include <stdio.h>
1764main()
1765{
1766 FILE *f=fopen("conftestval", "w");
1767 if (!f) exit(1);
1768 fprintf(f, "%d\n", sizeof(int));
1769 exit(0);
1770}
1771EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001772if { (eval echo configure:1773: \"$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 +00001773then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001774 ac_cv_sizeof_int=`cat conftestval`
1775else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001776 echo "configure: failed program was:" >&5
1777 cat conftest.$ac_ext >&5
1778 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001779 ac_cv_sizeof_int=0
1780fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001781rm -fr conftest*
1782fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001783
1784fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001785echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1786cat >> confdefs.h <<EOF
1787#define SIZEOF_INT $ac_cv_sizeof_int
1788EOF
1789
1790
1791echo $ac_n "checking size of long""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001792echo "configure:1793: checking size of long" >&5
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001793if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1794 echo $ac_n "(cached) $ac_c" 1>&6
1795else
1796 if test "$cross_compiling" = yes; then
1797 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1798else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001799 cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001800#line 1801 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001801#include "confdefs.h"
1802#include <stdio.h>
1803main()
1804{
1805 FILE *f=fopen("conftestval", "w");
1806 if (!f) exit(1);
1807 fprintf(f, "%d\n", sizeof(long));
1808 exit(0);
1809}
1810EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001811if { (eval echo configure:1812: \"$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 +00001812then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001813 ac_cv_sizeof_long=`cat conftestval`
1814else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001815 echo "configure: failed program was:" >&5
1816 cat conftest.$ac_ext >&5
1817 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001818 ac_cv_sizeof_long=0
1819fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001820rm -fr conftest*
1821fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001822
1823fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001824echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1825cat >> confdefs.h <<EOF
1826#define SIZEOF_LONG $ac_cv_sizeof_long
1827EOF
1828
1829
Guido van Rossum0a516c91994-09-12 10:58:40 +00001830
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001831echo $ac_n "checking for long long support""... $ac_c" 1>&6
1832echo "configure:1833: checking for long long support" >&5
1833have_long_long=no
1834cat > conftest.$ac_ext <<EOF
1835#line 1836 "configure"
1836#include "confdefs.h"
1837
1838int main() {
1839long long x; x = (long long)0;
1840; return 0; }
1841EOF
1842if { (eval echo configure:1843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1843 rm -rf conftest*
1844 cat >> confdefs.h <<\EOF
1845#define HAVE_LONG_LONG 1
1846EOF
1847 have_long_long=yes
1848else
1849 echo "configure: failed program was:" >&5
1850 cat conftest.$ac_ext >&5
1851fi
1852rm -f conftest*
1853echo "$ac_t""$have_long_long" 1>&6
1854if test $have_long_long = yes ; then
1855echo $ac_n "checking size of long long""... $ac_c" 1>&6
1856echo "configure:1857: checking size of long long" >&5
1857if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
1858 echo $ac_n "(cached) $ac_c" 1>&6
1859else
1860 if test "$cross_compiling" = yes; then
1861 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1862else
1863 cat > conftest.$ac_ext <<EOF
1864#line 1865 "configure"
1865#include "confdefs.h"
1866#include <stdio.h>
1867main()
1868{
1869 FILE *f=fopen("conftestval", "w");
1870 if (!f) exit(1);
1871 fprintf(f, "%d\n", sizeof(long long));
1872 exit(0);
1873}
1874EOF
1875if { (eval echo configure:1876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1876then
1877 ac_cv_sizeof_long_long=`cat conftestval`
1878else
1879 echo "configure: failed program was:" >&5
1880 cat conftest.$ac_ext >&5
1881 rm -fr conftest*
1882 ac_cv_sizeof_long_long=0
1883fi
1884rm -fr conftest*
1885fi
1886
1887fi
1888echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
1889cat >> confdefs.h <<EOF
1890#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
1891EOF
1892
1893
1894fi
1895
Guido van Rossum0a516c91994-09-12 10:58:40 +00001896# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00001897
1898
1899
1900
Guido van Rossum0a516c91994-09-12 10:58:40 +00001901# SO is the extension of shared libraries `(including the dot!)
1902# -- usually .so, .sl on HP-UX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001903echo $ac_n "checking SO""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001904echo "configure:1905: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00001905if test -z "$SO"
1906then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001907 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00001908 hp*|HP*) SO=.sl;;
1909 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001910 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001911fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001912echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001913# LDSHARED is the ld *command* used to create shared library
1914# -- "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 +00001915echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001916echo "configure:1917: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00001917if test -z "$LDSHARED"
1918then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001919 case $ac_sys_system/$ac_sys_release in
Guido van Rossum45140f91997-08-29 18:44:06 +00001920 AIX*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001921 BeOS*) LDSHARED="\$(srcdir)/../BeOS/linkmodule -L.. -lpython\$(VERSION)";;
Guido van Rossum07397971997-04-29 21:49:50 +00001922 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00001923 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001924 SunOS/4*) LDSHARED="ld";;
1925 SunOS/5*) LDSHARED="ld -G";;
1926 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00001927 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
1928 DYNIX/ptx*) LDSHARED="ld -G";;
Guido van Rossum563e7081996-09-10 18:20:48 +00001929 next/*) LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';;
Guido van Rossum81652ab1996-07-21 02:53:27 +00001930 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001931 dgux*) LDSHARED="ld -G";;
Guido van Rossum1f740161998-04-13 15:27:21 +00001932 FreeBSD*|NetBSD*|OpenBSD*) LDSHARED="ld -Bshareable";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00001933 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001934 *) LDSHARED="ld";;
1935 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001936fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001937echo "$ac_t""$LDSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001938# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001939# library -- this is only needed for a few systems
1940echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001941echo "configure:1942: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00001942if test -z "$CCSHARED"
1943then
Guido van Rossum07397971997-04-29 21:49:50 +00001944 case $ac_sys_system/$ac_sys_release in
Guido van Rossumaf07a441995-02-13 19:45:27 +00001945 hp*|HP*) if test "$GCC" = yes;
1946 then CCSHARED="-fpic";
1947 else CCSHARED="+z";
1948 fi;;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001949 Linux*) CCSHARED="-fpic";;
Guido van Rossum1f740161998-04-13 15:27:21 +00001950 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fpic";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00001951 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00001952 IRIX*/6*) case $CC in
1953 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00001954 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00001955 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001956 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001957fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001958echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001959# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001960# the python executable -- this is only needed for a few systems
1961echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001962echo "configure:1963: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00001963if test -z "$LINKFORSHARED"
1964then
Guido van Rossum07397971997-04-29 21:49:50 +00001965 case $ac_sys_system/$ac_sys_release in
Guido van Rossum69f65801998-03-03 21:47:00 +00001966 AIX*) LINKFORSHARED='-Wl,-bE:python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001967 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00001968 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossum2d9feed1997-11-24 17:36:21 +00001969 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum749af7c1997-08-16 14:35:52 +00001970 next/*) LINKFORSHARED="-u libsys_s";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00001971 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00001972 SunOS/5*) case $CC in
1973 *gcc*)
1974 if $CC -Xlinker -V 2>/dev/null | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00001975 then
1976 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00001977 fi;;
1978 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001979 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001980fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001981echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001982
Guido van Rossum627b2d71993-12-24 10:39:16 +00001983# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00001984echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001985echo "configure:1986: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001986ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001987if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001988 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001989else
1990 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001991LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001992cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001993#line 1994 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001994#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001995/* Override any gcc2 internal prototype to avoid an error. */
1996/* We use char because int might match the return type of a gcc2
1997 builtin and then its argument prototype would still apply. */
1998char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00001999
Guido van Rossumf78abae1997-01-21 22:02:36 +00002000int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002001dlopen()
2002; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002003EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002004if { (eval echo configure:2005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002005 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002006 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002007else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002008 echo "configure: failed program was:" >&5
2009 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002010 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002011 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002012fi
2013rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002014LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002015
Guido van Rossum627b2d71993-12-24 10:39:16 +00002016fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002017if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002018 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002019 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2020 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002021 cat >> confdefs.h <<EOF
2022#define $ac_tr_lib 1
2023EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002024
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002025 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002026
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002027else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002028 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002029fi
2030 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00002031echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002032echo "configure:2033: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002033ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002034if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002035 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002036else
2037 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002038LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002039cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002040#line 2041 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002041#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002042/* Override any gcc2 internal prototype to avoid an error. */
2043/* We use char because int might match the return type of a gcc2
2044 builtin and then its argument prototype would still apply. */
2045char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002046
Guido van Rossumf78abae1997-01-21 22:02:36 +00002047int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002048shl_load()
2049; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002050EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002051if { (eval echo configure:2052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002052 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002053 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002054else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002055 echo "configure: failed program was:" >&5
2056 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002057 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002058 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002059fi
2060rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002061LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002062
Guido van Rossum627b2d71993-12-24 10:39:16 +00002063fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002064if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002065 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002066 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2067 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002068 cat >> confdefs.h <<EOF
2069#define $ac_tr_lib 1
2070EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002071
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002072 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002073
2074else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002075 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002076fi
2077 # Dynamic linking for HP-UX
Guido van Rossumb93a8621998-05-07 13:27:32 +00002078echo $ac_n "checking for pow in -lm""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002079echo "configure:2080: checking for pow in -lm" >&5
Guido van Rossumb93a8621998-05-07 13:27:32 +00002080ac_lib_var=`echo m'_'pow | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002081if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002082 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002083else
2084 ac_save_LIBS="$LIBS"
Guido van Rossumb93a8621998-05-07 13:27:32 +00002085LIBS="-lm $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002086cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002087#line 2088 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002088#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002089/* Override any gcc2 internal prototype to avoid an error. */
2090/* We use char because int might match the return type of a gcc2
2091 builtin and then its argument prototype would still apply. */
Guido van Rossumb93a8621998-05-07 13:27:32 +00002092char pow();
Guido van Rossum7f43da71994-08-01 12:15:30 +00002093
Guido van Rossumf78abae1997-01-21 22:02:36 +00002094int main() {
Guido van Rossumb93a8621998-05-07 13:27:32 +00002095pow()
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002096; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002097EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002098if { (eval echo configure:2099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002099 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002100 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002101else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002102 echo "configure: failed program was:" >&5
2103 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002104 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002105 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002106fi
2107rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002108LIBS="$ac_save_LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002109
Guido van Rossum7f43da71994-08-01 12:15:30 +00002110fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002111if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002112 echo "$ac_t""yes" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00002113 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
Guido van Rossumf78abae1997-01-21 22:02:36 +00002114 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002115 cat >> confdefs.h <<EOF
2116#define $ac_tr_lib 1
2117EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002118
Guido van Rossumb93a8621998-05-07 13:27:32 +00002119 LIBS="-lm $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002120
2121else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002122 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002123fi
Guido van Rossumb93a8621998-05-07 13:27:32 +00002124 # Std math lib -- assume needed if it exists
Guido van Rossum70c7f481998-03-26 18:44:10 +00002125# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
2126# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002127# BeOS' sockets are stashed in libnet.
2128case "$ac_sys_system" in
2129IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00002130*)
Guido van Rossumf78abae1997-01-21 22:02:36 +00002131echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002132echo "configure:2133: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002133ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002134if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002135 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002136else
2137 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002138LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002139cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002140#line 2141 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002141#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002142/* Override any gcc2 internal prototype to avoid an error. */
2143/* We use char because int might match the return type of a gcc2
2144 builtin and then its argument prototype would still apply. */
2145char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002146
Guido van Rossumf78abae1997-01-21 22:02:36 +00002147int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002148t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002149; return 0; }
2150EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002151if { (eval echo configure:2152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002152 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002153 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002154else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002155 echo "configure: failed program was:" >&5
2156 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002157 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002158 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002159fi
2160rm -f conftest*
2161LIBS="$ac_save_LIBS"
2162
2163fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002164if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002165 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002166 LIBS="-lnsl $LIBS"
2167else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002168 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002169fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002170 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00002171echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002172echo "configure:2173: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002173ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002174if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002175 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002176else
2177 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002178LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002179cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002180#line 2181 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002181#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002182/* Override any gcc2 internal prototype to avoid an error. */
2183/* We use char because int might match the return type of a gcc2
2184 builtin and then its argument prototype would still apply. */
2185char socket();
Guido van Rossum7f43da71994-08-01 12:15:30 +00002186
Guido van Rossumf78abae1997-01-21 22:02:36 +00002187int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002188socket()
2189; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002190EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002191if { (eval echo configure:2192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002192 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002193 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002194else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002195 echo "configure: failed program was:" >&5
2196 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002197 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002198 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002199fi
2200rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002201LIBS="$ac_save_LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002202
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002203fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002204if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002205 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002206 LIBS="-lsocket $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002207else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002208 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002209fi
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002210 # SVR4 sockets
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002211echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
2212echo "configure:2213: checking for socket in -lnet" >&5
2213ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
2214if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2215 echo $ac_n "(cached) $ac_c" 1>&6
2216else
2217 ac_save_LIBS="$LIBS"
2218LIBS="-lnet $LIBS $LIBS"
2219cat > conftest.$ac_ext <<EOF
2220#line 2221 "configure"
2221#include "confdefs.h"
2222/* Override any gcc2 internal prototype to avoid an error. */
2223/* We use char because int might match the return type of a gcc2
2224 builtin and then its argument prototype would still apply. */
2225char socket();
2226
2227int main() {
2228socket()
2229; return 0; }
2230EOF
2231if { (eval echo configure:2232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2232 rm -rf conftest*
2233 eval "ac_cv_lib_$ac_lib_var=yes"
2234else
2235 echo "configure: failed program was:" >&5
2236 cat conftest.$ac_ext >&5
2237 rm -rf conftest*
2238 eval "ac_cv_lib_$ac_lib_var=no"
2239fi
2240rm -f conftest*
2241LIBS="$ac_save_LIBS"
2242
2243fi
2244if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2245 echo "$ac_t""yes" 1>&6
2246 LIBS="-lnet $LIBS"
2247else
2248 echo "$ac_t""no" 1>&6
2249fi
2250 # BeOS
2251;;
2252esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00002253
Guido van Rossuma68acba1996-07-31 17:36:39 +00002254echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002255echo "configure:2256: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00002256# Check whether --with-libs or --without-libs was given.
2257if test "${with_libs+set}" = set; then
2258 withval="$with_libs"
2259
2260echo "$ac_t""$withval" 1>&6
2261LIBS="$withval $LIBS"
2262
2263else
2264 echo "$ac_t""no" 1>&6
2265fi
2266
Guido van Rossum7f43da71994-08-01 12:15:30 +00002267
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002268echo $ac_n "checking for --with(out)-readline""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002269echo "configure:2270: checking for --with(out)-readline" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002270# Check whether --with-readline or --without-readline was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002271if test "${with_readline+set}" = set; then
2272 withval="$with_readline"
Guido van Rossumb06df271997-08-05 21:50:20 +00002273 echo "$ac_t""$withval" 1>&6
2274{ echo "configure: error: --with(out)-readline is obsolete" 1>&2; exit 1; }
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002275else
Guido van Rossumb06df271997-08-05 21:50:20 +00002276 echo "$ac_t""not specified." 1>&6
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002277fi
2278
Guido van Rossum7f43da71994-08-01 12:15:30 +00002279
Guido van Rossum009f7871997-12-04 00:51:42 +00002280
2281USE_THREAD_MODULE="#"
2282
Guido van Rossumec2f0731997-01-22 20:54:01 +00002283echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002284echo "configure:2285: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00002285
2286# Check whether --with-dec-threads or --without-dec-threads was given.
2287if test "${with_dec_threads+set}" = set; then
2288 withval="$with_dec_threads"
2289 echo "$ac_t""$withval" 1>&6
2290LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00002291if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00002292 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00002293fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00002294else
2295 echo "$ac_t""no" 1>&6
2296fi
2297
2298
2299echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002300echo "configure:2301: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00002301# Check whether --with-threads or --without-threads was given.
2302if test "${with_threads+set}" = set; then
2303 withval="$with_threads"
2304 echo "$ac_t""$withval" 1>&6
2305if test "${with_thread+set}" != set; then
2306 with_thread="$withval";
2307fi
2308else
2309 echo "$ac_t""no" 1>&6
2310fi
2311
2312
2313echo $ac_n "checking for --with-thread""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002314echo "configure:2315: checking for --with-thread" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002315# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002316if test "${with_thread+set}" = set; then
2317 withval="$with_thread"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002318
Guido van Rossum009f7871997-12-04 00:51:42 +00002319USE_THREAD_MODULE=
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002320echo "$ac_t""$withval" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002321if test -d "$withval"
Guido van Rossum84e7b241996-08-19 21:59:00 +00002322then LDFLAGS="$LDFLAGS -L$withval"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002323fi
Guido van Rossum9caf77a1996-08-01 00:52:26 +00002324cat >> confdefs.h <<\EOF
2325#define _REENTRANT 1
2326EOF
2327
Guido van Rossumf78abae1997-01-21 22:02:36 +00002328ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002329echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002330echo "configure:2331: checking for mach/cthreads.h" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002331if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2332 echo $ac_n "(cached) $ac_c" 1>&6
2333else
2334 cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002335#line 2336 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002336#include "confdefs.h"
2337#include <mach/cthreads.h>
2338EOF
2339ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002340{ (eval echo configure:2341: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002341ac_err=`grep -v '^ *+' conftest.out`
2342if test -z "$ac_err"; then
2343 rm -rf conftest*
2344 eval "ac_cv_header_$ac_safe=yes"
2345else
2346 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002347 echo "configure: failed program was:" >&5
2348 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002349 rm -rf conftest*
2350 eval "ac_cv_header_$ac_safe=no"
2351fi
2352rm -f conftest*
2353fi
2354if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2355 echo "$ac_t""yes" 1>&6
2356 cat >> confdefs.h <<\EOF
2357#define WITH_THREAD 1
2358EOF
2359
2360cat >> confdefs.h <<\EOF
2361#define C_THREADS 1
2362EOF
2363
2364LIBOBJS="$LIBOBJS thread.o"
2365else
2366 echo "$ac_t""no" 1>&6
2367
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002368ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
2369echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
2370echo "configure:2371: checking for kernel/OS.h" >&5
2371if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2372 echo $ac_n "(cached) $ac_c" 1>&6
2373else
2374 cat > conftest.$ac_ext <<EOF
2375#line 2376 "configure"
2376#include "confdefs.h"
2377#include <kernel/OS.h>
2378EOF
2379ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2380{ (eval echo configure:2381: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2381ac_err=`grep -v '^ *+' conftest.out`
2382if test -z "$ac_err"; then
2383 rm -rf conftest*
2384 eval "ac_cv_header_$ac_safe=yes"
2385else
2386 echo "$ac_err" >&5
2387 echo "configure: failed program was:" >&5
2388 cat conftest.$ac_ext >&5
2389 rm -rf conftest*
2390 eval "ac_cv_header_$ac_safe=no"
2391fi
2392rm -f conftest*
2393fi
2394if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2395 echo "$ac_t""yes" 1>&6
2396 cat >> confdefs.h <<\EOF
2397#define WITH_THREAD 1
2398EOF
2399
2400cat >> confdefs.h <<\EOF
2401#define BEOS_THREADS 1
2402EOF
2403
2404LIBOBJS="$LIBOBJS thread.o"
2405else
2406 echo "$ac_t""no" 1>&6
2407
Guido van Rossumf78abae1997-01-21 22:02:36 +00002408echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002409echo "configure:2410: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002410ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002411if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002412 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002413else
2414 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002415LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002416cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002417#line 2418 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002418#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002419/* Override any gcc2 internal prototype to avoid an error. */
2420/* We use char because int might match the return type of a gcc2
2421 builtin and then its argument prototype would still apply. */
2422char pthread_create();
Guido van Rossum7f43da71994-08-01 12:15:30 +00002423
Guido van Rossumf78abae1997-01-21 22:02:36 +00002424int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002425pthread_create()
2426; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002427EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002428if { (eval echo configure:2429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002429 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002430 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002431else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002432 echo "configure: failed program was:" >&5
2433 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002434 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002435 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002436fi
2437rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002438LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002439
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002440fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002441if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002442 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002443 cat >> confdefs.h <<\EOF
2444#define WITH_THREAD 1
2445EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002446
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002447cat >> confdefs.h <<\EOF
2448#define _POSIX_THREADS 1
2449EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002450
2451LIBS="$LIBS -lpthreads"
2452LIBOBJS="$LIBOBJS thread.o"
2453else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002454 echo "$ac_t""no" 1>&6
Guido van Rossum2d38f911996-06-26 19:47:01 +00002455
Guido van Rossumf78abae1997-01-21 22:02:36 +00002456echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002457echo "configure:2458: checking for pthread_create in -lpthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002458ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum2d38f911996-06-26 19:47:01 +00002459if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2460 echo $ac_n "(cached) $ac_c" 1>&6
2461else
2462 ac_save_LIBS="$LIBS"
2463LIBS="-lpthread $LIBS"
2464cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002465#line 2466 "configure"
Guido van Rossum2d38f911996-06-26 19:47:01 +00002466#include "confdefs.h"
2467/* Override any gcc2 internal prototype to avoid an error. */
2468/* We use char because int might match the return type of a gcc2
2469 builtin and then its argument prototype would still apply. */
2470char pthread_create();
2471
Guido van Rossumf78abae1997-01-21 22:02:36 +00002472int main() {
Guido van Rossum2d38f911996-06-26 19:47:01 +00002473pthread_create()
2474; return 0; }
2475EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002476if { (eval echo configure:2477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum2d38f911996-06-26 19:47:01 +00002477 rm -rf conftest*
2478 eval "ac_cv_lib_$ac_lib_var=yes"
2479else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002480 echo "configure: failed program was:" >&5
2481 cat conftest.$ac_ext >&5
Guido van Rossum2d38f911996-06-26 19:47:01 +00002482 rm -rf conftest*
2483 eval "ac_cv_lib_$ac_lib_var=no"
2484fi
2485rm -f conftest*
2486LIBS="$ac_save_LIBS"
2487
2488fi
2489if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2490 echo "$ac_t""yes" 1>&6
2491 cat >> confdefs.h <<\EOF
2492#define WITH_THREAD 1
2493EOF
2494
2495cat >> confdefs.h <<\EOF
2496#define _POSIX_THREADS 1
2497EOF
2498
2499LIBS="$LIBS -lpthread"
2500LIBOBJS="$LIBOBJS thread.o"
2501else
2502 echo "$ac_t""no" 1>&6
Guido van Rossum0be3e491997-05-22 20:33:33 +00002503
Guido van Rossum49545951997-12-02 19:28:29 +00002504echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002505echo "configure:2506: checking for pthread_create in -lc_r" >&5
Guido van Rossum49545951997-12-02 19:28:29 +00002506ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
2507if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2508 echo $ac_n "(cached) $ac_c" 1>&6
2509else
2510 ac_save_LIBS="$LIBS"
2511LIBS="-lc_r $LIBS"
2512cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002513#line 2514 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00002514#include "confdefs.h"
2515/* Override any gcc2 internal prototype to avoid an error. */
2516/* We use char because int might match the return type of a gcc2
2517 builtin and then its argument prototype would still apply. */
2518char pthread_create();
2519
2520int main() {
2521pthread_create()
2522; return 0; }
2523EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002524if { (eval echo configure:2525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum49545951997-12-02 19:28:29 +00002525 rm -rf conftest*
2526 eval "ac_cv_lib_$ac_lib_var=yes"
2527else
2528 echo "configure: failed program was:" >&5
2529 cat conftest.$ac_ext >&5
2530 rm -rf conftest*
2531 eval "ac_cv_lib_$ac_lib_var=no"
2532fi
2533rm -f conftest*
2534LIBS="$ac_save_LIBS"
2535
2536fi
2537if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2538 echo "$ac_t""yes" 1>&6
2539 cat >> confdefs.h <<\EOF
2540#define WITH_THREAD 1
2541EOF
2542
2543cat >> confdefs.h <<\EOF
2544#define _POSIX_THREADS 1
2545EOF
2546
2547LIBS="$LIBS -lc_r"
2548LIBOBJS="$LIBOBJS thread.o"
2549else
2550 echo "$ac_t""no" 1>&6
2551
Guido van Rossum0be3e491997-05-22 20:33:33 +00002552echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002553echo "configure:2554: checking for __d6_pthread_create in -lthread" >&5
Guido van Rossum0be3e491997-05-22 20:33:33 +00002554ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
2555if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2556 echo $ac_n "(cached) $ac_c" 1>&6
2557else
2558 ac_save_LIBS="$LIBS"
2559LIBS="-lthread $LIBS"
2560cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002561#line 2562 "configure"
Guido van Rossum0be3e491997-05-22 20:33:33 +00002562#include "confdefs.h"
2563/* Override any gcc2 internal prototype to avoid an error. */
2564/* We use char because int might match the return type of a gcc2
2565 builtin and then its argument prototype would still apply. */
2566char __d6_pthread_create();
2567
2568int main() {
2569__d6_pthread_create()
2570; return 0; }
2571EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002572if { (eval echo configure:2573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum0be3e491997-05-22 20:33:33 +00002573 rm -rf conftest*
2574 eval "ac_cv_lib_$ac_lib_var=yes"
2575else
2576 echo "configure: failed program was:" >&5
2577 cat conftest.$ac_ext >&5
2578 rm -rf conftest*
2579 eval "ac_cv_lib_$ac_lib_var=no"
2580fi
2581rm -f conftest*
2582LIBS="$ac_save_LIBS"
2583
2584fi
2585if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2586 echo "$ac_t""yes" 1>&6
2587 cat >> confdefs.h <<\EOF
2588#define WITH_THREAD 1
2589EOF
2590
2591cat >> confdefs.h <<\EOF
2592#define _POSIX_THREADS 1
2593EOF
2594
2595LIBS="$LIBS -lthread"
2596LIBOBJS="$LIBOBJS thread.o"
2597else
2598 echo "$ac_t""no" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00002599
2600echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002601echo "configure:2602: checking for pthread_create in -lcma" >&5
Guido van Rossumb93a8621998-05-07 13:27:32 +00002602ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
2603if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2604 echo $ac_n "(cached) $ac_c" 1>&6
2605else
2606 ac_save_LIBS="$LIBS"
2607LIBS="-lcma $LIBS"
2608cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002609#line 2610 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00002610#include "confdefs.h"
2611/* Override any gcc2 internal prototype to avoid an error. */
2612/* We use char because int might match the return type of a gcc2
2613 builtin and then its argument prototype would still apply. */
2614char pthread_create();
2615
2616int main() {
2617pthread_create()
2618; return 0; }
2619EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002620if { (eval echo configure:2621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00002621 rm -rf conftest*
2622 eval "ac_cv_lib_$ac_lib_var=yes"
2623else
2624 echo "configure: failed program was:" >&5
2625 cat conftest.$ac_ext >&5
2626 rm -rf conftest*
2627 eval "ac_cv_lib_$ac_lib_var=no"
2628fi
2629rm -f conftest*
2630LIBS="$ac_save_LIBS"
2631
2632fi
2633if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2634 echo "$ac_t""yes" 1>&6
2635 cat >> confdefs.h <<\EOF
2636#define WITH_THREAD 1
2637EOF
2638
2639cat >> confdefs.h <<\EOF
2640#define _POSIX_THREADS 1
2641EOF
2642
2643LIBS="$LIBS -lcma"
2644LIBOBJS="$LIBOBJS thread.o"
2645else
2646 echo "$ac_t""no" 1>&6
Guido van Rossum2d38f911996-06-26 19:47:01 +00002647fi
2648
2649
Guido van Rossum627b2d71993-12-24 10:39:16 +00002650fi
2651
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002652fi
2653
Guido van Rossum0be3e491997-05-22 20:33:33 +00002654fi
2655
Guido van Rossum49545951997-12-02 19:28:29 +00002656fi
2657
Guido van Rossumb93a8621998-05-07 13:27:32 +00002658fi
2659
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002660fi
2661
Guido van Rossum0be3e491997-05-22 20:33:33 +00002662
Guido van Rossumf78abae1997-01-21 22:02:36 +00002663echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002664echo "configure:2665: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002665ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002666if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002667 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002668else
2669 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002670LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002671cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002672#line 2673 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002673#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002674/* Override any gcc2 internal prototype to avoid an error. */
2675/* We use char because int might match the return type of a gcc2
2676 builtin and then its argument prototype would still apply. */
2677char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002678
Guido van Rossumf78abae1997-01-21 22:02:36 +00002679int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002680usconfig()
2681; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002682EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002683if { (eval echo configure:2684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002684 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002685 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002686else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002687 echo "configure: failed program was:" >&5
2688 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002689 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002690 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002691fi
2692rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002693LIBS="$ac_save_LIBS"
2694
2695fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002696if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002697 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002698 cat >> confdefs.h <<\EOF
2699#define WITH_THREAD 1
2700EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002701
Guido van Rossum7f43da71994-08-01 12:15:30 +00002702LIBS="$LIBS -lmpc"
2703LIBOBJS="$LIBOBJS thread.o"
2704else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002705 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002706fi
2707
Guido van Rossumf78abae1997-01-21 22:02:36 +00002708echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002709echo "configure:2710: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002710ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002711if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002712 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002713else
2714 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002715LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002716cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002717#line 2718 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002718#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002719/* Override any gcc2 internal prototype to avoid an error. */
2720/* We use char because int might match the return type of a gcc2
2721 builtin and then its argument prototype would still apply. */
2722char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002723
Guido van Rossumf78abae1997-01-21 22:02:36 +00002724int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002725thr_create()
2726; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002727EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002728if { (eval echo configure:2729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002729 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002730 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002731else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002732 echo "configure: failed program was:" >&5
2733 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002734 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002735 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002736fi
2737rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002738LIBS="$ac_save_LIBS"
2739
2740fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002741if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002742 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002743 cat >> confdefs.h <<\EOF
2744#define WITH_THREAD 1
2745EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002746
Guido van Rossum7f43da71994-08-01 12:15:30 +00002747LIBS="$LIBS -lthread"
2748LIBOBJS="$LIBOBJS thread.o"
2749else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002750 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002751fi
2752
Guido van Rossum7f43da71994-08-01 12:15:30 +00002753
Guido van Rossumda88dad1995-01-26 00:46:29 +00002754else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002755 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002756fi
2757
Guido van Rossum7f43da71994-08-01 12:15:30 +00002758
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002759# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00002760
2761DLINCLDIR=/
2762
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002763echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002764echo "configure:2765: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002765# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002766if test "${with_sgi_dl+set}" = set; then
2767 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002768
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002769echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002770cat >> confdefs.h <<\EOF
2771#define WITH_SGI_DL 1
2772EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002773
2774dldir=$withval
2775if test -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00002776then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002777else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002778fi
2779DLINCLDIR=${dldir}
2780LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00002781else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002782 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002783fi
2784
2785
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002786echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002787echo "configure:2788: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002788# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002789if test "${with_dl_dld+set}" = set; then
2790 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002791
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002792echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002793cat >> confdefs.h <<\EOF
2794#define WITH_DL_DLD 1
2795EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002796
2797dldir=`echo "$withval" | sed 's/,.*//'`
2798dlddir=`echo "$withval" | sed 's/.*,//'`
2799if test -d "$dldir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00002800then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002801else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002802fi
2803DLINCLDIR=${dldir}
2804LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00002805else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002806 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002807fi
2808
2809
Guido van Rossum627b2d71993-12-24 10:39:16 +00002810# checks for library functions
Guido van Rossum1171ee61997-08-22 20:42:00 +00002811for ac_func in alarm chown clock dlopen execv flock fork ftime ftruncate \
2812 gethostname_r getpeername getpgrp getpid getpwent gettimeofday getwd \
Guido van Rossum18099751998-03-06 17:14:34 +00002813 kill link lstat mkfifo mktime nice pause plock putenv readlink \
Guido van Rossum96013151997-10-08 22:47:52 +00002814 select setgid setlocale setuid setsid setpgid setpgrp setvbuf \
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00002815 sigaction siginterrupt sigrelse strftime strptime symlink \
Guido van Rossum08d6be41998-06-11 15:19:05 +00002816 tcgetpgrp tcsetpgrp timegm times truncate uname waitpid
Guido van Rossum627b2d71993-12-24 10:39:16 +00002817do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002818echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002819echo "configure:2820: checking for $ac_func" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002820if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2821 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002822else
2823 cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002824#line 2825 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002825#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002826/* System header to define __stub macros and hopefully few prototypes,
2827 which can conflict with char $ac_func(); below. */
2828#include <assert.h>
2829/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002830/* We use char because int might match the return type of a gcc2
2831 builtin and then its argument prototype would still apply. */
2832char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002833
Guido van Rossumf78abae1997-01-21 22:02:36 +00002834int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002835
Guido van Rossum627b2d71993-12-24 10:39:16 +00002836/* The GNU C library defines this for functions which it implements
2837 to always fail with ENOSYS. Some functions are actually named
2838 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002839#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00002840choke me
2841#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002842$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002843#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002844
Guido van Rossum7f43da71994-08-01 12:15:30 +00002845; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002846EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002847if { (eval echo configure:2848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002848 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002849 eval "ac_cv_func_$ac_func=yes"
2850else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002851 echo "configure: failed program was:" >&5
2852 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002853 rm -rf conftest*
2854 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002855fi
2856rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002857fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002858
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002859if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002860 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002861 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002862 cat >> confdefs.h <<EOF
2863#define $ac_tr_func 1
2864EOF
2865
2866else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002867 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002868fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002869done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002870
Guido van Rossum2b3ac691996-08-30 15:18:41 +00002871for ac_func in dup2 getcwd strdup strerror memmove
Guido van Rossum627b2d71993-12-24 10:39:16 +00002872do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002873echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002874echo "configure:2875: checking for $ac_func" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002875if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2876 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002877else
2878 cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002879#line 2880 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002880#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002881/* System header to define __stub macros and hopefully few prototypes,
2882 which can conflict with char $ac_func(); below. */
2883#include <assert.h>
2884/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002885/* We use char because int might match the return type of a gcc2
2886 builtin and then its argument prototype would still apply. */
2887char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002888
Guido van Rossumf78abae1997-01-21 22:02:36 +00002889int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002890
Guido van Rossum627b2d71993-12-24 10:39:16 +00002891/* The GNU C library defines this for functions which it implements
2892 to always fail with ENOSYS. Some functions are actually named
2893 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002894#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00002895choke me
2896#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002897$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002898#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002899
Guido van Rossum7f43da71994-08-01 12:15:30 +00002900; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002901EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002902if { (eval echo configure:2903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002903 rm -rf conftest*
2904 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002905else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002906 echo "configure: failed program was:" >&5
2907 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002908 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002909 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002910fi
2911rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002912fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002913
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002914if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002915 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002916 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2917 cat >> confdefs.h <<EOF
2918#define $ac_tr_func 1
2919EOF
2920
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002921else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002922 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002923LIBOBJS="$LIBOBJS ${ac_func}.o"
2924fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002925done
2926
Guido van Rossumf78abae1997-01-21 22:02:36 +00002927
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002928echo $ac_n "checking for getpgrp""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002929echo "configure:2930: checking for getpgrp" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002930if eval "test \"`echo '$''{'ac_cv_func_getpgrp'+set}'`\" = set"; then
2931 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002932else
2933 cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002934#line 2935 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002935#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002936/* System header to define __stub macros and hopefully few prototypes,
2937 which can conflict with char getpgrp(); below. */
2938#include <assert.h>
2939/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002940/* We use char because int might match the return type of a gcc2
2941 builtin and then its argument prototype would still apply. */
2942char getpgrp();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002943
Guido van Rossumf78abae1997-01-21 22:02:36 +00002944int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002945
Guido van Rossum627b2d71993-12-24 10:39:16 +00002946/* The GNU C library defines this for functions which it implements
2947 to always fail with ENOSYS. Some functions are actually named
2948 something starting with __ and the normal name is an alias. */
2949#if defined (__stub_getpgrp) || defined (__stub___getpgrp)
2950choke me
2951#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002952getpgrp();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002953#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002954
2955; return 0; }
2956EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002957if { (eval echo configure:2958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002958 rm -rf conftest*
2959 eval "ac_cv_func_getpgrp=yes"
2960else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002961 echo "configure: failed program was:" >&5
2962 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002963 rm -rf conftest*
2964 eval "ac_cv_func_getpgrp=no"
2965fi
2966rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002967fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002968
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002969if eval "test \"`echo '$ac_cv_func_'getpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002970 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002971 cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002972#line 2973 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002973#include "confdefs.h"
2974#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002975int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002976getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00002977; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002978EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002979if { (eval echo configure:2980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002980 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002981 cat >> confdefs.h <<\EOF
2982#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00002983EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002984
Guido van Rossumf78abae1997-01-21 22:02:36 +00002985else
2986 echo "configure: failed program was:" >&5
2987 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002988fi
2989rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002990else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002991 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002992fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002993
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002994echo $ac_n "checking for setpgrp""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002995echo "configure:2996: checking for setpgrp" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002996if eval "test \"`echo '$''{'ac_cv_func_setpgrp'+set}'`\" = set"; then
2997 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002998else
2999 cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003000#line 3001 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003001#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003002/* System header to define __stub macros and hopefully few prototypes,
3003 which can conflict with char setpgrp(); below. */
3004#include <assert.h>
3005/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003006/* We use char because int might match the return type of a gcc2
3007 builtin and then its argument prototype would still apply. */
3008char setpgrp();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003009
Guido van Rossumf78abae1997-01-21 22:02:36 +00003010int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003011
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003012/* The GNU C library defines this for functions which it implements
3013 to always fail with ENOSYS. Some functions are actually named
3014 something starting with __ and the normal name is an alias. */
3015#if defined (__stub_setpgrp) || defined (__stub___setpgrp)
3016choke me
3017#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003018setpgrp();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003019#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003020
3021; return 0; }
3022EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003023if { (eval echo configure:3024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003024 rm -rf conftest*
3025 eval "ac_cv_func_setpgrp=yes"
3026else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003027 echo "configure: failed program was:" >&5
3028 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003029 rm -rf conftest*
3030 eval "ac_cv_func_setpgrp=no"
3031fi
3032rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003033fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003034
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003035if eval "test \"`echo '$ac_cv_func_'setpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003036 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003037 cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003038#line 3039 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003039#include "confdefs.h"
3040#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003041int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003042setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003043; return 0; }
3044EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003045if { (eval echo configure:3046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003046 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003047 cat >> confdefs.h <<\EOF
3048#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003049EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003050
Guido van Rossumf78abae1997-01-21 22:02:36 +00003051else
3052 echo "configure: failed program was:" >&5
3053 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003054fi
3055rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003056else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003057 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003058fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +00003059
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003060echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003061echo "configure:3062: checking for gettimeofday" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003062if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
3063 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003064else
3065 cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003066#line 3067 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003067#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003068/* System header to define __stub macros and hopefully few prototypes,
3069 which can conflict with char gettimeofday(); below. */
3070#include <assert.h>
3071/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003072/* We use char because int might match the return type of a gcc2
3073 builtin and then its argument prototype would still apply. */
3074char gettimeofday();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003075
Guido van Rossumf78abae1997-01-21 22:02:36 +00003076int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003077
3078/* The GNU C library defines this for functions which it implements
3079 to always fail with ENOSYS. Some functions are actually named
3080 something starting with __ and the normal name is an alias. */
3081#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
3082choke me
3083#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003084gettimeofday();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003085#endif
3086
3087; return 0; }
3088EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003089if { (eval echo configure:3090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003090 rm -rf conftest*
3091 eval "ac_cv_func_gettimeofday=yes"
3092else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003093 echo "configure: failed program was:" >&5
3094 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003095 rm -rf conftest*
3096 eval "ac_cv_func_gettimeofday=no"
3097fi
3098rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003099fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003100
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003101if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003102 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003103 cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003104#line 3105 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003105#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003106#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003107int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003108gettimeofday((struct timeval*)0,(struct timezone*)0);
3109; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003110EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003111if { (eval echo configure:3112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003112 :
3113else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003114 echo "configure: failed program was:" >&5
3115 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003116 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003117 cat >> confdefs.h <<\EOF
3118#define GETTIMEOFDAY_NO_TZ 1
3119EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003120
3121fi
3122rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003123else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003124 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003125fi
3126
3127
3128# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003129echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003130echo "configure:3131: checking whether time.h and sys/time.h may both be included" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003131if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
3132 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003133else
3134 cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003135#line 3136 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003136#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003137#include <sys/types.h>
3138#include <sys/time.h>
3139#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003140int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003141struct tm *tp;
3142; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003143EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003144if { (eval echo configure:3145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003145 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003146 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003147else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003148 echo "configure: failed program was:" >&5
3149 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003150 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003151 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003152fi
3153rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003154fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003155
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003156echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003157if test $ac_cv_header_time = yes; then
3158 cat >> confdefs.h <<\EOF
3159#define TIME_WITH_SYS_TIME 1
3160EOF
3161
3162fi
3163
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003164echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003165echo "configure:3166: checking whether struct tm is in sys/time.h or time.h" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003166if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
3167 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003168else
3169 cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003170#line 3171 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003171#include "confdefs.h"
3172#include <sys/types.h>
3173#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003174int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003175struct tm *tp; tp->tm_sec;
3176; return 0; }
3177EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003178if { (eval echo configure:3179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003179 rm -rf conftest*
3180 ac_cv_struct_tm=time.h
3181else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003182 echo "configure: failed program was:" >&5
3183 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003184 rm -rf conftest*
3185 ac_cv_struct_tm=sys/time.h
3186fi
3187rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003188fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003189
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003190echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003191if test $ac_cv_struct_tm = sys/time.h; then
3192 cat >> confdefs.h <<\EOF
3193#define TM_IN_SYS_TIME 1
3194EOF
3195
3196fi
3197
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003198echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003199echo "configure:3200: checking for tm_zone in struct tm" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003200if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
3201 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003202else
3203 cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003204#line 3205 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003205#include "confdefs.h"
3206#include <sys/types.h>
3207#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003208int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003209struct tm tm; tm.tm_zone;
3210; return 0; }
3211EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003212if { (eval echo configure:3213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003213 rm -rf conftest*
3214 ac_cv_struct_tm_zone=yes
3215else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003216 echo "configure: failed program was:" >&5
3217 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003218 rm -rf conftest*
3219 ac_cv_struct_tm_zone=no
3220fi
3221rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003222fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003223
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003224echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003225if test "$ac_cv_struct_tm_zone" = yes; then
3226 cat >> confdefs.h <<\EOF
3227#define HAVE_TM_ZONE 1
3228EOF
3229
3230else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003231 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003232echo "configure:3233: checking for tzname" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003233if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
3234 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003235else
3236 cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003237#line 3238 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003238#include "confdefs.h"
3239#include <time.h>
3240#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003241extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00003242#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00003243int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003244atoi(*tzname);
3245; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003246EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003247if { (eval echo configure:3248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003248 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003249 ac_cv_var_tzname=yes
3250else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003251 echo "configure: failed program was:" >&5
3252 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003253 rm -rf conftest*
3254 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003255fi
3256rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00003257fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003258
3259echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003260 if test $ac_cv_var_tzname = yes; then
3261 cat >> confdefs.h <<\EOF
3262#define HAVE_TZNAME 1
3263EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003264
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003265 fi
3266fi
3267
3268
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003269echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003270echo "configure:3271: checking for time.h that defines altzone" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003271if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
3272 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003273else
3274 cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003275#line 3276 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003276#include "confdefs.h"
3277#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003278int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003279return altzone;
3280; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003281EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003282if { (eval echo configure:3283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00003283 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003284 ac_cv_header_time_altzone=yes
3285else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003286 echo "configure: failed program was:" >&5
3287 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003288 rm -rf conftest*
3289 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00003290fi
3291rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003292fi
3293
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003294echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003295if test $ac_cv_header_time_altzone = yes; then
3296 cat >> confdefs.h <<\EOF
3297#define HAVE_ALTZONE 1
3298EOF
3299
3300fi
3301
Guido van Rossumda88dad1995-01-26 00:46:29 +00003302was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003303echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003304echo "configure:3305: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003305cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003306#line 3307 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003307#include "confdefs.h"
3308
3309#include <sys/types.h>
3310#include <sys/select.h>
3311#include <sys/time.h>
3312
Guido van Rossumf78abae1997-01-21 22:02:36 +00003313int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003314;
3315; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003316EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003317if { (eval echo configure:3318: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00003318 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003319 cat >> confdefs.h <<\EOF
3320#define SYS_SELECT_WITH_SYS_TIME 1
3321EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003322 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00003323else
3324 echo "configure: failed program was:" >&5
3325 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00003326fi
3327rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003328echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003329
3330# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00003331
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003332echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003333echo "configure:3334: checking whether char is unsigned" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003334if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
3335 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003336else
3337 if test "$GCC" = yes; then
3338 # GCC predefines this symbol on systems where it applies.
3339cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003340#line 3341 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003341#include "confdefs.h"
3342#ifdef __CHAR_UNSIGNED__
3343 yes
3344#endif
3345
3346EOF
3347if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3348 egrep "yes" >/dev/null 2>&1; then
3349 rm -rf conftest*
3350 ac_cv_c_char_unsigned=yes
3351else
3352 rm -rf conftest*
3353 ac_cv_c_char_unsigned=no
3354fi
3355rm -f conftest*
3356
3357else
3358if test "$cross_compiling" = yes; then
3359 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3360else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003361 cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003362#line 3363 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003363#include "confdefs.h"
3364/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003365#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00003366#define volatile
3367#endif
3368main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00003369 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00003370}
3371EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003372if { (eval echo configure:3373: \"$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 +00003373then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003374 ac_cv_c_char_unsigned=yes
3375else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003376 echo "configure: failed program was:" >&5
3377 cat conftest.$ac_ext >&5
3378 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003379 ac_cv_c_char_unsigned=no
3380fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003381rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003382fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003383
3384fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003385fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003386
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003387echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003388if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
3389 cat >> confdefs.h <<\EOF
3390#define __CHAR_UNSIGNED__ 1
3391EOF
3392
3393fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003394
3395
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003396echo $ac_n "checking for working const""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003397echo "configure:3398: checking for working const" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003398if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3399 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003400else
3401 cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003402#line 3403 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003403#include "confdefs.h"
3404
Guido van Rossumf78abae1997-01-21 22:02:36 +00003405int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003406
3407/* Ultrix mips cc rejects this. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00003408typedef int charset[2]; const charset x;
3409/* SunOS 4.1.1 cc rejects this. */
3410char const *const *ccp;
3411char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003412/* NEC SVR4.0.2 mips cc rejects this. */
3413struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003414static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00003415/* AIX XL C 1.02.0.0 rejects this.
3416 It does not let you subtract one const X* pointer from another in an arm
3417 of an if-expression whose if-part is not a constant expression */
3418const char *g = "string";
3419ccp = &g + (g ? g-g : 0);
3420/* HPUX 7.0 cc rejects these. */
3421++ccp;
3422p = (char**) ccp;
3423ccp = (char const *const *) p;
3424{ /* SCO 3.2v4 cc rejects this. */
3425 char *t;
3426 char const *s = 0 ? (char *) 0 : (char const *) 0;
3427
3428 *t++ = 0;
3429}
3430{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003431 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00003432 const int *foo = &x[0];
3433 ++foo;
3434}
3435{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3436 typedef const int *iptr;
3437 iptr p = 0;
3438 ++p;
3439}
3440{ /* AIX XL C 1.02.0.0 rejects this saying
3441 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3442 struct s { int j; const int *ap[3]; };
3443 struct s *b; b->j = 5;
3444}
3445{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3446 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003447}
3448
3449; return 0; }
3450EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003451if { (eval echo configure:3452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003452 rm -rf conftest*
3453 ac_cv_c_const=yes
3454else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003455 echo "configure: failed program was:" >&5
3456 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003457 rm -rf conftest*
3458 ac_cv_c_const=no
3459fi
3460rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003461fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003462
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003463echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003464if test $ac_cv_c_const = no; then
3465 cat >> confdefs.h <<\EOF
3466#define const
3467EOF
3468
3469fi
3470
3471
Guido van Rossumda88dad1995-01-26 00:46:29 +00003472works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003473echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003474echo "configure:3475: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003475cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003476#line 3477 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003477#include "confdefs.h"
3478
Guido van Rossumf78abae1997-01-21 22:02:36 +00003479int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003480volatile int x; x = 0;
3481; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003482EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003483if { (eval echo configure:3484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00003484 rm -rf conftest*
3485 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003486else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003487 echo "configure: failed program was:" >&5
3488 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003489 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003490 cat >> confdefs.h <<\EOF
3491#define volatile
3492EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003493
3494fi
3495rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003496echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003497
Guido van Rossumda88dad1995-01-26 00:46:29 +00003498works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003499echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003500echo "configure:3501: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003501cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003502#line 3503 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003503#include "confdefs.h"
3504
Guido van Rossumf78abae1997-01-21 22:02:36 +00003505int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003506signed char c;
3507; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003508EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003509if { (eval echo configure:3510: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00003510 rm -rf conftest*
3511 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003512else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003513 echo "configure: failed program was:" >&5
3514 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003515 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003516 cat >> confdefs.h <<\EOF
3517#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00003518EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003519
3520fi
3521rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003522echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003523
Guido van Rossumda88dad1995-01-26 00:46:29 +00003524have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003525echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003526echo "configure:3527: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003527cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003528#line 3529 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003529#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003530int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00003531int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003532return foo(10);
3533; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003534EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003535if { (eval echo configure:3536: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003536 rm -rf conftest*
3537 cat >> confdefs.h <<\EOF
3538#define HAVE_PROTOTYPES 1
3539EOF
3540 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00003541else
3542 echo "configure: failed program was:" >&5
3543 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00003544fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003545rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003546echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003547
Guido van Rossumda88dad1995-01-26 00:46:29 +00003548works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003549echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003550echo "configure:3551: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003551cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003552#line 3553 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003553#include "confdefs.h"
3554
3555#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00003556int foo(int x, ...) {
3557 va_list va;
3558 va_start(va, x);
3559 va_arg(va, int);
3560 va_arg(va, char *);
3561 va_arg(va, double);
3562 return 0;
3563}
Guido van Rossum7f43da71994-08-01 12:15:30 +00003564
Guido van Rossumf78abae1997-01-21 22:02:36 +00003565int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00003566return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003567; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003568EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003569if { (eval echo configure:3570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003570 rm -rf conftest*
3571 cat >> confdefs.h <<\EOF
3572#define HAVE_STDARG_PROTOTYPES 1
3573EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003574 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00003575else
3576 echo "configure: failed program was:" >&5
3577 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003578fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003579rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003580echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003581
Guido van Rossumda88dad1995-01-26 00:46:29 +00003582if test "$have_prototypes" = yes; then
3583bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003584echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003585echo "configure:3586: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003586cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003587#line 3588 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003588#include "confdefs.h"
3589#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003590int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003591char **t;execve("@",t,t);
3592; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003593EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003594if { (eval echo configure:3595: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003595 :
3596else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003597 echo "configure: failed program was:" >&5
3598 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003599 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003600 cat >> confdefs.h <<\EOF
3601#define BAD_EXEC_PROTOTYPES 1
3602EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003603 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003604fi
3605rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003606echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003607fi
3608
Guido van Rossumda88dad1995-01-26 00:46:29 +00003609bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003610echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003611echo "configure:3612: checking for bad static forward" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003612if test "$cross_compiling" = yes; then
3613 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3614else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003615 cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003616#line 3617 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003617#include "confdefs.h"
3618
3619struct s { int a; int b; };
3620static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003621int foobar() {
3622 static int random;
3623 random = (int) &foo;
3624 return random;
3625}
Guido van Rossum7f43da71994-08-01 12:15:30 +00003626static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003627main() {
3628 exit(!((int)&foo == foobar()));
3629}
Guido van Rossum7f43da71994-08-01 12:15:30 +00003630
3631EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003632if { (eval echo configure:3633: \"$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 +00003633then
Guido van Rossum7f43da71994-08-01 12:15:30 +00003634 :
3635else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003636 echo "configure: failed program was:" >&5
3637 cat conftest.$ac_ext >&5
3638 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003639 cat >> confdefs.h <<\EOF
3640#define BAD_STATIC_FORWARD 1
3641EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003642 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00003643fi
3644rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00003645fi
3646
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003647echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003648
Guido van Rossumda88dad1995-01-26 00:46:29 +00003649va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003650echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003651echo "configure:3652: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003652cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003653#line 3654 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003654#include "confdefs.h"
3655
3656#ifdef HAVE_STDARG_PROTOTYPES
3657#include <stdarg.h>
3658#else
3659#include <varargs.h>
3660#endif
3661
Guido van Rossumf78abae1997-01-21 22:02:36 +00003662int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003663va_list list1, list2; list1 = list2;
3664; return 0; }
3665EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003666if { (eval echo configure:3667: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003667 :
3668else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003669 echo "configure: failed program was:" >&5
3670 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003671 rm -rf conftest*
3672 cat >> confdefs.h <<\EOF
3673#define VA_LIST_IS_ARRAY 1
3674EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003675 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003676fi
3677rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003678echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003679
Guido van Rossum627b2d71993-12-24 10:39:16 +00003680# checks for system services
3681# (none yet)
3682
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003683# Linux requires this for correct f.p. operations
Guido van Rossumf78abae1997-01-21 22:02:36 +00003684echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003685echo "configure:3686: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003686ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003687if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003688 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003689else
3690 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003691LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003692cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003693#line 3694 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003694#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003695/* Override any gcc2 internal prototype to avoid an error. */
3696/* We use char because int might match the return type of a gcc2
3697 builtin and then its argument prototype would still apply. */
3698char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003699
Guido van Rossumf78abae1997-01-21 22:02:36 +00003700int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003701__fpu_control()
3702; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003703EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003704if { (eval echo configure:3705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003705 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003706 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003707else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003708 echo "configure: failed program was:" >&5
3709 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003710 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003711 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003712fi
3713rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003714LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003715
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003716fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003717if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003718 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003719 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3720 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003721 cat >> confdefs.h <<EOF
3722#define $ac_tr_lib 1
3723EOF
3724
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003725 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003726
3727else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003728 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003729fi
3730
3731
Guido van Rossum7f253911997-05-09 02:42:48 +00003732# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00003733echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003734echo "configure:3735: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00003735# Check whether --with-fpectl or --without-fpectl was given.
3736if test "${with_fpectl+set}" = set; then
3737 withval="$with_fpectl"
3738
3739if test "$withval" != no
3740then cat >> confdefs.h <<\EOF
3741#define WANT_SIGFPE_HANDLER 1
3742EOF
3743 echo "$ac_t""yes" 1>&6
3744else echo "$ac_t""no" 1>&6
3745fi
3746fi
3747
3748
Guido van Rossum7f43da71994-08-01 12:15:30 +00003749# check for --with-libm=...
3750
Guido van Rossum563e7081996-09-10 18:20:48 +00003751case $ac_sys_system in
3752next) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003753BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00003754*) LIBM=-lm
3755esac
Guido van Rossum7f253911997-05-09 02:42:48 +00003756echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003757echo "configure:3758: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003758# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003759if test "${with_libm+set}" = set; then
3760 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003761
Guido van Rossum7f253911997-05-09 02:42:48 +00003762if test "$withval" = no
3763then LIBM=
3764 echo "$ac_t""force LIBM empty" 1>&6
3765elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00003766then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00003767 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003768else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003769fi
Guido van Rossum7f253911997-05-09 02:42:48 +00003770else
3771 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003772fi
3773
3774
3775# check for --with-libc=...
3776
Guido van Rossum7f253911997-05-09 02:42:48 +00003777echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003778echo "configure:3779: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003779# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003780if test "${with_libc+set}" = set; then
3781 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003782
Guido van Rossum7f253911997-05-09 02:42:48 +00003783if test "$withval" = no
3784then LIBC=
3785 echo "$ac_t""force LIBC empty" 1>&6
3786elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00003787then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00003788 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003789else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003790fi
Guido van Rossum7f253911997-05-09 02:42:48 +00003791else
3792 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003793fi
3794
3795
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003796# check for hypot() in math library
3797LIBS_SAVE=$LIBS
3798LIBS="$LIBS $LIBM"
3799for ac_func in hypot
3800do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003801echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003802echo "configure:3803: checking for $ac_func" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003803if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3804 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003805else
3806 cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003807#line 3808 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003808#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003809/* System header to define __stub macros and hopefully few prototypes,
3810 which can conflict with char $ac_func(); below. */
3811#include <assert.h>
3812/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003813/* We use char because int might match the return type of a gcc2
3814 builtin and then its argument prototype would still apply. */
3815char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003816
Guido van Rossumf78abae1997-01-21 22:02:36 +00003817int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003818
3819/* The GNU C library defines this for functions which it implements
3820 to always fail with ENOSYS. Some functions are actually named
3821 something starting with __ and the normal name is an alias. */
3822#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3823choke me
3824#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003825$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003826#endif
3827
3828; return 0; }
3829EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003830if { (eval echo configure:3831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003831 rm -rf conftest*
3832 eval "ac_cv_func_$ac_func=yes"
3833else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003834 echo "configure: failed program was:" >&5
3835 cat conftest.$ac_ext >&5
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003836 rm -rf conftest*
3837 eval "ac_cv_func_$ac_func=no"
3838fi
3839rm -f conftest*
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003840fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003841
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003842if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003843 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003844 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003845 cat >> confdefs.h <<EOF
3846#define $ac_tr_func 1
3847EOF
3848
3849else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003850 echo "$ac_t""no" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003851fi
3852done
3853
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003854for ac_func in hypot
3855do
3856echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003857echo "configure:3858: checking for $ac_func" >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003858if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3859 echo $ac_n "(cached) $ac_c" 1>&6
3860else
3861 cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003862#line 3863 "configure"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003863#include "confdefs.h"
3864/* System header to define __stub macros and hopefully few prototypes,
3865 which can conflict with char $ac_func(); below. */
3866#include <assert.h>
3867/* Override any gcc2 internal prototype to avoid an error. */
3868/* We use char because int might match the return type of a gcc2
3869 builtin and then its argument prototype would still apply. */
3870char $ac_func();
3871
Guido van Rossumf78abae1997-01-21 22:02:36 +00003872int main() {
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003873
3874/* The GNU C library defines this for functions which it implements
3875 to always fail with ENOSYS. Some functions are actually named
3876 something starting with __ and the normal name is an alias. */
3877#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3878choke me
3879#else
3880$ac_func();
3881#endif
3882
3883; return 0; }
3884EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003885if { (eval echo configure:3886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003886 rm -rf conftest*
3887 eval "ac_cv_func_$ac_func=yes"
3888else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003889 echo "configure: failed program was:" >&5
3890 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003891 rm -rf conftest*
3892 eval "ac_cv_func_$ac_func=no"
3893fi
3894rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003895fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003896
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003897if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3898 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003899 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3900 cat >> confdefs.h <<EOF
3901#define $ac_tr_func 1
3902EOF
3903
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003904else
3905 echo "$ac_t""no" 1>&6
3906LIBOBJS="$LIBOBJS ${ac_func}.o"
3907fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003908done
3909
Guido van Rossumf78abae1997-01-21 22:02:36 +00003910
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003911LIBS=$LIBS_SAVE
3912
Guido van Rossumda88dad1995-01-26 00:46:29 +00003913# check for getopt
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003914echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003915echo "configure:3916: checking for genuine getopt" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003916if eval "test \"`echo '$''{'ac_cv_func_getopt'+set}'`\" = set"; then
3917 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00003918else
3919 if test "$cross_compiling" = yes; then
3920 ac_cv_func_getopt=no
3921else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003922 cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003923#line 3924 "configure"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003924#include "confdefs.h"
3925#include <stdio.h>
3926extern int optind, opterr, getopt();
3927extern char* optarg;
3928int main() {
3929 char* av[] = { "testprog", "parameter", "-fFlag", NULL };
3930 opterr = 0;
3931 if (getopt(3, av, "f:") == 'f') { exit(1); }
3932 exit(0);
3933}
3934EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003935if { (eval echo configure:3936: \"$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 +00003936then
Guido van Rossumda88dad1995-01-26 00:46:29 +00003937 ac_cv_func_getopt=yes
3938else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003939 echo "configure: failed program was:" >&5
3940 cat conftest.$ac_ext >&5
3941 rm -fr conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00003942 ac_cv_func_getopt=no
3943fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003944rm -fr conftest*
3945fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003946
3947fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003948echo "$ac_t""$ac_cv_func_getopt" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00003949test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o"
3950
Guido van Rossumad713701997-07-10 22:42:38 +00003951# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00003952echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003953echo "configure:3954: checking what malloc(0) returns" >&5
Guido van Rossumad713701997-07-10 22:42:38 +00003954if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
3955 echo $ac_n "(cached) $ac_c" 1>&6
3956else
3957 if test "$cross_compiling" = yes; then
3958 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3959else
3960 cat > conftest.$ac_ext <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003961#line 3962 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00003962#include "confdefs.h"
3963#include <stdio.h>
3964#ifdef HAVE_STDLIB
3965#include <stdlib.h>
3966#else
3967char *malloc(), *realloc();
3968int *free();
3969#endif
3970main() {
3971 char *p;
3972 p = malloc(0);
3973 if (p == NULL) exit(1);
3974 p = realloc(p, 0);
3975 if (p == NULL) exit(1);
3976 free(p);
3977 exit(0);
3978}
3979EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003980if { (eval echo configure:3981: \"$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 +00003981then
3982 ac_cv_malloc_zero=nonnull
3983else
3984 echo "configure: failed program was:" >&5
3985 cat conftest.$ac_ext >&5
3986 rm -fr conftest*
3987 ac_cv_malloc_zero=null
3988fi
3989rm -fr conftest*
3990fi
3991
3992fi
3993
3994echo "$ac_t""$ac_cv_malloc_zero" 1>&6
3995if test "$ac_cv_malloc_zero" = null
3996then
3997 cat >> confdefs.h <<\EOF
3998#define MALLOC_ZERO_RETURNS_NULL 1
3999EOF
4000
4001fi
4002
Guido van Rossum627b2d71993-12-24 10:39:16 +00004003# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004004trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004005cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004006# This file is a shell script that caches the results of configure
4007# tests run on this system so they can be shared between configure
4008# scripts and configure runs. It is not useful on other systems.
4009# If it contains results you don't want to keep, you may remove or edit it.
4010#
4011# By default, configure uses ./config.cache as the cache file,
4012# creating it if it does not exist already. You can give configure
4013# the --cache-file=FILE option to use a different cache file; that is
4014# what configure does when it calls configure scripts in
4015# subdirectories, so they share the cache.
4016# Giving --cache-file=/dev/null disables caching, for debugging configure.
4017# config.status only pays attention to the cache file if you give it the
4018# --recheck option to rerun configure.
4019#
4020EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00004021# The following way of writing the cache mishandles newlines in values,
4022# but we know of no workaround that is simple, portable, and efficient.
4023# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004024# Ultrix sh set writes to stderr and can't be redirected directly,
4025# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004026(set) 2>&1 |
Guido van Rossumf78abae1997-01-21 22:02:36 +00004027 case `(ac_space=' '; set) 2>&1` in
4028 *ac_space=\ *)
4029 # `set' does not quote correctly, so add quotes (double-quote substitution
4030 # turns \\\\ into \\, and sed turns \\ into \).
4031 sed -n \
4032 -e "s/'/'\\\\''/g" \
4033 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4034 ;;
4035 *)
4036 # `set' quotes correctly as required by POSIX, so do not add quotes.
4037 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4038 ;;
4039 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004040if cmp -s $cache_file confcache; then
4041 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004042else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004043 if test -w $cache_file; then
4044 echo "updating cache $cache_file"
4045 cat confcache > $cache_file
4046 else
4047 echo "not updating unwritable cache $cache_file"
4048 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004049fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004050rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00004051
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004052trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004053
4054test "x$prefix" = xNONE && prefix=$ac_default_prefix
4055# Let make expand exec_prefix.
4056test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00004057
Guido van Rossum7f43da71994-08-01 12:15:30 +00004058# Any assignment to VPATH causes Sun make to only execute
4059# the first set of double-colon rules, so remove it if not needed.
4060# If there is a colon in the path, we need to keep it.
4061if test "x$srcdir" = x.; then
4062 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
4063fi
4064
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004065trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00004066
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004067DEFS=-DHAVE_CONFIG_H
4068
4069# Without the "./", some shells look in PATH for config.status.
4070: ${CONFIG_STATUS=./config.status}
4071
4072echo creating $CONFIG_STATUS
4073rm -f $CONFIG_STATUS
4074cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004075#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00004076# Generated automatically by configure.
4077# Run this file to recreate the current configuration.
4078# This directory was configured as follows,
4079# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4080#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004081# $0 $ac_configure_args
4082#
4083# Compiler output produced by configure, useful for debugging
4084# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00004085
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004086ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004087for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00004088do
Guido van Rossum7f43da71994-08-01 12:15:30 +00004089 case "\$ac_option" in
4090 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004091 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4092 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00004093 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossumf78abae1997-01-21 22:02:36 +00004094 echo "$CONFIG_STATUS generated by autoconf version 2.12"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004095 exit 0 ;;
4096 -help | --help | --hel | --he | --h)
4097 echo "\$ac_cs_usage"; exit 0 ;;
4098 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00004099 esac
4100done
4101
Guido van Rossum7f43da71994-08-01 12:15:30 +00004102ac_given_srcdir=$srcdir
Guido van Rossum627b2d71993-12-24 10:39:16 +00004103
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004104trap 'rm -fr `echo "Makefile \
4105 Objects/Makefile \
4106 Parser/Makefile \
4107 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00004108 Modules/Makefile.pre \
4109 Modules/Setup.thread config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004110EOF
4111cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004112
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004113# Protect against being on the right side of a sed subst in config.status.
4114sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4115 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004116$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00004117$extrasub
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004118s%@CFLAGS@%$CFLAGS%g
4119s%@CPPFLAGS@%$CPPFLAGS%g
4120s%@CXXFLAGS@%$CXXFLAGS%g
4121s%@DEFS@%$DEFS%g
4122s%@LDFLAGS@%$LDFLAGS%g
4123s%@LIBS@%$LIBS%g
4124s%@exec_prefix@%$exec_prefix%g
4125s%@prefix@%$prefix%g
4126s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004127s%@bindir@%$bindir%g
4128s%@sbindir@%$sbindir%g
4129s%@libexecdir@%$libexecdir%g
4130s%@datadir@%$datadir%g
4131s%@sysconfdir@%$sysconfdir%g
4132s%@sharedstatedir@%$sharedstatedir%g
4133s%@localstatedir@%$localstatedir%g
4134s%@libdir@%$libdir%g
4135s%@includedir@%$includedir%g
4136s%@oldincludedir@%$oldincludedir%g
4137s%@infodir@%$infodir%g
4138s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00004139s%@VERSION@%$VERSION%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004140s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00004141s%@SGI_ABI@%$SGI_ABI%g
4142s%@SET_CCC@%$SET_CCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00004143s%@CC@%$CC%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00004144s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00004145s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00004146s%@AR@%$AR%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004147s%@INSTALL@%$INSTALL%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00004148s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4149s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossum3c4bb801997-12-18 23:55:32 +00004150s%@REALLIBRARY@%$REALLIBRARY%g
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004151s%@LN@%$LN%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004152s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00004153s%@CPP@%$CPP%g
Guido van Rossum3c4bb801997-12-18 23:55:32 +00004154s%@DGUX_IS_BROKEN@%$DGUX_IS_BROKEN%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00004155s%@SO@%$SO%g
4156s%@LDSHARED@%$LDSHARED%g
4157s%@CCSHARED@%$CCSHARED%g
4158s%@LINKFORSHARED@%$LINKFORSHARED%g
Guido van Rossum009f7871997-12-04 00:51:42 +00004159s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00004160s%@LDLAST@%$LDLAST%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00004161s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00004162s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00004163s%@LIBM@%$LIBM%g
4164s%@LIBC@%$LIBC%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004165
4166CEOF
4167EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00004168
4169cat >> $CONFIG_STATUS <<\EOF
4170
4171# Split the substitutions into bite-sized pieces for seds with
4172# small command number limits, like on Digital OSF/1 and HP-UX.
4173ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4174ac_file=1 # Number of current file.
4175ac_beg=1 # First line for current file.
4176ac_end=$ac_max_sed_cmds # Line after last line for current file.
4177ac_more_lines=:
4178ac_sed_cmds=""
4179while $ac_more_lines; do
4180 if test $ac_beg -gt 1; then
4181 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4182 else
4183 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4184 fi
4185 if test ! -s conftest.s$ac_file; then
4186 ac_more_lines=false
4187 rm -f conftest.s$ac_file
4188 else
4189 if test -z "$ac_sed_cmds"; then
4190 ac_sed_cmds="sed -f conftest.s$ac_file"
4191 else
4192 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4193 fi
4194 ac_file=`expr $ac_file + 1`
4195 ac_beg=$ac_end
4196 ac_end=`expr $ac_end + $ac_max_sed_cmds`
4197 fi
4198done
4199if test -z "$ac_sed_cmds"; then
4200 ac_sed_cmds=cat
4201fi
4202EOF
4203
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004204cat >> $CONFIG_STATUS <<EOF
4205
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004206CONFIG_FILES=\${CONFIG_FILES-"Makefile \
4207 Objects/Makefile \
4208 Parser/Makefile \
4209 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00004210 Modules/Makefile.pre \
4211 Modules/Setup.thread"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004212EOF
4213cat >> $CONFIG_STATUS <<\EOF
4214for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004215 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004216 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00004217 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004218 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4219 *) ac_file_in="${ac_file}.in" ;;
4220 esac
4221
Guido van Rossumf78abae1997-01-21 22:02:36 +00004222 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004223
4224 # Remove last slash and all that follows it. Not all systems have dirname.
4225 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4226 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4227 # The file is in a subdirectory.
4228 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004229 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004230 # A "../" for each directory in $ac_dir_suffix.
4231 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4232 else
4233 ac_dir_suffix= ac_dots=
4234 fi
4235
4236 case "$ac_given_srcdir" in
4237 .) srcdir=.
4238 if test -z "$ac_dots"; then top_srcdir=.
4239 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4240 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4241 *) # Relative path.
4242 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4243 top_srcdir="$ac_dots$ac_given_srcdir" ;;
4244 esac
4245
Guido van Rossumf78abae1997-01-21 22:02:36 +00004246
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004247 echo creating "$ac_file"
4248 rm -f "$ac_file"
4249 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4250 case "$ac_file" in
4251 *Makefile*) ac_comsub="1i\\
4252# $configure_input" ;;
4253 *) ac_comsub= ;;
4254 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00004255
4256 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 +00004257 sed -e "$ac_comsub
4258s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00004259s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00004260s%@top_srcdir@%$top_srcdir%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00004261" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00004262fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00004263rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00004264
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004265# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4266# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00004267#
4268# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004269ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
4270ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00004271ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004272ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00004273# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004274ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4275ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00004276ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004277ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00004278# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004279ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4280ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00004281ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004282ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00004283
Guido van Rossumf78abae1997-01-21 22:02:36 +00004284if test "${CONFIG_HEADERS+set}" != set; then
4285EOF
4286cat >> $CONFIG_STATUS <<EOF
4287 CONFIG_HEADERS="config.h"
4288EOF
4289cat >> $CONFIG_STATUS <<\EOF
4290fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004291for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004292 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004293 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00004294 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004295 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4296 *) ac_file_in="${ac_file}.in" ;;
4297 esac
4298
Guido van Rossum7f43da71994-08-01 12:15:30 +00004299 echo creating $ac_file
4300
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004301 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00004302 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4303 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004304
4305EOF
4306
4307# Transform confdefs.h into a sed script conftest.vals that substitutes
4308# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004309# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004310# Protect against being in an unquoted here document in config.status.
4311rm -f conftest.vals
4312cat > conftest.hdr <<\EOF
4313s/[\\&%]/\\&/g
4314s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004315s%#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 +00004316s%ac_d%ac_u%gp
4317s%ac_u%ac_e%gp
4318EOF
4319sed -n -f conftest.hdr confdefs.h > conftest.vals
4320rm -f conftest.hdr
4321
4322# This sed command replaces #undef with comments. This is necessary, for
4323# example, in the case of _POSIX_SOURCE, which is predefined and required
4324# on some systems where configure will not decide to define it.
4325cat >> conftest.vals <<\EOF
4326s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4327EOF
4328
4329# Break up conftest.vals because some shells have a limit on
4330# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004331
4332rm -f conftest.tail
4333while :
4334do
4335 ac_lines=`grep -c . conftest.vals`
4336 # grep -c gives empty output for an empty file on some AIX systems.
4337 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4338 # Write a limited-size here document to conftest.frag.
4339 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4340 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4341 echo 'CEOF
4342 sed -f conftest.frag conftest.in > conftest.out
4343 rm -f conftest.in
4344 mv conftest.out conftest.in
4345' >> $CONFIG_STATUS
4346 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4347 rm -f conftest.vals
4348 mv conftest.tail conftest.vals
4349done
4350rm -f conftest.vals
4351
4352cat >> $CONFIG_STATUS <<\EOF
4353 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00004354 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004355 cat conftest.in >> conftest.h
4356 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00004357 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004358 echo "$ac_file is unchanged"
4359 rm -f conftest.h
4360 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004361 # Remove last slash and all that follows it. Not all systems have dirname.
4362 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4363 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4364 # The file is in a subdirectory.
4365 test ! -d "$ac_dir" && mkdir "$ac_dir"
4366 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004367 rm -f $ac_file
4368 mv conftest.h $ac_file
4369 fi
4370fi; done
4371
Guido van Rossumf78abae1997-01-21 22:02:36 +00004372EOF
4373cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004374
Guido van Rossumf78abae1997-01-21 22:02:36 +00004375EOF
4376cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004377
4378exit 0
4379EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004380chmod +x $CONFIG_STATUS
4381rm -fr confdefs* $ac_clean_files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004382test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00004383