blob: 7b2c7d004f7101424ee1080136fe12a41ca1d6ad [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 Rossum1f740161998-04-13 15:27:21 +00003# From configure.in Revision: 1.83
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004
Guido van Rossum627b2d71993-12-24 10:39:16 +00005# Guess values for system-dependent variables and create Makefiles.
Guido van Rossumf78abae1997-01-21 22:02:36 +00006# Generated automatically using autoconf version 2.12
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
Guido van Rossum627b2d71993-12-24 10:39:16 +000011
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012# Defaults:
13ac_help=
14ac_default_prefix=/usr/local
15# Any additions from configure.in:
16ac_help="$ac_help
Guido van Rossum7b3853f1996-07-30 18:09:35 +000017--with-next-archs='arch1 arch2 ..' build MAB binary"
18ac_help="$ac_help
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019--without-gcc never use gcc"
20ac_help="$ac_help
Guido van Rossuma68acba1996-07-31 17:36:39 +000021--with-libs='lib1 ...' link against additional libs"
22ac_help="$ac_help
Guido van Rossumb06df271997-08-05 21:50:20 +000023--with(out)-readline obsolete, edit Modules/Setup instead"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024ac_help="$ac_help
Guido van Rossumec2f0731997-01-22 20:54:01 +000025--with-dec-threads use DEC Alpha/OSF1 thread-safe libraries"
26ac_help="$ac_help
27--with-threads alias for --with-thread"
28ac_help="$ac_help
Guido van Rossum76be6ed1995-01-02 18:33:54 +000029--with-thread[=DIRECTORY] make interpreter thread-safe"
30ac_help="$ac_help
31--with-sgi-dl=DIRECTORY IRIX 4 dynamic linking"
32ac_help="$ac_help
33--with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking"
34ac_help="$ac_help
Guido van Rossum7f253911997-05-09 02:42:48 +000035--with-fpectl enable SIGFPE catching"
36ac_help="$ac_help
Guido van Rossum76be6ed1995-01-02 18:33:54 +000037--with-libm=STRING math library"
38ac_help="$ac_help
39--with-libc=STRING C library"
Guido van Rossum627b2d71993-12-24 10:39:16 +000040
Guido van Rossum7f43da71994-08-01 12:15:30 +000041# Initialize some variables set by options.
42# The variables have the same names as the options, with
43# dashes changed to underlines.
44build=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000045cache_file=./config.cache
46exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +000047host=NONE
48no_create=
49nonopt=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000050no_recursion=
51prefix=NONE
52program_prefix=NONE
53program_suffix=NONE
54program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +000055silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000056site=
Guido van Rossum7f43da71994-08-01 12:15:30 +000057srcdir=
58target=NONE
59verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000060x_includes=NONE
61x_libraries=NONE
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000062bindir='${exec_prefix}/bin'
63sbindir='${exec_prefix}/sbin'
64libexecdir='${exec_prefix}/libexec'
65datadir='${prefix}/share'
66sysconfdir='${prefix}/etc'
67sharedstatedir='${prefix}/com'
68localstatedir='${prefix}/var'
69libdir='${exec_prefix}/lib'
70includedir='${prefix}/include'
71oldincludedir='/usr/include'
72infodir='${prefix}/info'
73mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000074
75# Initialize some other variables.
76subdirs=
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000077MFLAGS= MAKEFLAGS=
Guido van Rossumf78abae1997-01-21 22:02:36 +000078# Maximum number of lines to put in a shell here document.
79ac_max_here_lines=12
Guido van Rossum7f43da71994-08-01 12:15:30 +000080
81ac_prev=
82for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +000083do
Guido van Rossum627b2d71993-12-24 10:39:16 +000084
Guido van Rossum7f43da71994-08-01 12:15:30 +000085 # If the previous option needs an argument, assign it.
86 if test -n "$ac_prev"; then
87 eval "$ac_prev=\$ac_option"
88 ac_prev=
89 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +000090 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000091
Guido van Rossum7f43da71994-08-01 12:15:30 +000092 case "$ac_option" in
93 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
94 *) ac_optarg= ;;
95 esac
96
Guido van Rossum76be6ed1995-01-02 18:33:54 +000097 # Accept the important Cygnus configure options, so we can diagnose typos.
98
Guido van Rossum7f43da71994-08-01 12:15:30 +000099 case "$ac_option" in
100
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000101 -bindir | --bindir | --bindi | --bind | --bin | --bi)
102 ac_prev=bindir ;;
103 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
104 bindir="$ac_optarg" ;;
105
106 -build | --build | --buil | --bui | --bu)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000107 ac_prev=build ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000108 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000109 build="$ac_optarg" ;;
110
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000111 -cache-file | --cache-file | --cache-fil | --cache-fi \
112 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
113 ac_prev=cache_file ;;
114 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
115 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
116 cache_file="$ac_optarg" ;;
117
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000118 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
119 ac_prev=datadir ;;
120 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
121 | --da=*)
122 datadir="$ac_optarg" ;;
123
Guido van Rossum7f43da71994-08-01 12:15:30 +0000124 -disable-* | --disable-*)
125 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000126 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000127 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000128 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000129 fi
130 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
131 eval "enable_${ac_feature}=no" ;;
132
133 -enable-* | --enable-*)
134 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000135 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000136 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000137 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000138 fi
139 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
140 case "$ac_option" in
141 *=*) ;;
142 *) ac_optarg=yes ;;
143 esac
144 eval "enable_${ac_feature}='$ac_optarg'" ;;
145
Guido van Rossum7f43da71994-08-01 12:15:30 +0000146 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
147 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
148 | --exec | --exe | --ex)
149 ac_prev=exec_prefix ;;
150 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
151 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
152 | --exec=* | --exe=* | --ex=*)
153 exec_prefix="$ac_optarg" ;;
154
155 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000156 # Obsolete; use --with-gas.
157 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000158
159 -help | --help | --hel | --he)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000160 # Omit some internal or obsolete options to make the list less imposing.
161 # This message is too long to be a string in the A/UX 3.1 sh.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000162 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000163Usage: configure [options] [host]
164Options: [defaults in brackets after descriptions]
165Configuration:
166 --cache-file=FILE cache test results in FILE
167 --help print this message
168 --no-create do not create output files
169 --quiet, --silent do not print \`checking...' messages
170 --version print the version of autoconf that created configure
171Directory and file names:
172 --prefix=PREFIX install architecture-independent files in PREFIX
173 [$ac_default_prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000174 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000175 [same as prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000176 --bindir=DIR user executables in DIR [EPREFIX/bin]
177 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
178 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
179 --datadir=DIR read-only architecture-independent data in DIR
180 [PREFIX/share]
181 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
182 --sharedstatedir=DIR modifiable architecture-independent data in DIR
183 [PREFIX/com]
184 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
185 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
186 --includedir=DIR C header files in DIR [PREFIX/include]
187 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
188 --infodir=DIR info documentation in DIR [PREFIX/info]
189 --mandir=DIR man documentation in DIR [PREFIX/man]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000190 --srcdir=DIR find the sources in DIR [configure dir or ..]
191 --program-prefix=PREFIX prepend PREFIX to installed program names
192 --program-suffix=SUFFIX append SUFFIX to installed program names
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000193 --program-transform-name=PROGRAM
194 run sed PROGRAM on installed program names
195EOF
196 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000197Host type:
198 --build=BUILD configure for building on BUILD [BUILD=HOST]
199 --host=HOST configure for HOST [guessed]
200 --target=TARGET configure for TARGET [TARGET=HOST]
201Features and packages:
202 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
203 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
204 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
205 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
206 --x-includes=DIR X include files are in DIR
207 --x-libraries=DIR X library files are in DIR
Guido van Rossum7f43da71994-08-01 12:15:30 +0000208EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000209 if test -n "$ac_help"; then
210 echo "--enable and --with options recognized:$ac_help"
211 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000212 exit 0 ;;
213
214 -host | --host | --hos | --ho)
215 ac_prev=host ;;
216 -host=* | --host=* | --hos=* | --ho=*)
217 host="$ac_optarg" ;;
218
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000219 -includedir | --includedir | --includedi | --included | --include \
220 | --includ | --inclu | --incl | --inc)
221 ac_prev=includedir ;;
222 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
223 | --includ=* | --inclu=* | --incl=* | --inc=*)
224 includedir="$ac_optarg" ;;
225
226 -infodir | --infodir | --infodi | --infod | --info | --inf)
227 ac_prev=infodir ;;
228 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
229 infodir="$ac_optarg" ;;
230
231 -libdir | --libdir | --libdi | --libd)
232 ac_prev=libdir ;;
233 -libdir=* | --libdir=* | --libdi=* | --libd=*)
234 libdir="$ac_optarg" ;;
235
236 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
237 | --libexe | --libex | --libe)
238 ac_prev=libexecdir ;;
239 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
240 | --libexe=* | --libex=* | --libe=*)
241 libexecdir="$ac_optarg" ;;
242
243 -localstatedir | --localstatedir | --localstatedi | --localstated \
244 | --localstate | --localstat | --localsta | --localst \
245 | --locals | --local | --loca | --loc | --lo)
246 ac_prev=localstatedir ;;
247 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
248 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
249 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
250 localstatedir="$ac_optarg" ;;
251
252 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
253 ac_prev=mandir ;;
254 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
255 mandir="$ac_optarg" ;;
256
Guido van Rossum7f43da71994-08-01 12:15:30 +0000257 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000258 # Obsolete; use --without-fp.
259 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000260
261 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
262 | --no-cr | --no-c)
263 no_create=yes ;;
264
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000265 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
266 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
267 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000268
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000269 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
270 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
271 | --oldin | --oldi | --old | --ol | --o)
272 ac_prev=oldincludedir ;;
273 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
274 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
275 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
276 oldincludedir="$ac_optarg" ;;
277
Guido van Rossum7f43da71994-08-01 12:15:30 +0000278 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
279 ac_prev=prefix ;;
280 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
281 prefix="$ac_optarg" ;;
282
283 -program-prefix | --program-prefix | --program-prefi | --program-pref \
284 | --program-pre | --program-pr | --program-p)
285 ac_prev=program_prefix ;;
286 -program-prefix=* | --program-prefix=* | --program-prefi=* \
287 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
288 program_prefix="$ac_optarg" ;;
289
290 -program-suffix | --program-suffix | --program-suffi | --program-suff \
291 | --program-suf | --program-su | --program-s)
292 ac_prev=program_suffix ;;
293 -program-suffix=* | --program-suffix=* | --program-suffi=* \
294 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
295 program_suffix="$ac_optarg" ;;
296
297 -program-transform-name | --program-transform-name \
298 | --program-transform-nam | --program-transform-na \
299 | --program-transform-n | --program-transform- \
300 | --program-transform | --program-transfor \
301 | --program-transfo | --program-transf \
302 | --program-trans | --program-tran \
303 | --progr-tra | --program-tr | --program-t)
304 ac_prev=program_transform_name ;;
305 -program-transform-name=* | --program-transform-name=* \
306 | --program-transform-nam=* | --program-transform-na=* \
307 | --program-transform-n=* | --program-transform-=* \
308 | --program-transform=* | --program-transfor=* \
309 | --program-transfo=* | --program-transf=* \
310 | --program-trans=* | --program-tran=* \
311 | --progr-tra=* | --program-tr=* | --program-t=*)
312 program_transform_name="$ac_optarg" ;;
313
314 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
315 | -silent | --silent | --silen | --sile | --sil)
316 silent=yes ;;
317
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000318 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
319 ac_prev=sbindir ;;
320 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
321 | --sbi=* | --sb=*)
322 sbindir="$ac_optarg" ;;
323
324 -sharedstatedir | --sharedstatedir | --sharedstatedi \
325 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
326 | --sharedst | --shareds | --shared | --share | --shar \
327 | --sha | --sh)
328 ac_prev=sharedstatedir ;;
329 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
330 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
331 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
332 | --sha=* | --sh=*)
333 sharedstatedir="$ac_optarg" ;;
334
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000335 -site | --site | --sit)
336 ac_prev=site ;;
337 -site=* | --site=* | --sit=*)
338 site="$ac_optarg" ;;
339
Guido van Rossum7f43da71994-08-01 12:15:30 +0000340 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
341 ac_prev=srcdir ;;
342 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
343 srcdir="$ac_optarg" ;;
344
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000345 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
346 | --syscon | --sysco | --sysc | --sys | --sy)
347 ac_prev=sysconfdir ;;
348 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
349 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
350 sysconfdir="$ac_optarg" ;;
351
Guido van Rossum7f43da71994-08-01 12:15:30 +0000352 -target | --target | --targe | --targ | --tar | --ta | --t)
353 ac_prev=target ;;
354 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
355 target="$ac_optarg" ;;
356
357 -v | -verbose | --verbose | --verbos | --verbo | --verb)
358 verbose=yes ;;
359
360 -version | --version | --versio | --versi | --vers)
Guido van Rossumf78abae1997-01-21 22:02:36 +0000361 echo "configure generated by autoconf version 2.12"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000362 exit 0 ;;
363
364 -with-* | --with-*)
365 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000366 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000367 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000368 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000369 fi
370 ac_package=`echo $ac_package| sed 's/-/_/g'`
371 case "$ac_option" in
372 *=*) ;;
373 *) ac_optarg=yes ;;
374 esac
375 eval "with_${ac_package}='$ac_optarg'" ;;
376
377 -without-* | --without-*)
378 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000379 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000380 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000381 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000382 fi
383 ac_package=`echo $ac_package| sed 's/-/_/g'`
384 eval "with_${ac_package}=no" ;;
385
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000386 --x)
387 # Obsolete; use --with-x.
388 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000389
390 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
391 | --x-incl | --x-inc | --x-in | --x-i)
392 ac_prev=x_includes ;;
393 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
394 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
395 x_includes="$ac_optarg" ;;
396
397 -x-libraries | --x-libraries | --x-librarie | --x-librari \
398 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
399 ac_prev=x_libraries ;;
400 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
401 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
402 x_libraries="$ac_optarg" ;;
403
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000404 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000405 ;;
406
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000407 *)
Guido van Rossum0a516c91994-09-12 10:58:40 +0000408 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000409 echo "configure: warning: $ac_option: invalid host type" 1>&2
Guido van Rossum7f43da71994-08-01 12:15:30 +0000410 fi
Guido van Rossum0a516c91994-09-12 10:58:40 +0000411 if test "x$nonopt" != xNONE; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000412 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000413 fi
414 nonopt="$ac_option"
415 ;;
416
417 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000418done
419
Guido van Rossum7f43da71994-08-01 12:15:30 +0000420if test -n "$ac_prev"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000421 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000422fi
423
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000424trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum7f43da71994-08-01 12:15:30 +0000425
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000426# File descriptor usage:
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000427# 0 standard input
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000428# 1 file creation
429# 2 errors and warnings
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000430# 3 some systems may open it to /dev/tty
431# 4 used on the Kubota Titan
432# 6 checking for... messages and results
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000433# 5 compiler messages saved in config.log
434if test "$silent" = yes; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000435 exec 6>/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000436else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000437 exec 6>&1
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000438fi
439exec 5>./config.log
440
441echo "\
442This file contains any messages produced by compilers while
443running configure, to aid debugging if configure makes a mistake.
444" 1>&5
445
446# Strip out --no-create and --no-recursion so they do not pile up.
447# Also quote any args containing shell metacharacters.
448ac_configure_args=
449for ac_arg
450do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000451 case "$ac_arg" in
452 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
453 | --no-cr | --no-c) ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000454 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
455 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
456 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
457 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
458 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000459 esac
460done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000461
462# NLS nuisances.
Guido van Rossumf78abae1997-01-21 22:02:36 +0000463# Only set these to C if already set. These must not be set unconditionally
464# because not all systems understand e.g. LANG=C (notably SCO).
465# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
466# Non-C LC_CTYPE values break the ctype check.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000467if test "${LANG+set}" = set; then LANG=C; export LANG; fi
Guido van Rossumf78abae1997-01-21 22:02:36 +0000468if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
469if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
470if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000471
Guido van Rossum7f43da71994-08-01 12:15:30 +0000472# confdefs.h avoids OS command line length limits that DEFS can exceed.
473rm -rf conftest* confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000474# AIX cpp loses on an empty file, so make sure it contains at least a newline.
475echo > confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000476
477# A filename unique to this package, relative to the directory that
478# configure is in, which we can look for to find out if srcdir is correct.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000479ac_unique_file=Include/object.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000480
481# Find the source files, if location was not specified.
482if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000483 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000484 # Try the directory containing this script, then its parent.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000485 ac_prog=$0
486 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
487 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
488 srcdir=$ac_confdir
489 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000490 srcdir=..
491 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000492else
493 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000494fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000495if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000496 if test "$ac_srcdir_defaulted" = yes; then
497 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000498 else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000499 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000500 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000501fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000502srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
503
504# Prefer explicitly selected file to automatically selected ones.
505if test -z "$CONFIG_SITE"; then
506 if test "x$prefix" != xNONE; then
507 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
508 else
509 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
510 fi
511fi
512for ac_site_file in $CONFIG_SITE; do
513 if test -r "$ac_site_file"; then
514 echo "loading site script $ac_site_file"
515 . "$ac_site_file"
516 fi
517done
518
519if test -r "$cache_file"; then
520 echo "loading cache $cache_file"
521 . $cache_file
522else
523 echo "creating cache $cache_file"
524 > $cache_file
525fi
526
Guido van Rossum7f43da71994-08-01 12:15:30 +0000527ac_ext=c
Guido van Rossum0a516c91994-09-12 10:58:40 +0000528# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000529ac_cpp='$CPP $CPPFLAGS'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000530ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
531ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000532cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000533
534if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
535 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
536 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
537 ac_n= ac_c='
538' ac_t=' '
539 else
540 ac_n=-n ac_c= ac_t=
541 fi
542else
543 ac_n= ac_c='\c' ac_t=
544fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000545
Guido van Rossum0a516c91994-09-12 10:58:40 +0000546
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000547
Guido van Rossum627b2d71993-12-24 10:39:16 +0000548
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000549# Set VERSION so we only need to edit in one place (i.e., here)
550
551VERSION=1.5
552
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000553# NEXTSTEP stuff
Guido van Rossum563e7081996-09-10 18:20:48 +0000554if test -f /usr/lib/NextStep/software_version; then
555
556 echo $ac_n "checking for --with-next-archs""... $ac_c" 1>&6
Guido van Rossumb06df271997-08-05 21:50:20 +0000557echo "configure:558: checking for --with-next-archs" >&5
Guido van Rossum563e7081996-09-10 18:20:48 +0000558 # Check whether --with-next-archs or --without-next-archs was given.
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000559if test "${with_next_archs+set}" = set; then
560 withval="$with_next_archs"
561
Guido van Rossum563e7081996-09-10 18:20:48 +0000562 if test -n "$withval"; then
563 ac_arch_flags=`/usr/lib/arch_tool -archify_list $withval`
564 # GCC does not currently support multi archs on the NeXT
565 with_gcc=no
566 fi
567 echo "$ac_t""$with_next_archs" 1>&6
568
569else
570 echo "$ac_t""none: using `arch`" 1>&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000571fi
572
Guido van Rossum563e7081996-09-10 18:20:48 +0000573
574 if test -z "$MACHDEP"
575 then
576 set X `hostinfo | grep 'NeXT Mach.*:' | \
577 sed -e 's/://' -e 's/\./_/'` && \
578 ac_sys_system=next && ac_sys_release=$4
579
Guido van Rossumb97ef171997-09-28 05:44:03 +0000580 MACHDEP="$ac_sys_system$ac_sys_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000581 fi
582fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000583
Guido van Rossum91922671997-10-09 20:24:13 +0000584
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000585# Set name for machine-dependent library files
586
587echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
Guido van Rossum91922671997-10-09 20:24:13 +0000588echo "configure:589: checking MACHDEP" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000589if test -z "$MACHDEP"
590then
Guido van Rossum563e7081996-09-10 18:20:48 +0000591 ac_sys_system=`uname -s`
592 if test "$ac_sys_system" = "AIX" ; then
593 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000594 else
Guido van Rossum563e7081996-09-10 18:20:48 +0000595 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000596 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000597 ac_md_system=`echo $ac_sys_system |
598 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
599 ac_md_release=`echo $ac_sys_release |
600 tr -d '/ ' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +0000601 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000602
Guido van Rossum07397971997-04-29 21:49:50 +0000603 case $MACHDEP in
Guido van Rossumb97ef171997-09-28 05:44:03 +0000604 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000605 esac
606fi
Guido van Rossum91922671997-10-09 20:24:13 +0000607
608#
609# SGI compilers allow the specification of the both the ABI and the
610# ISA on the command line. Depending on the values of these switches,
611# different and often incompatable code will be generated.
612#
613# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
614# thus supply support for various ABI/ISA combinations. The MACHDEP
615# variable is also adjusted.
616#
617
618if test ! -z "$SGI_ABI"
619then
620 CC="cc $SGI_ABI"
621 LDFLAGS="$SGI_ABI $LDFLAGS"
622 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
623fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000624echo "$ac_t""$MACHDEP" 1>&6
625
Guido van Rossum91922671997-10-09 20:24:13 +0000626#
627# CCC is the command that compiles C++ programs
628#
629# Not all make programs have this predefined.
630#
631
632echo $ac_n "checking CCC""... $ac_c" 1>&6
633echo "configure:634: checking CCC" >&5
634if test -z "$CCC"
635then
636 case $ac_sys_system in
637 IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";;
638 *) SET_CCC=""
639 esac
640else
641 SET_CCC="CCC= ${CCC}"
642fi
643echo "$ac_t""$SET_CCC" 1>&6
644
645
Guido van Rossum627b2d71993-12-24 10:39:16 +0000646# checks for alternative programs
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000647echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
Guido van Rossum91922671997-10-09 20:24:13 +0000648echo "configure:649: checking for --without-gcc" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000649# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000650if test "${with_gcc+set}" = set; then
651 withval="$with_gcc"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000652
653 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000654 no) CC=cc
655 without_gcc=yes;;
656 yes) CC=gcc
657 without_gcc=no;;
658 *) CC=$withval
659 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000660 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000661else
Guido van Rossume77438c1995-09-13 18:59:59 +0000662
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000663 case $ac_sys_system in
Guido van Rossume77438c1995-09-13 18:59:59 +0000664 OSF1) CC=cc
665 without_gcc=;;
666 *) without_gcc=no;;
667 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000668fi
669
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000670echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000671
Guido van Rossum8b131c51995-03-09 14:10:13 +0000672# If the user switches compilers, we can't believe the cache
673if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
674then
675 { echo "configure: error: cached CC is different -- throw away $cache_file
676(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
677fi
678
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000679# Extract the first word of "gcc", so it can be a program name with args.
680set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000681echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum91922671997-10-09 20:24:13 +0000682echo "configure:683: checking for $ac_word" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000683if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
684 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000685else
686 if test -n "$CC"; then
687 ac_cv_prog_CC="$CC" # Let the user override the test.
688else
Guido van Rossum7f43da71994-08-01 12:15:30 +0000689 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
690 for ac_dir in $PATH; do
691 test -z "$ac_dir" && ac_dir=.
692 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000693 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000694 break
695 fi
696 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000697 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000698fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000699fi
700CC="$ac_cv_prog_CC"
701if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000702 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000703else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000704 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000705fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000706
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000707if test -z "$CC"; then
708 # Extract the first word of "cc", so it can be a program name with args.
709set dummy cc; ac_word=$2
710echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum91922671997-10-09 20:24:13 +0000711echo "configure:712: checking for $ac_word" >&5
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000712if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
713 echo $ac_n "(cached) $ac_c" 1>&6
714else
715 if test -n "$CC"; then
716 ac_cv_prog_CC="$CC" # Let the user override the test.
717else
718 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
719 ac_prog_rejected=no
720 for ac_dir in $PATH; do
721 test -z "$ac_dir" && ac_dir=.
722 if test -f $ac_dir/$ac_word; then
723 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
724 ac_prog_rejected=yes
725 continue
726 fi
727 ac_cv_prog_CC="cc"
728 break
729 fi
730 done
731 IFS="$ac_save_ifs"
732if test $ac_prog_rejected = yes; then
733 # We found a bogon in the path, so make sure we never use it.
734 set dummy $ac_cv_prog_CC
735 shift
736 if test $# -gt 0; then
737 # We chose a different compiler from the bogus one.
738 # However, it has the same basename, so the bogon will be chosen
739 # first if we set CC to just the basename; use the full file name.
740 shift
741 set dummy "$ac_dir/$ac_word" "$@"
742 shift
743 ac_cv_prog_CC="$@"
744 fi
745fi
746fi
747fi
748CC="$ac_cv_prog_CC"
749if test -n "$CC"; then
750 echo "$ac_t""$CC" 1>&6
751else
752 echo "$ac_t""no" 1>&6
753fi
754
755 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
756fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000757
Guido van Rossumf78abae1997-01-21 22:02:36 +0000758echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Guido van Rossum91922671997-10-09 20:24:13 +0000759echo "configure:760: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000760
761ac_ext=c
762# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
763ac_cpp='$CPP $CPPFLAGS'
764ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
765ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
766cross_compiling=$ac_cv_prog_cc_cross
767
768cat > conftest.$ac_ext <<EOF
Guido van Rossum91922671997-10-09 20:24:13 +0000769#line 770 "configure"
Guido van Rossumf78abae1997-01-21 22:02:36 +0000770#include "confdefs.h"
771main(){return(0);}
772EOF
Guido van Rossum91922671997-10-09 20:24:13 +0000773if { (eval echo configure:774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000774 ac_cv_prog_cc_works=yes
775 # If we can't run a trivial program, we are probably using a cross compiler.
776 if (./conftest; exit) 2>/dev/null; then
777 ac_cv_prog_cc_cross=no
778 else
779 ac_cv_prog_cc_cross=yes
780 fi
781else
782 echo "configure: failed program was:" >&5
783 cat conftest.$ac_ext >&5
784 ac_cv_prog_cc_works=no
785fi
786rm -fr conftest*
787
788echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
789if test $ac_cv_prog_cc_works = no; then
790 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
791fi
792echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Guido van Rossum91922671997-10-09 20:24:13 +0000793echo "configure:794: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000794echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
795cross_compiling=$ac_cv_prog_cc_cross
796
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000797echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Guido van Rossum91922671997-10-09 20:24:13 +0000798echo "configure:799: checking whether we are using GNU C" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000799if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
800 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000801else
802 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000803#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000804 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +0000805#endif
806EOF
Guido van Rossum91922671997-10-09 20:24:13 +0000807if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:808: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000808 ac_cv_prog_gcc=yes
809else
810 ac_cv_prog_gcc=no
811fi
812fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000813
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000814echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +0000815
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000816if test $ac_cv_prog_gcc = yes; then
817 GCC=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +0000818 ac_test_CFLAGS="${CFLAGS+set}"
819 ac_save_CFLAGS="$CFLAGS"
820 CFLAGS=
821 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Guido van Rossum91922671997-10-09 20:24:13 +0000822echo "configure:823: checking whether ${CC-cc} accepts -g" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000823if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000824 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000825else
826 echo 'void f(){}' > conftest.c
827if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000828 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000829else
Guido van Rossumf78abae1997-01-21 22:02:36 +0000830 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000831fi
832rm -f conftest*
833
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000834fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000835
Guido van Rossumf78abae1997-01-21 22:02:36 +0000836echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
837 if test "$ac_test_CFLAGS" = set; then
838 CFLAGS="$ac_save_CFLAGS"
839 elif test $ac_cv_prog_cc_g = yes; then
840 CFLAGS="-g -O2"
841 else
842 CFLAGS="-O2"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000843 fi
844else
845 GCC=
846 test "${CFLAGS+set}" = set || CFLAGS="-g"
847fi
848
Guido van Rossum76c5fe21997-08-14 19:45:07 +0000849
Guido van Rossum24b1e751997-08-21 02:29:16 +0000850case $ac_sys_system in
851hp*|HP*)
852 case $CC in
853 cc|*/cc) CC="$CC -Aa -D_HPUX_SOURCE";;
854 esac;;
855esac
856
Guido van Rossum76c5fe21997-08-14 19:45:07 +0000857# LINKCC is the command that links the python executable -- default is $(CC).
858# This is altered for AIX in order to build the export list before linking.
859
860echo $ac_n "checking LINKCC""... $ac_c" 1>&6
Guido van Rossum91922671997-10-09 20:24:13 +0000861echo "configure:862: checking LINKCC" >&5
Guido van Rossum76c5fe21997-08-14 19:45:07 +0000862if test -z "$LINKCC"
863then
864 case $ac_sys_system in
865 AIX*)
Guido van Rossum45140f91997-08-29 18:44:06 +0000866 LINKCC="\$(srcdir)/makexp_aix python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +0000867 dgux*)
868 LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";;
Guido van Rossum25f93031997-08-18 16:00:04 +0000869 *) LINKCC="\$(PURIFY) \$(CC)";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +0000870 esac
871fi
872echo "$ac_t""$LINKCC" 1>&6
873
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874# Extract the first word of "ranlib", so it can be a program name with args.
875set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000876echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +0000877echo "configure:878: checking for $ac_word" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000878if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
879 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000880else
881 if test -n "$RANLIB"; then
882 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
883else
Guido van Rossum7f43da71994-08-01 12:15:30 +0000884 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
885 for ac_dir in $PATH; do
886 test -z "$ac_dir" && ac_dir=.
887 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000888 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000889 break
890 fi
891 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000892 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000893 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000894fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000895fi
896RANLIB="$ac_cv_prog_RANLIB"
897if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000898 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000899else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000900 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000901fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000902
903
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904for ac_prog in ar aal
905do
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000906# Extract the first word of "$ac_prog", so it can be a program name with args.
907set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000908echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +0000909echo "configure:910: checking for $ac_word" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000910if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
911 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000912else
913 if test -n "$AR"; then
914 ac_cv_prog_AR="$AR" # Let the user override the test.
915else
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
917 for ac_dir in $PATH; do
918 test -z "$ac_dir" && ac_dir=.
919 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000920 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000921 break
922 fi
923 done
924 IFS="$ac_save_ifs"
925fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000926fi
927AR="$ac_cv_prog_AR"
928if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000929 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000930else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000931 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000932fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000933
934test -n "$AR" && break
935done
936test -n "$AR" || AR="ar"
937
938
Guido van Rossumda88dad1995-01-26 00:46:29 +0000939
940
Guido van Rossum3c4bb801997-12-18 23:55:32 +0000941
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000942# Install just never works :-(
943if test -z "$INSTALL"
Guido van Rossumda88dad1995-01-26 00:46:29 +0000944then
945 INSTALL=cp
946 INSTALL_PROGRAM=cp
947 INSTALL_DATA=cp
948else
949 INSTALL_PROGRAM="$INSTALL"
950 INSTALL_DATA="$INSTALL -m 644"
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000951fi
952
953# Optimizer/debugger flags passed between Makefiles
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000954
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000955if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000956then
Guido van Rossumedca74a1997-07-18 23:29:40 +0000957 case $GCC in
958 yes)
959 case $ac_cv_prog_cc_g in
960 yes) OPT="-g -O2";;
961 *) OPT="-O2";;
962 esac
963 ;;
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000964 *) OPT="-O";;
965 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000966fi
967
Guido van Rossum563e7081996-09-10 18:20:48 +0000968if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +0000969then
970 OPT="$OPT $ac_arch_flags"
971fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000972# checks for UNIX variants that set C preprocessor variables
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000973echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +0000974echo "configure:975: checking how to run the C preprocessor" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000975# On Suns, sometimes $CPP names a directory.
976if test -n "$CPP" && test -d "$CPP"; then
977 CPP=
978fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000979if test -z "$CPP"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000980if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
981 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000982else
983 # This must be in double quotes, not single quotes, because CPP may get
984 # substituted into the Makefile and "${CC-cc}" will confuse make.
Guido van Rossum627b2d71993-12-24 10:39:16 +0000985 CPP="${CC-cc} -E"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000986 # On the NeXT, cc -E runs the code through the compiler's parser,
987 # not just through cpp.
988 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +0000989#line 990 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000990#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000991#include <assert.h>
Guido van Rossum627b2d71993-12-24 10:39:16 +0000992Syntax Error
993EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000994ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum3c4bb801997-12-18 23:55:32 +0000995{ (eval echo configure:996: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000996ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000997if test -z "$ac_err"; then
998 :
999else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001000 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001001 echo "configure: failed program was:" >&5
1002 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003 rm -rf conftest*
1004 CPP="${CC-cc} -E -traditional-cpp"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001005 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001006#line 1007 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001008#include <assert.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009Syntax Error
1010EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001011ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001012{ (eval echo configure:1013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001013ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001014if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001015 :
1016else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001017 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001018 echo "configure: failed program was:" >&5
1019 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001020 rm -rf conftest*
1021 CPP=/lib/cpp
1022fi
1023rm -f conftest*
1024fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001026 ac_cv_prog_CPP="$CPP"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001027fi
Guido van Rossume77438c1995-09-13 18:59:59 +00001028 CPP="$ac_cv_prog_CPP"
1029else
1030 ac_cv_prog_CPP="$CPP"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001031fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001032echo "$ac_t""$CPP" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001033
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001034echo $ac_n "checking for AIX""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001035echo "configure:1036: checking for AIX" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001036cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001037#line 1038 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001038#include "confdefs.h"
1039#ifdef _AIX
1040 yes
1041#endif
1042
1043EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001044if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1045 egrep "yes" >/dev/null 2>&1; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001046 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001047 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001048#define _ALL_SOURCE 1
1049EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001050
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001051else
1052 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001053 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001054fi
1055rm -f conftest*
1056
1057
Guido van Rossumf78abae1997-01-21 22:02:36 +00001058ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001059echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001060echo "configure:1061: checking for minix/config.h" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001061if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1062 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001063else
1064 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001065#line 1066 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001066#include "confdefs.h"
1067#include <minix/config.h>
1068EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001070{ (eval echo configure:1071: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001071ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001072if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001073 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001074 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001075else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001076 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001077 echo "configure: failed program was:" >&5
1078 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079 rm -rf conftest*
1080 eval "ac_cv_header_$ac_safe=no"
1081fi
1082rm -f conftest*
1083fi
1084if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001085 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001086 MINIX=yes
1087else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001088 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001089MINIX=
Guido van Rossum627b2d71993-12-24 10:39:16 +00001090fi
1091
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001092if test "$MINIX" = yes; then
1093 cat >> confdefs.h <<\EOF
1094#define _POSIX_SOURCE 1
1095EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001096
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001097 cat >> confdefs.h <<\EOF
1098#define _POSIX_1_SOURCE 2
1099EOF
1100
1101 cat >> confdefs.h <<\EOF
1102#define _MINIX 1
1103EOF
1104
1105fi
1106
Guido van Rossumda88dad1995-01-26 00:46:29 +00001107
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001108if test "$MACHDEP" != "dguxR4"
1109then
Guido van Rossum201afe51997-05-14 21:14:44 +00001110echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001111echo "configure:1112: checking whether $CC accepts -Olimit 1500" >&5
Guido van Rossum201afe51997-05-14 21:14:44 +00001112if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
1113 echo $ac_n "(cached) $ac_c" 1>&6
1114else
1115 ac_save_cc="$CC"
1116CC="$CC -Olimit 1500"
Guido van Rossumdb7098c1997-05-30 14:24:16 +00001117if test "$cross_compiling" = yes; then
1118 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1119else
1120 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001121#line 1122 "configure"
Guido van Rossum201afe51997-05-14 21:14:44 +00001122#include "confdefs.h"
Guido van Rossumdb7098c1997-05-30 14:24:16 +00001123int main() { return 0; }
Guido van Rossum201afe51997-05-14 21:14:44 +00001124EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001125if { (eval echo configure:1126: \"$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 +00001126then
Guido van Rossum201afe51997-05-14 21:14:44 +00001127 ac_cv_olimit_ok=yes
1128else
1129 echo "configure: failed program was:" >&5
1130 cat conftest.$ac_ext >&5
Guido van Rossumdb7098c1997-05-30 14:24:16 +00001131 rm -fr conftest*
Guido van Rossum201afe51997-05-14 21:14:44 +00001132 ac_cv_olimit_ok=no
1133fi
Guido van Rossumdb7098c1997-05-30 14:24:16 +00001134rm -fr conftest*
1135fi
1136
Guido van Rossum201afe51997-05-14 21:14:44 +00001137CC="$ac_save_cc"
1138fi
1139
1140echo "$ac_t""$ac_cv_olimit_ok" 1>&6
1141if test $ac_cv_olimit_ok = yes; then
Guido van Rossum304dd2d1997-10-20 23:10:56 +00001142 OPT="$OPT -Olimit 1500"
Guido van Rossum91922671997-10-09 20:24:13 +00001143fi
1144
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001145
Guido van Rossum91922671997-10-09 20:24:13 +00001146echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001147echo "configure:1148: checking whether $CC accepts -OPT:Olimit=0" >&5
Guido van Rossum91922671997-10-09 20:24:13 +00001148if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then
1149 echo $ac_n "(cached) $ac_c" 1>&6
1150else
1151 ac_save_cc="$CC"
1152CC="$CC -OPT:Olimit=0"
1153if test "$cross_compiling" = yes; then
1154 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1155else
1156 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001157#line 1158 "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00001158#include "confdefs.h"
1159int main() { return 0; }
1160EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001161if { (eval echo configure:1162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
Guido van Rossum91922671997-10-09 20:24:13 +00001162then
1163 ac_cv_opt_olimit_ok=yes
1164else
1165 echo "configure: failed program was:" >&5
1166 cat conftest.$ac_ext >&5
1167 rm -fr conftest*
1168 ac_cv_opt_olimit_ok=no
1169fi
1170rm -fr conftest*
1171fi
1172
1173CC="$ac_save_cc"
1174fi
1175
1176echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00001177if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum304dd2d1997-10-20 23:10:56 +00001178 OPT="$OPT -OPT:Olimit=0"
Guido van Rossum201afe51997-05-14 21:14:44 +00001179fi
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001180 REALLIBRARY='libpython$(VERSION).a'
Guido van Rossum35742851998-02-19 21:32:40 +00001181 DGUX_IS_BROKEN="true"
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001182else
1183 REALLIBRARY='libpython$(VERSION).so'
1184 OPT="$OPT -pic"
Guido van Rossum35742851998-02-19 21:32:40 +00001185 DGUX_IS_BROKEN="make $REALLIBRARY"
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001186fi
Guido van Rossum201afe51997-05-14 21:14:44 +00001187
Guido van Rossum84e7b241996-08-19 21:59:00 +00001188# check for ANSI or K&R ("traditional") preprocessor
1189echo $ac_n "checking for C preprocessor type""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001190echo "configure:1191: checking for C preprocessor type" >&5
Guido van Rossum84e7b241996-08-19 21:59:00 +00001191cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001192#line 1193 "configure"
Guido van Rossum84e7b241996-08-19 21:59:00 +00001193#include "confdefs.h"
1194
1195#define spam(name, doc) {#name, &name, #name "() -- " doc}
1196int foo;
1197struct {char *name; int *addr; char *doc;} desc = spam(foo, "something");
1198
Guido van Rossumf78abae1997-01-21 22:02:36 +00001199int main() {
Guido van Rossum84e7b241996-08-19 21:59:00 +00001200;
1201; return 0; }
1202EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001203if { (eval echo configure:1204: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum84e7b241996-08-19 21:59:00 +00001204 rm -rf conftest*
1205 cpp_type=ansi
1206else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001207 echo "configure: failed program was:" >&5
1208 cat conftest.$ac_ext >&5
Guido van Rossum84e7b241996-08-19 21:59:00 +00001209 rm -rf conftest*
1210 cat >> confdefs.h <<\EOF
1211#define HAVE_OLD_CPP 1
1212EOF
1213 cpp_type=traditional
1214fi
1215rm -f conftest*
Guido van Rossum84e7b241996-08-19 21:59:00 +00001216echo "$ac_t""$cpp_type" 1>&6
1217
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001218# checks for header files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001219echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001220echo "configure:1221: checking for ANSI C header files" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001221if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1222 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001223else
1224 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001225#line 1226 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001226#include "confdefs.h"
1227#include <stdlib.h>
1228#include <stdarg.h>
1229#include <string.h>
1230#include <float.h>
1231EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001232ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001233{ (eval echo configure:1234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001234ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001235if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001236 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001237 ac_cv_header_stdc=yes
1238else
1239 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001240 echo "configure: failed program was:" >&5
1241 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001242 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001243 ac_cv_header_stdc=no
1244fi
1245rm -f conftest*
1246
1247if test $ac_cv_header_stdc = yes; then
1248 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1249cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001250#line 1251 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001251#include "confdefs.h"
1252#include <string.h>
1253EOF
1254if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1255 egrep "memchr" >/dev/null 2>&1; then
1256 :
1257else
1258 rm -rf conftest*
1259 ac_cv_header_stdc=no
1260fi
1261rm -f conftest*
1262
1263fi
1264
1265if test $ac_cv_header_stdc = yes; then
1266 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1267cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001268#line 1269 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001269#include "confdefs.h"
1270#include <stdlib.h>
1271EOF
1272if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1273 egrep "free" >/dev/null 2>&1; then
1274 :
1275else
1276 rm -rf conftest*
1277 ac_cv_header_stdc=no
1278fi
1279rm -f conftest*
1280
1281fi
1282
1283if test $ac_cv_header_stdc = yes; then
1284 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1285if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001286 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001287else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001288 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001289#line 1290 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001290#include "confdefs.h"
1291#include <ctype.h>
1292#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1293#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001294#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00001295int main () { int i; for (i = 0; i < 256; i++)
1296if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1297exit (0); }
1298
1299EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001300if { (eval echo configure:1301: \"$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 +00001301then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001302 :
1303else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001304 echo "configure: failed program was:" >&5
1305 cat conftest.$ac_ext >&5
1306 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001307 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001308fi
1309rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001310fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001311
1312fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001313fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001314
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001315echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001316if test $ac_cv_header_stdc = yes; then
1317 cat >> confdefs.h <<\EOF
1318#define STDC_HEADERS 1
1319EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001320
1321fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001322
Guido van Rossum96013151997-10-08 22:47:52 +00001323for ac_hdr in dlfcn.h fcntl.h limits.h locale.h ncurses.h pthread.h \
Guido van Rossum2d38f911996-06-26 19:47:01 +00001324signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h \
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001325sys/audioio.h sys/file.h sys/lock.h \
1326sys/param.h sys/select.h sys/time.h sys/times.h \
Guido van Rossum2d38f911996-06-26 19:47:01 +00001327sys/un.h sys/utsname.h sys/wait.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001328do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001329ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001330echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001331echo "configure:1332: checking for $ac_hdr" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001332if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1333 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001334else
1335 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001336#line 1337 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001337#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001338#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001339EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001340ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001341{ (eval echo configure:1342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001342ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001343if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001344 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001345 eval "ac_cv_header_$ac_safe=yes"
1346else
1347 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001348 echo "configure: failed program was:" >&5
1349 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001350 rm -rf conftest*
1351 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001352fi
1353rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001354fi
1355if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001356 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001357 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001358 cat >> confdefs.h <<EOF
1359#define $ac_tr_hdr 1
1360EOF
1361
1362else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001363 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001364fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001365done
1366
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001367ac_header_dirent=no
1368for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1369do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001370ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001371echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001372echo "configure:1373: checking for $ac_hdr that defines DIR" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001373if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1374 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001375else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001376 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001377#line 1378 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001378#include "confdefs.h"
1379#include <sys/types.h>
1380#include <$ac_hdr>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001381int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001382DIR *dirp = 0;
1383; return 0; }
1384EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001385if { (eval echo configure:1386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001386 rm -rf conftest*
1387 eval "ac_cv_header_dirent_$ac_safe=yes"
1388else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001389 echo "configure: failed program was:" >&5
1390 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001391 rm -rf conftest*
1392 eval "ac_cv_header_dirent_$ac_safe=no"
1393fi
1394rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001395fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001396if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001397 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001398 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001399 cat >> confdefs.h <<EOF
1400#define $ac_tr_hdr 1
1401EOF
1402 ac_header_dirent=$ac_hdr; break
1403else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001404 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001405fi
1406done
1407# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1408if test $ac_header_dirent = dirent.h; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001409echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001410echo "configure:1411: checking for opendir in -ldir" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001411ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001412if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001413 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001414else
1415 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001416LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001417cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001418#line 1419 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001419#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001420/* Override any gcc2 internal prototype to avoid an error. */
1421/* We use char because int might match the return type of a gcc2
1422 builtin and then its argument prototype would still apply. */
1423char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001424
Guido van Rossumf78abae1997-01-21 22:02:36 +00001425int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001426opendir()
1427; return 0; }
1428EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001429if { (eval echo configure:1430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001430 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001431 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001432else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001433 echo "configure: failed program was:" >&5
1434 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001435 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001436 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001437fi
1438rm -f conftest*
1439LIBS="$ac_save_LIBS"
1440
1441fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001442if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001443 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001444 LIBS="$LIBS -ldir"
1445else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001446 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001447fi
1448
1449else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001450echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001451echo "configure:1452: checking for opendir in -lx" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001452ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001453if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001454 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001455else
1456 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001457LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001458cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001459#line 1460 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001460#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001461/* Override any gcc2 internal prototype to avoid an error. */
1462/* We use char because int might match the return type of a gcc2
1463 builtin and then its argument prototype would still apply. */
1464char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001465
Guido van Rossumf78abae1997-01-21 22:02:36 +00001466int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001467opendir()
1468; return 0; }
1469EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001470if { (eval echo configure:1471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001471 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001472 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001473else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001474 echo "configure: failed program was:" >&5
1475 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001476 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001477 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001478fi
1479rm -f conftest*
1480LIBS="$ac_save_LIBS"
1481
1482fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001483if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001484 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001485 LIBS="$LIBS -lx"
1486else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001487 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001488fi
1489
1490fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001491
1492
1493# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00001494was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001495echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001496echo "configure:1497: checking for clock_t in time.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001497cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001498#line 1499 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001499#include "confdefs.h"
1500#include <time.h>
1501EOF
1502if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1503 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00001504 rm -rf conftest*
1505 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001506else
1507 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001508 cat >> confdefs.h <<\EOF
1509#define clock_t long
1510EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001511
1512fi
1513rm -f conftest*
1514
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001515echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00001516
Guido van Rossum84e7b241996-08-19 21:59:00 +00001517# Add some code to confdefs.h so that the test for off_t works on SCO
1518cat >> confdefs.h <<\EOF
1519#if defined(SCO_DS)
1520#undef _OFF_T
1521#endif
1522EOF
1523
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001524echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001525echo "configure:1526: checking for mode_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001526if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1527 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001528else
1529 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001530#line 1531 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001531#include "confdefs.h"
1532#include <sys/types.h>
1533#if STDC_HEADERS
1534#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001535#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001536#endif
1537EOF
1538if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossumf78abae1997-01-21 22:02:36 +00001539 egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001540 rm -rf conftest*
1541 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001542else
1543 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001544 ac_cv_type_mode_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001545fi
1546rm -f conftest*
1547
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001548fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001549echo "$ac_t""$ac_cv_type_mode_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001550if test $ac_cv_type_mode_t = no; then
1551 cat >> confdefs.h <<\EOF
1552#define mode_t int
1553EOF
1554
1555fi
1556
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001557echo $ac_n "checking for off_t""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001558echo "configure:1559: checking for off_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001559if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1560 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001561else
1562 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001563#line 1564 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001564#include "confdefs.h"
1565#include <sys/types.h>
1566#if STDC_HEADERS
1567#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001568#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001569#endif
1570EOF
1571if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossumf78abae1997-01-21 22:02:36 +00001572 egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001573 rm -rf conftest*
1574 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001575else
1576 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001577 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001578fi
1579rm -f conftest*
1580
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001581fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001582echo "$ac_t""$ac_cv_type_off_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001583if test $ac_cv_type_off_t = no; then
1584 cat >> confdefs.h <<\EOF
1585#define off_t long
1586EOF
1587
1588fi
1589
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001590echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001591echo "configure:1592: checking for pid_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001592if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1593 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001594else
1595 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001596#line 1597 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001597#include "confdefs.h"
1598#include <sys/types.h>
1599#if STDC_HEADERS
1600#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001601#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001602#endif
1603EOF
1604if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossumf78abae1997-01-21 22:02:36 +00001605 egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001606 rm -rf conftest*
1607 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001608else
1609 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001610 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001611fi
1612rm -f conftest*
1613
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001614fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001615echo "$ac_t""$ac_cv_type_pid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001616if test $ac_cv_type_pid_t = no; then
1617 cat >> confdefs.h <<\EOF
1618#define pid_t int
1619EOF
1620
1621fi
1622
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001623echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001624echo "configure:1625: checking return type of signal handlers" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001625if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1626 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001627else
1628 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001629#line 1630 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001630#include "confdefs.h"
1631#include <sys/types.h>
1632#include <signal.h>
1633#ifdef signal
1634#undef signal
1635#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001636#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001637extern "C" void (*signal (int, void (*)(int)))(int);
1638#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001639void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001640#endif
1641
Guido van Rossumf78abae1997-01-21 22:02:36 +00001642int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001643int i;
1644; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001645EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001646if { (eval echo configure:1647: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001647 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001648 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00001649else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001650 echo "configure: failed program was:" >&5
1651 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001652 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001653 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00001654fi
1655rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001656fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001657
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001658echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001659cat >> confdefs.h <<EOF
1660#define RETSIGTYPE $ac_cv_type_signal
1661EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001662
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001663
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001664echo $ac_n "checking for size_t""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001665echo "configure:1666: checking for size_t" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001666if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1667 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001668else
1669 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001670#line 1671 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001671#include "confdefs.h"
1672#include <sys/types.h>
1673#if STDC_HEADERS
1674#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001675#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001676#endif
1677EOF
1678if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossumf78abae1997-01-21 22:02:36 +00001679 egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001680 rm -rf conftest*
1681 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001682else
1683 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001684 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001685fi
1686rm -f conftest*
1687
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001688fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001689echo "$ac_t""$ac_cv_type_size_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001690if test $ac_cv_type_size_t = no; then
1691 cat >> confdefs.h <<\EOF
1692#define size_t unsigned
1693EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001694
1695fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001696
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001697echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001698echo "configure:1699: checking for uid_t in sys/types.h" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001699if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
1700 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001701else
1702 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001703#line 1704 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001704#include "confdefs.h"
1705#include <sys/types.h>
1706EOF
1707if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1708 egrep "uid_t" >/dev/null 2>&1; then
1709 rm -rf conftest*
1710 ac_cv_type_uid_t=yes
1711else
1712 rm -rf conftest*
1713 ac_cv_type_uid_t=no
1714fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001715rm -f conftest*
1716
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001717fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001718
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001719echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001720if test $ac_cv_type_uid_t = no; then
1721 cat >> confdefs.h <<\EOF
1722#define uid_t int
1723EOF
1724
1725 cat >> confdefs.h <<\EOF
1726#define gid_t int
1727EOF
1728
1729fi
1730
Guido van Rossum627b2d71993-12-24 10:39:16 +00001731
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001732echo $ac_n "checking size of int""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001733echo "configure:1734: checking size of int" >&5
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001734if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1735 echo $ac_n "(cached) $ac_c" 1>&6
1736else
1737 if test "$cross_compiling" = yes; then
1738 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1739else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001740 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001741#line 1742 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001742#include "confdefs.h"
1743#include <stdio.h>
1744main()
1745{
1746 FILE *f=fopen("conftestval", "w");
1747 if (!f) exit(1);
1748 fprintf(f, "%d\n", sizeof(int));
1749 exit(0);
1750}
1751EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001752if { (eval echo configure:1753: \"$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 +00001753then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001754 ac_cv_sizeof_int=`cat conftestval`
1755else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001756 echo "configure: failed program was:" >&5
1757 cat conftest.$ac_ext >&5
1758 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001759 ac_cv_sizeof_int=0
1760fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001761rm -fr conftest*
1762fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001763
1764fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001765echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1766cat >> confdefs.h <<EOF
1767#define SIZEOF_INT $ac_cv_sizeof_int
1768EOF
1769
1770
1771echo $ac_n "checking size of long""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001772echo "configure:1773: checking size of long" >&5
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001773if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1774 echo $ac_n "(cached) $ac_c" 1>&6
1775else
1776 if test "$cross_compiling" = yes; then
1777 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1778else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001779 cat > conftest.$ac_ext <<EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001780#line 1781 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001781#include "confdefs.h"
1782#include <stdio.h>
1783main()
1784{
1785 FILE *f=fopen("conftestval", "w");
1786 if (!f) exit(1);
1787 fprintf(f, "%d\n", sizeof(long));
1788 exit(0);
1789}
1790EOF
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001791if { (eval echo configure:1792: \"$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 +00001792then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001793 ac_cv_sizeof_long=`cat conftestval`
1794else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001795 echo "configure: failed program was:" >&5
1796 cat conftest.$ac_ext >&5
1797 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001798 ac_cv_sizeof_long=0
1799fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001800rm -fr conftest*
1801fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001802
1803fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001804echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1805cat >> confdefs.h <<EOF
1806#define SIZEOF_LONG $ac_cv_sizeof_long
1807EOF
1808
1809
Guido van Rossum0a516c91994-09-12 10:58:40 +00001810
1811# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00001812
1813
1814
1815
Guido van Rossum0a516c91994-09-12 10:58:40 +00001816# SO is the extension of shared libraries `(including the dot!)
1817# -- usually .so, .sl on HP-UX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001818echo $ac_n "checking SO""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001819echo "configure:1820: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00001820if test -z "$SO"
1821then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001822 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00001823 hp*|HP*) SO=.sl;;
1824 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001825 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001826fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001827echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001828# LDSHARED is the ld *command* used to create shared library
1829# -- "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 +00001830echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001831echo "configure:1832: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00001832if test -z "$LDSHARED"
1833then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001834 case $ac_sys_system/$ac_sys_release in
Guido van Rossum45140f91997-08-29 18:44:06 +00001835 AIX*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";;
Guido van Rossum07397971997-04-29 21:49:50 +00001836 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00001837 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001838 SunOS/4*) LDSHARED="ld";;
1839 SunOS/5*) LDSHARED="ld -G";;
1840 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00001841 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
1842 DYNIX/ptx*) LDSHARED="ld -G";;
Guido van Rossum563e7081996-09-10 18:20:48 +00001843 next/*) LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';;
Guido van Rossum81652ab1996-07-21 02:53:27 +00001844 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001845 dgux*) LDSHARED="ld -G";;
Guido van Rossum1f740161998-04-13 15:27:21 +00001846 FreeBSD*|NetBSD*|OpenBSD*) LDSHARED="ld -Bshareable";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00001847 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001848 *) LDSHARED="ld";;
1849 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001850fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001851echo "$ac_t""$LDSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001852# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001853# library -- this is only needed for a few systems
1854echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001855echo "configure:1856: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00001856if test -z "$CCSHARED"
1857then
Guido van Rossum07397971997-04-29 21:49:50 +00001858 case $ac_sys_system/$ac_sys_release in
Guido van Rossumaf07a441995-02-13 19:45:27 +00001859 hp*|HP*) if test "$GCC" = yes;
1860 then CCSHARED="-fpic";
1861 else CCSHARED="+z";
1862 fi;;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001863 Linux*) CCSHARED="-fpic";;
Guido van Rossum1f740161998-04-13 15:27:21 +00001864 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fpic";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00001865 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00001866 IRIX*/6*) case $CC in
1867 *gcc*) CCSHARED="-shared";;
1868 *) CCSHARED="-shared -all";;
1869 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001870 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001871fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001872echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001873# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001874# the python executable -- this is only needed for a few systems
1875echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Guido van Rossum2b5ca001998-03-05 15:41:09 +00001876echo "configure:1877: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00001877if test -z "$LINKFORSHARED"
1878then
Guido van Rossum07397971997-04-29 21:49:50 +00001879 case $ac_sys_system/$ac_sys_release in
Guido van Rossum69f65801998-03-03 21:47:00 +00001880 AIX*) LINKFORSHARED='-Wl,-bE:python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001881 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00001882 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossum2d9feed1997-11-24 17:36:21 +00001883 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum749af7c1997-08-16 14:35:52 +00001884 next/*) LINKFORSHARED="-u libsys_s";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00001885 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00001886 SunOS/5*) case $CC in
1887 *gcc*)
1888 if $CC -Xlinker -V 2>/dev/null | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00001889 then
1890 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00001891 fi;;
1892 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001893 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001894fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001895echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001896
Guido van Rossum627b2d71993-12-24 10:39:16 +00001897# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00001898echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Guido van Rossum56896dd1998-03-05 16:59:36 +00001899echo "configure:1900: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001900ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001901if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001902 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001903else
1904 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001905LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001906cat > conftest.$ac_ext <<EOF
Guido van Rossum56896dd1998-03-05 16:59:36 +00001907#line 1908 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001908#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001909/* Override any gcc2 internal prototype to avoid an error. */
1910/* We use char because int might match the return type of a gcc2
1911 builtin and then its argument prototype would still apply. */
1912char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00001913
Guido van Rossumf78abae1997-01-21 22:02:36 +00001914int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001915dlopen()
1916; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001917EOF
Guido van Rossum56896dd1998-03-05 16:59:36 +00001918if { (eval echo configure:1919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001919 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001920 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001921else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001922 echo "configure: failed program was:" >&5
1923 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001924 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001925 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001926fi
1927rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001928LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001929
Guido van Rossum627b2d71993-12-24 10:39:16 +00001930fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001931if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001932 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001933 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1934 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001935 cat >> confdefs.h <<EOF
1936#define $ac_tr_lib 1
1937EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001938
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001939 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001940
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001941else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001942 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001943fi
1944 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00001945echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Guido van Rossum56896dd1998-03-05 16:59:36 +00001946echo "configure:1947: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001947ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001948if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001949 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001950else
1951 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001952LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001953cat > conftest.$ac_ext <<EOF
Guido van Rossum56896dd1998-03-05 16:59:36 +00001954#line 1955 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001955#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001956/* Override any gcc2 internal prototype to avoid an error. */
1957/* We use char because int might match the return type of a gcc2
1958 builtin and then its argument prototype would still apply. */
1959char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00001960
Guido van Rossumf78abae1997-01-21 22:02:36 +00001961int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001962shl_load()
1963; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001964EOF
Guido van Rossum56896dd1998-03-05 16:59:36 +00001965if { (eval echo configure:1966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001966 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001967 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001968else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001969 echo "configure: failed program was:" >&5
1970 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001971 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001972 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001973fi
1974rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001975LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001976
Guido van Rossum627b2d71993-12-24 10:39:16 +00001977fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001978if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001979 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001980 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1981 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001982 cat >> confdefs.h <<EOF
1983#define $ac_tr_lib 1
1984EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001985
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001986 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001987
1988else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001989 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001990fi
1991 # Dynamic linking for HP-UX
Guido van Rossumf78abae1997-01-21 22:02:36 +00001992echo $ac_n "checking for getpwnam in -lsun""... $ac_c" 1>&6
Guido van Rossum56896dd1998-03-05 16:59:36 +00001993echo "configure:1994: checking for getpwnam in -lsun" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001994ac_lib_var=`echo sun'_'getpwnam | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001995if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001996 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001997else
1998 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001999LIBS="-lsun $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002000cat > conftest.$ac_ext <<EOF
Guido van Rossum56896dd1998-03-05 16:59:36 +00002001#line 2002 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002002#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002003/* Override any gcc2 internal prototype to avoid an error. */
2004/* We use char because int might match the return type of a gcc2
2005 builtin and then its argument prototype would still apply. */
2006char getpwnam();
Guido van Rossum7f43da71994-08-01 12:15:30 +00002007
Guido van Rossumf78abae1997-01-21 22:02:36 +00002008int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002009getpwnam()
2010; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002011EOF
Guido van Rossum56896dd1998-03-05 16:59:36 +00002012if { (eval echo configure:2013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002013 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002014 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002015else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002016 echo "configure: failed program was:" >&5
2017 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002018 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002019 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002020fi
2021rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002022LIBS="$ac_save_LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002023
Guido van Rossum7f43da71994-08-01 12:15:30 +00002024fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002025if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002026 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002027 ac_tr_lib=HAVE_LIB`echo sun | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2028 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002029 cat >> confdefs.h <<EOF
2030#define $ac_tr_lib 1
2031EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002032
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002033 LIBS="-lsun $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002034
2035else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002036 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002037fi
2038 # NIS (== YP) interface for IRIX 4
Guido van Rossum70c7f481998-03-26 18:44:10 +00002039# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
2040# However on SGI IRIX, these exist but are broken.
Guido van Rossum2b3ac691996-08-30 15:18:41 +00002041if test "$ac_sys_system" != IRIX
Guido van Rossumda88dad1995-01-26 00:46:29 +00002042then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002043echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00002044echo "configure:2045: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002045ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002046if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002047 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002048else
2049 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002050LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002051cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002052#line 2053 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002053#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002054/* Override any gcc2 internal prototype to avoid an error. */
2055/* We use char because int might match the return type of a gcc2
2056 builtin and then its argument prototype would still apply. */
2057char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002058
Guido van Rossumf78abae1997-01-21 22:02:36 +00002059int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002060t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002061; return 0; }
2062EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002063if { (eval echo configure:2064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002064 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002065 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002066else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002067 echo "configure: failed program was:" >&5
2068 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002069 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002070 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002071fi
2072rm -f conftest*
2073LIBS="$ac_save_LIBS"
2074
2075fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002076if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002077 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002078 LIBS="-lnsl $LIBS"
2079else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002080 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002081fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002082 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00002083echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00002084echo "configure:2085: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002085ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002086if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002087 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002088else
2089 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002090LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002091cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002092#line 2093 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002093#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002094/* Override any gcc2 internal prototype to avoid an error. */
2095/* We use char because int might match the return type of a gcc2
2096 builtin and then its argument prototype would still apply. */
2097char socket();
Guido van Rossum7f43da71994-08-01 12:15:30 +00002098
Guido van Rossumf78abae1997-01-21 22:02:36 +00002099int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002100socket()
2101; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002102EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002103if { (eval echo configure:2104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002104 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002105 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002106else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002107 echo "configure: failed program was:" >&5
2108 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002109 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002110 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002111fi
2112rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002113LIBS="$ac_save_LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002114
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002115fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002116if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002117 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002118 LIBS="-lsocket $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002119else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002120 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002121fi
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002122 # SVR4 sockets
Guido van Rossumda88dad1995-01-26 00:46:29 +00002123fi
Guido van Rossum70c7f481998-03-26 18:44:10 +00002124
Guido van Rossuma68acba1996-07-31 17:36:39 +00002125echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00002126echo "configure:2127: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00002127# Check whether --with-libs or --without-libs was given.
2128if test "${with_libs+set}" = set; then
2129 withval="$with_libs"
2130
2131echo "$ac_t""$withval" 1>&6
2132LIBS="$withval $LIBS"
2133
2134else
2135 echo "$ac_t""no" 1>&6
2136fi
2137
Guido van Rossum7f43da71994-08-01 12:15:30 +00002138
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002139echo $ac_n "checking for --with(out)-readline""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00002140echo "configure:2141: checking for --with(out)-readline" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002141# Check whether --with-readline or --without-readline was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002142if test "${with_readline+set}" = set; then
2143 withval="$with_readline"
Guido van Rossumb06df271997-08-05 21:50:20 +00002144 echo "$ac_t""$withval" 1>&6
2145{ echo "configure: error: --with(out)-readline is obsolete" 1>&2; exit 1; }
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002146else
Guido van Rossumb06df271997-08-05 21:50:20 +00002147 echo "$ac_t""not specified." 1>&6
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002148fi
2149
Guido van Rossum7f43da71994-08-01 12:15:30 +00002150
Guido van Rossum009f7871997-12-04 00:51:42 +00002151
2152USE_THREAD_MODULE="#"
2153
Guido van Rossumec2f0731997-01-22 20:54:01 +00002154echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00002155echo "configure:2156: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00002156
2157# Check whether --with-dec-threads or --without-dec-threads was given.
2158if test "${with_dec_threads+set}" = set; then
2159 withval="$with_dec_threads"
2160 echo "$ac_t""$withval" 1>&6
2161LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00002162if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00002163 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00002164fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00002165else
2166 echo "$ac_t""no" 1>&6
2167fi
2168
2169
2170echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00002171echo "configure:2172: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00002172# Check whether --with-threads or --without-threads was given.
2173if test "${with_threads+set}" = set; then
2174 withval="$with_threads"
2175 echo "$ac_t""$withval" 1>&6
2176if test "${with_thread+set}" != set; then
2177 with_thread="$withval";
2178fi
2179else
2180 echo "$ac_t""no" 1>&6
2181fi
2182
2183
2184echo $ac_n "checking for --with-thread""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00002185echo "configure:2186: checking for --with-thread" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002186# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002187if test "${with_thread+set}" = set; then
2188 withval="$with_thread"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002189
Guido van Rossum009f7871997-12-04 00:51:42 +00002190USE_THREAD_MODULE=
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002191echo "$ac_t""$withval" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002192if test -d "$withval"
Guido van Rossum84e7b241996-08-19 21:59:00 +00002193then LDFLAGS="$LDFLAGS -L$withval"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002194fi
Guido van Rossum9caf77a1996-08-01 00:52:26 +00002195cat >> confdefs.h <<\EOF
2196#define _REENTRANT 1
2197EOF
2198
Guido van Rossumf78abae1997-01-21 22:02:36 +00002199ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002200echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00002201echo "configure:2202: checking for mach/cthreads.h" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002202if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2203 echo $ac_n "(cached) $ac_c" 1>&6
2204else
2205 cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002206#line 2207 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002207#include "confdefs.h"
2208#include <mach/cthreads.h>
2209EOF
2210ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum70c7f481998-03-26 18:44:10 +00002211{ (eval echo configure:2212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002212ac_err=`grep -v '^ *+' conftest.out`
2213if test -z "$ac_err"; then
2214 rm -rf conftest*
2215 eval "ac_cv_header_$ac_safe=yes"
2216else
2217 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002218 echo "configure: failed program was:" >&5
2219 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002220 rm -rf conftest*
2221 eval "ac_cv_header_$ac_safe=no"
2222fi
2223rm -f conftest*
2224fi
2225if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2226 echo "$ac_t""yes" 1>&6
2227 cat >> confdefs.h <<\EOF
2228#define WITH_THREAD 1
2229EOF
2230
2231cat >> confdefs.h <<\EOF
2232#define C_THREADS 1
2233EOF
2234
2235LIBOBJS="$LIBOBJS thread.o"
2236else
2237 echo "$ac_t""no" 1>&6
2238
Guido van Rossumf78abae1997-01-21 22:02:36 +00002239echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00002240echo "configure:2241: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002241ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002242if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002243 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002244else
2245 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002246LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002247cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002248#line 2249 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002249#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002250/* Override any gcc2 internal prototype to avoid an error. */
2251/* We use char because int might match the return type of a gcc2
2252 builtin and then its argument prototype would still apply. */
2253char pthread_create();
Guido van Rossum7f43da71994-08-01 12:15:30 +00002254
Guido van Rossumf78abae1997-01-21 22:02:36 +00002255int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002256pthread_create()
2257; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002258EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002259if { (eval echo configure:2260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002260 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002261 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002262else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002263 echo "configure: failed program was:" >&5
2264 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002265 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002266 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002267fi
2268rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002269LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002270
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002271fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002272if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002273 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002274 cat >> confdefs.h <<\EOF
2275#define WITH_THREAD 1
2276EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002277
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002278cat >> confdefs.h <<\EOF
2279#define _POSIX_THREADS 1
2280EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002281
2282LIBS="$LIBS -lpthreads"
2283LIBOBJS="$LIBOBJS thread.o"
2284else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002285 echo "$ac_t""no" 1>&6
Guido van Rossum2d38f911996-06-26 19:47:01 +00002286
Guido van Rossumf78abae1997-01-21 22:02:36 +00002287echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00002288echo "configure:2289: checking for pthread_create in -lpthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002289ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum2d38f911996-06-26 19:47:01 +00002290if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2291 echo $ac_n "(cached) $ac_c" 1>&6
2292else
2293 ac_save_LIBS="$LIBS"
2294LIBS="-lpthread $LIBS"
2295cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002296#line 2297 "configure"
Guido van Rossum2d38f911996-06-26 19:47:01 +00002297#include "confdefs.h"
2298/* Override any gcc2 internal prototype to avoid an error. */
2299/* We use char because int might match the return type of a gcc2
2300 builtin and then its argument prototype would still apply. */
2301char pthread_create();
2302
Guido van Rossumf78abae1997-01-21 22:02:36 +00002303int main() {
Guido van Rossum2d38f911996-06-26 19:47:01 +00002304pthread_create()
2305; return 0; }
2306EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002307if { (eval echo configure:2308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum2d38f911996-06-26 19:47:01 +00002308 rm -rf conftest*
2309 eval "ac_cv_lib_$ac_lib_var=yes"
2310else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002311 echo "configure: failed program was:" >&5
2312 cat conftest.$ac_ext >&5
Guido van Rossum2d38f911996-06-26 19:47:01 +00002313 rm -rf conftest*
2314 eval "ac_cv_lib_$ac_lib_var=no"
2315fi
2316rm -f conftest*
2317LIBS="$ac_save_LIBS"
2318
2319fi
2320if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2321 echo "$ac_t""yes" 1>&6
2322 cat >> confdefs.h <<\EOF
2323#define WITH_THREAD 1
2324EOF
2325
2326cat >> confdefs.h <<\EOF
2327#define _POSIX_THREADS 1
2328EOF
2329
2330LIBS="$LIBS -lpthread"
2331LIBOBJS="$LIBOBJS thread.o"
2332else
2333 echo "$ac_t""no" 1>&6
Guido van Rossum0be3e491997-05-22 20:33:33 +00002334
Guido van Rossum49545951997-12-02 19:28:29 +00002335echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00002336echo "configure:2337: checking for pthread_create in -lc_r" >&5
Guido van Rossum49545951997-12-02 19:28:29 +00002337ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
2338if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2339 echo $ac_n "(cached) $ac_c" 1>&6
2340else
2341 ac_save_LIBS="$LIBS"
2342LIBS="-lc_r $LIBS"
2343cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002344#line 2345 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00002345#include "confdefs.h"
2346/* 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 pthread_create();
2350
2351int main() {
2352pthread_create()
2353; return 0; }
2354EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002355if { (eval echo configure:2356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum49545951997-12-02 19:28:29 +00002356 rm -rf conftest*
2357 eval "ac_cv_lib_$ac_lib_var=yes"
2358else
2359 echo "configure: failed program was:" >&5
2360 cat conftest.$ac_ext >&5
2361 rm -rf conftest*
2362 eval "ac_cv_lib_$ac_lib_var=no"
2363fi
2364rm -f conftest*
2365LIBS="$ac_save_LIBS"
2366
2367fi
2368if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2369 echo "$ac_t""yes" 1>&6
2370 cat >> confdefs.h <<\EOF
2371#define WITH_THREAD 1
2372EOF
2373
2374cat >> confdefs.h <<\EOF
2375#define _POSIX_THREADS 1
2376EOF
2377
2378LIBS="$LIBS -lc_r"
2379LIBOBJS="$LIBOBJS thread.o"
2380else
2381 echo "$ac_t""no" 1>&6
2382
Guido van Rossum0be3e491997-05-22 20:33:33 +00002383echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00002384echo "configure:2385: checking for __d6_pthread_create in -lthread" >&5
Guido van Rossum0be3e491997-05-22 20:33:33 +00002385ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
2386if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2387 echo $ac_n "(cached) $ac_c" 1>&6
2388else
2389 ac_save_LIBS="$LIBS"
2390LIBS="-lthread $LIBS"
2391cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002392#line 2393 "configure"
Guido van Rossum0be3e491997-05-22 20:33:33 +00002393#include "confdefs.h"
2394/* Override any gcc2 internal prototype to avoid an error. */
2395/* We use char because int might match the return type of a gcc2
2396 builtin and then its argument prototype would still apply. */
2397char __d6_pthread_create();
2398
2399int main() {
2400__d6_pthread_create()
2401; return 0; }
2402EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002403if { (eval echo configure:2404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum0be3e491997-05-22 20:33:33 +00002404 rm -rf conftest*
2405 eval "ac_cv_lib_$ac_lib_var=yes"
2406else
2407 echo "configure: failed program was:" >&5
2408 cat conftest.$ac_ext >&5
2409 rm -rf conftest*
2410 eval "ac_cv_lib_$ac_lib_var=no"
2411fi
2412rm -f conftest*
2413LIBS="$ac_save_LIBS"
2414
2415fi
2416if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2417 echo "$ac_t""yes" 1>&6
2418 cat >> confdefs.h <<\EOF
2419#define WITH_THREAD 1
2420EOF
2421
2422cat >> confdefs.h <<\EOF
2423#define _POSIX_THREADS 1
2424EOF
2425
2426LIBS="$LIBS -lthread"
2427LIBOBJS="$LIBOBJS thread.o"
2428else
2429 echo "$ac_t""no" 1>&6
Guido van Rossum2d38f911996-06-26 19:47:01 +00002430fi
2431
2432
Guido van Rossum627b2d71993-12-24 10:39:16 +00002433fi
2434
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002435fi
2436
Guido van Rossum0be3e491997-05-22 20:33:33 +00002437fi
2438
Guido van Rossum49545951997-12-02 19:28:29 +00002439fi
2440
Guido van Rossum0be3e491997-05-22 20:33:33 +00002441
Guido van Rossumf78abae1997-01-21 22:02:36 +00002442echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00002443echo "configure:2444: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002444ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002445if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002446 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002447else
2448 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002449LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002450cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002451#line 2452 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002452#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002453/* Override any gcc2 internal prototype to avoid an error. */
2454/* We use char because int might match the return type of a gcc2
2455 builtin and then its argument prototype would still apply. */
2456char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002457
Guido van Rossumf78abae1997-01-21 22:02:36 +00002458int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002459usconfig()
2460; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002461EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002462if { (eval echo configure:2463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002463 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002464 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002465else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002466 echo "configure: failed program was:" >&5
2467 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002468 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002469 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002470fi
2471rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002472LIBS="$ac_save_LIBS"
2473
2474fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002475if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002476 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002477 cat >> confdefs.h <<\EOF
2478#define WITH_THREAD 1
2479EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002480
Guido van Rossum7f43da71994-08-01 12:15:30 +00002481LIBS="$LIBS -lmpc"
2482LIBOBJS="$LIBOBJS thread.o"
2483else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002484 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002485fi
2486
Guido van Rossumf78abae1997-01-21 22:02:36 +00002487echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00002488echo "configure:2489: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002489ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002490if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002491 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002492else
2493 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002494LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002495cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002496#line 2497 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002497#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002498/* Override any gcc2 internal prototype to avoid an error. */
2499/* We use char because int might match the return type of a gcc2
2500 builtin and then its argument prototype would still apply. */
2501char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002502
Guido van Rossumf78abae1997-01-21 22:02:36 +00002503int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002504thr_create()
2505; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002506EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002507if { (eval echo configure:2508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002508 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002509 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002510else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002511 echo "configure: failed program was:" >&5
2512 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002513 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002514 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002515fi
2516rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002517LIBS="$ac_save_LIBS"
2518
2519fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002520if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002521 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002522 cat >> confdefs.h <<\EOF
2523#define WITH_THREAD 1
2524EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002525
Guido van Rossum7f43da71994-08-01 12:15:30 +00002526LIBS="$LIBS -lthread"
2527LIBOBJS="$LIBOBJS thread.o"
2528else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002529 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002530fi
2531
Guido van Rossum7f43da71994-08-01 12:15:30 +00002532
Guido van Rossumda88dad1995-01-26 00:46:29 +00002533else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002534 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002535fi
2536
Guido van Rossum7f43da71994-08-01 12:15:30 +00002537
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002538# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00002539
2540DLINCLDIR=/
2541
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002542echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00002543echo "configure:2544: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002544# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002545if test "${with_sgi_dl+set}" = set; then
2546 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002547
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002548echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002549cat >> confdefs.h <<\EOF
2550#define WITH_SGI_DL 1
2551EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002552
2553dldir=$withval
2554if test -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00002555then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002556else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002557fi
2558DLINCLDIR=${dldir}
2559LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00002560else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002561 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002562fi
2563
2564
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002565echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00002566echo "configure:2567: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002567# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002568if test "${with_dl_dld+set}" = set; then
2569 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002570
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002571echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002572cat >> confdefs.h <<\EOF
2573#define WITH_DL_DLD 1
2574EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002575
2576dldir=`echo "$withval" | sed 's/,.*//'`
2577dlddir=`echo "$withval" | sed 's/.*,//'`
2578if test -d "$dldir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00002579then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002580else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002581fi
2582DLINCLDIR=${dldir}
2583LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00002584else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002585 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002586fi
2587
2588
Guido van Rossum627b2d71993-12-24 10:39:16 +00002589# checks for library functions
Guido van Rossum1171ee61997-08-22 20:42:00 +00002590for ac_func in alarm chown clock dlopen execv flock fork ftime ftruncate \
2591 gethostname_r getpeername getpgrp getpid getpwent gettimeofday getwd \
Guido van Rossum18099751998-03-06 17:14:34 +00002592 kill link lstat mkfifo mktime nice pause plock putenv readlink \
Guido van Rossum96013151997-10-08 22:47:52 +00002593 select setgid setlocale setuid setsid setpgid setpgrp setvbuf \
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00002594 sigaction siginterrupt sigrelse strftime strptime symlink \
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002595 tcgetpgrp tcsetpgrp times truncate uname waitpid
Guido van Rossum627b2d71993-12-24 10:39:16 +00002596do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002597echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00002598echo "configure:2599: checking for $ac_func" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002599if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2600 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002601else
2602 cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002603#line 2604 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002604#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002605/* System header to define __stub macros and hopefully few prototypes,
2606 which can conflict with char $ac_func(); below. */
2607#include <assert.h>
2608/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002609/* We use char because int might match the return type of a gcc2
2610 builtin and then its argument prototype would still apply. */
2611char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002612
Guido van Rossumf78abae1997-01-21 22:02:36 +00002613int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002614
Guido van Rossum627b2d71993-12-24 10:39:16 +00002615/* The GNU C library defines this for functions which it implements
2616 to always fail with ENOSYS. Some functions are actually named
2617 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002618#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00002619choke me
2620#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002621$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002622#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002623
Guido van Rossum7f43da71994-08-01 12:15:30 +00002624; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002625EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002626if { (eval echo configure:2627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002627 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002628 eval "ac_cv_func_$ac_func=yes"
2629else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002630 echo "configure: failed program was:" >&5
2631 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002632 rm -rf conftest*
2633 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002634fi
2635rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002636fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002637
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002638if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002639 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002640 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002641 cat >> confdefs.h <<EOF
2642#define $ac_tr_func 1
2643EOF
2644
2645else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002646 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002647fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002648done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002649
Guido van Rossum2b3ac691996-08-30 15:18:41 +00002650for ac_func in dup2 getcwd strdup strerror memmove
Guido van Rossum627b2d71993-12-24 10:39:16 +00002651do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002652echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00002653echo "configure:2654: checking for $ac_func" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002654if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2655 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002656else
2657 cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002658#line 2659 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002659#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002660/* System header to define __stub macros and hopefully few prototypes,
2661 which can conflict with char $ac_func(); below. */
2662#include <assert.h>
2663/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002664/* We use char because int might match the return type of a gcc2
2665 builtin and then its argument prototype would still apply. */
2666char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002667
Guido van Rossumf78abae1997-01-21 22:02:36 +00002668int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002669
Guido van Rossum627b2d71993-12-24 10:39:16 +00002670/* The GNU C library defines this for functions which it implements
2671 to always fail with ENOSYS. Some functions are actually named
2672 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002673#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00002674choke me
2675#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002676$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002677#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002678
Guido van Rossum7f43da71994-08-01 12:15:30 +00002679; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002680EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002681if { (eval echo configure:2682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002682 rm -rf conftest*
2683 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002684else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002685 echo "configure: failed program was:" >&5
2686 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002687 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002688 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002689fi
2690rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002691fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002692
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002693if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002694 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002695 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2696 cat >> confdefs.h <<EOF
2697#define $ac_tr_func 1
2698EOF
2699
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002700else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002701 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002702LIBOBJS="$LIBOBJS ${ac_func}.o"
2703fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002704done
2705
Guido van Rossumf78abae1997-01-21 22:02:36 +00002706
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002707echo $ac_n "checking for getpgrp""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00002708echo "configure:2709: checking for getpgrp" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002709if eval "test \"`echo '$''{'ac_cv_func_getpgrp'+set}'`\" = set"; then
2710 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002711else
2712 cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002713#line 2714 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002714#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002715/* System header to define __stub macros and hopefully few prototypes,
2716 which can conflict with char getpgrp(); below. */
2717#include <assert.h>
2718/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002719/* We use char because int might match the return type of a gcc2
2720 builtin and then its argument prototype would still apply. */
2721char getpgrp();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002722
Guido van Rossumf78abae1997-01-21 22:02:36 +00002723int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002724
Guido van Rossum627b2d71993-12-24 10:39:16 +00002725/* The GNU C library defines this for functions which it implements
2726 to always fail with ENOSYS. Some functions are actually named
2727 something starting with __ and the normal name is an alias. */
2728#if defined (__stub_getpgrp) || defined (__stub___getpgrp)
2729choke me
2730#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002731getpgrp();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002732#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002733
2734; return 0; }
2735EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002736if { (eval echo configure:2737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002737 rm -rf conftest*
2738 eval "ac_cv_func_getpgrp=yes"
2739else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002740 echo "configure: failed program was:" >&5
2741 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002742 rm -rf conftest*
2743 eval "ac_cv_func_getpgrp=no"
2744fi
2745rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002746fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002747
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002748if eval "test \"`echo '$ac_cv_func_'getpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002749 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002750 cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002751#line 2752 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002752#include "confdefs.h"
2753#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002754int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002755getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00002756; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002757EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002758if { (eval echo configure:2759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002759 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002760 cat >> confdefs.h <<\EOF
2761#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00002762EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002763
Guido van Rossumf78abae1997-01-21 22:02:36 +00002764else
2765 echo "configure: failed program was:" >&5
2766 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002767fi
2768rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002769else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002770 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002771fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002772
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002773echo $ac_n "checking for setpgrp""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00002774echo "configure:2775: checking for setpgrp" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002775if eval "test \"`echo '$''{'ac_cv_func_setpgrp'+set}'`\" = set"; then
2776 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002777else
2778 cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002779#line 2780 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002780#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002781/* System header to define __stub macros and hopefully few prototypes,
2782 which can conflict with char setpgrp(); below. */
2783#include <assert.h>
2784/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002785/* We use char because int might match the return type of a gcc2
2786 builtin and then its argument prototype would still apply. */
2787char setpgrp();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002788
Guido van Rossumf78abae1997-01-21 22:02:36 +00002789int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002790
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002791/* The GNU C library defines this for functions which it implements
2792 to always fail with ENOSYS. Some functions are actually named
2793 something starting with __ and the normal name is an alias. */
2794#if defined (__stub_setpgrp) || defined (__stub___setpgrp)
2795choke me
2796#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002797setpgrp();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002798#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002799
2800; return 0; }
2801EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002802if { (eval echo configure:2803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002803 rm -rf conftest*
2804 eval "ac_cv_func_setpgrp=yes"
2805else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002806 echo "configure: failed program was:" >&5
2807 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002808 rm -rf conftest*
2809 eval "ac_cv_func_setpgrp=no"
2810fi
2811rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002812fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002813
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002814if eval "test \"`echo '$ac_cv_func_'setpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002815 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002816 cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002817#line 2818 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002818#include "confdefs.h"
2819#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002820int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002821setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002822; return 0; }
2823EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002824if { (eval echo configure:2825: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002825 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002826 cat >> confdefs.h <<\EOF
2827#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002828EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002829
Guido van Rossumf78abae1997-01-21 22:02:36 +00002830else
2831 echo "configure: failed program was:" >&5
2832 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002833fi
2834rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002835else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002836 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002837fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002838
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002839echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00002840echo "configure:2841: checking for gettimeofday" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002841if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
2842 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002843else
2844 cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002845#line 2846 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002846#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002847/* System header to define __stub macros and hopefully few prototypes,
2848 which can conflict with char gettimeofday(); below. */
2849#include <assert.h>
2850/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002851/* We use char because int might match the return type of a gcc2
2852 builtin and then its argument prototype would still apply. */
2853char gettimeofday();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002854
Guido van Rossumf78abae1997-01-21 22:02:36 +00002855int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002856
2857/* The GNU C library defines this for functions which it implements
2858 to always fail with ENOSYS. Some functions are actually named
2859 something starting with __ and the normal name is an alias. */
2860#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
2861choke me
2862#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002863gettimeofday();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002864#endif
2865
2866; return 0; }
2867EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002868if { (eval echo configure:2869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002869 rm -rf conftest*
2870 eval "ac_cv_func_gettimeofday=yes"
2871else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002872 echo "configure: failed program was:" >&5
2873 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002874 rm -rf conftest*
2875 eval "ac_cv_func_gettimeofday=no"
2876fi
2877rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002878fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002879
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002880if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002881 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002882 cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002883#line 2884 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002884#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002885#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002886int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002887gettimeofday((struct timeval*)0,(struct timezone*)0);
2888; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002889EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002890if { (eval echo configure:2891: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002891 :
2892else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002893 echo "configure: failed program was:" >&5
2894 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002895 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002896 cat >> confdefs.h <<\EOF
2897#define GETTIMEOFDAY_NO_TZ 1
2898EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002899
2900fi
2901rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002902else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002903 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002904fi
2905
2906
2907# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002908echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00002909echo "configure:2910: checking whether time.h and sys/time.h may both be included" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002910if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2911 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002912else
2913 cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002914#line 2915 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002915#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002916#include <sys/types.h>
2917#include <sys/time.h>
2918#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002919int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002920struct tm *tp;
2921; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002922EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002923if { (eval echo configure:2924: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002924 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002925 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002926else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002927 echo "configure: failed program was:" >&5
2928 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002929 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002930 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002931fi
2932rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002933fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002934
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002935echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002936if test $ac_cv_header_time = yes; then
2937 cat >> confdefs.h <<\EOF
2938#define TIME_WITH_SYS_TIME 1
2939EOF
2940
2941fi
2942
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002943echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00002944echo "configure:2945: checking whether struct tm is in sys/time.h or time.h" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002945if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
2946 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002947else
2948 cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002949#line 2950 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002950#include "confdefs.h"
2951#include <sys/types.h>
2952#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002953int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002954struct tm *tp; tp->tm_sec;
2955; return 0; }
2956EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002957if { (eval echo configure:2958: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002958 rm -rf conftest*
2959 ac_cv_struct_tm=time.h
2960else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002961 echo "configure: failed program was:" >&5
2962 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002963 rm -rf conftest*
2964 ac_cv_struct_tm=sys/time.h
2965fi
2966rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002967fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002968
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002969echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002970if test $ac_cv_struct_tm = sys/time.h; then
2971 cat >> confdefs.h <<\EOF
2972#define TM_IN_SYS_TIME 1
2973EOF
2974
2975fi
2976
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002977echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00002978echo "configure:2979: checking for tm_zone in struct tm" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002979if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
2980 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002981else
2982 cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002983#line 2984 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002984#include "confdefs.h"
2985#include <sys/types.h>
2986#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002987int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002988struct tm tm; tm.tm_zone;
2989; return 0; }
2990EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00002991if { (eval echo configure:2992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002992 rm -rf conftest*
2993 ac_cv_struct_tm_zone=yes
2994else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002995 echo "configure: failed program was:" >&5
2996 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002997 rm -rf conftest*
2998 ac_cv_struct_tm_zone=no
2999fi
3000rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003001fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003002
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003003echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003004if test "$ac_cv_struct_tm_zone" = yes; then
3005 cat >> confdefs.h <<\EOF
3006#define HAVE_TM_ZONE 1
3007EOF
3008
3009else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003010 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00003011echo "configure:3012: checking for tzname" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003012if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
3013 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003014else
3015 cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00003016#line 3017 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003017#include "confdefs.h"
3018#include <time.h>
3019#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003020extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00003021#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00003022int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003023atoi(*tzname);
3024; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003025EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00003026if { (eval echo configure:3027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003027 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003028 ac_cv_var_tzname=yes
3029else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003030 echo "configure: failed program was:" >&5
3031 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003032 rm -rf conftest*
3033 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003034fi
3035rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00003036fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003037
3038echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003039 if test $ac_cv_var_tzname = yes; then
3040 cat >> confdefs.h <<\EOF
3041#define HAVE_TZNAME 1
3042EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003043
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003044 fi
3045fi
3046
3047
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003048echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00003049echo "configure:3050: checking for time.h that defines altzone" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003050if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
3051 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003052else
3053 cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00003054#line 3055 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003055#include "confdefs.h"
3056#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003057int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003058return altzone;
3059; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003060EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00003061if { (eval echo configure:3062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00003062 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003063 ac_cv_header_time_altzone=yes
3064else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003065 echo "configure: failed program was:" >&5
3066 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003067 rm -rf conftest*
3068 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00003069fi
3070rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003071fi
3072
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003073echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003074if test $ac_cv_header_time_altzone = yes; then
3075 cat >> confdefs.h <<\EOF
3076#define HAVE_ALTZONE 1
3077EOF
3078
3079fi
3080
Guido van Rossumda88dad1995-01-26 00:46:29 +00003081was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003082echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00003083echo "configure:3084: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003084cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00003085#line 3086 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003086#include "confdefs.h"
3087
3088#include <sys/types.h>
3089#include <sys/select.h>
3090#include <sys/time.h>
3091
Guido van Rossumf78abae1997-01-21 22:02:36 +00003092int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003093;
3094; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003095EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00003096if { (eval echo configure:3097: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00003097 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003098 cat >> confdefs.h <<\EOF
3099#define SYS_SELECT_WITH_SYS_TIME 1
3100EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003101 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00003102else
3103 echo "configure: failed program was:" >&5
3104 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00003105fi
3106rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003107echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003108
3109# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00003110
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003111echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00003112echo "configure:3113: checking whether char is unsigned" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003113if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
3114 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003115else
3116 if test "$GCC" = yes; then
3117 # GCC predefines this symbol on systems where it applies.
3118cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00003119#line 3120 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003120#include "confdefs.h"
3121#ifdef __CHAR_UNSIGNED__
3122 yes
3123#endif
3124
3125EOF
3126if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3127 egrep "yes" >/dev/null 2>&1; then
3128 rm -rf conftest*
3129 ac_cv_c_char_unsigned=yes
3130else
3131 rm -rf conftest*
3132 ac_cv_c_char_unsigned=no
3133fi
3134rm -f conftest*
3135
3136else
3137if test "$cross_compiling" = yes; then
3138 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3139else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003140 cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00003141#line 3142 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003142#include "confdefs.h"
3143/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003144#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00003145#define volatile
3146#endif
3147main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00003148 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00003149}
3150EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00003151if { (eval echo configure:3152: \"$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 +00003152then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003153 ac_cv_c_char_unsigned=yes
3154else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003155 echo "configure: failed program was:" >&5
3156 cat conftest.$ac_ext >&5
3157 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003158 ac_cv_c_char_unsigned=no
3159fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003160rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003161fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003162
3163fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003164fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003165
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003166echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003167if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
3168 cat >> confdefs.h <<\EOF
3169#define __CHAR_UNSIGNED__ 1
3170EOF
3171
3172fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003173
3174
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003175echo $ac_n "checking for working const""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00003176echo "configure:3177: checking for working const" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003177if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3178 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003179else
3180 cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00003181#line 3182 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003182#include "confdefs.h"
3183
Guido van Rossumf78abae1997-01-21 22:02:36 +00003184int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003185
3186/* Ultrix mips cc rejects this. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00003187typedef int charset[2]; const charset x;
3188/* SunOS 4.1.1 cc rejects this. */
3189char const *const *ccp;
3190char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003191/* NEC SVR4.0.2 mips cc rejects this. */
3192struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003193static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00003194/* AIX XL C 1.02.0.0 rejects this.
3195 It does not let you subtract one const X* pointer from another in an arm
3196 of an if-expression whose if-part is not a constant expression */
3197const char *g = "string";
3198ccp = &g + (g ? g-g : 0);
3199/* HPUX 7.0 cc rejects these. */
3200++ccp;
3201p = (char**) ccp;
3202ccp = (char const *const *) p;
3203{ /* SCO 3.2v4 cc rejects this. */
3204 char *t;
3205 char const *s = 0 ? (char *) 0 : (char const *) 0;
3206
3207 *t++ = 0;
3208}
3209{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003210 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00003211 const int *foo = &x[0];
3212 ++foo;
3213}
3214{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3215 typedef const int *iptr;
3216 iptr p = 0;
3217 ++p;
3218}
3219{ /* AIX XL C 1.02.0.0 rejects this saying
3220 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3221 struct s { int j; const int *ap[3]; };
3222 struct s *b; b->j = 5;
3223}
3224{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3225 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003226}
3227
3228; return 0; }
3229EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00003230if { (eval echo configure:3231: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003231 rm -rf conftest*
3232 ac_cv_c_const=yes
3233else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003234 echo "configure: failed program was:" >&5
3235 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003236 rm -rf conftest*
3237 ac_cv_c_const=no
3238fi
3239rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003240fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003241
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003242echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003243if test $ac_cv_c_const = no; then
3244 cat >> confdefs.h <<\EOF
3245#define const
3246EOF
3247
3248fi
3249
3250
Guido van Rossumda88dad1995-01-26 00:46:29 +00003251works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003252echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00003253echo "configure:3254: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003254cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00003255#line 3256 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003256#include "confdefs.h"
3257
Guido van Rossumf78abae1997-01-21 22:02:36 +00003258int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003259volatile int x; x = 0;
3260; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003261EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00003262if { (eval echo configure:3263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00003263 rm -rf conftest*
3264 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003265else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003266 echo "configure: failed program was:" >&5
3267 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003268 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003269 cat >> confdefs.h <<\EOF
3270#define volatile
3271EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003272
3273fi
3274rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003275echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003276
Guido van Rossumda88dad1995-01-26 00:46:29 +00003277works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003278echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00003279echo "configure:3280: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003280cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00003281#line 3282 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003282#include "confdefs.h"
3283
Guido van Rossumf78abae1997-01-21 22:02:36 +00003284int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003285signed char c;
3286; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003287EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00003288if { (eval echo configure:3289: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00003289 rm -rf conftest*
3290 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003291else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003292 echo "configure: failed program was:" >&5
3293 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00003294 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003295 cat >> confdefs.h <<\EOF
3296#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00003297EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003298
3299fi
3300rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003301echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003302
Guido van Rossumda88dad1995-01-26 00:46:29 +00003303have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003304echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00003305echo "configure:3306: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003306cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00003307#line 3308 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003308#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003309int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00003310int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003311return foo(10);
3312; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003313EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00003314if { (eval echo configure:3315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003315 rm -rf conftest*
3316 cat >> confdefs.h <<\EOF
3317#define HAVE_PROTOTYPES 1
3318EOF
3319 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00003320else
3321 echo "configure: failed program was:" >&5
3322 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00003323fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003324rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003325echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003326
Guido van Rossumda88dad1995-01-26 00:46:29 +00003327works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003328echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00003329echo "configure:3330: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003330cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00003331#line 3332 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003332#include "confdefs.h"
3333
3334#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00003335int foo(int x, ...) {
3336 va_list va;
3337 va_start(va, x);
3338 va_arg(va, int);
3339 va_arg(va, char *);
3340 va_arg(va, double);
3341 return 0;
3342}
Guido van Rossum7f43da71994-08-01 12:15:30 +00003343
Guido van Rossumf78abae1997-01-21 22:02:36 +00003344int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00003345return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003346; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003347EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00003348if { (eval echo configure:3349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003349 rm -rf conftest*
3350 cat >> confdefs.h <<\EOF
3351#define HAVE_STDARG_PROTOTYPES 1
3352EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003353 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00003354else
3355 echo "configure: failed program was:" >&5
3356 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003357fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003358rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003359echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003360
Guido van Rossumda88dad1995-01-26 00:46:29 +00003361if test "$have_prototypes" = yes; then
3362bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003363echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00003364echo "configure:3365: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003365cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00003366#line 3367 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003367#include "confdefs.h"
3368#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00003369int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003370char **t;execve("@",t,t);
3371; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003372EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00003373if { (eval echo configure:3374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003374 :
3375else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003376 echo "configure: failed program was:" >&5
3377 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003378 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003379 cat >> confdefs.h <<\EOF
3380#define BAD_EXEC_PROTOTYPES 1
3381EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003382 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003383fi
3384rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003385echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003386fi
3387
Guido van Rossumda88dad1995-01-26 00:46:29 +00003388bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003389echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00003390echo "configure:3391: checking for bad static forward" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003391if test "$cross_compiling" = yes; then
3392 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3393else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003394 cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00003395#line 3396 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003396#include "confdefs.h"
3397
3398struct s { int a; int b; };
3399static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003400int foobar() {
3401 static int random;
3402 random = (int) &foo;
3403 return random;
3404}
Guido van Rossum7f43da71994-08-01 12:15:30 +00003405static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003406main() {
3407 exit(!((int)&foo == foobar()));
3408}
Guido van Rossum7f43da71994-08-01 12:15:30 +00003409
3410EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00003411if { (eval echo configure:3412: \"$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 +00003412then
Guido van Rossum7f43da71994-08-01 12:15:30 +00003413 :
3414else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003415 echo "configure: failed program was:" >&5
3416 cat conftest.$ac_ext >&5
3417 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003418 cat >> confdefs.h <<\EOF
3419#define BAD_STATIC_FORWARD 1
3420EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003421 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00003422fi
3423rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00003424fi
3425
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003426echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003427
Guido van Rossumda88dad1995-01-26 00:46:29 +00003428va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003429echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00003430echo "configure:3431: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003431cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00003432#line 3433 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003433#include "confdefs.h"
3434
3435#ifdef HAVE_STDARG_PROTOTYPES
3436#include <stdarg.h>
3437#else
3438#include <varargs.h>
3439#endif
3440
Guido van Rossumf78abae1997-01-21 22:02:36 +00003441int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003442va_list list1, list2; list1 = list2;
3443; return 0; }
3444EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00003445if { (eval echo configure:3446: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003446 :
3447else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003448 echo "configure: failed program was:" >&5
3449 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003450 rm -rf conftest*
3451 cat >> confdefs.h <<\EOF
3452#define VA_LIST_IS_ARRAY 1
3453EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00003454 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003455fi
3456rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003457echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003458
Guido van Rossum627b2d71993-12-24 10:39:16 +00003459# checks for system services
3460# (none yet)
3461
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003462# Linux requires this for correct f.p. operations
Guido van Rossumf78abae1997-01-21 22:02:36 +00003463echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00003464echo "configure:3465: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003465ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003466if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003467 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003468else
3469 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003470LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003471cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00003472#line 3473 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003473#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003474/* Override any gcc2 internal prototype to avoid an error. */
3475/* We use char because int might match the return type of a gcc2
3476 builtin and then its argument prototype would still apply. */
3477char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003478
Guido van Rossumf78abae1997-01-21 22:02:36 +00003479int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003480__fpu_control()
3481; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003482EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00003483if { (eval echo configure:3484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003484 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003485 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003486else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003487 echo "configure: failed program was:" >&5
3488 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003489 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003490 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003491fi
3492rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003493LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003494
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003495fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003496if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003497 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003498 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3499 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003500 cat >> confdefs.h <<EOF
3501#define $ac_tr_lib 1
3502EOF
3503
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003504 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003505
3506else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003507 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003508fi
3509
3510
Guido van Rossum7f253911997-05-09 02:42:48 +00003511# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00003512echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00003513echo "configure:3514: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00003514# Check whether --with-fpectl or --without-fpectl was given.
3515if test "${with_fpectl+set}" = set; then
3516 withval="$with_fpectl"
3517
3518if test "$withval" != no
3519then cat >> confdefs.h <<\EOF
3520#define WANT_SIGFPE_HANDLER 1
3521EOF
3522 echo "$ac_t""yes" 1>&6
3523else echo "$ac_t""no" 1>&6
3524fi
3525fi
3526
3527
Guido van Rossum7f43da71994-08-01 12:15:30 +00003528# check for --with-libm=...
3529
Guido van Rossum563e7081996-09-10 18:20:48 +00003530case $ac_sys_system in
3531next) ;;
3532*) LIBM=-lm
3533esac
Guido van Rossum7f253911997-05-09 02:42:48 +00003534echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00003535echo "configure:3536: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003536# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003537if test "${with_libm+set}" = set; then
3538 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003539
Guido van Rossum7f253911997-05-09 02:42:48 +00003540if test "$withval" = no
3541then LIBM=
3542 echo "$ac_t""force LIBM empty" 1>&6
3543elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00003544then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00003545 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003546else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003547fi
Guido van Rossum7f253911997-05-09 02:42:48 +00003548else
3549 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003550fi
3551
3552
3553# check for --with-libc=...
3554
Guido van Rossum7f253911997-05-09 02:42:48 +00003555echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00003556echo "configure:3557: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003557# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003558if test "${with_libc+set}" = set; then
3559 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003560
Guido van Rossum7f253911997-05-09 02:42:48 +00003561if test "$withval" = no
3562then LIBC=
3563 echo "$ac_t""force LIBC empty" 1>&6
3564elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00003565then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00003566 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003567else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003568fi
Guido van Rossum7f253911997-05-09 02:42:48 +00003569else
3570 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003571fi
3572
3573
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003574# check for hypot() in math library
3575LIBS_SAVE=$LIBS
3576LIBS="$LIBS $LIBM"
3577for ac_func in hypot
3578do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003579echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00003580echo "configure:3581: checking for $ac_func" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003581if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3582 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003583else
3584 cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00003585#line 3586 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003586#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003587/* System header to define __stub macros and hopefully few prototypes,
3588 which can conflict with char $ac_func(); below. */
3589#include <assert.h>
3590/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003591/* We use char because int might match the return type of a gcc2
3592 builtin and then its argument prototype would still apply. */
3593char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003594
Guido van Rossumf78abae1997-01-21 22:02:36 +00003595int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003596
3597/* The GNU C library defines this for functions which it implements
3598 to always fail with ENOSYS. Some functions are actually named
3599 something starting with __ and the normal name is an alias. */
3600#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3601choke me
3602#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003603$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003604#endif
3605
3606; return 0; }
3607EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00003608if { (eval echo configure:3609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003609 rm -rf conftest*
3610 eval "ac_cv_func_$ac_func=yes"
3611else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003612 echo "configure: failed program was:" >&5
3613 cat conftest.$ac_ext >&5
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003614 rm -rf conftest*
3615 eval "ac_cv_func_$ac_func=no"
3616fi
3617rm -f conftest*
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003618fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003619
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003620if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003621 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003622 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003623 cat >> confdefs.h <<EOF
3624#define $ac_tr_func 1
3625EOF
3626
3627else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003628 echo "$ac_t""no" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003629fi
3630done
3631
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003632for ac_func in hypot
3633do
3634echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00003635echo "configure:3636: checking for $ac_func" >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003636if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3637 echo $ac_n "(cached) $ac_c" 1>&6
3638else
3639 cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00003640#line 3641 "configure"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003641#include "confdefs.h"
3642/* System header to define __stub macros and hopefully few prototypes,
3643 which can conflict with char $ac_func(); below. */
3644#include <assert.h>
3645/* Override any gcc2 internal prototype to avoid an error. */
3646/* We use char because int might match the return type of a gcc2
3647 builtin and then its argument prototype would still apply. */
3648char $ac_func();
3649
Guido van Rossumf78abae1997-01-21 22:02:36 +00003650int main() {
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003651
3652/* The GNU C library defines this for functions which it implements
3653 to always fail with ENOSYS. Some functions are actually named
3654 something starting with __ and the normal name is an alias. */
3655#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3656choke me
3657#else
3658$ac_func();
3659#endif
3660
3661; return 0; }
3662EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00003663if { (eval echo configure:3664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003664 rm -rf conftest*
3665 eval "ac_cv_func_$ac_func=yes"
3666else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003667 echo "configure: failed program was:" >&5
3668 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003669 rm -rf conftest*
3670 eval "ac_cv_func_$ac_func=no"
3671fi
3672rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003673fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003674
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003675if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3676 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003677 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3678 cat >> confdefs.h <<EOF
3679#define $ac_tr_func 1
3680EOF
3681
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003682else
3683 echo "$ac_t""no" 1>&6
3684LIBOBJS="$LIBOBJS ${ac_func}.o"
3685fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00003686done
3687
Guido van Rossumf78abae1997-01-21 22:02:36 +00003688
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00003689LIBS=$LIBS_SAVE
3690
Guido van Rossumda88dad1995-01-26 00:46:29 +00003691# check for getopt
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003692echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00003693echo "configure:3694: checking for genuine getopt" >&5
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003694if eval "test \"`echo '$''{'ac_cv_func_getopt'+set}'`\" = set"; then
3695 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00003696else
3697 if test "$cross_compiling" = yes; then
3698 ac_cv_func_getopt=no
3699else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003700 cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00003701#line 3702 "configure"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003702#include "confdefs.h"
3703#include <stdio.h>
3704extern int optind, opterr, getopt();
3705extern char* optarg;
3706int main() {
3707 char* av[] = { "testprog", "parameter", "-fFlag", NULL };
3708 opterr = 0;
3709 if (getopt(3, av, "f:") == 'f') { exit(1); }
3710 exit(0);
3711}
3712EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00003713if { (eval echo configure:3714: \"$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 +00003714then
Guido van Rossumda88dad1995-01-26 00:46:29 +00003715 ac_cv_func_getopt=yes
3716else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003717 echo "configure: failed program was:" >&5
3718 cat conftest.$ac_ext >&5
3719 rm -fr conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00003720 ac_cv_func_getopt=no
3721fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003722rm -fr conftest*
3723fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003724
3725fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003726echo "$ac_t""$ac_cv_func_getopt" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00003727test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o"
3728
Guido van Rossumad713701997-07-10 22:42:38 +00003729# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00003730echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Guido van Rossum70c7f481998-03-26 18:44:10 +00003731echo "configure:3732: checking what malloc(0) returns" >&5
Guido van Rossumad713701997-07-10 22:42:38 +00003732if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
3733 echo $ac_n "(cached) $ac_c" 1>&6
3734else
3735 if test "$cross_compiling" = yes; then
3736 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3737else
3738 cat > conftest.$ac_ext <<EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00003739#line 3740 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00003740#include "confdefs.h"
3741#include <stdio.h>
3742#ifdef HAVE_STDLIB
3743#include <stdlib.h>
3744#else
3745char *malloc(), *realloc();
3746int *free();
3747#endif
3748main() {
3749 char *p;
3750 p = malloc(0);
3751 if (p == NULL) exit(1);
3752 p = realloc(p, 0);
3753 if (p == NULL) exit(1);
3754 free(p);
3755 exit(0);
3756}
3757EOF
Guido van Rossum70c7f481998-03-26 18:44:10 +00003758if { (eval echo configure:3759: \"$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 +00003759then
3760 ac_cv_malloc_zero=nonnull
3761else
3762 echo "configure: failed program was:" >&5
3763 cat conftest.$ac_ext >&5
3764 rm -fr conftest*
3765 ac_cv_malloc_zero=null
3766fi
3767rm -fr conftest*
3768fi
3769
3770fi
3771
3772echo "$ac_t""$ac_cv_malloc_zero" 1>&6
3773if test "$ac_cv_malloc_zero" = null
3774then
3775 cat >> confdefs.h <<\EOF
3776#define MALLOC_ZERO_RETURNS_NULL 1
3777EOF
3778
3779fi
3780
Guido van Rossum627b2d71993-12-24 10:39:16 +00003781# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003782trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003783cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003784# This file is a shell script that caches the results of configure
3785# tests run on this system so they can be shared between configure
3786# scripts and configure runs. It is not useful on other systems.
3787# If it contains results you don't want to keep, you may remove or edit it.
3788#
3789# By default, configure uses ./config.cache as the cache file,
3790# creating it if it does not exist already. You can give configure
3791# the --cache-file=FILE option to use a different cache file; that is
3792# what configure does when it calls configure scripts in
3793# subdirectories, so they share the cache.
3794# Giving --cache-file=/dev/null disables caching, for debugging configure.
3795# config.status only pays attention to the cache file if you give it the
3796# --recheck option to rerun configure.
3797#
3798EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00003799# The following way of writing the cache mishandles newlines in values,
3800# but we know of no workaround that is simple, portable, and efficient.
3801# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003802# Ultrix sh set writes to stderr and can't be redirected directly,
3803# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003804(set) 2>&1 |
Guido van Rossumf78abae1997-01-21 22:02:36 +00003805 case `(ac_space=' '; set) 2>&1` in
3806 *ac_space=\ *)
3807 # `set' does not quote correctly, so add quotes (double-quote substitution
3808 # turns \\\\ into \\, and sed turns \\ into \).
3809 sed -n \
3810 -e "s/'/'\\\\''/g" \
3811 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3812 ;;
3813 *)
3814 # `set' quotes correctly as required by POSIX, so do not add quotes.
3815 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3816 ;;
3817 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003818if cmp -s $cache_file confcache; then
3819 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003820else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003821 if test -w $cache_file; then
3822 echo "updating cache $cache_file"
3823 cat confcache > $cache_file
3824 else
3825 echo "not updating unwritable cache $cache_file"
3826 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003827fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003828rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00003829
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003830trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003831
3832test "x$prefix" = xNONE && prefix=$ac_default_prefix
3833# Let make expand exec_prefix.
3834test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00003835
Guido van Rossum7f43da71994-08-01 12:15:30 +00003836# Any assignment to VPATH causes Sun make to only execute
3837# the first set of double-colon rules, so remove it if not needed.
3838# If there is a colon in the path, we need to keep it.
3839if test "x$srcdir" = x.; then
3840 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
3841fi
3842
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003843trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00003844
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003845DEFS=-DHAVE_CONFIG_H
3846
3847# Without the "./", some shells look in PATH for config.status.
3848: ${CONFIG_STATUS=./config.status}
3849
3850echo creating $CONFIG_STATUS
3851rm -f $CONFIG_STATUS
3852cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003853#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00003854# Generated automatically by configure.
3855# Run this file to recreate the current configuration.
3856# This directory was configured as follows,
3857# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3858#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003859# $0 $ac_configure_args
3860#
3861# Compiler output produced by configure, useful for debugging
3862# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00003863
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003864ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003865for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00003866do
Guido van Rossum7f43da71994-08-01 12:15:30 +00003867 case "\$ac_option" in
3868 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003869 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3870 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003871 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossumf78abae1997-01-21 22:02:36 +00003872 echo "$CONFIG_STATUS generated by autoconf version 2.12"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003873 exit 0 ;;
3874 -help | --help | --hel | --he | --h)
3875 echo "\$ac_cs_usage"; exit 0 ;;
3876 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00003877 esac
3878done
3879
Guido van Rossum7f43da71994-08-01 12:15:30 +00003880ac_given_srcdir=$srcdir
Guido van Rossum627b2d71993-12-24 10:39:16 +00003881
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003882trap 'rm -fr `echo "Makefile \
3883 Objects/Makefile \
3884 Parser/Makefile \
3885 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00003886 Modules/Makefile.pre \
3887 Modules/Setup.thread config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003888EOF
3889cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003890
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003891# Protect against being on the right side of a sed subst in config.status.
3892sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3893 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003894$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00003895$extrasub
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003896s%@CFLAGS@%$CFLAGS%g
3897s%@CPPFLAGS@%$CPPFLAGS%g
3898s%@CXXFLAGS@%$CXXFLAGS%g
3899s%@DEFS@%$DEFS%g
3900s%@LDFLAGS@%$LDFLAGS%g
3901s%@LIBS@%$LIBS%g
3902s%@exec_prefix@%$exec_prefix%g
3903s%@prefix@%$prefix%g
3904s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003905s%@bindir@%$bindir%g
3906s%@sbindir@%$sbindir%g
3907s%@libexecdir@%$libexecdir%g
3908s%@datadir@%$datadir%g
3909s%@sysconfdir@%$sysconfdir%g
3910s%@sharedstatedir@%$sharedstatedir%g
3911s%@localstatedir@%$localstatedir%g
3912s%@libdir@%$libdir%g
3913s%@includedir@%$includedir%g
3914s%@oldincludedir@%$oldincludedir%g
3915s%@infodir@%$infodir%g
3916s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003917s%@VERSION@%$VERSION%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003918s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00003919s%@SGI_ABI@%$SGI_ABI%g
3920s%@SET_CCC@%$SET_CCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003921s%@CC@%$CC%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003922s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003923s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00003924s%@AR@%$AR%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003925s%@INSTALL@%$INSTALL%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00003926s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3927s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003928s%@REALLIBRARY@%$REALLIBRARY%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003929s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003930s%@CPP@%$CPP%g
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003931s%@DGUX_IS_BROKEN@%$DGUX_IS_BROKEN%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00003932s%@SO@%$SO%g
3933s%@LDSHARED@%$LDSHARED%g
3934s%@CCSHARED@%$CCSHARED%g
3935s%@LINKFORSHARED@%$LINKFORSHARED%g
Guido van Rossum009f7871997-12-04 00:51:42 +00003936s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00003937s%@LDLAST@%$LDLAST%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00003938s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00003939s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00003940s%@LIBM@%$LIBM%g
3941s%@LIBC@%$LIBC%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003942
3943CEOF
3944EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00003945
3946cat >> $CONFIG_STATUS <<\EOF
3947
3948# Split the substitutions into bite-sized pieces for seds with
3949# small command number limits, like on Digital OSF/1 and HP-UX.
3950ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3951ac_file=1 # Number of current file.
3952ac_beg=1 # First line for current file.
3953ac_end=$ac_max_sed_cmds # Line after last line for current file.
3954ac_more_lines=:
3955ac_sed_cmds=""
3956while $ac_more_lines; do
3957 if test $ac_beg -gt 1; then
3958 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3959 else
3960 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3961 fi
3962 if test ! -s conftest.s$ac_file; then
3963 ac_more_lines=false
3964 rm -f conftest.s$ac_file
3965 else
3966 if test -z "$ac_sed_cmds"; then
3967 ac_sed_cmds="sed -f conftest.s$ac_file"
3968 else
3969 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3970 fi
3971 ac_file=`expr $ac_file + 1`
3972 ac_beg=$ac_end
3973 ac_end=`expr $ac_end + $ac_max_sed_cmds`
3974 fi
3975done
3976if test -z "$ac_sed_cmds"; then
3977 ac_sed_cmds=cat
3978fi
3979EOF
3980
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003981cat >> $CONFIG_STATUS <<EOF
3982
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003983CONFIG_FILES=\${CONFIG_FILES-"Makefile \
3984 Objects/Makefile \
3985 Parser/Makefile \
3986 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00003987 Modules/Makefile.pre \
3988 Modules/Setup.thread"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003989EOF
3990cat >> $CONFIG_STATUS <<\EOF
3991for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003992 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003993 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00003994 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003995 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3996 *) ac_file_in="${ac_file}.in" ;;
3997 esac
3998
Guido van Rossumf78abae1997-01-21 22:02:36 +00003999 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004000
4001 # Remove last slash and all that follows it. Not all systems have dirname.
4002 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4003 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4004 # The file is in a subdirectory.
4005 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004006 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004007 # A "../" for each directory in $ac_dir_suffix.
4008 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4009 else
4010 ac_dir_suffix= ac_dots=
4011 fi
4012
4013 case "$ac_given_srcdir" in
4014 .) srcdir=.
4015 if test -z "$ac_dots"; then top_srcdir=.
4016 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4017 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4018 *) # Relative path.
4019 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4020 top_srcdir="$ac_dots$ac_given_srcdir" ;;
4021 esac
4022
Guido van Rossumf78abae1997-01-21 22:02:36 +00004023
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004024 echo creating "$ac_file"
4025 rm -f "$ac_file"
4026 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4027 case "$ac_file" in
4028 *Makefile*) ac_comsub="1i\\
4029# $configure_input" ;;
4030 *) ac_comsub= ;;
4031 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00004032
4033 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 +00004034 sed -e "$ac_comsub
4035s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00004036s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00004037s%@top_srcdir@%$top_srcdir%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00004038" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00004039fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00004040rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00004041
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004042# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4043# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00004044#
4045# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004046ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
4047ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00004048ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004049ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00004050# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004051ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4052ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00004053ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004054ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00004055# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004056ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4057ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00004058ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004059ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00004060
Guido van Rossumf78abae1997-01-21 22:02:36 +00004061if test "${CONFIG_HEADERS+set}" != set; then
4062EOF
4063cat >> $CONFIG_STATUS <<EOF
4064 CONFIG_HEADERS="config.h"
4065EOF
4066cat >> $CONFIG_STATUS <<\EOF
4067fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004068for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004069 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004070 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00004071 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004072 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4073 *) ac_file_in="${ac_file}.in" ;;
4074 esac
4075
Guido van Rossum7f43da71994-08-01 12:15:30 +00004076 echo creating $ac_file
4077
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004078 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00004079 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4080 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004081
4082EOF
4083
4084# Transform confdefs.h into a sed script conftest.vals that substitutes
4085# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004086# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004087# Protect against being in an unquoted here document in config.status.
4088rm -f conftest.vals
4089cat > conftest.hdr <<\EOF
4090s/[\\&%]/\\&/g
4091s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004092s%#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 +00004093s%ac_d%ac_u%gp
4094s%ac_u%ac_e%gp
4095EOF
4096sed -n -f conftest.hdr confdefs.h > conftest.vals
4097rm -f conftest.hdr
4098
4099# This sed command replaces #undef with comments. This is necessary, for
4100# example, in the case of _POSIX_SOURCE, which is predefined and required
4101# on some systems where configure will not decide to define it.
4102cat >> conftest.vals <<\EOF
4103s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4104EOF
4105
4106# Break up conftest.vals because some shells have a limit on
4107# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004108
4109rm -f conftest.tail
4110while :
4111do
4112 ac_lines=`grep -c . conftest.vals`
4113 # grep -c gives empty output for an empty file on some AIX systems.
4114 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4115 # Write a limited-size here document to conftest.frag.
4116 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4117 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4118 echo 'CEOF
4119 sed -f conftest.frag conftest.in > conftest.out
4120 rm -f conftest.in
4121 mv conftest.out conftest.in
4122' >> $CONFIG_STATUS
4123 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4124 rm -f conftest.vals
4125 mv conftest.tail conftest.vals
4126done
4127rm -f conftest.vals
4128
4129cat >> $CONFIG_STATUS <<\EOF
4130 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00004131 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004132 cat conftest.in >> conftest.h
4133 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00004134 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004135 echo "$ac_file is unchanged"
4136 rm -f conftest.h
4137 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004138 # Remove last slash and all that follows it. Not all systems have dirname.
4139 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4140 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4141 # The file is in a subdirectory.
4142 test ! -d "$ac_dir" && mkdir "$ac_dir"
4143 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004144 rm -f $ac_file
4145 mv conftest.h $ac_file
4146 fi
4147fi; done
4148
Guido van Rossumf78abae1997-01-21 22:02:36 +00004149EOF
4150cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004151
Guido van Rossumf78abae1997-01-21 22:02:36 +00004152EOF
4153cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004154
4155exit 0
4156EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004157chmod +x $CONFIG_STATUS
4158rm -fr confdefs* $ac_clean_files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004159test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00004160