blob: a06ce333485bafcbf72d8376519794d963522b3c [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 Rossum45140f91997-08-29 18:44:06 +00003# From configure.in Revision: 1.64
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
580 MACHDEP="$ac_sys_system$ac_sys_release"
581 fi
582fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000583
584# Set name for machine-dependent library files
585
586echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +0000587echo "configure:588: checking MACHDEP" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000588if test -z "$MACHDEP"
589then
Guido van Rossum563e7081996-09-10 18:20:48 +0000590 ac_sys_system=`uname -s`
591 if test "$ac_sys_system" = "AIX" ; then
592 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000593 else
Guido van Rossum563e7081996-09-10 18:20:48 +0000594 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000595 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000596 ac_md_system=`echo $ac_sys_system |
597 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
598 ac_md_release=`echo $ac_sys_release |
599 tr -d '/ ' | sed 's/\..*//'`
600 MACHDEP="$ac_md_system$ac_md_release"
601
Guido van Rossum07397971997-04-29 21:49:50 +0000602 case $MACHDEP in
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000603 '') MACHDEP=unknown;;
604 esac
605fi
606echo "$ac_t""$MACHDEP" 1>&6
607
Guido van Rossum627b2d71993-12-24 10:39:16 +0000608# checks for alternative programs
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000609echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +0000610echo "configure:611: checking for --without-gcc" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000611# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000612if test "${with_gcc+set}" = set; then
613 withval="$with_gcc"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000614
615 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000616 no) CC=cc
617 without_gcc=yes;;
618 yes) CC=gcc
619 without_gcc=no;;
620 *) CC=$withval
621 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000622 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000623else
Guido van Rossume77438c1995-09-13 18:59:59 +0000624
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000625 case $ac_sys_system in
Guido van Rossume77438c1995-09-13 18:59:59 +0000626 OSF1) CC=cc
627 without_gcc=;;
628 *) without_gcc=no;;
629 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000630fi
631
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000632echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000633
Guido van Rossum8b131c51995-03-09 14:10:13 +0000634# If the user switches compilers, we can't believe the cache
635if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
636then
637 { echo "configure: error: cached CC is different -- throw away $cache_file
638(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
639fi
640
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000641# Extract the first word of "gcc", so it can be a program name with args.
642set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000643echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +0000644echo "configure:645: checking for $ac_word" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000645if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
646 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000647else
648 if test -n "$CC"; then
649 ac_cv_prog_CC="$CC" # Let the user override the test.
650else
Guido van Rossum7f43da71994-08-01 12:15:30 +0000651 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
652 for ac_dir in $PATH; do
653 test -z "$ac_dir" && ac_dir=.
654 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000655 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000656 break
657 fi
658 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000659 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000660fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000661fi
662CC="$ac_cv_prog_CC"
663if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000664 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000665else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000666 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000667fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000668
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000669if test -z "$CC"; then
670 # Extract the first word of "cc", so it can be a program name with args.
671set dummy cc; ac_word=$2
672echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +0000673echo "configure:674: checking for $ac_word" >&5
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000674if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
675 echo $ac_n "(cached) $ac_c" 1>&6
676else
677 if test -n "$CC"; then
678 ac_cv_prog_CC="$CC" # Let the user override the test.
679else
680 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
681 ac_prog_rejected=no
682 for ac_dir in $PATH; do
683 test -z "$ac_dir" && ac_dir=.
684 if test -f $ac_dir/$ac_word; then
685 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
686 ac_prog_rejected=yes
687 continue
688 fi
689 ac_cv_prog_CC="cc"
690 break
691 fi
692 done
693 IFS="$ac_save_ifs"
694if test $ac_prog_rejected = yes; then
695 # We found a bogon in the path, so make sure we never use it.
696 set dummy $ac_cv_prog_CC
697 shift
698 if test $# -gt 0; then
699 # We chose a different compiler from the bogus one.
700 # However, it has the same basename, so the bogon will be chosen
701 # first if we set CC to just the basename; use the full file name.
702 shift
703 set dummy "$ac_dir/$ac_word" "$@"
704 shift
705 ac_cv_prog_CC="$@"
706 fi
707fi
708fi
709fi
710CC="$ac_cv_prog_CC"
711if test -n "$CC"; then
712 echo "$ac_t""$CC" 1>&6
713else
714 echo "$ac_t""no" 1>&6
715fi
716
717 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
718fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000719
Guido van Rossumf78abae1997-01-21 22:02:36 +0000720echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +0000721echo "configure:722: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000722
723ac_ext=c
724# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
725ac_cpp='$CPP $CPPFLAGS'
726ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
727ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
728cross_compiling=$ac_cv_prog_cc_cross
729
730cat > conftest.$ac_ext <<EOF
Guido van Rossumb06df271997-08-05 21:50:20 +0000731#line 732 "configure"
Guido van Rossumf78abae1997-01-21 22:02:36 +0000732#include "confdefs.h"
733main(){return(0);}
734EOF
Guido van Rossumb06df271997-08-05 21:50:20 +0000735if { (eval echo configure:736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000736 ac_cv_prog_cc_works=yes
737 # If we can't run a trivial program, we are probably using a cross compiler.
738 if (./conftest; exit) 2>/dev/null; then
739 ac_cv_prog_cc_cross=no
740 else
741 ac_cv_prog_cc_cross=yes
742 fi
743else
744 echo "configure: failed program was:" >&5
745 cat conftest.$ac_ext >&5
746 ac_cv_prog_cc_works=no
747fi
748rm -fr conftest*
749
750echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
751if test $ac_cv_prog_cc_works = no; then
752 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
753fi
754echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +0000755echo "configure:756: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000756echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
757cross_compiling=$ac_cv_prog_cc_cross
758
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000759echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +0000760echo "configure:761: checking whether we are using GNU C" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000761if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
762 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000763else
764 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000765#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000766 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +0000767#endif
768EOF
Guido van Rossumb06df271997-08-05 21:50:20 +0000769if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:770: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000770 ac_cv_prog_gcc=yes
771else
772 ac_cv_prog_gcc=no
773fi
774fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000775
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000776echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +0000777
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000778if test $ac_cv_prog_gcc = yes; then
779 GCC=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +0000780 ac_test_CFLAGS="${CFLAGS+set}"
781 ac_save_CFLAGS="$CFLAGS"
782 CFLAGS=
783 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +0000784echo "configure:785: checking whether ${CC-cc} accepts -g" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000785if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000786 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000787else
788 echo 'void f(){}' > conftest.c
789if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000790 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000791else
Guido van Rossumf78abae1997-01-21 22:02:36 +0000792 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000793fi
794rm -f conftest*
795
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000796fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000797
Guido van Rossumf78abae1997-01-21 22:02:36 +0000798echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
799 if test "$ac_test_CFLAGS" = set; then
800 CFLAGS="$ac_save_CFLAGS"
801 elif test $ac_cv_prog_cc_g = yes; then
802 CFLAGS="-g -O2"
803 else
804 CFLAGS="-O2"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000805 fi
806else
807 GCC=
808 test "${CFLAGS+set}" = set || CFLAGS="-g"
809fi
810
Guido van Rossum76c5fe21997-08-14 19:45:07 +0000811
Guido van Rossum24b1e751997-08-21 02:29:16 +0000812case $ac_sys_system in
813hp*|HP*)
814 case $CC in
815 cc|*/cc) CC="$CC -Aa -D_HPUX_SOURCE";;
816 esac;;
817esac
818
Guido van Rossum76c5fe21997-08-14 19:45:07 +0000819# LINKCC is the command that links the python executable -- default is $(CC).
820# This is altered for AIX in order to build the export list before linking.
821
822echo $ac_n "checking LINKCC""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +0000823echo "configure:824: checking LINKCC" >&5
Guido van Rossum76c5fe21997-08-14 19:45:07 +0000824if test -z "$LINKCC"
825then
826 case $ac_sys_system in
827 AIX*)
Guido van Rossum45140f91997-08-29 18:44:06 +0000828 LINKCC="\$(srcdir)/makexp_aix python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
Guido van Rossum25f93031997-08-18 16:00:04 +0000829 *) LINKCC="\$(PURIFY) \$(CC)";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +0000830 esac
831fi
832echo "$ac_t""$LINKCC" 1>&6
833
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000834# Extract the first word of "ranlib", so it can be a program name with args.
835set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000836echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +0000837echo "configure:838: checking for $ac_word" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000838if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
839 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000840else
841 if test -n "$RANLIB"; then
842 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
843else
Guido van Rossum7f43da71994-08-01 12:15:30 +0000844 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
845 for ac_dir in $PATH; do
846 test -z "$ac_dir" && ac_dir=.
847 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000848 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000849 break
850 fi
851 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000853 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000854fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000855fi
856RANLIB="$ac_cv_prog_RANLIB"
857if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000858 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000859else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000860 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000861fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000862
863
Guido van Rossum7f43da71994-08-01 12:15:30 +0000864for ac_prog in ar aal
865do
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000866# Extract the first word of "$ac_prog", so it can be a program name with args.
867set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000868echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +0000869echo "configure:870: checking for $ac_word" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000870if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
871 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872else
873 if test -n "$AR"; then
874 ac_cv_prog_AR="$AR" # Let the user override the test.
875else
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
877 for ac_dir in $PATH; do
878 test -z "$ac_dir" && ac_dir=.
879 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000880 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881 break
882 fi
883 done
884 IFS="$ac_save_ifs"
885fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000886fi
887AR="$ac_cv_prog_AR"
888if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000889 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000890else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000891 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000892fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000893
894test -n "$AR" && break
895done
896test -n "$AR" || AR="ar"
897
898
Guido van Rossumda88dad1995-01-26 00:46:29 +0000899
900
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000901# Install just never works :-(
902if test -z "$INSTALL"
Guido van Rossumda88dad1995-01-26 00:46:29 +0000903then
904 INSTALL=cp
905 INSTALL_PROGRAM=cp
906 INSTALL_DATA=cp
907else
908 INSTALL_PROGRAM="$INSTALL"
909 INSTALL_DATA="$INSTALL -m 644"
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000910fi
911
912# Optimizer/debugger flags passed between Makefiles
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000913
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000914if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000915then
Guido van Rossumedca74a1997-07-18 23:29:40 +0000916 case $GCC in
917 yes)
918 case $ac_cv_prog_cc_g in
919 yes) OPT="-g -O2";;
920 *) OPT="-O2";;
921 esac
922 ;;
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000923 *) OPT="-O";;
924 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000925fi
926
Guido van Rossum563e7081996-09-10 18:20:48 +0000927if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +0000928then
929 OPT="$OPT $ac_arch_flags"
930fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000931# checks for UNIX variants that set C preprocessor variables
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000932echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +0000933echo "configure:934: checking how to run the C preprocessor" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000934# On Suns, sometimes $CPP names a directory.
935if test -n "$CPP" && test -d "$CPP"; then
936 CPP=
937fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000938if test -z "$CPP"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000939if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
940 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000941else
942 # This must be in double quotes, not single quotes, because CPP may get
943 # substituted into the Makefile and "${CC-cc}" will confuse make.
Guido van Rossum627b2d71993-12-24 10:39:16 +0000944 CPP="${CC-cc} -E"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000945 # On the NeXT, cc -E runs the code through the compiler's parser,
946 # not just through cpp.
947 cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +0000948#line 949 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000949#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000950#include <assert.h>
Guido van Rossum627b2d71993-12-24 10:39:16 +0000951Syntax Error
952EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000953ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum24b1e751997-08-21 02:29:16 +0000954{ (eval echo configure:955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000955ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000956if test -z "$ac_err"; then
957 :
958else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000959 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000960 echo "configure: failed program was:" >&5
961 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +0000962 rm -rf conftest*
963 CPP="${CC-cc} -E -traditional-cpp"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000964 cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +0000965#line 966 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000966#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000967#include <assert.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +0000968Syntax Error
969EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000970ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum24b1e751997-08-21 02:29:16 +0000971{ (eval echo configure:972: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000972ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000973if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000974 :
975else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000976 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000977 echo "configure: failed program was:" >&5
978 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +0000979 rm -rf conftest*
980 CPP=/lib/cpp
981fi
982rm -f conftest*
983fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000984rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000985 ac_cv_prog_CPP="$CPP"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000986fi
Guido van Rossume77438c1995-09-13 18:59:59 +0000987 CPP="$ac_cv_prog_CPP"
988else
989 ac_cv_prog_CPP="$CPP"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000990fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000991echo "$ac_t""$CPP" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +0000992
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000993echo $ac_n "checking for AIX""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +0000994echo "configure:995: checking for AIX" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000995cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +0000996#line 997 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000997#include "confdefs.h"
998#ifdef _AIX
999 yes
1000#endif
1001
1002EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001003if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1004 egrep "yes" >/dev/null 2>&1; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001005 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001006 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001007#define _ALL_SOURCE 1
1008EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001009
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001010else
1011 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001012 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001013fi
1014rm -f conftest*
1015
1016
Guido van Rossumf78abae1997-01-21 22:02:36 +00001017ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001018echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00001019echo "configure:1020: checking for minix/config.h" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001020if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1021 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001022else
1023 cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00001024#line 1025 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001025#include "confdefs.h"
1026#include <minix/config.h>
1027EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001028ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum24b1e751997-08-21 02:29:16 +00001029{ (eval echo configure:1030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001030ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001031if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001032 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001033 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001034else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001035 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001036 echo "configure: failed program was:" >&5
1037 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001038 rm -rf conftest*
1039 eval "ac_cv_header_$ac_safe=no"
1040fi
1041rm -f conftest*
1042fi
1043if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001044 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001045 MINIX=yes
1046else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001047 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001048MINIX=
Guido van Rossum627b2d71993-12-24 10:39:16 +00001049fi
1050
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001051if test "$MINIX" = yes; then
1052 cat >> confdefs.h <<\EOF
1053#define _POSIX_SOURCE 1
1054EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001055
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001056 cat >> confdefs.h <<\EOF
1057#define _POSIX_1_SOURCE 2
1058EOF
1059
1060 cat >> confdefs.h <<\EOF
1061#define _MINIX 1
1062EOF
1063
1064fi
1065
Guido van Rossumda88dad1995-01-26 00:46:29 +00001066
Guido van Rossum201afe51997-05-14 21:14:44 +00001067echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00001068echo "configure:1069: checking whether $CC accepts -Olimit 1500" >&5
Guido van Rossum201afe51997-05-14 21:14:44 +00001069if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
1070 echo $ac_n "(cached) $ac_c" 1>&6
1071else
1072 ac_save_cc="$CC"
1073CC="$CC -Olimit 1500"
Guido van Rossumdb7098c1997-05-30 14:24:16 +00001074if test "$cross_compiling" = yes; then
1075 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1076else
1077 cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00001078#line 1079 "configure"
Guido van Rossum201afe51997-05-14 21:14:44 +00001079#include "confdefs.h"
Guido van Rossumdb7098c1997-05-30 14:24:16 +00001080int main() { return 0; }
Guido van Rossum201afe51997-05-14 21:14:44 +00001081EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00001082if { (eval echo configure:1083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
Guido van Rossumdb7098c1997-05-30 14:24:16 +00001083then
Guido van Rossum201afe51997-05-14 21:14:44 +00001084 ac_cv_olimit_ok=yes
1085else
1086 echo "configure: failed program was:" >&5
1087 cat conftest.$ac_ext >&5
Guido van Rossumdb7098c1997-05-30 14:24:16 +00001088 rm -fr conftest*
Guido van Rossum201afe51997-05-14 21:14:44 +00001089 ac_cv_olimit_ok=no
1090fi
Guido van Rossumdb7098c1997-05-30 14:24:16 +00001091rm -fr conftest*
1092fi
1093
Guido van Rossum201afe51997-05-14 21:14:44 +00001094CC="$ac_save_cc"
1095fi
1096
1097echo "$ac_t""$ac_cv_olimit_ok" 1>&6
1098if test $ac_cv_olimit_ok = yes; then
1099 OPT="$OPT -Olimit 1500"
1100fi
1101
Guido van Rossum84e7b241996-08-19 21:59:00 +00001102# check for ANSI or K&R ("traditional") preprocessor
1103echo $ac_n "checking for C preprocessor type""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00001104echo "configure:1105: checking for C preprocessor type" >&5
Guido van Rossum84e7b241996-08-19 21:59:00 +00001105cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00001106#line 1107 "configure"
Guido van Rossum84e7b241996-08-19 21:59:00 +00001107#include "confdefs.h"
1108
1109#define spam(name, doc) {#name, &name, #name "() -- " doc}
1110int foo;
1111struct {char *name; int *addr; char *doc;} desc = spam(foo, "something");
1112
Guido van Rossumf78abae1997-01-21 22:02:36 +00001113int main() {
Guido van Rossum84e7b241996-08-19 21:59:00 +00001114;
1115; return 0; }
1116EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00001117if { (eval echo configure:1118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum84e7b241996-08-19 21:59:00 +00001118 rm -rf conftest*
1119 cpp_type=ansi
1120else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001121 echo "configure: failed program was:" >&5
1122 cat conftest.$ac_ext >&5
Guido van Rossum84e7b241996-08-19 21:59:00 +00001123 rm -rf conftest*
1124 cat >> confdefs.h <<\EOF
1125#define HAVE_OLD_CPP 1
1126EOF
1127 cpp_type=traditional
1128fi
1129rm -f conftest*
Guido van Rossum84e7b241996-08-19 21:59:00 +00001130echo "$ac_t""$cpp_type" 1>&6
1131
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001132# checks for header files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001133echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00001134echo "configure:1135: checking for ANSI C header files" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001135if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1136 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001137else
1138 cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00001139#line 1140 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001140#include "confdefs.h"
1141#include <stdlib.h>
1142#include <stdarg.h>
1143#include <string.h>
1144#include <float.h>
1145EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001146ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum24b1e751997-08-21 02:29:16 +00001147{ (eval echo configure:1148: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001148ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001149if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001150 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001151 ac_cv_header_stdc=yes
1152else
1153 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001154 echo "configure: failed program was:" >&5
1155 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001156 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001157 ac_cv_header_stdc=no
1158fi
1159rm -f conftest*
1160
1161if test $ac_cv_header_stdc = yes; then
1162 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1163cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00001164#line 1165 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001165#include "confdefs.h"
1166#include <string.h>
1167EOF
1168if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1169 egrep "memchr" >/dev/null 2>&1; then
1170 :
1171else
1172 rm -rf conftest*
1173 ac_cv_header_stdc=no
1174fi
1175rm -f conftest*
1176
1177fi
1178
1179if test $ac_cv_header_stdc = yes; then
1180 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1181cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00001182#line 1183 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001183#include "confdefs.h"
1184#include <stdlib.h>
1185EOF
1186if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1187 egrep "free" >/dev/null 2>&1; then
1188 :
1189else
1190 rm -rf conftest*
1191 ac_cv_header_stdc=no
1192fi
1193rm -f conftest*
1194
1195fi
1196
1197if test $ac_cv_header_stdc = yes; then
1198 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1199if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001200 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001201else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001202 cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00001203#line 1204 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001204#include "confdefs.h"
1205#include <ctype.h>
1206#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1207#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001208#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00001209int main () { int i; for (i = 0; i < 256; i++)
1210if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1211exit (0); }
1212
1213EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00001214if { (eval echo configure:1215: \"$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 +00001215then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001216 :
1217else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001218 echo "configure: failed program was:" >&5
1219 cat conftest.$ac_ext >&5
1220 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001221 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001222fi
1223rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001224fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001225
1226fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001227fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001228
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001229echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001230if test $ac_cv_header_stdc = yes; then
1231 cat >> confdefs.h <<\EOF
1232#define STDC_HEADERS 1
1233EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001234
1235fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001236
Guido van Rossum07397971997-04-29 21:49:50 +00001237for ac_hdr in dlfcn.h fcntl.h limits.h ncurses.h pthread.h \
Guido van Rossum2d38f911996-06-26 19:47:01 +00001238signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h \
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001239sys/audioio.h sys/file.h sys/lock.h \
1240sys/param.h sys/select.h sys/time.h sys/times.h \
Guido van Rossum2d38f911996-06-26 19:47:01 +00001241sys/un.h sys/utsname.h sys/wait.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001242do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001243ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001244echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00001245echo "configure:1246: checking for $ac_hdr" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001246if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1247 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001248else
1249 cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00001250#line 1251 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001251#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001252#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001253EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001254ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum24b1e751997-08-21 02:29:16 +00001255{ (eval echo configure:1256: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001256ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001257if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001258 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001259 eval "ac_cv_header_$ac_safe=yes"
1260else
1261 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001262 echo "configure: failed program was:" >&5
1263 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001264 rm -rf conftest*
1265 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001266fi
1267rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001268fi
1269if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001270 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001271 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001272 cat >> confdefs.h <<EOF
1273#define $ac_tr_hdr 1
1274EOF
1275
1276else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001277 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001278fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001279done
1280
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001281ac_header_dirent=no
1282for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1283do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001284ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001285echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00001286echo "configure:1287: checking for $ac_hdr that defines DIR" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001287if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1288 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001289else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001290 cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00001291#line 1292 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001292#include "confdefs.h"
1293#include <sys/types.h>
1294#include <$ac_hdr>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001295int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001296DIR *dirp = 0;
1297; return 0; }
1298EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00001299if { (eval echo configure:1300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001300 rm -rf conftest*
1301 eval "ac_cv_header_dirent_$ac_safe=yes"
1302else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001303 echo "configure: failed program was:" >&5
1304 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001305 rm -rf conftest*
1306 eval "ac_cv_header_dirent_$ac_safe=no"
1307fi
1308rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001309fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001310if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001311 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001312 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001313 cat >> confdefs.h <<EOF
1314#define $ac_tr_hdr 1
1315EOF
1316 ac_header_dirent=$ac_hdr; break
1317else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001318 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001319fi
1320done
1321# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1322if test $ac_header_dirent = dirent.h; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001323echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00001324echo "configure:1325: checking for opendir in -ldir" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001325ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001326if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001327 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001328else
1329 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001330LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001331cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00001332#line 1333 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001333#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001334/* Override any gcc2 internal prototype to avoid an error. */
1335/* We use char because int might match the return type of a gcc2
1336 builtin and then its argument prototype would still apply. */
1337char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001338
Guido van Rossumf78abae1997-01-21 22:02:36 +00001339int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001340opendir()
1341; return 0; }
1342EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00001343if { (eval echo configure:1344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001344 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001345 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001346else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001347 echo "configure: failed program was:" >&5
1348 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001349 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001350 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001351fi
1352rm -f conftest*
1353LIBS="$ac_save_LIBS"
1354
1355fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001356if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001357 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001358 LIBS="$LIBS -ldir"
1359else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001360 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001361fi
1362
1363else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001364echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00001365echo "configure:1366: checking for opendir in -lx" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001366ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001367if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001368 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001369else
1370 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001371LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001372cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00001373#line 1374 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001374#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001375/* Override any gcc2 internal prototype to avoid an error. */
1376/* We use char because int might match the return type of a gcc2
1377 builtin and then its argument prototype would still apply. */
1378char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001379
Guido van Rossumf78abae1997-01-21 22:02:36 +00001380int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001381opendir()
1382; return 0; }
1383EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00001384if { (eval echo configure:1385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001385 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001386 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001387else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001388 echo "configure: failed program was:" >&5
1389 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001390 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001391 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001392fi
1393rm -f conftest*
1394LIBS="$ac_save_LIBS"
1395
1396fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001397if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001398 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001399 LIBS="$LIBS -lx"
1400else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001401 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001402fi
1403
1404fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001405
1406
1407# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00001408was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001409echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00001410echo "configure:1411: checking for clock_t in time.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001411cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00001412#line 1413 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001413#include "confdefs.h"
1414#include <time.h>
1415EOF
1416if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1417 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00001418 rm -rf conftest*
1419 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001420else
1421 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001422 cat >> confdefs.h <<\EOF
1423#define clock_t long
1424EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001425
1426fi
1427rm -f conftest*
1428
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001429echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00001430
Guido van Rossum84e7b241996-08-19 21:59:00 +00001431# Add some code to confdefs.h so that the test for off_t works on SCO
1432cat >> confdefs.h <<\EOF
1433#if defined(SCO_DS)
1434#undef _OFF_T
1435#endif
1436EOF
1437
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001438echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00001439echo "configure:1440: checking for mode_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001440if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1441 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001442else
1443 cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00001444#line 1445 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001445#include "confdefs.h"
1446#include <sys/types.h>
1447#if STDC_HEADERS
1448#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001449#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001450#endif
1451EOF
1452if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossumf78abae1997-01-21 22:02:36 +00001453 egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001454 rm -rf conftest*
1455 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001456else
1457 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001458 ac_cv_type_mode_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001459fi
1460rm -f conftest*
1461
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001462fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001463echo "$ac_t""$ac_cv_type_mode_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001464if test $ac_cv_type_mode_t = no; then
1465 cat >> confdefs.h <<\EOF
1466#define mode_t int
1467EOF
1468
1469fi
1470
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001471echo $ac_n "checking for off_t""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00001472echo "configure:1473: checking for off_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001473if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1474 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001475else
1476 cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00001477#line 1478 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001478#include "confdefs.h"
1479#include <sys/types.h>
1480#if STDC_HEADERS
1481#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001482#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001483#endif
1484EOF
1485if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossumf78abae1997-01-21 22:02:36 +00001486 egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001487 rm -rf conftest*
1488 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001489else
1490 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001491 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001492fi
1493rm -f conftest*
1494
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001495fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001496echo "$ac_t""$ac_cv_type_off_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001497if test $ac_cv_type_off_t = no; then
1498 cat >> confdefs.h <<\EOF
1499#define off_t long
1500EOF
1501
1502fi
1503
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001504echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00001505echo "configure:1506: checking for pid_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001506if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1507 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001508else
1509 cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00001510#line 1511 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001511#include "confdefs.h"
1512#include <sys/types.h>
1513#if STDC_HEADERS
1514#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001515#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001516#endif
1517EOF
1518if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossumf78abae1997-01-21 22:02:36 +00001519 egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001520 rm -rf conftest*
1521 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001522else
1523 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001524 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001525fi
1526rm -f conftest*
1527
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001528fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001529echo "$ac_t""$ac_cv_type_pid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001530if test $ac_cv_type_pid_t = no; then
1531 cat >> confdefs.h <<\EOF
1532#define pid_t int
1533EOF
1534
1535fi
1536
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001537echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00001538echo "configure:1539: checking return type of signal handlers" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001539if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1540 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001541else
1542 cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00001543#line 1544 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001544#include "confdefs.h"
1545#include <sys/types.h>
1546#include <signal.h>
1547#ifdef signal
1548#undef signal
1549#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001550#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001551extern "C" void (*signal (int, void (*)(int)))(int);
1552#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001553void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001554#endif
1555
Guido van Rossumf78abae1997-01-21 22:02:36 +00001556int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001557int i;
1558; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001559EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00001560if { (eval echo configure:1561: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001561 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001562 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00001563else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001564 echo "configure: failed program was:" >&5
1565 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001566 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001567 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00001568fi
1569rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001570fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001571
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001572echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001573cat >> confdefs.h <<EOF
1574#define RETSIGTYPE $ac_cv_type_signal
1575EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001576
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001577
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001578echo $ac_n "checking for size_t""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00001579echo "configure:1580: checking for size_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001580if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1581 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001582else
1583 cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00001584#line 1585 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001585#include "confdefs.h"
1586#include <sys/types.h>
1587#if STDC_HEADERS
1588#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001589#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001590#endif
1591EOF
1592if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossumf78abae1997-01-21 22:02:36 +00001593 egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001594 rm -rf conftest*
1595 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001596else
1597 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001598 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001599fi
1600rm -f conftest*
1601
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001602fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001603echo "$ac_t""$ac_cv_type_size_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001604if test $ac_cv_type_size_t = no; then
1605 cat >> confdefs.h <<\EOF
1606#define size_t unsigned
1607EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001608
1609fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001610
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001611echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00001612echo "configure:1613: checking for uid_t in sys/types.h" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001613if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
1614 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001615else
1616 cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00001617#line 1618 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001618#include "confdefs.h"
1619#include <sys/types.h>
1620EOF
1621if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1622 egrep "uid_t" >/dev/null 2>&1; then
1623 rm -rf conftest*
1624 ac_cv_type_uid_t=yes
1625else
1626 rm -rf conftest*
1627 ac_cv_type_uid_t=no
1628fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001629rm -f conftest*
1630
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001631fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001632
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001633echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001634if test $ac_cv_type_uid_t = no; then
1635 cat >> confdefs.h <<\EOF
1636#define uid_t int
1637EOF
1638
1639 cat >> confdefs.h <<\EOF
1640#define gid_t int
1641EOF
1642
1643fi
1644
Guido van Rossum627b2d71993-12-24 10:39:16 +00001645
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001646echo $ac_n "checking size of int""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00001647echo "configure:1648: checking size of int" >&5
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001648if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1649 echo $ac_n "(cached) $ac_c" 1>&6
1650else
1651 if test "$cross_compiling" = yes; then
1652 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1653else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001654 cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00001655#line 1656 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001656#include "confdefs.h"
1657#include <stdio.h>
1658main()
1659{
1660 FILE *f=fopen("conftestval", "w");
1661 if (!f) exit(1);
1662 fprintf(f, "%d\n", sizeof(int));
1663 exit(0);
1664}
1665EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00001666if { (eval echo configure:1667: \"$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 +00001667then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001668 ac_cv_sizeof_int=`cat conftestval`
1669else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001670 echo "configure: failed program was:" >&5
1671 cat conftest.$ac_ext >&5
1672 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001673 ac_cv_sizeof_int=0
1674fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001675rm -fr conftest*
1676fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001677
1678fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001679echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1680cat >> confdefs.h <<EOF
1681#define SIZEOF_INT $ac_cv_sizeof_int
1682EOF
1683
1684
1685echo $ac_n "checking size of long""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00001686echo "configure:1687: checking size of long" >&5
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001687if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1688 echo $ac_n "(cached) $ac_c" 1>&6
1689else
1690 if test "$cross_compiling" = yes; then
1691 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1692else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001693 cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00001694#line 1695 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001695#include "confdefs.h"
1696#include <stdio.h>
1697main()
1698{
1699 FILE *f=fopen("conftestval", "w");
1700 if (!f) exit(1);
1701 fprintf(f, "%d\n", sizeof(long));
1702 exit(0);
1703}
1704EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00001705if { (eval echo configure:1706: \"$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 +00001706then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001707 ac_cv_sizeof_long=`cat conftestval`
1708else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001709 echo "configure: failed program was:" >&5
1710 cat conftest.$ac_ext >&5
1711 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001712 ac_cv_sizeof_long=0
1713fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001714rm -fr conftest*
1715fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001716
1717fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001718echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1719cat >> confdefs.h <<EOF
1720#define SIZEOF_LONG $ac_cv_sizeof_long
1721EOF
1722
1723
Guido van Rossum0a516c91994-09-12 10:58:40 +00001724
1725# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00001726
1727
1728
1729
Guido van Rossum0a516c91994-09-12 10:58:40 +00001730# SO is the extension of shared libraries `(including the dot!)
1731# -- usually .so, .sl on HP-UX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001732echo $ac_n "checking SO""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00001733echo "configure:1734: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00001734if test -z "$SO"
1735then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001736 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00001737 hp*|HP*) SO=.sl;;
1738 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001739 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001740fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001741echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001742# LDSHARED is the ld *command* used to create shared library
1743# -- "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 +00001744echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00001745echo "configure:1746: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00001746if test -z "$LDSHARED"
1747then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001748 case $ac_sys_system/$ac_sys_release in
Guido van Rossum45140f91997-08-29 18:44:06 +00001749 AIX*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";;
Guido van Rossum07397971997-04-29 21:49:50 +00001750 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossumdb7098c1997-05-30 14:24:16 +00001751 IRIX*/6*) LDSHARED="ld $SGI_ABI -shared -all"; OPT="$OPT $SGI_ABI";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001752 SunOS/4*) LDSHARED="ld";;
1753 SunOS/5*) LDSHARED="ld -G";;
1754 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00001755 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
1756 DYNIX/ptx*) LDSHARED="ld -G";;
Guido van Rossum563e7081996-09-10 18:20:48 +00001757 next/*) LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';;
Guido van Rossum81652ab1996-07-21 02:53:27 +00001758 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001759 FreeBSD*) LDSHARED="ld -Bshareable";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00001760 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001761 *) LDSHARED="ld";;
1762 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001763fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001764echo "$ac_t""$LDSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001765# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001766# library -- this is only needed for a few systems
1767echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00001768echo "configure:1769: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00001769if test -z "$CCSHARED"
1770then
Guido van Rossum07397971997-04-29 21:49:50 +00001771 case $ac_sys_system/$ac_sys_release in
Guido van Rossumaf07a441995-02-13 19:45:27 +00001772 hp*|HP*) if test "$GCC" = yes;
1773 then CCSHARED="-fpic";
1774 else CCSHARED="+z";
1775 fi;;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001776 Linux*) CCSHARED="-fpic";;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001777 FreeBSD*) CCSHARED="-fpic";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00001778 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Guido van Rossumdb7098c1997-05-30 14:24:16 +00001779 IRIX*/6*) CCSHARED="$SGI_ABI -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001780 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001781fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001782echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001783# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001784# the python executable -- this is only needed for a few systems
1785echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00001786echo "configure:1787: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00001787if test -z "$LINKFORSHARED"
1788then
Guido van Rossum07397971997-04-29 21:49:50 +00001789 case $ac_sys_system/$ac_sys_release in
Guido van Rossume4766f61997-05-13 21:04:26 +00001790 AIX*) LINKFORSHARED='-Wl,-bE:$(srcdir)/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001791 hp*|HP*)
1792 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/sharedmodules";;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001793 Linux*) LINKFORSHARED="-rdynamic";;
Guido van Rossum749af7c1997-08-16 14:35:52 +00001794 next/*) LINKFORSHARED="-u libsys_s";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00001795 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Guido van Rossumdb7098c1997-05-30 14:24:16 +00001796 IRIX*/6*) LINKFORSHARED="$SGI_ABI -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001797 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001798fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001799echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001800
Guido van Rossum627b2d71993-12-24 10:39:16 +00001801# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00001802echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00001803echo "configure:1804: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001804ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001805if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001806 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001807else
1808 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001809LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001810cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00001811#line 1812 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001812#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001813/* Override any gcc2 internal prototype to avoid an error. */
1814/* We use char because int might match the return type of a gcc2
1815 builtin and then its argument prototype would still apply. */
1816char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00001817
Guido van Rossumf78abae1997-01-21 22:02:36 +00001818int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001819dlopen()
1820; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001821EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00001822if { (eval echo configure:1823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001823 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001824 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001825else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001826 echo "configure: failed program was:" >&5
1827 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001828 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001829 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001830fi
1831rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001832LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001833
Guido van Rossum627b2d71993-12-24 10:39:16 +00001834fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001835if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001836 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001837 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1838 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001839 cat >> confdefs.h <<EOF
1840#define $ac_tr_lib 1
1841EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001842
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001843 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001844
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001845else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001846 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001847fi
1848 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00001849echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00001850echo "configure:1851: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001851ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001852if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001853 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001854else
1855 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001856LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001857cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00001858#line 1859 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001859#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001860/* Override any gcc2 internal prototype to avoid an error. */
1861/* We use char because int might match the return type of a gcc2
1862 builtin and then its argument prototype would still apply. */
1863char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00001864
Guido van Rossumf78abae1997-01-21 22:02:36 +00001865int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001866shl_load()
1867; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001868EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00001869if { (eval echo configure:1870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001870 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001871 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001872else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001873 echo "configure: failed program was:" >&5
1874 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001875 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001876 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001877fi
1878rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001879LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001880
Guido van Rossum627b2d71993-12-24 10:39:16 +00001881fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001882if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001883 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001884 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1885 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001886 cat >> confdefs.h <<EOF
1887#define $ac_tr_lib 1
1888EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001889
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001890 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001891
1892else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001893 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001894fi
1895 # Dynamic linking for HP-UX
Guido van Rossumf78abae1997-01-21 22:02:36 +00001896echo $ac_n "checking for getpwnam in -lsun""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00001897echo "configure:1898: checking for getpwnam in -lsun" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001898ac_lib_var=`echo sun'_'getpwnam | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001899if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001900 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001901else
1902 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001903LIBS="-lsun $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001904cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00001905#line 1906 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001906#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001907/* Override any gcc2 internal prototype to avoid an error. */
1908/* We use char because int might match the return type of a gcc2
1909 builtin and then its argument prototype would still apply. */
1910char getpwnam();
Guido van Rossum7f43da71994-08-01 12:15:30 +00001911
Guido van Rossumf78abae1997-01-21 22:02:36 +00001912int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001913getpwnam()
1914; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001915EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00001916if { (eval echo configure:1917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001917 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001918 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001919else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001920 echo "configure: failed program was:" >&5
1921 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001922 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001923 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001924fi
1925rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001926LIBS="$ac_save_LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001927
Guido van Rossum7f43da71994-08-01 12:15:30 +00001928fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001929if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001930 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001931 ac_tr_lib=HAVE_LIB`echo sun | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1932 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001933 cat >> confdefs.h <<EOF
1934#define $ac_tr_lib 1
1935EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001936
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001937 LIBS="-lsun $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001938
1939else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001940 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001941fi
1942 # NIS (== YP) interface for IRIX 4
Guido van Rossumda88dad1995-01-26 00:46:29 +00001943# The following three (nsl,inet,socket) are needed on Sequent;
1944# the order of checking must be this. Most SVR4 platforms will
1945# need -lsocket and -lnsl. However on SGI IRIX 5, these exist but
1946# broken. I see no elegant solution (probably CHECK_LIB should be
1947# fixed to only add the library if the given entry point is not
1948# satisfied without it).
Guido van Rossum2b3ac691996-08-30 15:18:41 +00001949if test "$ac_sys_system" != IRIX
Guido van Rossumda88dad1995-01-26 00:46:29 +00001950then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001951echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00001952echo "configure:1953: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001953ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001954if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001955 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001956else
1957 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001958LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001959cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00001960#line 1961 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001961#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001962/* Override any gcc2 internal prototype to avoid an error. */
1963/* We use char because int might match the return type of a gcc2
1964 builtin and then its argument prototype would still apply. */
1965char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001966
Guido van Rossumf78abae1997-01-21 22:02:36 +00001967int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00001968t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001969; return 0; }
1970EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00001971if { (eval echo configure:1972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001972 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001973 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001974else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001975 echo "configure: failed program was:" >&5
1976 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001977 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001978 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001979fi
1980rm -f conftest*
1981LIBS="$ac_save_LIBS"
1982
1983fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001984if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001985 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001986 LIBS="-lnsl $LIBS"
1987else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001988 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001989fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00001990 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00001991echo $ac_n "checking for gethostbyname in -linet""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00001992echo "configure:1993: checking for gethostbyname in -linet" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001993ac_lib_var=`echo inet'_'gethostbyname | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001994if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001995 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001996else
1997 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001998LIBS="-linet -lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001999cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00002000#line 2001 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002001#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002002/* Override any gcc2 internal prototype to avoid an error. */
2003/* We use char because int might match the return type of a gcc2
2004 builtin and then its argument prototype would still apply. */
2005char gethostbyname();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002006
Guido van Rossumf78abae1997-01-21 22:02:36 +00002007int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002008gethostbyname()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002009; return 0; }
2010EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00002011if { (eval echo configure:2012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002012 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002013 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002014else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002015 echo "configure: failed program was:" >&5
2016 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002017 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002018 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002019fi
2020rm -f conftest*
2021LIBS="$ac_save_LIBS"
2022
2023fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002024if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002025 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002026 LIBS="-linet $LIBS"
2027else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002028 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002029fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002030 # Sequent
Guido van Rossumf78abae1997-01-21 22:02:36 +00002031echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00002032echo "configure:2033: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002033ac_lib_var=`echo socket'_'socket | 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="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002039cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00002040#line 2041 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +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 socket();
Guido van Rossum7f43da71994-08-01 12:15:30 +00002046
Guido van Rossumf78abae1997-01-21 22:02:36 +00002047int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002048socket()
2049; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002050EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00002051if { (eval echo configure:2052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum7f43da71994-08-01 12:15:30 +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 Rossum7f43da71994-08-01 12:15:30 +00002059fi
2060rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002061LIBS="$ac_save_LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002062
Guido van Rossum76be6ed1995-01-02 18:33:54 +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 Rossum79dddcb1995-01-12 12:25:42 +00002066 LIBS="-lsocket $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002067else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002068 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002069fi
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002070 # SVR4 sockets
Guido van Rossumda88dad1995-01-26 00:46:29 +00002071fi
Guido van Rossuma68acba1996-07-31 17:36:39 +00002072echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00002073echo "configure:2074: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00002074# Check whether --with-libs or --without-libs was given.
2075if test "${with_libs+set}" = set; then
2076 withval="$with_libs"
2077
2078echo "$ac_t""$withval" 1>&6
2079LIBS="$withval $LIBS"
2080
2081else
2082 echo "$ac_t""no" 1>&6
2083fi
2084
Guido van Rossum7f43da71994-08-01 12:15:30 +00002085
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002086echo $ac_n "checking for --with(out)-readline""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00002087echo "configure:2088: checking for --with(out)-readline" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002088# Check whether --with-readline or --without-readline was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002089if test "${with_readline+set}" = set; then
2090 withval="$with_readline"
Guido van Rossumb06df271997-08-05 21:50:20 +00002091 echo "$ac_t""$withval" 1>&6
2092{ echo "configure: error: --with(out)-readline is obsolete" 1>&2; exit 1; }
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002093else
Guido van Rossumb06df271997-08-05 21:50:20 +00002094 echo "$ac_t""not specified." 1>&6
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002095fi
2096
Guido van Rossum7f43da71994-08-01 12:15:30 +00002097
Guido van Rossumec2f0731997-01-22 20:54:01 +00002098echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00002099echo "configure:2100: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00002100
2101# Check whether --with-dec-threads or --without-dec-threads was given.
2102if test "${with_dec_threads+set}" = set; then
2103 withval="$with_dec_threads"
2104 echo "$ac_t""$withval" 1>&6
2105LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00002106if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00002107 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00002108fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00002109else
2110 echo "$ac_t""no" 1>&6
2111fi
2112
2113
2114echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00002115echo "configure:2116: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00002116# Check whether --with-threads or --without-threads was given.
2117if test "${with_threads+set}" = set; then
2118 withval="$with_threads"
2119 echo "$ac_t""$withval" 1>&6
2120if test "${with_thread+set}" != set; then
2121 with_thread="$withval";
2122fi
2123else
2124 echo "$ac_t""no" 1>&6
2125fi
2126
2127
2128echo $ac_n "checking for --with-thread""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00002129echo "configure:2130: checking for --with-thread" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002130# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002131if test "${with_thread+set}" = set; then
2132 withval="$with_thread"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002133
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002134echo "$ac_t""$withval" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002135if test -d "$withval"
Guido van Rossum84e7b241996-08-19 21:59:00 +00002136then LDFLAGS="$LDFLAGS -L$withval"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002137fi
Guido van Rossum9caf77a1996-08-01 00:52:26 +00002138cat >> confdefs.h <<\EOF
2139#define _REENTRANT 1
2140EOF
2141
Guido van Rossumf78abae1997-01-21 22:02:36 +00002142ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002143echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00002144echo "configure:2145: checking for mach/cthreads.h" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002145if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2146 echo $ac_n "(cached) $ac_c" 1>&6
2147else
2148 cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00002149#line 2150 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002150#include "confdefs.h"
2151#include <mach/cthreads.h>
2152EOF
2153ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum24b1e751997-08-21 02:29:16 +00002154{ (eval echo configure:2155: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002155ac_err=`grep -v '^ *+' conftest.out`
2156if test -z "$ac_err"; then
2157 rm -rf conftest*
2158 eval "ac_cv_header_$ac_safe=yes"
2159else
2160 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002161 echo "configure: failed program was:" >&5
2162 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002163 rm -rf conftest*
2164 eval "ac_cv_header_$ac_safe=no"
2165fi
2166rm -f conftest*
2167fi
2168if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2169 echo "$ac_t""yes" 1>&6
2170 cat >> confdefs.h <<\EOF
2171#define WITH_THREAD 1
2172EOF
2173
2174cat >> confdefs.h <<\EOF
2175#define C_THREADS 1
2176EOF
2177
2178LIBOBJS="$LIBOBJS thread.o"
2179else
2180 echo "$ac_t""no" 1>&6
2181
Guido van Rossumf78abae1997-01-21 22:02:36 +00002182echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00002183echo "configure:2184: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002184ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002185if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002186 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002187else
2188 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002189LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002190cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00002191#line 2192 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002192#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002193/* Override any gcc2 internal prototype to avoid an error. */
2194/* We use char because int might match the return type of a gcc2
2195 builtin and then its argument prototype would still apply. */
2196char pthread_create();
Guido van Rossum7f43da71994-08-01 12:15:30 +00002197
Guido van Rossumf78abae1997-01-21 22:02:36 +00002198int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002199pthread_create()
2200; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002201EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00002202if { (eval echo configure:2203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002203 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002204 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002205else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002206 echo "configure: failed program was:" >&5
2207 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002208 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002209 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002210fi
2211rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002212LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002213
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002214fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002215if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002216 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002217 cat >> confdefs.h <<\EOF
2218#define WITH_THREAD 1
2219EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002220
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002221cat >> confdefs.h <<\EOF
2222#define _POSIX_THREADS 1
2223EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002224
2225LIBS="$LIBS -lpthreads"
2226LIBOBJS="$LIBOBJS thread.o"
2227else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002228 echo "$ac_t""no" 1>&6
Guido van Rossum2d38f911996-06-26 19:47:01 +00002229
Guido van Rossumf78abae1997-01-21 22:02:36 +00002230echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00002231echo "configure:2232: checking for pthread_create in -lpthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002232ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum2d38f911996-06-26 19:47:01 +00002233if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2234 echo $ac_n "(cached) $ac_c" 1>&6
2235else
2236 ac_save_LIBS="$LIBS"
2237LIBS="-lpthread $LIBS"
2238cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00002239#line 2240 "configure"
Guido van Rossum2d38f911996-06-26 19:47:01 +00002240#include "confdefs.h"
2241/* Override any gcc2 internal prototype to avoid an error. */
2242/* We use char because int might match the return type of a gcc2
2243 builtin and then its argument prototype would still apply. */
2244char pthread_create();
2245
Guido van Rossumf78abae1997-01-21 22:02:36 +00002246int main() {
Guido van Rossum2d38f911996-06-26 19:47:01 +00002247pthread_create()
2248; return 0; }
2249EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00002250if { (eval echo configure:2251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum2d38f911996-06-26 19:47:01 +00002251 rm -rf conftest*
2252 eval "ac_cv_lib_$ac_lib_var=yes"
2253else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002254 echo "configure: failed program was:" >&5
2255 cat conftest.$ac_ext >&5
Guido van Rossum2d38f911996-06-26 19:47:01 +00002256 rm -rf conftest*
2257 eval "ac_cv_lib_$ac_lib_var=no"
2258fi
2259rm -f conftest*
2260LIBS="$ac_save_LIBS"
2261
2262fi
2263if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2264 echo "$ac_t""yes" 1>&6
2265 cat >> confdefs.h <<\EOF
2266#define WITH_THREAD 1
2267EOF
2268
2269cat >> confdefs.h <<\EOF
2270#define _POSIX_THREADS 1
2271EOF
2272
2273LIBS="$LIBS -lpthread"
2274LIBOBJS="$LIBOBJS thread.o"
2275else
2276 echo "$ac_t""no" 1>&6
Guido van Rossum0be3e491997-05-22 20:33:33 +00002277
2278echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00002279echo "configure:2280: checking for __d6_pthread_create in -lthread" >&5
Guido van Rossum0be3e491997-05-22 20:33:33 +00002280ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
2281if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2282 echo $ac_n "(cached) $ac_c" 1>&6
2283else
2284 ac_save_LIBS="$LIBS"
2285LIBS="-lthread $LIBS"
2286cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00002287#line 2288 "configure"
Guido van Rossum0be3e491997-05-22 20:33:33 +00002288#include "confdefs.h"
2289/* Override any gcc2 internal prototype to avoid an error. */
2290/* We use char because int might match the return type of a gcc2
2291 builtin and then its argument prototype would still apply. */
2292char __d6_pthread_create();
2293
2294int main() {
2295__d6_pthread_create()
2296; return 0; }
2297EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00002298if { (eval echo configure:2299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum0be3e491997-05-22 20:33:33 +00002299 rm -rf conftest*
2300 eval "ac_cv_lib_$ac_lib_var=yes"
2301else
2302 echo "configure: failed program was:" >&5
2303 cat conftest.$ac_ext >&5
2304 rm -rf conftest*
2305 eval "ac_cv_lib_$ac_lib_var=no"
2306fi
2307rm -f conftest*
2308LIBS="$ac_save_LIBS"
2309
2310fi
2311if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2312 echo "$ac_t""yes" 1>&6
2313 cat >> confdefs.h <<\EOF
2314#define WITH_THREAD 1
2315EOF
2316
2317cat >> confdefs.h <<\EOF
2318#define _POSIX_THREADS 1
2319EOF
2320
2321LIBS="$LIBS -lthread"
2322LIBOBJS="$LIBOBJS thread.o"
2323else
2324 echo "$ac_t""no" 1>&6
Guido van Rossum2d38f911996-06-26 19:47:01 +00002325fi
2326
2327
Guido van Rossum627b2d71993-12-24 10:39:16 +00002328fi
2329
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002330fi
2331
Guido van Rossum0be3e491997-05-22 20:33:33 +00002332fi
2333
2334
Guido van Rossumf78abae1997-01-21 22:02:36 +00002335echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00002336echo "configure:2337: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002337ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002338if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002339 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002340else
2341 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002342LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002343cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00002344#line 2345 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002345#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002346/* Override any gcc2 internal prototype to avoid an error. */
2347/* We use char because int might match the return type of a gcc2
2348 builtin and then its argument prototype would still apply. */
2349char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002350
Guido van Rossumf78abae1997-01-21 22:02:36 +00002351int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002352usconfig()
2353; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002354EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00002355if { (eval echo configure:2356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002356 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002357 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002358else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002359 echo "configure: failed program was:" >&5
2360 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002361 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002362 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002363fi
2364rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002365LIBS="$ac_save_LIBS"
2366
2367fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002368if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002369 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002370 cat >> confdefs.h <<\EOF
2371#define WITH_THREAD 1
2372EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002373
Guido van Rossum7f43da71994-08-01 12:15:30 +00002374LIBS="$LIBS -lmpc"
2375LIBOBJS="$LIBOBJS thread.o"
2376else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002377 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002378fi
2379
Guido van Rossumf78abae1997-01-21 22:02:36 +00002380echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00002381echo "configure:2382: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002382ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002383if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002384 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002385else
2386 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002387LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002388cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00002389#line 2390 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002390#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002391/* Override any gcc2 internal prototype to avoid an error. */
2392/* We use char because int might match the return type of a gcc2
2393 builtin and then its argument prototype would still apply. */
2394char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002395
Guido van Rossumf78abae1997-01-21 22:02:36 +00002396int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002397thr_create()
2398; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002399EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00002400if { (eval echo configure:2401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002401 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002402 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002403else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002404 echo "configure: failed program was:" >&5
2405 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002406 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002407 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002408fi
2409rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002410LIBS="$ac_save_LIBS"
2411
2412fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002413if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002414 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002415 cat >> confdefs.h <<\EOF
2416#define WITH_THREAD 1
2417EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002418
Guido van Rossum7f43da71994-08-01 12:15:30 +00002419LIBS="$LIBS -lthread"
2420LIBOBJS="$LIBOBJS thread.o"
2421else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002422 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002423fi
2424
Guido van Rossum7f43da71994-08-01 12:15:30 +00002425
Guido van Rossumda88dad1995-01-26 00:46:29 +00002426else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002427 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002428fi
2429
Guido van Rossum7f43da71994-08-01 12:15:30 +00002430
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002431# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00002432
2433DLINCLDIR=/
2434
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002435echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00002436echo "configure:2437: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002437# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002438if test "${with_sgi_dl+set}" = set; then
2439 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002440
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002441echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002442cat >> confdefs.h <<\EOF
2443#define WITH_SGI_DL 1
2444EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002445
2446dldir=$withval
2447if test -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00002448then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002449else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002450fi
2451DLINCLDIR=${dldir}
2452LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00002453else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002454 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002455fi
2456
2457
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002458echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00002459echo "configure:2460: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002460# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002461if test "${with_dl_dld+set}" = set; then
2462 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002463
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002464echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002465cat >> confdefs.h <<\EOF
2466#define WITH_DL_DLD 1
2467EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002468
2469dldir=`echo "$withval" | sed 's/,.*//'`
2470dlddir=`echo "$withval" | sed 's/.*,//'`
2471if test -d "$dldir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00002472then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002473else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002474fi
2475DLINCLDIR=${dldir}
2476LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00002477else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002478 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002479fi
2480
2481
Guido van Rossum627b2d71993-12-24 10:39:16 +00002482# checks for library functions
Guido van Rossum1171ee61997-08-22 20:42:00 +00002483for ac_func in alarm chown clock dlopen execv flock fork ftime ftruncate \
2484 gethostname_r getpeername getpgrp getpid getpwent gettimeofday getwd \
2485 kill link lstat mkfifo nice pause plock putenv readlink \
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002486 select setgid setuid setsid setpgid setpgrp setvbuf \
2487 sigaction siginterrupt sigrelse strftime symlink \
2488 tcgetpgrp tcsetpgrp times truncate uname waitpid
Guido van Rossum627b2d71993-12-24 10:39:16 +00002489do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002490echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00002491echo "configure:2492: checking for $ac_func" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002492if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2493 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002494else
2495 cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00002496#line 2497 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002497#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002498/* System header to define __stub macros and hopefully few prototypes,
2499 which can conflict with char $ac_func(); below. */
2500#include <assert.h>
2501/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002502/* We use char because int might match the return type of a gcc2
2503 builtin and then its argument prototype would still apply. */
2504char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002505
Guido van Rossumf78abae1997-01-21 22:02:36 +00002506int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002507
Guido van Rossum627b2d71993-12-24 10:39:16 +00002508/* The GNU C library defines this for functions which it implements
2509 to always fail with ENOSYS. Some functions are actually named
2510 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002511#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00002512choke me
2513#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002514$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002515#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002516
Guido van Rossum7f43da71994-08-01 12:15:30 +00002517; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002518EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00002519if { (eval echo configure:2520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002520 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002521 eval "ac_cv_func_$ac_func=yes"
2522else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002523 echo "configure: failed program was:" >&5
2524 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002525 rm -rf conftest*
2526 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002527fi
2528rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002529fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002530
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002531if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002532 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002533 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002534 cat >> confdefs.h <<EOF
2535#define $ac_tr_func 1
2536EOF
2537
2538else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002539 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002540fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002541done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002542
Guido van Rossum2b3ac691996-08-30 15:18:41 +00002543for ac_func in dup2 getcwd strdup strerror memmove
Guido van Rossum627b2d71993-12-24 10:39:16 +00002544do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002545echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00002546echo "configure:2547: checking for $ac_func" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002547if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2548 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002549else
2550 cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00002551#line 2552 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002552#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002553/* System header to define __stub macros and hopefully few prototypes,
2554 which can conflict with char $ac_func(); below. */
2555#include <assert.h>
2556/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002557/* We use char because int might match the return type of a gcc2
2558 builtin and then its argument prototype would still apply. */
2559char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002560
Guido van Rossumf78abae1997-01-21 22:02:36 +00002561int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002562
Guido van Rossum627b2d71993-12-24 10:39:16 +00002563/* The GNU C library defines this for functions which it implements
2564 to always fail with ENOSYS. Some functions are actually named
2565 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002566#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00002567choke me
2568#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002569$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002570#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002571
Guido van Rossum7f43da71994-08-01 12:15:30 +00002572; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002573EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00002574if { (eval echo configure:2575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002575 rm -rf conftest*
2576 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002577else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002578 echo "configure: failed program was:" >&5
2579 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002580 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002581 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002582fi
2583rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002584fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002585
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002586if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002587 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002588 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2589 cat >> confdefs.h <<EOF
2590#define $ac_tr_func 1
2591EOF
2592
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002593else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002594 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002595LIBOBJS="$LIBOBJS ${ac_func}.o"
2596fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002597done
2598
Guido van Rossumf78abae1997-01-21 22:02:36 +00002599
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002600echo $ac_n "checking for getpgrp""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00002601echo "configure:2602: checking for getpgrp" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002602if eval "test \"`echo '$''{'ac_cv_func_getpgrp'+set}'`\" = set"; then
2603 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002604else
2605 cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00002606#line 2607 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002607#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002608/* System header to define __stub macros and hopefully few prototypes,
2609 which can conflict with char getpgrp(); below. */
2610#include <assert.h>
2611/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002612/* We use char because int might match the return type of a gcc2
2613 builtin and then its argument prototype would still apply. */
2614char getpgrp();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002615
Guido van Rossumf78abae1997-01-21 22:02:36 +00002616int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002617
Guido van Rossum627b2d71993-12-24 10:39:16 +00002618/* The GNU C library defines this for functions which it implements
2619 to always fail with ENOSYS. Some functions are actually named
2620 something starting with __ and the normal name is an alias. */
2621#if defined (__stub_getpgrp) || defined (__stub___getpgrp)
2622choke me
2623#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002624getpgrp();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002625#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002626
2627; return 0; }
2628EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00002629if { (eval echo configure:2630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002630 rm -rf conftest*
2631 eval "ac_cv_func_getpgrp=yes"
2632else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002633 echo "configure: failed program was:" >&5
2634 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002635 rm -rf conftest*
2636 eval "ac_cv_func_getpgrp=no"
2637fi
2638rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002639fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002640
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002641if eval "test \"`echo '$ac_cv_func_'getpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002642 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002643 cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00002644#line 2645 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002645#include "confdefs.h"
2646#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002647int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002648getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00002649; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002650EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00002651if { (eval echo configure:2652: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002652 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002653 cat >> confdefs.h <<\EOF
2654#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00002655EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002656
Guido van Rossumf78abae1997-01-21 22:02:36 +00002657else
2658 echo "configure: failed program was:" >&5
2659 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002660fi
2661rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002662else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002663 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002664fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002665
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002666echo $ac_n "checking for setpgrp""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00002667echo "configure:2668: checking for setpgrp" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002668if eval "test \"`echo '$''{'ac_cv_func_setpgrp'+set}'`\" = set"; then
2669 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002670else
2671 cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00002672#line 2673 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002673#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002674/* System header to define __stub macros and hopefully few prototypes,
2675 which can conflict with char setpgrp(); below. */
2676#include <assert.h>
2677/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002678/* We use char because int might match the return type of a gcc2
2679 builtin and then its argument prototype would still apply. */
2680char setpgrp();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002681
Guido van Rossumf78abae1997-01-21 22:02:36 +00002682int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002683
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002684/* The GNU C library defines this for functions which it implements
2685 to always fail with ENOSYS. Some functions are actually named
2686 something starting with __ and the normal name is an alias. */
2687#if defined (__stub_setpgrp) || defined (__stub___setpgrp)
2688choke me
2689#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002690setpgrp();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002691#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002692
2693; return 0; }
2694EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00002695if { (eval echo configure:2696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002696 rm -rf conftest*
2697 eval "ac_cv_func_setpgrp=yes"
2698else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002699 echo "configure: failed program was:" >&5
2700 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002701 rm -rf conftest*
2702 eval "ac_cv_func_setpgrp=no"
2703fi
2704rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002705fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002706
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002707if eval "test \"`echo '$ac_cv_func_'setpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002708 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002709 cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00002710#line 2711 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002711#include "confdefs.h"
2712#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002713int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002714setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002715; return 0; }
2716EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00002717if { (eval echo configure:2718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002718 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002719 cat >> confdefs.h <<\EOF
2720#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002721EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002722
Guido van Rossumf78abae1997-01-21 22:02:36 +00002723else
2724 echo "configure: failed program was:" >&5
2725 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002726fi
2727rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002728else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002729 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002730fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002731
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002732echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00002733echo "configure:2734: checking for gettimeofday" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002734if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
2735 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002736else
2737 cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00002738#line 2739 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002739#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002740/* System header to define __stub macros and hopefully few prototypes,
2741 which can conflict with char gettimeofday(); below. */
2742#include <assert.h>
2743/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002744/* We use char because int might match the return type of a gcc2
2745 builtin and then its argument prototype would still apply. */
2746char gettimeofday();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002747
Guido van Rossumf78abae1997-01-21 22:02:36 +00002748int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002749
2750/* The GNU C library defines this for functions which it implements
2751 to always fail with ENOSYS. Some functions are actually named
2752 something starting with __ and the normal name is an alias. */
2753#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
2754choke me
2755#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002756gettimeofday();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002757#endif
2758
2759; return 0; }
2760EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00002761if { (eval echo configure:2762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002762 rm -rf conftest*
2763 eval "ac_cv_func_gettimeofday=yes"
2764else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002765 echo "configure: failed program was:" >&5
2766 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002767 rm -rf conftest*
2768 eval "ac_cv_func_gettimeofday=no"
2769fi
2770rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002771fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002772
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002773if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002774 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002775 cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00002776#line 2777 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002777#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002778#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002779int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002780gettimeofday((struct timeval*)0,(struct timezone*)0);
2781; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002782EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00002783if { (eval echo configure:2784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002784 :
2785else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002786 echo "configure: failed program was:" >&5
2787 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002788 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002789 cat >> confdefs.h <<\EOF
2790#define GETTIMEOFDAY_NO_TZ 1
2791EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002792
2793fi
2794rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002795else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002796 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002797fi
2798
2799
2800# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002801echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00002802echo "configure:2803: checking whether time.h and sys/time.h may both be included" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002803if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2804 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002805else
2806 cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00002807#line 2808 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002808#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002809#include <sys/types.h>
2810#include <sys/time.h>
2811#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002812int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002813struct tm *tp;
2814; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002815EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00002816if { (eval echo configure:2817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002817 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002818 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002819else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002820 echo "configure: failed program was:" >&5
2821 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002822 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002823 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002824fi
2825rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002826fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002827
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002828echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002829if test $ac_cv_header_time = yes; then
2830 cat >> confdefs.h <<\EOF
2831#define TIME_WITH_SYS_TIME 1
2832EOF
2833
2834fi
2835
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002836echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00002837echo "configure:2838: checking whether struct tm is in sys/time.h or time.h" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002838if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
2839 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002840else
2841 cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00002842#line 2843 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002843#include "confdefs.h"
2844#include <sys/types.h>
2845#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002846int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002847struct tm *tp; tp->tm_sec;
2848; return 0; }
2849EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00002850if { (eval echo configure:2851: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002851 rm -rf conftest*
2852 ac_cv_struct_tm=time.h
2853else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002854 echo "configure: failed program was:" >&5
2855 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002856 rm -rf conftest*
2857 ac_cv_struct_tm=sys/time.h
2858fi
2859rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002860fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002861
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002862echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002863if test $ac_cv_struct_tm = sys/time.h; then
2864 cat >> confdefs.h <<\EOF
2865#define TM_IN_SYS_TIME 1
2866EOF
2867
2868fi
2869
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002870echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00002871echo "configure:2872: checking for tm_zone in struct tm" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002872if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
2873 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002874else
2875 cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00002876#line 2877 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002877#include "confdefs.h"
2878#include <sys/types.h>
2879#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002880int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002881struct tm tm; tm.tm_zone;
2882; return 0; }
2883EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00002884if { (eval echo configure:2885: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002885 rm -rf conftest*
2886 ac_cv_struct_tm_zone=yes
2887else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002888 echo "configure: failed program was:" >&5
2889 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002890 rm -rf conftest*
2891 ac_cv_struct_tm_zone=no
2892fi
2893rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002894fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002895
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002896echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002897if test "$ac_cv_struct_tm_zone" = yes; then
2898 cat >> confdefs.h <<\EOF
2899#define HAVE_TM_ZONE 1
2900EOF
2901
2902else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002903 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00002904echo "configure:2905: checking for tzname" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002905if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
2906 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002907else
2908 cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00002909#line 2910 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002910#include "confdefs.h"
2911#include <time.h>
2912#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002913extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00002914#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00002915int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002916atoi(*tzname);
2917; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002918EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00002919if { (eval echo configure:2920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002920 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002921 ac_cv_var_tzname=yes
2922else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002923 echo "configure: failed program was:" >&5
2924 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002925 rm -rf conftest*
2926 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002927fi
2928rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00002929fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002930
2931echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002932 if test $ac_cv_var_tzname = yes; then
2933 cat >> confdefs.h <<\EOF
2934#define HAVE_TZNAME 1
2935EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002936
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002937 fi
2938fi
2939
2940
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002941echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00002942echo "configure:2943: checking for time.h that defines altzone" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002943if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
2944 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002945else
2946 cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00002947#line 2948 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002948#include "confdefs.h"
2949#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002950int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002951return altzone;
2952; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002953EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00002954if { (eval echo configure:2955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002955 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002956 ac_cv_header_time_altzone=yes
2957else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002958 echo "configure: failed program was:" >&5
2959 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002960 rm -rf conftest*
2961 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00002962fi
2963rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002964fi
2965
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002966echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002967if test $ac_cv_header_time_altzone = yes; then
2968 cat >> confdefs.h <<\EOF
2969#define HAVE_ALTZONE 1
2970EOF
2971
2972fi
2973
Guido van Rossumda88dad1995-01-26 00:46:29 +00002974was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002975echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00002976echo "configure:2977: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002977cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00002978#line 2979 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002979#include "confdefs.h"
2980
2981#include <sys/types.h>
2982#include <sys/select.h>
2983#include <sys/time.h>
2984
Guido van Rossumf78abae1997-01-21 22:02:36 +00002985int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002986;
2987; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002988EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00002989if { (eval echo configure:2990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002990 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002991 cat >> confdefs.h <<\EOF
2992#define SYS_SELECT_WITH_SYS_TIME 1
2993EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00002994 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00002995else
2996 echo "configure: failed program was:" >&5
2997 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00002998fi
2999rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003000echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003001
3002# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00003003
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003004echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00003005echo "configure:3006: checking whether char is unsigned" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003006if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
3007 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003008else
3009 if test "$GCC" = yes; then
3010 # GCC predefines this symbol on systems where it applies.
3011cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00003012#line 3013 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003013#include "confdefs.h"
3014#ifdef __CHAR_UNSIGNED__
3015 yes
3016#endif
3017
3018EOF
3019if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3020 egrep "yes" >/dev/null 2>&1; then
3021 rm -rf conftest*
3022 ac_cv_c_char_unsigned=yes
3023else
3024 rm -rf conftest*
3025 ac_cv_c_char_unsigned=no
3026fi
3027rm -f conftest*
3028
3029else
3030if test "$cross_compiling" = yes; then
3031 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3032else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003033 cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00003034#line 3035 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003035#include "confdefs.h"
3036/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003037#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00003038#define volatile
3039#endif
3040main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00003041 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00003042}
3043EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00003044if { (eval echo configure:3045: \"$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 +00003045then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003046 ac_cv_c_char_unsigned=yes
3047else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003048 echo "configure: failed program was:" >&5
3049 cat conftest.$ac_ext >&5
3050 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003051 ac_cv_c_char_unsigned=no
3052fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003053rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003054fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003055
3056fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003057fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003058
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003059echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003060if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
3061 cat >> confdefs.h <<\EOF
3062#define __CHAR_UNSIGNED__ 1
3063EOF
3064
3065fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003066
3067
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003068echo $ac_n "checking for working const""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00003069echo "configure:3070: checking for working const" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003070if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3071 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003072else
3073 cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00003074#line 3075 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003075#include "confdefs.h"
3076
Guido van Rossumf78abae1997-01-21 22:02:36 +00003077int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003078
3079/* Ultrix mips cc rejects this. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00003080typedef int charset[2]; const charset x;
3081/* SunOS 4.1.1 cc rejects this. */
3082char const *const *ccp;
3083char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003084/* NEC SVR4.0.2 mips cc rejects this. */
3085struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003086static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00003087/* AIX XL C 1.02.0.0 rejects this.
3088 It does not let you subtract one const X* pointer from another in an arm
3089 of an if-expression whose if-part is not a constant expression */
3090const char *g = "string";
3091ccp = &g + (g ? g-g : 0);
3092/* HPUX 7.0 cc rejects these. */
3093++ccp;
3094p = (char**) ccp;
3095ccp = (char const *const *) p;
3096{ /* SCO 3.2v4 cc rejects this. */
3097 char *t;
3098 char const *s = 0 ? (char *) 0 : (char const *) 0;
3099
3100 *t++ = 0;
3101}
3102{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003103 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00003104 const int *foo = &x[0];
3105 ++foo;
3106}
3107{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3108 typedef const int *iptr;
3109 iptr p = 0;
3110 ++p;
3111}
3112{ /* AIX XL C 1.02.0.0 rejects this saying
3113 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3114 struct s { int j; const int *ap[3]; };
3115 struct s *b; b->j = 5;
3116}
3117{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3118 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003119}
3120
3121; return 0; }
3122EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00003123if { (eval echo configure:3124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003124 rm -rf conftest*
3125 ac_cv_c_const=yes
3126else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003127 echo "configure: failed program was:" >&5
3128 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003129 rm -rf conftest*
3130 ac_cv_c_const=no
3131fi
3132rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003133fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003134
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003135echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003136if test $ac_cv_c_const = no; then
3137 cat >> confdefs.h <<\EOF
3138#define const
3139EOF
3140
3141fi
3142
3143
Guido van Rossumda88dad1995-01-26 00:46:29 +00003144works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003145echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00003146echo "configure:3147: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003147cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00003148#line 3149 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003149#include "confdefs.h"
3150
Guido van Rossumf78abae1997-01-21 22:02:36 +00003151int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003152volatile int x; x = 0;
3153; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003154EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00003155if { (eval echo configure:3156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00003156 rm -rf conftest*
3157 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003158else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003159 echo "configure: failed program was:" >&5
3160 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003161 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003162 cat >> confdefs.h <<\EOF
3163#define volatile
3164EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003165
3166fi
3167rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003168echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003169
Guido van Rossumda88dad1995-01-26 00:46:29 +00003170works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003171echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00003172echo "configure:3173: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003173cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00003174#line 3175 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003175#include "confdefs.h"
3176
Guido van Rossumf78abae1997-01-21 22:02:36 +00003177int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003178signed char c;
3179; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003180EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00003181if { (eval echo configure:3182: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00003182 rm -rf conftest*
3183 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003184else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003185 echo "configure: failed program was:" >&5
3186 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003187 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003188 cat >> confdefs.h <<\EOF
3189#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00003190EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003191
3192fi
3193rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003194echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003195
Guido van Rossumda88dad1995-01-26 00:46:29 +00003196have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003197echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00003198echo "configure:3199: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003199cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00003200#line 3201 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003201#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003202int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00003203int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003204return foo(10);
3205; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003206EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00003207if { (eval echo configure:3208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003208 rm -rf conftest*
3209 cat >> confdefs.h <<\EOF
3210#define HAVE_PROTOTYPES 1
3211EOF
3212 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00003213else
3214 echo "configure: failed program was:" >&5
3215 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00003216fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003217rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003218echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003219
Guido van Rossumda88dad1995-01-26 00:46:29 +00003220works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003221echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00003222echo "configure:3223: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003223cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00003224#line 3225 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003225#include "confdefs.h"
3226
3227#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00003228int foo(int x, ...) {
3229 va_list va;
3230 va_start(va, x);
3231 va_arg(va, int);
3232 va_arg(va, char *);
3233 va_arg(va, double);
3234 return 0;
3235}
Guido van Rossum7f43da71994-08-01 12:15:30 +00003236
Guido van Rossumf78abae1997-01-21 22:02:36 +00003237int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00003238return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003239; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003240EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00003241if { (eval echo configure:3242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003242 rm -rf conftest*
3243 cat >> confdefs.h <<\EOF
3244#define HAVE_STDARG_PROTOTYPES 1
3245EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003246 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00003247else
3248 echo "configure: failed program was:" >&5
3249 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003250fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003251rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003252echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003253
Guido van Rossumda88dad1995-01-26 00:46:29 +00003254if test "$have_prototypes" = yes; then
3255bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003256echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00003257echo "configure:3258: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003258cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00003259#line 3260 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003260#include "confdefs.h"
3261#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003262int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003263char **t;execve("@",t,t);
3264; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003265EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00003266if { (eval echo configure:3267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003267 :
3268else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003269 echo "configure: failed program was:" >&5
3270 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003271 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003272 cat >> confdefs.h <<\EOF
3273#define BAD_EXEC_PROTOTYPES 1
3274EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003275 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003276fi
3277rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003278echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003279fi
3280
Guido van Rossumda88dad1995-01-26 00:46:29 +00003281bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003282echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00003283echo "configure:3284: checking for bad static forward" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003284if test "$cross_compiling" = yes; then
3285 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3286else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003287 cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00003288#line 3289 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003289#include "confdefs.h"
3290
3291struct s { int a; int b; };
3292static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003293int foobar() {
3294 static int random;
3295 random = (int) &foo;
3296 return random;
3297}
Guido van Rossum7f43da71994-08-01 12:15:30 +00003298static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003299main() {
3300 exit(!((int)&foo == foobar()));
3301}
Guido van Rossum7f43da71994-08-01 12:15:30 +00003302
3303EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00003304if { (eval echo configure:3305: \"$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 +00003305then
Guido van Rossum7f43da71994-08-01 12:15:30 +00003306 :
3307else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003308 echo "configure: failed program was:" >&5
3309 cat conftest.$ac_ext >&5
3310 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003311 cat >> confdefs.h <<\EOF
3312#define BAD_STATIC_FORWARD 1
3313EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003314 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00003315fi
3316rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00003317fi
3318
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003319echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003320
Guido van Rossumda88dad1995-01-26 00:46:29 +00003321va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003322echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00003323echo "configure:3324: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003324cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00003325#line 3326 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003326#include "confdefs.h"
3327
3328#ifdef HAVE_STDARG_PROTOTYPES
3329#include <stdarg.h>
3330#else
3331#include <varargs.h>
3332#endif
3333
Guido van Rossumf78abae1997-01-21 22:02:36 +00003334int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003335va_list list1, list2; list1 = list2;
3336; return 0; }
3337EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00003338if { (eval echo configure:3339: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003339 :
3340else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003341 echo "configure: failed program was:" >&5
3342 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003343 rm -rf conftest*
3344 cat >> confdefs.h <<\EOF
3345#define VA_LIST_IS_ARRAY 1
3346EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003347 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003348fi
3349rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003350echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003351
Guido van Rossum627b2d71993-12-24 10:39:16 +00003352# checks for system services
3353# (none yet)
3354
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003355# Linux requires this for correct f.p. operations
Guido van Rossumf78abae1997-01-21 22:02:36 +00003356echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00003357echo "configure:3358: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003358ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003359if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003360 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003361else
3362 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003363LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003364cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00003365#line 3366 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003366#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003367/* Override any gcc2 internal prototype to avoid an error. */
3368/* We use char because int might match the return type of a gcc2
3369 builtin and then its argument prototype would still apply. */
3370char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003371
Guido van Rossumf78abae1997-01-21 22:02:36 +00003372int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003373__fpu_control()
3374; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003375EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00003376if { (eval echo configure:3377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003377 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003378 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003379else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003380 echo "configure: failed program was:" >&5
3381 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003382 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003383 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003384fi
3385rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003386LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003387
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003388fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003389if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003390 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003391 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3392 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003393 cat >> confdefs.h <<EOF
3394#define $ac_tr_lib 1
3395EOF
3396
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003397 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003398
3399else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003400 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003401fi
3402
3403
Guido van Rossum7f253911997-05-09 02:42:48 +00003404# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00003405echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00003406echo "configure:3407: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00003407# Check whether --with-fpectl or --without-fpectl was given.
3408if test "${with_fpectl+set}" = set; then
3409 withval="$with_fpectl"
3410
3411if test "$withval" != no
3412then cat >> confdefs.h <<\EOF
3413#define WANT_SIGFPE_HANDLER 1
3414EOF
3415 echo "$ac_t""yes" 1>&6
3416else echo "$ac_t""no" 1>&6
3417fi
3418fi
3419
3420
Guido van Rossum7f43da71994-08-01 12:15:30 +00003421# check for --with-libm=...
3422
Guido van Rossum563e7081996-09-10 18:20:48 +00003423case $ac_sys_system in
3424next) ;;
3425*) LIBM=-lm
3426esac
Guido van Rossum7f253911997-05-09 02:42:48 +00003427echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00003428echo "configure:3429: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003429# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003430if test "${with_libm+set}" = set; then
3431 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003432
Guido van Rossum7f253911997-05-09 02:42:48 +00003433if test "$withval" = no
3434then LIBM=
3435 echo "$ac_t""force LIBM empty" 1>&6
3436elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00003437then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00003438 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003439else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003440fi
Guido van Rossum7f253911997-05-09 02:42:48 +00003441else
3442 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003443fi
3444
3445
3446# check for --with-libc=...
3447
Guido van Rossum7f253911997-05-09 02:42:48 +00003448echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00003449echo "configure:3450: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003450# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003451if test "${with_libc+set}" = set; then
3452 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003453
Guido van Rossum7f253911997-05-09 02:42:48 +00003454if test "$withval" = no
3455then LIBC=
3456 echo "$ac_t""force LIBC empty" 1>&6
3457elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00003458then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00003459 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003460else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003461fi
Guido van Rossum7f253911997-05-09 02:42:48 +00003462else
3463 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003464fi
3465
3466
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003467# check for hypot() in math library
3468LIBS_SAVE=$LIBS
3469LIBS="$LIBS $LIBM"
3470for ac_func in hypot
3471do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003472echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00003473echo "configure:3474: checking for $ac_func" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003474if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3475 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003476else
3477 cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00003478#line 3479 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003479#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003480/* System header to define __stub macros and hopefully few prototypes,
3481 which can conflict with char $ac_func(); below. */
3482#include <assert.h>
3483/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003484/* We use char because int might match the return type of a gcc2
3485 builtin and then its argument prototype would still apply. */
3486char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003487
Guido van Rossumf78abae1997-01-21 22:02:36 +00003488int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003489
3490/* The GNU C library defines this for functions which it implements
3491 to always fail with ENOSYS. Some functions are actually named
3492 something starting with __ and the normal name is an alias. */
3493#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3494choke me
3495#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003496$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003497#endif
3498
3499; return 0; }
3500EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00003501if { (eval echo configure:3502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003502 rm -rf conftest*
3503 eval "ac_cv_func_$ac_func=yes"
3504else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003505 echo "configure: failed program was:" >&5
3506 cat conftest.$ac_ext >&5
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003507 rm -rf conftest*
3508 eval "ac_cv_func_$ac_func=no"
3509fi
3510rm -f conftest*
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003511fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003512
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003513if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003514 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003515 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003516 cat >> confdefs.h <<EOF
3517#define $ac_tr_func 1
3518EOF
3519
3520else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003521 echo "$ac_t""no" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003522fi
3523done
3524
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003525for ac_func in hypot
3526do
3527echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00003528echo "configure:3529: checking for $ac_func" >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003529if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3530 echo $ac_n "(cached) $ac_c" 1>&6
3531else
3532 cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00003533#line 3534 "configure"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003534#include "confdefs.h"
3535/* System header to define __stub macros and hopefully few prototypes,
3536 which can conflict with char $ac_func(); below. */
3537#include <assert.h>
3538/* Override any gcc2 internal prototype to avoid an error. */
3539/* We use char because int might match the return type of a gcc2
3540 builtin and then its argument prototype would still apply. */
3541char $ac_func();
3542
Guido van Rossumf78abae1997-01-21 22:02:36 +00003543int main() {
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003544
3545/* The GNU C library defines this for functions which it implements
3546 to always fail with ENOSYS. Some functions are actually named
3547 something starting with __ and the normal name is an alias. */
3548#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3549choke me
3550#else
3551$ac_func();
3552#endif
3553
3554; return 0; }
3555EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00003556if { (eval echo configure:3557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003557 rm -rf conftest*
3558 eval "ac_cv_func_$ac_func=yes"
3559else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003560 echo "configure: failed program was:" >&5
3561 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003562 rm -rf conftest*
3563 eval "ac_cv_func_$ac_func=no"
3564fi
3565rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003566fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003567
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003568if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3569 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003570 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3571 cat >> confdefs.h <<EOF
3572#define $ac_tr_func 1
3573EOF
3574
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003575else
3576 echo "$ac_t""no" 1>&6
3577LIBOBJS="$LIBOBJS ${ac_func}.o"
3578fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003579done
3580
Guido van Rossumf78abae1997-01-21 22:02:36 +00003581
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003582LIBS=$LIBS_SAVE
3583
Guido van Rossumda88dad1995-01-26 00:46:29 +00003584# check for getopt
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003585echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00003586echo "configure:3587: checking for genuine getopt" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003587if eval "test \"`echo '$''{'ac_cv_func_getopt'+set}'`\" = set"; then
3588 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00003589else
3590 if test "$cross_compiling" = yes; then
3591 ac_cv_func_getopt=no
3592else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003593 cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00003594#line 3595 "configure"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003595#include "confdefs.h"
3596#include <stdio.h>
3597extern int optind, opterr, getopt();
3598extern char* optarg;
3599int main() {
3600 char* av[] = { "testprog", "parameter", "-fFlag", NULL };
3601 opterr = 0;
3602 if (getopt(3, av, "f:") == 'f') { exit(1); }
3603 exit(0);
3604}
3605EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00003606if { (eval echo configure:3607: \"$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 +00003607then
Guido van Rossumda88dad1995-01-26 00:46:29 +00003608 ac_cv_func_getopt=yes
3609else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003610 echo "configure: failed program was:" >&5
3611 cat conftest.$ac_ext >&5
3612 rm -fr conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00003613 ac_cv_func_getopt=no
3614fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003615rm -fr conftest*
3616fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003617
3618fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003619echo "$ac_t""$ac_cv_func_getopt" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00003620test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o"
3621
Guido van Rossumad713701997-07-10 22:42:38 +00003622# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00003623echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Guido van Rossum24b1e751997-08-21 02:29:16 +00003624echo "configure:3625: checking what malloc(0) returns" >&5
Guido van Rossumad713701997-07-10 22:42:38 +00003625if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
3626 echo $ac_n "(cached) $ac_c" 1>&6
3627else
3628 if test "$cross_compiling" = yes; then
3629 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3630else
3631 cat > conftest.$ac_ext <<EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00003632#line 3633 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00003633#include "confdefs.h"
3634#include <stdio.h>
3635#ifdef HAVE_STDLIB
3636#include <stdlib.h>
3637#else
3638char *malloc(), *realloc();
3639int *free();
3640#endif
3641main() {
3642 char *p;
3643 p = malloc(0);
3644 if (p == NULL) exit(1);
3645 p = realloc(p, 0);
3646 if (p == NULL) exit(1);
3647 free(p);
3648 exit(0);
3649}
3650EOF
Guido van Rossum24b1e751997-08-21 02:29:16 +00003651if { (eval echo configure:3652: \"$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 +00003652then
3653 ac_cv_malloc_zero=nonnull
3654else
3655 echo "configure: failed program was:" >&5
3656 cat conftest.$ac_ext >&5
3657 rm -fr conftest*
3658 ac_cv_malloc_zero=null
3659fi
3660rm -fr conftest*
3661fi
3662
3663fi
3664
3665echo "$ac_t""$ac_cv_malloc_zero" 1>&6
3666if test "$ac_cv_malloc_zero" = null
3667then
3668 cat >> confdefs.h <<\EOF
3669#define MALLOC_ZERO_RETURNS_NULL 1
3670EOF
3671
3672fi
3673
Guido van Rossum627b2d71993-12-24 10:39:16 +00003674# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003675trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003676cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003677# This file is a shell script that caches the results of configure
3678# tests run on this system so they can be shared between configure
3679# scripts and configure runs. It is not useful on other systems.
3680# If it contains results you don't want to keep, you may remove or edit it.
3681#
3682# By default, configure uses ./config.cache as the cache file,
3683# creating it if it does not exist already. You can give configure
3684# the --cache-file=FILE option to use a different cache file; that is
3685# what configure does when it calls configure scripts in
3686# subdirectories, so they share the cache.
3687# Giving --cache-file=/dev/null disables caching, for debugging configure.
3688# config.status only pays attention to the cache file if you give it the
3689# --recheck option to rerun configure.
3690#
3691EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00003692# The following way of writing the cache mishandles newlines in values,
3693# but we know of no workaround that is simple, portable, and efficient.
3694# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003695# Ultrix sh set writes to stderr and can't be redirected directly,
3696# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003697(set) 2>&1 |
Guido van Rossumf78abae1997-01-21 22:02:36 +00003698 case `(ac_space=' '; set) 2>&1` in
3699 *ac_space=\ *)
3700 # `set' does not quote correctly, so add quotes (double-quote substitution
3701 # turns \\\\ into \\, and sed turns \\ into \).
3702 sed -n \
3703 -e "s/'/'\\\\''/g" \
3704 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3705 ;;
3706 *)
3707 # `set' quotes correctly as required by POSIX, so do not add quotes.
3708 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3709 ;;
3710 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003711if cmp -s $cache_file confcache; then
3712 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003713else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003714 if test -w $cache_file; then
3715 echo "updating cache $cache_file"
3716 cat confcache > $cache_file
3717 else
3718 echo "not updating unwritable cache $cache_file"
3719 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003720fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003721rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00003722
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003723trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003724
3725test "x$prefix" = xNONE && prefix=$ac_default_prefix
3726# Let make expand exec_prefix.
3727test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00003728
Guido van Rossum7f43da71994-08-01 12:15:30 +00003729# Any assignment to VPATH causes Sun make to only execute
3730# the first set of double-colon rules, so remove it if not needed.
3731# If there is a colon in the path, we need to keep it.
3732if test "x$srcdir" = x.; then
3733 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
3734fi
3735
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003736trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00003737
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003738DEFS=-DHAVE_CONFIG_H
3739
3740# Without the "./", some shells look in PATH for config.status.
3741: ${CONFIG_STATUS=./config.status}
3742
3743echo creating $CONFIG_STATUS
3744rm -f $CONFIG_STATUS
3745cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003746#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00003747# Generated automatically by configure.
3748# Run this file to recreate the current configuration.
3749# This directory was configured as follows,
3750# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3751#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003752# $0 $ac_configure_args
3753#
3754# Compiler output produced by configure, useful for debugging
3755# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00003756
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003757ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003758for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00003759do
Guido van Rossum7f43da71994-08-01 12:15:30 +00003760 case "\$ac_option" in
3761 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003762 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3763 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003764 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossumf78abae1997-01-21 22:02:36 +00003765 echo "$CONFIG_STATUS generated by autoconf version 2.12"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003766 exit 0 ;;
3767 -help | --help | --hel | --he | --h)
3768 echo "\$ac_cs_usage"; exit 0 ;;
3769 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00003770 esac
3771done
3772
Guido van Rossum7f43da71994-08-01 12:15:30 +00003773ac_given_srcdir=$srcdir
Guido van Rossum627b2d71993-12-24 10:39:16 +00003774
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003775trap 'rm -fr `echo "Makefile \
3776 Objects/Makefile \
3777 Parser/Makefile \
3778 Python/Makefile \
3779 Modules/Makefile.pre config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003780EOF
3781cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003782
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003783# Protect against being on the right side of a sed subst in config.status.
3784sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3785 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003786$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00003787$extrasub
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003788s%@CFLAGS@%$CFLAGS%g
3789s%@CPPFLAGS@%$CPPFLAGS%g
3790s%@CXXFLAGS@%$CXXFLAGS%g
3791s%@DEFS@%$DEFS%g
3792s%@LDFLAGS@%$LDFLAGS%g
3793s%@LIBS@%$LIBS%g
3794s%@exec_prefix@%$exec_prefix%g
3795s%@prefix@%$prefix%g
3796s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003797s%@bindir@%$bindir%g
3798s%@sbindir@%$sbindir%g
3799s%@libexecdir@%$libexecdir%g
3800s%@datadir@%$datadir%g
3801s%@sysconfdir@%$sysconfdir%g
3802s%@sharedstatedir@%$sharedstatedir%g
3803s%@localstatedir@%$localstatedir%g
3804s%@libdir@%$libdir%g
3805s%@includedir@%$includedir%g
3806s%@oldincludedir@%$oldincludedir%g
3807s%@infodir@%$infodir%g
3808s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003809s%@VERSION@%$VERSION%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003810s%@MACHDEP@%$MACHDEP%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003811s%@CC@%$CC%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003812s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003813s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00003814s%@AR@%$AR%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003815s%@INSTALL@%$INSTALL%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00003816s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3817s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003818s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003819s%@CPP@%$CPP%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00003820s%@SO@%$SO%g
3821s%@LDSHARED@%$LDSHARED%g
3822s%@CCSHARED@%$CCSHARED%g
3823s%@LINKFORSHARED@%$LINKFORSHARED%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00003824s%@LDLAST@%$LDLAST%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00003825s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003826s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00003827s%@LIBM@%$LIBM%g
3828s%@LIBC@%$LIBC%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003829
3830CEOF
3831EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00003832
3833cat >> $CONFIG_STATUS <<\EOF
3834
3835# Split the substitutions into bite-sized pieces for seds with
3836# small command number limits, like on Digital OSF/1 and HP-UX.
3837ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3838ac_file=1 # Number of current file.
3839ac_beg=1 # First line for current file.
3840ac_end=$ac_max_sed_cmds # Line after last line for current file.
3841ac_more_lines=:
3842ac_sed_cmds=""
3843while $ac_more_lines; do
3844 if test $ac_beg -gt 1; then
3845 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3846 else
3847 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3848 fi
3849 if test ! -s conftest.s$ac_file; then
3850 ac_more_lines=false
3851 rm -f conftest.s$ac_file
3852 else
3853 if test -z "$ac_sed_cmds"; then
3854 ac_sed_cmds="sed -f conftest.s$ac_file"
3855 else
3856 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3857 fi
3858 ac_file=`expr $ac_file + 1`
3859 ac_beg=$ac_end
3860 ac_end=`expr $ac_end + $ac_max_sed_cmds`
3861 fi
3862done
3863if test -z "$ac_sed_cmds"; then
3864 ac_sed_cmds=cat
3865fi
3866EOF
3867
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003868cat >> $CONFIG_STATUS <<EOF
3869
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003870CONFIG_FILES=\${CONFIG_FILES-"Makefile \
3871 Objects/Makefile \
3872 Parser/Makefile \
3873 Python/Makefile \
3874 Modules/Makefile.pre"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003875EOF
3876cat >> $CONFIG_STATUS <<\EOF
3877for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003878 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003879 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00003880 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003881 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3882 *) ac_file_in="${ac_file}.in" ;;
3883 esac
3884
Guido van Rossumf78abae1997-01-21 22:02:36 +00003885 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003886
3887 # Remove last slash and all that follows it. Not all systems have dirname.
3888 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3889 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3890 # The file is in a subdirectory.
3891 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003892 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003893 # A "../" for each directory in $ac_dir_suffix.
3894 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3895 else
3896 ac_dir_suffix= ac_dots=
3897 fi
3898
3899 case "$ac_given_srcdir" in
3900 .) srcdir=.
3901 if test -z "$ac_dots"; then top_srcdir=.
3902 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3903 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3904 *) # Relative path.
3905 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3906 top_srcdir="$ac_dots$ac_given_srcdir" ;;
3907 esac
3908
Guido van Rossumf78abae1997-01-21 22:02:36 +00003909
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003910 echo creating "$ac_file"
3911 rm -f "$ac_file"
3912 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3913 case "$ac_file" in
3914 *Makefile*) ac_comsub="1i\\
3915# $configure_input" ;;
3916 *) ac_comsub= ;;
3917 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00003918
3919 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 +00003920 sed -e "$ac_comsub
3921s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003922s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00003923s%@top_srcdir@%$top_srcdir%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00003924" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00003925fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00003926rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00003927
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003928# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3929# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00003930#
3931# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003932ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
3933ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003934ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003935ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003936# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003937ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3938ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003939ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003940ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003941# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003942ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3943ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003944ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003945ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00003946
Guido van Rossumf78abae1997-01-21 22:02:36 +00003947if test "${CONFIG_HEADERS+set}" != set; then
3948EOF
3949cat >> $CONFIG_STATUS <<EOF
3950 CONFIG_HEADERS="config.h"
3951EOF
3952cat >> $CONFIG_STATUS <<\EOF
3953fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003954for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003955 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003956 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00003957 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003958 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3959 *) ac_file_in="${ac_file}.in" ;;
3960 esac
3961
Guido van Rossum7f43da71994-08-01 12:15:30 +00003962 echo creating $ac_file
3963
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003964 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00003965 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3966 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003967
3968EOF
3969
3970# Transform confdefs.h into a sed script conftest.vals that substitutes
3971# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003972# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003973# Protect against being in an unquoted here document in config.status.
3974rm -f conftest.vals
3975cat > conftest.hdr <<\EOF
3976s/[\\&%]/\\&/g
3977s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003978s%#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 +00003979s%ac_d%ac_u%gp
3980s%ac_u%ac_e%gp
3981EOF
3982sed -n -f conftest.hdr confdefs.h > conftest.vals
3983rm -f conftest.hdr
3984
3985# This sed command replaces #undef with comments. This is necessary, for
3986# example, in the case of _POSIX_SOURCE, which is predefined and required
3987# on some systems where configure will not decide to define it.
3988cat >> conftest.vals <<\EOF
3989s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3990EOF
3991
3992# Break up conftest.vals because some shells have a limit on
3993# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003994
3995rm -f conftest.tail
3996while :
3997do
3998 ac_lines=`grep -c . conftest.vals`
3999 # grep -c gives empty output for an empty file on some AIX systems.
4000 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4001 # Write a limited-size here document to conftest.frag.
4002 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4003 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4004 echo 'CEOF
4005 sed -f conftest.frag conftest.in > conftest.out
4006 rm -f conftest.in
4007 mv conftest.out conftest.in
4008' >> $CONFIG_STATUS
4009 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4010 rm -f conftest.vals
4011 mv conftest.tail conftest.vals
4012done
4013rm -f conftest.vals
4014
4015cat >> $CONFIG_STATUS <<\EOF
4016 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00004017 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004018 cat conftest.in >> conftest.h
4019 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00004020 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004021 echo "$ac_file is unchanged"
4022 rm -f conftest.h
4023 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004024 # Remove last slash and all that follows it. Not all systems have dirname.
4025 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4026 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4027 # The file is in a subdirectory.
4028 test ! -d "$ac_dir" && mkdir "$ac_dir"
4029 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004030 rm -f $ac_file
4031 mv conftest.h $ac_file
4032 fi
4033fi; done
4034
Guido van Rossumf78abae1997-01-21 22:02:36 +00004035EOF
4036cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004037
Guido van Rossumf78abae1997-01-21 22:02:36 +00004038EOF
4039cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004040
4041exit 0
4042EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004043chmod +x $CONFIG_STATUS
4044rm -fr confdefs* $ac_clean_files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004045test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00004046