blob: b3b968343d629b46a1027bd82d07b3b4acaa11fb [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 Rossum2242fd11995-09-19 16:19:29 +00003# From configure.in Revision: 1.24
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 Rossume77438c1995-09-13 18:59:59 +00006# Generated automatically using autoconf version 2.4
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
8#
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
17--without-gcc never use gcc"
18ac_help="$ac_help
19--with-readline=DIRECTORY GNU readline"
20ac_help="$ac_help
21--with-thread[=DIRECTORY] make interpreter thread-safe"
22ac_help="$ac_help
23--with-sgi-dl=DIRECTORY IRIX 4 dynamic linking"
24ac_help="$ac_help
25--with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking"
26ac_help="$ac_help
27--with-libm=STRING math library"
28ac_help="$ac_help
29--with-libc=STRING C library"
Guido van Rossum627b2d71993-12-24 10:39:16 +000030
Guido van Rossum7f43da71994-08-01 12:15:30 +000031# Initialize some variables set by options.
32# The variables have the same names as the options, with
33# dashes changed to underlines.
34build=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000035cache_file=./config.cache
36exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +000037host=NONE
38no_create=
39nonopt=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000040no_recursion=
41prefix=NONE
42program_prefix=NONE
43program_suffix=NONE
44program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +000045silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000046site=
Guido van Rossum7f43da71994-08-01 12:15:30 +000047srcdir=
48target=NONE
49verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000050x_includes=NONE
51x_libraries=NONE
52
53# Initialize some other variables.
54subdirs=
Guido van Rossum7f43da71994-08-01 12:15:30 +000055
56ac_prev=
57for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +000058do
Guido van Rossum627b2d71993-12-24 10:39:16 +000059
Guido van Rossum7f43da71994-08-01 12:15:30 +000060 # If the previous option needs an argument, assign it.
61 if test -n "$ac_prev"; then
62 eval "$ac_prev=\$ac_option"
63 ac_prev=
64 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +000065 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000066
Guido van Rossum7f43da71994-08-01 12:15:30 +000067 case "$ac_option" in
68 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
69 *) ac_optarg= ;;
70 esac
71
Guido van Rossum76be6ed1995-01-02 18:33:54 +000072 # Accept the important Cygnus configure options, so we can diagnose typos.
73
Guido van Rossum7f43da71994-08-01 12:15:30 +000074 case "$ac_option" in
75
76 -build | --build | --buil | --bui | --bu | --b)
77 ac_prev=build ;;
78 -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
79 build="$ac_optarg" ;;
80
Guido van Rossum76be6ed1995-01-02 18:33:54 +000081 -cache-file | --cache-file | --cache-fil | --cache-fi \
82 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
83 ac_prev=cache_file ;;
84 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
85 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
86 cache_file="$ac_optarg" ;;
87
Guido van Rossum7f43da71994-08-01 12:15:30 +000088 -disable-* | --disable-*)
89 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +000090 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +000091 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000092 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000093 fi
94 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
95 eval "enable_${ac_feature}=no" ;;
96
97 -enable-* | --enable-*)
98 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +000099 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000100 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000101 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000102 fi
103 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
104 case "$ac_option" in
105 *=*) ;;
106 *) ac_optarg=yes ;;
107 esac
108 eval "enable_${ac_feature}='$ac_optarg'" ;;
109
Guido van Rossum7f43da71994-08-01 12:15:30 +0000110 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
111 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
112 | --exec | --exe | --ex)
113 ac_prev=exec_prefix ;;
114 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
115 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
116 | --exec=* | --exe=* | --ex=*)
117 exec_prefix="$ac_optarg" ;;
118
119 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000120 # Obsolete; use --with-gas.
121 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000122
123 -help | --help | --hel | --he)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000124 # Omit some internal or obsolete options to make the list less imposing.
125 # This message is too long to be a string in the A/UX 3.1 sh.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000126 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000127Usage: configure [options] [host]
128Options: [defaults in brackets after descriptions]
129Configuration:
130 --cache-file=FILE cache test results in FILE
131 --help print this message
132 --no-create do not create output files
133 --quiet, --silent do not print \`checking...' messages
134 --version print the version of autoconf that created configure
135Directory and file names:
136 --prefix=PREFIX install architecture-independent files in PREFIX
137 [$ac_default_prefix]
138 --exec-prefix=PREFIX install architecture-dependent files in PREFIX
139 [same as prefix]
140 --srcdir=DIR find the sources in DIR [configure dir or ..]
141 --program-prefix=PREFIX prepend PREFIX to installed program names
142 --program-suffix=SUFFIX append SUFFIX to installed program names
143 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
144Host type:
145 --build=BUILD configure for building on BUILD [BUILD=HOST]
146 --host=HOST configure for HOST [guessed]
147 --target=TARGET configure for TARGET [TARGET=HOST]
148Features and packages:
149 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
150 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
151 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
152 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
153 --x-includes=DIR X include files are in DIR
154 --x-libraries=DIR X library files are in DIR
155--enable and --with options recognized:$ac_help
Guido van Rossum7f43da71994-08-01 12:15:30 +0000156EOF
157 exit 0 ;;
158
159 -host | --host | --hos | --ho)
160 ac_prev=host ;;
161 -host=* | --host=* | --hos=* | --ho=*)
162 host="$ac_optarg" ;;
163
164 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000165 # Obsolete; use --without-fp.
166 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000167
168 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
169 | --no-cr | --no-c)
170 no_create=yes ;;
171
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000172 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
173 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
174 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000175
176 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
177 ac_prev=prefix ;;
178 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
179 prefix="$ac_optarg" ;;
180
181 -program-prefix | --program-prefix | --program-prefi | --program-pref \
182 | --program-pre | --program-pr | --program-p)
183 ac_prev=program_prefix ;;
184 -program-prefix=* | --program-prefix=* | --program-prefi=* \
185 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
186 program_prefix="$ac_optarg" ;;
187
188 -program-suffix | --program-suffix | --program-suffi | --program-suff \
189 | --program-suf | --program-su | --program-s)
190 ac_prev=program_suffix ;;
191 -program-suffix=* | --program-suffix=* | --program-suffi=* \
192 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
193 program_suffix="$ac_optarg" ;;
194
195 -program-transform-name | --program-transform-name \
196 | --program-transform-nam | --program-transform-na \
197 | --program-transform-n | --program-transform- \
198 | --program-transform | --program-transfor \
199 | --program-transfo | --program-transf \
200 | --program-trans | --program-tran \
201 | --progr-tra | --program-tr | --program-t)
202 ac_prev=program_transform_name ;;
203 -program-transform-name=* | --program-transform-name=* \
204 | --program-transform-nam=* | --program-transform-na=* \
205 | --program-transform-n=* | --program-transform-=* \
206 | --program-transform=* | --program-transfor=* \
207 | --program-transfo=* | --program-transf=* \
208 | --program-trans=* | --program-tran=* \
209 | --progr-tra=* | --program-tr=* | --program-t=*)
210 program_transform_name="$ac_optarg" ;;
211
212 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
213 | -silent | --silent | --silen | --sile | --sil)
214 silent=yes ;;
215
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000216 -site | --site | --sit)
217 ac_prev=site ;;
218 -site=* | --site=* | --sit=*)
219 site="$ac_optarg" ;;
220
Guido van Rossum7f43da71994-08-01 12:15:30 +0000221 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
222 ac_prev=srcdir ;;
223 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
224 srcdir="$ac_optarg" ;;
225
226 -target | --target | --targe | --targ | --tar | --ta | --t)
227 ac_prev=target ;;
228 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
229 target="$ac_optarg" ;;
230
231 -v | -verbose | --verbose | --verbos | --verbo | --verb)
232 verbose=yes ;;
233
234 -version | --version | --versio | --versi | --vers)
Guido van Rossume77438c1995-09-13 18:59:59 +0000235 echo "configure generated by autoconf version 2.4"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000236 exit 0 ;;
237
238 -with-* | --with-*)
239 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000240 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000241 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000242 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000243 fi
244 ac_package=`echo $ac_package| sed 's/-/_/g'`
245 case "$ac_option" in
246 *=*) ;;
247 *) ac_optarg=yes ;;
248 esac
249 eval "with_${ac_package}='$ac_optarg'" ;;
250
251 -without-* | --without-*)
252 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000253 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000254 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000255 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000256 fi
257 ac_package=`echo $ac_package| sed 's/-/_/g'`
258 eval "with_${ac_package}=no" ;;
259
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000260 --x)
261 # Obsolete; use --with-x.
262 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000263
264 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
265 | --x-incl | --x-inc | --x-in | --x-i)
266 ac_prev=x_includes ;;
267 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
268 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
269 x_includes="$ac_optarg" ;;
270
271 -x-libraries | --x-libraries | --x-librarie | --x-librari \
272 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
273 ac_prev=x_libraries ;;
274 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
275 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
276 x_libraries="$ac_optarg" ;;
277
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000278 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000279 ;;
280
281 *)
Guido van Rossum0a516c91994-09-12 10:58:40 +0000282 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000283 echo "configure: warning: $ac_option: invalid host type" 1>&2
Guido van Rossum7f43da71994-08-01 12:15:30 +0000284 fi
Guido van Rossum0a516c91994-09-12 10:58:40 +0000285 if test "x$nonopt" != xNONE; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000286 { 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 +0000287 fi
288 nonopt="$ac_option"
289 ;;
290
291 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000292done
293
Guido van Rossum7f43da71994-08-01 12:15:30 +0000294if test -n "$ac_prev"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000295 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000296fi
297
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000298trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum7f43da71994-08-01 12:15:30 +0000299
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000300# File descriptor usage:
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000301# 0 standard input
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000302# 1 file creation
303# 2 errors and warnings
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000304# 3 some systems may open it to /dev/tty
305# 4 used on the Kubota Titan
306# 6 checking for... messages and results
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000307# 5 compiler messages saved in config.log
308if test "$silent" = yes; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000309 exec 6>/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000310else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000311 exec 6>&1
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000312fi
313exec 5>./config.log
314
315echo "\
316This file contains any messages produced by compilers while
317running configure, to aid debugging if configure makes a mistake.
318" 1>&5
319
320# Strip out --no-create and --no-recursion so they do not pile up.
321# Also quote any args containing shell metacharacters.
322ac_configure_args=
323for ac_arg
324do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000325 case "$ac_arg" in
326 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
327 | --no-cr | --no-c) ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000328 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
329 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
330 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
331 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
332 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000333 esac
334done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000335
336# NLS nuisances.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000337# Only set LANG and LC_ALL to C if already set.
Guido van Rossum627b2d71993-12-24 10:39:16 +0000338# These must not be set unconditionally because not all systems understand
339# e.g. LANG=C (notably SCO).
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000340if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
341if test "${LANG+set}" = set; then LANG=C; export LANG; fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000342
Guido van Rossum7f43da71994-08-01 12:15:30 +0000343# confdefs.h avoids OS command line length limits that DEFS can exceed.
344rm -rf conftest* confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000345# AIX cpp loses on an empty file, so make sure it contains at least a newline.
346echo > confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000347
348# A filename unique to this package, relative to the directory that
349# configure is in, which we can look for to find out if srcdir is correct.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000350ac_unique_file=Include/object.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000351
352# Find the source files, if location was not specified.
353if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000354 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000355 # Try the directory containing this script, then its parent.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000356 ac_prog=$0
357 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
358 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
359 srcdir=$ac_confdir
360 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000361 srcdir=..
362 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000363else
364 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000365fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000366if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000367 if test "$ac_srcdir_defaulted" = yes; then
368 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000369 else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000370 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000371 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000372fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000373srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
374
375# Prefer explicitly selected file to automatically selected ones.
376if test -z "$CONFIG_SITE"; then
377 if test "x$prefix" != xNONE; then
378 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
379 else
380 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
381 fi
382fi
383for ac_site_file in $CONFIG_SITE; do
384 if test -r "$ac_site_file"; then
385 echo "loading site script $ac_site_file"
386 . "$ac_site_file"
387 fi
388done
389
390if test -r "$cache_file"; then
391 echo "loading cache $cache_file"
392 . $cache_file
393else
394 echo "creating cache $cache_file"
395 > $cache_file
396fi
397
Guido van Rossum7f43da71994-08-01 12:15:30 +0000398ac_ext=c
Guido van Rossum0a516c91994-09-12 10:58:40 +0000399# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000400ac_cpp='$CPP $CPPFLAGS'
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000401ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
402ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000403
404if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
405 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
406 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
407 ac_n= ac_c='
408' ac_t=' '
409 else
410 ac_n=-n ac_c= ac_t=
411 fi
412else
413 ac_n= ac_c='\c' ac_t=
414fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000415
Guido van Rossum0a516c91994-09-12 10:58:40 +0000416
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000417
Guido van Rossum627b2d71993-12-24 10:39:16 +0000418
419# checks for alternative programs
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000420echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000421# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000422withval="$with_gcc"
423if test -n "$withval"; then
424
425 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000426 no) CC=cc
427 without_gcc=yes;;
428 yes) CC=gcc
429 without_gcc=no;;
430 *) CC=$withval
431 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000432 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000433else
Guido van Rossume77438c1995-09-13 18:59:59 +0000434
435 case `uname -s` in
436 OSF1) CC=cc
437 without_gcc=;;
438 *) without_gcc=no;;
439 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000440fi
441
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000442echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000443
Guido van Rossum8b131c51995-03-09 14:10:13 +0000444# If the user switches compilers, we can't believe the cache
445if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
446then
447 { echo "configure: error: cached CC is different -- throw away $cache_file
448(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
449fi
450
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000451# Extract the first word of "gcc", so it can be a program name with args.
452set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000453echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
454if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
455 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000456else
457 if test -n "$CC"; then
458 ac_cv_prog_CC="$CC" # Let the user override the test.
459else
Guido van Rossum7f43da71994-08-01 12:15:30 +0000460 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
461 for ac_dir in $PATH; do
462 test -z "$ac_dir" && ac_dir=.
463 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000464 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000465 break
466 fi
467 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000468 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000469 test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000470fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000471fi
472CC="$ac_cv_prog_CC"
473if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000474 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000475else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000476 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000477fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000478
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000479
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000480echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
481if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
482 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000483else
484 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000485#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000486 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +0000487#endif
488EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000489if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
490 ac_cv_prog_gcc=yes
491else
492 ac_cv_prog_gcc=no
493fi
494fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000495echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000496if test $ac_cv_prog_gcc = yes; then
497 GCC=yes
498 if test "${CFLAGS+set}" != set; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000499 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
500if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
501 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000502else
503 echo 'void f(){}' > conftest.c
504if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
505 ac_cv_prog_gcc_g=yes
506else
507 ac_cv_prog_gcc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000508fi
509rm -f conftest*
510
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000511fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000512 echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000513 if test $ac_cv_prog_gcc_g = yes; then
514 CFLAGS="-g -O"
515 else
516 CFLAGS="-O"
517 fi
518 fi
519else
520 GCC=
521 test "${CFLAGS+set}" = set || CFLAGS="-g"
522fi
523
524# Extract the first word of "ranlib", so it can be a program name with args.
525set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000526echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
527if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
528 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000529else
530 if test -n "$RANLIB"; then
531 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
532else
Guido van Rossum7f43da71994-08-01 12:15:30 +0000533 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
534 for ac_dir in $PATH; do
535 test -z "$ac_dir" && ac_dir=.
536 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000537 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000538 break
539 fi
540 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000541 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000542 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000543fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000544fi
545RANLIB="$ac_cv_prog_RANLIB"
546if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000547 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000548else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000549 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000550fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000551
552
Guido van Rossum7f43da71994-08-01 12:15:30 +0000553for ac_prog in ar aal
554do
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000555# Extract the first word of "$ac_prog", so it can be a program name with args.
556set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000557echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
558if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
559 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000560else
561 if test -n "$AR"; then
562 ac_cv_prog_AR="$AR" # Let the user override the test.
563else
Guido van Rossum7f43da71994-08-01 12:15:30 +0000564 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
565 for ac_dir in $PATH; do
566 test -z "$ac_dir" && ac_dir=.
567 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000568 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000569 break
570 fi
571 done
572 IFS="$ac_save_ifs"
573fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000574fi
575AR="$ac_cv_prog_AR"
576if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000577 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000578else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000579 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000580fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000581
582test -n "$AR" && break
583done
584test -n "$AR" || AR="ar"
585
586
Guido van Rossumda88dad1995-01-26 00:46:29 +0000587
588
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000589# Install just never works :-(
590if test -z "$INSTALL"
Guido van Rossumda88dad1995-01-26 00:46:29 +0000591then
592 INSTALL=cp
593 INSTALL_PROGRAM=cp
594 INSTALL_DATA=cp
595else
596 INSTALL_PROGRAM="$INSTALL"
597 INSTALL_DATA="$INSTALL -m 644"
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000598fi
599
600# Optimizer/debugger flags passed between Makefiles
601if test -z "$OPT"
602then OPT=-O
603fi
604
Guido van Rossum627b2d71993-12-24 10:39:16 +0000605# checks for UNIX variants that set C preprocessor variables
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000606echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000607# On Suns, sometimes $CPP names a directory.
608if test -n "$CPP" && test -d "$CPP"; then
609 CPP=
610fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000611if test -z "$CPP"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000612if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
613 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000614else
615 # This must be in double quotes, not single quotes, because CPP may get
616 # substituted into the Makefile and "${CC-cc}" will confuse make.
Guido van Rossum627b2d71993-12-24 10:39:16 +0000617 CPP="${CC-cc} -E"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000618 # On the NeXT, cc -E runs the code through the compiler's parser,
619 # not just through cpp.
620 cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +0000621#line 622 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000622#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000623#include <assert.h>
Guido van Rossum627b2d71993-12-24 10:39:16 +0000624Syntax Error
625EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000626eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
627ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000628if test -z "$ac_err"; then
629 :
630else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000631 echo "$ac_err" >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +0000632 rm -rf conftest*
633 CPP="${CC-cc} -E -traditional-cpp"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000634 cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +0000635#line 636 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000636#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000637#include <assert.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +0000638Syntax Error
639EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000640eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
641ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000642if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000643 :
644else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000645 echo "$ac_err" >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +0000646 rm -rf conftest*
647 CPP=/lib/cpp
648fi
649rm -f conftest*
650fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000651rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000652 ac_cv_prog_CPP="$CPP"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000653fi
Guido van Rossume77438c1995-09-13 18:59:59 +0000654 CPP="$ac_cv_prog_CPP"
655else
656 ac_cv_prog_CPP="$CPP"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000657fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000658echo "$ac_t""$CPP" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +0000659
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000660echo $ac_n "checking for AIX""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000661cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +0000662#line 663 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000663#include "confdefs.h"
664#ifdef _AIX
665 yes
666#endif
667
668EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000669if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
670 egrep "yes" >/dev/null 2>&1; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000671 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000672 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000673#define _ALL_SOURCE 1
674EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000675
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000676else
677 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000678 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +0000679fi
680rm -f conftest*
681
682
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000683ac_safe=`echo "minix/config.h" | tr './\055' '___'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000684echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
685if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
686 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000687else
688 cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +0000689#line 690 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000690#include "confdefs.h"
691#include <minix/config.h>
692EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000693eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
694ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000695if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000696 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000697 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000698else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000699 echo "$ac_err" >&5
700 rm -rf conftest*
701 eval "ac_cv_header_$ac_safe=no"
702fi
703rm -f conftest*
704fi
705if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000706 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000707 MINIX=yes
708else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000709 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000710MINIX=
Guido van Rossum627b2d71993-12-24 10:39:16 +0000711fi
712
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000713if test "$MINIX" = yes; then
714 cat >> confdefs.h <<\EOF
715#define _POSIX_SOURCE 1
716EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000717
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000718 cat >> confdefs.h <<\EOF
719#define _POSIX_1_SOURCE 2
720EOF
721
722 cat >> confdefs.h <<\EOF
723#define _MINIX 1
724EOF
725
726fi
727
Guido van Rossumda88dad1995-01-26 00:46:29 +0000728
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000729# checks for header files
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000730# If we cannot run a trivial program, we must be cross compiling.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000731echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
732if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
733 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000734else
735 if test "$cross_compiling" = yes; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000736 ac_cv_c_cross=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000737else
738cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +0000739#line 740 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000740#include "confdefs.h"
741main(){return(0);}
742EOF
743eval $ac_link
744if test -s conftest && (./conftest; exit) 2>/dev/null; then
745 ac_cv_c_cross=no
746else
747 ac_cv_c_cross=yes
748fi
749fi
750rm -fr conftest*
751fi
752cross_compiling=$ac_cv_c_cross
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000753echo "$ac_t""$ac_cv_c_cross" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000754
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000755echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
756if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
757 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000758else
759 cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +0000760#line 761 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000761#include "confdefs.h"
762#include <stdlib.h>
763#include <stdarg.h>
764#include <string.h>
765#include <float.h>
766EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000767eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
768ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000769if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000770 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000771 ac_cv_header_stdc=yes
772else
773 echo "$ac_err" >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +0000774 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000775 ac_cv_header_stdc=no
776fi
777rm -f conftest*
778
779if test $ac_cv_header_stdc = yes; then
780 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
781cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +0000782#line 783 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000783#include "confdefs.h"
784#include <string.h>
785EOF
786if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
787 egrep "memchr" >/dev/null 2>&1; then
788 :
789else
790 rm -rf conftest*
791 ac_cv_header_stdc=no
792fi
793rm -f conftest*
794
795fi
796
797if test $ac_cv_header_stdc = yes; then
798 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
799cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +0000800#line 801 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000801#include "confdefs.h"
802#include <stdlib.h>
803EOF
804if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
805 egrep "free" >/dev/null 2>&1; then
806 :
807else
808 rm -rf conftest*
809 ac_cv_header_stdc=no
810fi
811rm -f conftest*
812
813fi
814
815if test $ac_cv_header_stdc = yes; then
816 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
817if test "$cross_compiling" = yes; then
818 ac_cv_header_stdc=no
819else
820cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +0000821#line 822 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000822#include "confdefs.h"
823#include <ctype.h>
824#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
825#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000826#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +0000827int main () { int i; for (i = 0; i < 256; i++)
828if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
829exit (0); }
830
831EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000832eval $ac_link
Guido van Rossum627b2d71993-12-24 10:39:16 +0000833if test -s conftest && (./conftest; exit) 2>/dev/null; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000834 :
835else
836 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000837fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000838fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000839rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000840fi
841fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000842echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000843if test $ac_cv_header_stdc = yes; then
844 cat >> confdefs.h <<\EOF
845#define STDC_HEADERS 1
846EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000847
848fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000849
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000850for ac_hdr in dlfcn.h fcntl.h limits.h signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h sys/audioio.h sys/param.h sys/select.h sys/time.h sys/times.h sys/un.h sys/utsname.h sys/wait.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000851do
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000852ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000853echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
854if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
855 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000856else
857 cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +0000858#line 859 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000859#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000860#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +0000861EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000862eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
863ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000864if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000865 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000866 eval "ac_cv_header_$ac_safe=yes"
867else
868 echo "$ac_err" >&5
869 rm -rf conftest*
870 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000871fi
872rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873fi
874if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000875 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000876 ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
877 cat >> confdefs.h <<EOF
878#define $ac_tr_hdr 1
879EOF
880
881else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000882 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000883fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000884done
885
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000886ac_header_dirent=no
887for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
888do
889ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000890echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
891if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
892 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +0000893else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000894 cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +0000895#line 896 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000896#include "confdefs.h"
897#include <sys/types.h>
898#include <$ac_hdr>
899int main() { return 0; }
900int t() {
901DIR *dirp = 0;
902; return 0; }
903EOF
904if eval $ac_compile; then
905 rm -rf conftest*
906 eval "ac_cv_header_dirent_$ac_safe=yes"
907else
908 rm -rf conftest*
909 eval "ac_cv_header_dirent_$ac_safe=no"
910fi
911rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +0000912
913fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000914if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000915 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000916 ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
917 cat >> confdefs.h <<EOF
918#define $ac_tr_hdr 1
919EOF
920 ac_header_dirent=$ac_hdr; break
921else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000922 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000923fi
924done
925# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
926if test $ac_header_dirent = dirent.h; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000927echo $ac_n "checking for -ldir""... $ac_c" 1>&6
928if eval "test \"`echo '$''{'ac_cv_lib_dir'+set}'`\" = set"; then
929 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000930else
931 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000932LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000933cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +0000934#line 935 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000935#include "confdefs.h"
936
937int main() { return 0; }
938int t() {
939opendir()
940; return 0; }
941EOF
942if eval $ac_link; then
943 rm -rf conftest*
944 eval "ac_cv_lib_dir=yes"
945else
946 rm -rf conftest*
947 eval "ac_cv_lib_dir=no"
948fi
949rm -f conftest*
950LIBS="$ac_save_LIBS"
951
952fi
953if eval "test \"`echo '$ac_cv_lib_'dir`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000954 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000955 LIBS="$LIBS -ldir"
956else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000957 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000958fi
959
960else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000961echo $ac_n "checking for -lx""... $ac_c" 1>&6
962if eval "test \"`echo '$''{'ac_cv_lib_x'+set}'`\" = set"; then
963 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000964else
965 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000966LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000967cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +0000968#line 969 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000969#include "confdefs.h"
970
971int main() { return 0; }
972int t() {
973opendir()
974; return 0; }
975EOF
976if eval $ac_link; then
977 rm -rf conftest*
978 eval "ac_cv_lib_x=yes"
979else
980 rm -rf conftest*
981 eval "ac_cv_lib_x=no"
982fi
983rm -f conftest*
984LIBS="$ac_save_LIBS"
985
986fi
987if eval "test \"`echo '$ac_cv_lib_'x`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000988 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000989 LIBS="$LIBS -lx"
990else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000991 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000992fi
993
994fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000995
996
997# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +0000998was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000999echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001000cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00001001#line 1002 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001002#include "confdefs.h"
1003#include <time.h>
1004EOF
1005if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1006 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00001007 rm -rf conftest*
1008 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001009else
1010 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001011 cat >> confdefs.h <<\EOF
1012#define clock_t long
1013EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001014
1015fi
1016rm -f conftest*
1017
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001018echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00001019
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001020echo $ac_n "checking for mode_t""... $ac_c" 1>&6
1021if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1022 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001023else
1024 cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00001025#line 1026 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001026#include "confdefs.h"
1027#include <sys/types.h>
1028#if STDC_HEADERS
1029#include <stdlib.h>
1030#endif
1031EOF
1032if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1033 egrep "mode_t" >/dev/null 2>&1; then
1034 rm -rf conftest*
1035 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001036else
1037 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001038 ac_cv_type_mode_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001039fi
1040rm -f conftest*
1041
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001042fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001043echo "$ac_t""$ac_cv_type_mode_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001044if test $ac_cv_type_mode_t = no; then
1045 cat >> confdefs.h <<\EOF
1046#define mode_t int
1047EOF
1048
1049fi
1050
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001051echo $ac_n "checking for off_t""... $ac_c" 1>&6
1052if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1053 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001054else
1055 cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00001056#line 1057 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001057#include "confdefs.h"
1058#include <sys/types.h>
1059#if STDC_HEADERS
1060#include <stdlib.h>
1061#endif
1062EOF
1063if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1064 egrep "off_t" >/dev/null 2>&1; then
1065 rm -rf conftest*
1066 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001067else
1068 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001069 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001070fi
1071rm -f conftest*
1072
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001073fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001074echo "$ac_t""$ac_cv_type_off_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001075if test $ac_cv_type_off_t = no; then
1076 cat >> confdefs.h <<\EOF
1077#define off_t long
1078EOF
1079
1080fi
1081
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001082echo $ac_n "checking for pid_t""... $ac_c" 1>&6
1083if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1084 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001085else
1086 cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00001087#line 1088 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001088#include "confdefs.h"
1089#include <sys/types.h>
1090#if STDC_HEADERS
1091#include <stdlib.h>
1092#endif
1093EOF
1094if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1095 egrep "pid_t" >/dev/null 2>&1; then
1096 rm -rf conftest*
1097 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001098else
1099 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001100 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001101fi
1102rm -f conftest*
1103
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001104fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001105echo "$ac_t""$ac_cv_type_pid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001106if test $ac_cv_type_pid_t = no; then
1107 cat >> confdefs.h <<\EOF
1108#define pid_t int
1109EOF
1110
1111fi
1112
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001113echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1114if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1115 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001116else
1117 cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00001118#line 1119 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001119#include "confdefs.h"
1120#include <sys/types.h>
1121#include <signal.h>
1122#ifdef signal
1123#undef signal
1124#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001125#ifdef __cplusplus
1126extern "C"
1127#endif
1128void (*signal ()) ();
Guido van Rossum7f43da71994-08-01 12:15:30 +00001129int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001130int t() {
1131int i;
1132; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001133EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001134if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001135 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001136 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00001137else
1138 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001139 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00001140fi
1141rm -f conftest*
1142
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001143fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001144echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001145cat >> confdefs.h <<EOF
1146#define RETSIGTYPE $ac_cv_type_signal
1147EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001148
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001149
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001150echo $ac_n "checking for size_t""... $ac_c" 1>&6
1151if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1152 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001153else
1154 cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00001155#line 1156 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001156#include "confdefs.h"
1157#include <sys/types.h>
1158#if STDC_HEADERS
1159#include <stdlib.h>
1160#endif
1161EOF
1162if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1163 egrep "size_t" >/dev/null 2>&1; then
1164 rm -rf conftest*
1165 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001166else
1167 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001168 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001169fi
1170rm -f conftest*
1171
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001172fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001173echo "$ac_t""$ac_cv_type_size_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001174if test $ac_cv_type_size_t = no; then
1175 cat >> confdefs.h <<\EOF
1176#define size_t unsigned
1177EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001178
1179fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001180
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001181echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
1182if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
1183 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001184else
1185 cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00001186#line 1187 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001187#include "confdefs.h"
1188#include <sys/types.h>
1189EOF
1190if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1191 egrep "uid_t" >/dev/null 2>&1; then
1192 rm -rf conftest*
1193 ac_cv_type_uid_t=yes
1194else
1195 rm -rf conftest*
1196 ac_cv_type_uid_t=no
1197fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001198rm -f conftest*
1199
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001200fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001201echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001202if test $ac_cv_type_uid_t = no; then
1203 cat >> confdefs.h <<\EOF
1204#define uid_t int
1205EOF
1206
1207 cat >> confdefs.h <<\EOF
1208#define gid_t int
1209EOF
1210
1211fi
1212
Guido van Rossum627b2d71993-12-24 10:39:16 +00001213
Guido van Rossum0a516c91994-09-12 10:58:40 +00001214# Set name for machine-dependent library files
1215
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001216echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001217if test -z "$MACHDEP"
1218then
Guido van Rossum2242fd11995-09-19 16:19:29 +00001219 ac_sys_system=`uname -s | tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1220 ac_sys_release=`uname -r | tr -d '/ ' | sed 's/\..*//'`
Guido van Rossume77438c1995-09-13 18:59:59 +00001221 ac_sys_cpu=`(uname -p 2>/dev/null || uname -m) |
Guido van Rossum2242fd11995-09-19 16:19:29 +00001222 tr '[A-Z]' '[a-z]'`
Guido van Rossume77438c1995-09-13 18:59:59 +00001223## MACHDEP="$ac_sys_system$ac_sys_release$ac_sys_cpu"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001224 MACHDEP="$ac_sys_system$ac_sys_release"
Guido van Rossum0a516c91994-09-12 10:58:40 +00001225 case MACHDEP in
1226 '') MACHDEP=unknown;;
1227 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001228fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001229echo "$ac_t""$MACHDEP" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001230
1231# Set info about shared libraries.
1232# XXX This should try things out instead of testing uname!
1233
1234
1235
1236
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001237ac_sys_system=`uname -s`
1238ac_sys_release=`uname -r`
Guido van Rossum0a516c91994-09-12 10:58:40 +00001239# SO is the extension of shared libraries `(including the dot!)
1240# -- usually .so, .sl on HP-UX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001241echo $ac_n "checking SO""... $ac_c" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001242if test -z "$SO"
1243then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001244 case $ac_sys_system in
Guido van Rossum0a516c91994-09-12 10:58:40 +00001245 hp*|HP*) SO=.sl;;
1246 *) SO=.so;;
1247 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001248fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001249echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001250# LDSHARED is the ld *command* used to create shared library
1251# -- "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 +00001252echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001253if test -z "$LDSHARED"
1254then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001255 case $ac_sys_system/$ac_sys_release in
Guido van Rossum0a516c91994-09-12 10:58:40 +00001256 IRIX*) LDSHARED="ld -shared";;
1257 SunOS/4*) LDSHARED="ld";;
1258 SunOS/5*) LDSHARED="ld -G";;
1259 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00001260 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
1261 DYNIX/ptx*) LDSHARED="ld -G";;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001262 Linux*) LDSHARED="gcc-elf -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001263 *) LDSHARED="ld";;
1264 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001265fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001266echo "$ac_t""$LDSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001267# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001268# library -- this is only needed for a few systems
1269echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001270if test -z "$CCSHARED"
1271then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001272 case $ac_sys_system in
Guido van Rossumaf07a441995-02-13 19:45:27 +00001273 hp*|HP*) if test "$GCC" = yes;
1274 then CCSHARED="-fpic";
1275 else CCSHARED="+z";
1276 fi;;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001277 Linux*) CCSHARED="-fpic";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001278 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001279fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001280echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001281# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001282# the python executable -- this is only needed for a few systems
1283echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001284if test -z "$LINKFORSHARED"
1285then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001286 case $ac_sys_system in
Guido van Rossum0a516c91994-09-12 10:58:40 +00001287 hp*|HP*) LINKFORSHARED="-Wl,-E";;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001288 Linux*) LINKFORSHARED="-rdynamic";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001289 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001290fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001291echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001292
Guido van Rossum627b2d71993-12-24 10:39:16 +00001293# checks for libraries
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001294echo $ac_n "checking for -ldl""... $ac_c" 1>&6
1295if eval "test \"`echo '$''{'ac_cv_lib_dl'+set}'`\" = set"; then
1296 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001297else
1298 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001299LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001300cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00001301#line 1302 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001302#include "confdefs.h"
1303
Guido van Rossum7f43da71994-08-01 12:15:30 +00001304int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001305int t() {
1306dlopen()
1307; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001308EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001309if eval $ac_link; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001310 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001311 eval "ac_cv_lib_dl=yes"
1312else
1313 rm -rf conftest*
1314 eval "ac_cv_lib_dl=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001315fi
1316rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001317LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001318
Guido van Rossum627b2d71993-12-24 10:39:16 +00001319fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001320if eval "test \"`echo '$ac_cv_lib_'dl`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001321 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001322 ac_tr_lib=HAVE_LIB`echo dl | tr '[a-z]' '[A-Z]'`
1323 cat >> confdefs.h <<EOF
1324#define $ac_tr_lib 1
1325EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001326
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001327 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001328
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001329else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001330 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001331fi
1332 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001333echo $ac_n "checking for -ldld""... $ac_c" 1>&6
1334if eval "test \"`echo '$''{'ac_cv_lib_dld'+set}'`\" = set"; then
1335 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001336else
1337 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001338LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001339cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00001340#line 1341 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001341#include "confdefs.h"
1342
Guido van Rossum7f43da71994-08-01 12:15:30 +00001343int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001344int t() {
1345shl_load()
1346; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001347EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001348if eval $ac_link; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001349 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001350 eval "ac_cv_lib_dld=yes"
1351else
1352 rm -rf conftest*
1353 eval "ac_cv_lib_dld=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001354fi
1355rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001356LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001357
Guido van Rossum627b2d71993-12-24 10:39:16 +00001358fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001359if eval "test \"`echo '$ac_cv_lib_'dld`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001360 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001361 ac_tr_lib=HAVE_LIB`echo dld | tr '[a-z]' '[A-Z]'`
1362 cat >> confdefs.h <<EOF
1363#define $ac_tr_lib 1
1364EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001365
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001366 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001367
1368else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001369 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001370fi
1371 # Dynamic linking for HP-UX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001372echo $ac_n "checking for -lsun""... $ac_c" 1>&6
1373if eval "test \"`echo '$''{'ac_cv_lib_sun'+set}'`\" = set"; then
1374 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001375else
1376 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001377LIBS="-lsun $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001378cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00001379#line 1380 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001380#include "confdefs.h"
1381
1382int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001383int t() {
1384getpwnam()
1385; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001386EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001387if eval $ac_link; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001388 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001389 eval "ac_cv_lib_sun=yes"
1390else
1391 rm -rf conftest*
1392 eval "ac_cv_lib_sun=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001393fi
1394rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001395LIBS="$ac_save_LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001396
Guido van Rossum7f43da71994-08-01 12:15:30 +00001397fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001398if eval "test \"`echo '$ac_cv_lib_'sun`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001399 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001400 ac_tr_lib=HAVE_LIB`echo sun | tr '[a-z]' '[A-Z]'`
1401 cat >> confdefs.h <<EOF
1402#define $ac_tr_lib 1
1403EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001404
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001405 LIBS="-lsun $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001406
1407else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001408 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001409fi
1410 # NIS (== YP) interface for IRIX 4
Guido van Rossumda88dad1995-01-26 00:46:29 +00001411# The following three (nsl,inet,socket) are needed on Sequent;
1412# the order of checking must be this. Most SVR4 platforms will
1413# need -lsocket and -lnsl. However on SGI IRIX 5, these exist but
1414# broken. I see no elegant solution (probably CHECK_LIB should be
1415# fixed to only add the library if the given entry point is not
1416# satisfied without it).
1417if test "`uname -s`" != IRIX
1418then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001419echo $ac_n "checking for -lnsl""... $ac_c" 1>&6
1420if eval "test \"`echo '$''{'ac_cv_lib_nsl'+set}'`\" = set"; then
1421 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001422else
1423 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001424LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001425cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00001426#line 1427 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001427#include "confdefs.h"
1428
1429int main() { return 0; }
1430int t() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00001431t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001432; return 0; }
1433EOF
1434if eval $ac_link; then
1435 rm -rf conftest*
1436 eval "ac_cv_lib_nsl=yes"
1437else
1438 rm -rf conftest*
1439 eval "ac_cv_lib_nsl=no"
1440fi
1441rm -f conftest*
1442LIBS="$ac_save_LIBS"
1443
1444fi
1445if eval "test \"`echo '$ac_cv_lib_'nsl`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001446 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001447 LIBS="-lnsl $LIBS"
1448else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001449 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001450fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00001451 # SVR4
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001452echo $ac_n "checking for -linet""... $ac_c" 1>&6
1453if eval "test \"`echo '$''{'ac_cv_lib_inet'+set}'`\" = set"; then
1454 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001455else
1456 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001457LIBS="-linet -lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001458cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00001459#line 1460 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001460#include "confdefs.h"
1461
1462int main() { return 0; }
1463int t() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00001464gethostbyname()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001465; return 0; }
1466EOF
1467if eval $ac_link; then
1468 rm -rf conftest*
1469 eval "ac_cv_lib_inet=yes"
1470else
1471 rm -rf conftest*
1472 eval "ac_cv_lib_inet=no"
1473fi
1474rm -f conftest*
1475LIBS="$ac_save_LIBS"
1476
1477fi
1478if eval "test \"`echo '$ac_cv_lib_'inet`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001479 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001480 LIBS="-linet $LIBS"
1481else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001482 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001483fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00001484 # Sequent
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001485echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
1486if eval "test \"`echo '$''{'ac_cv_lib_socket'+set}'`\" = set"; then
1487 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001488else
1489 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001490LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001491cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00001492#line 1493 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001493#include "confdefs.h"
1494
1495int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001496int t() {
1497socket()
1498; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001499EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001500if eval $ac_link; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001501 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001502 eval "ac_cv_lib_socket=yes"
1503else
1504 rm -rf conftest*
1505 eval "ac_cv_lib_socket=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001506fi
1507rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001508LIBS="$ac_save_LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001509
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001510fi
1511if eval "test \"`echo '$ac_cv_lib_'socket`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001512 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001513 LIBS="-lsocket $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001514else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001515 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00001516fi
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001517 # SVR4 sockets
Guido van Rossumda88dad1995-01-26 00:46:29 +00001518fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001519
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001520echo $ac_n "checking for --with-readline""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001521# Check whether --with-readline or --without-readline was given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00001522withval="$with_readline"
1523if test -n "$withval"; then
1524
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001525echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001526cat >> confdefs.h <<\EOF
1527#define WITH_READLINE 1
1528EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001529
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001530if test ! -d "$withval"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001531then { echo "configure: error: proper usage is --with-readline=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001532fi
1533termcap=
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001534echo $ac_n "checking for -ltermcap""... $ac_c" 1>&6
1535if eval "test \"`echo '$''{'ac_cv_lib_termcap'+set}'`\" = set"; then
1536 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001537else
1538 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001539LIBS="-ltermcap $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001540cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00001541#line 1542 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001542#include "confdefs.h"
1543
Guido van Rossum7f43da71994-08-01 12:15:30 +00001544int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001545int t() {
1546tgetent()
1547; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001548EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001549if eval $ac_link; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001550 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001551 eval "ac_cv_lib_termcap=yes"
1552else
1553 rm -rf conftest*
1554 eval "ac_cv_lib_termcap=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001555fi
1556rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001557LIBS="$ac_save_LIBS"
1558
1559fi
1560if eval "test \"`echo '$ac_cv_lib_'termcap`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001561 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001562 termcap=termcap
Guido van Rossum7f43da71994-08-01 12:15:30 +00001563else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001564 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001565
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001566echo $ac_n "checking for -ltermlib""... $ac_c" 1>&6
1567if eval "test \"`echo '$''{'ac_cv_lib_termlib'+set}'`\" = set"; then
1568 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001569else
1570 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001571LIBS="-ltermlib $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001572cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00001573#line 1574 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001574#include "confdefs.h"
1575
1576int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001577int t() {
1578tgetent()
1579; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001580EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001581if eval $ac_link; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001582 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001583 eval "ac_cv_lib_termlib=yes"
1584else
1585 rm -rf conftest*
1586 eval "ac_cv_lib_termlib=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001587fi
1588rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001589LIBS="$ac_save_LIBS"
1590
1591fi
1592if eval "test \"`echo '$ac_cv_lib_'termlib`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001593 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001594 termcap=termlib
Guido van Rossum7f43da71994-08-01 12:15:30 +00001595else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001596 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00001597fi
1598
1599fi
1600
1601if test ! -z "$termcap"
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001602then LIBS="$LIBS $withval/libreadline.a"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001603 # Avoid possible conflict between shared libraries termcap and gl
1604 # on IRIX 5: both contain a routine called clear.
1605 if test -f /usr/lib/lib$termcap.a
1606 then LIBS="$LIBS /usr/lib/lib$termcap.a"
1607 else LIBS="$LIBS -l$termcap"
1608 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001609else { echo "configure: error: no working termcap/termlib" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001610fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00001611else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001612 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00001613fi
1614
1615
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001616echo $ac_n "checking for --with-thread""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001617# Check whether --with-thread or --without-thread was given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00001618withval="$with_thread"
1619if test -n "$withval"; then
1620
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001621echo "$ac_t""$withval" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00001622if test -d "$withval"
1623then LIBS="$LIBS -L$withval"
1624fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001625echo $ac_n "checking for -lpthreads""... $ac_c" 1>&6
1626if eval "test \"`echo '$''{'ac_cv_lib_pthreads'+set}'`\" = set"; then
1627 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001628else
1629 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001630LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001631cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00001632#line 1633 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001633#include "confdefs.h"
1634
1635int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001636int t() {
1637pthread_create()
1638; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001639EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001640if eval $ac_link; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001641 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001642 eval "ac_cv_lib_pthreads=yes"
1643else
1644 rm -rf conftest*
1645 eval "ac_cv_lib_pthreads=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001646fi
1647rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001648LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001649
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001650fi
1651if eval "test \"`echo '$ac_cv_lib_'pthreads`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001652 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001653 cat >> confdefs.h <<\EOF
1654#define WITH_THREAD 1
1655EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001656
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001657cat >> confdefs.h <<\EOF
1658#define _POSIX_THREADS 1
1659EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001660
1661LIBS="$LIBS -lpthreads"
1662LIBOBJS="$LIBOBJS thread.o"
1663else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001664 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001665fi
1666
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001667echo $ac_n "checking for -lmpc""... $ac_c" 1>&6
1668if eval "test \"`echo '$''{'ac_cv_lib_mpc'+set}'`\" = set"; then
1669 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001670else
1671 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001672LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001673cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00001674#line 1675 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001675#include "confdefs.h"
1676
Guido van Rossum7f43da71994-08-01 12:15:30 +00001677int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001678int t() {
1679usconfig()
1680; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001681EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001682if eval $ac_link; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001683 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001684 eval "ac_cv_lib_mpc=yes"
1685else
1686 rm -rf conftest*
1687 eval "ac_cv_lib_mpc=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001688fi
1689rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001690LIBS="$ac_save_LIBS"
1691
1692fi
1693if eval "test \"`echo '$ac_cv_lib_'mpc`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001694 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001695 cat >> confdefs.h <<\EOF
1696#define WITH_THREAD 1
1697EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001698
Guido van Rossum7f43da71994-08-01 12:15:30 +00001699LIBS="$LIBS -lmpc"
1700LIBOBJS="$LIBOBJS thread.o"
1701else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001702 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001703fi
1704
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001705echo $ac_n "checking for -lthread""... $ac_c" 1>&6
1706if eval "test \"`echo '$''{'ac_cv_lib_thread'+set}'`\" = set"; then
1707 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001708else
1709 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001710LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001711cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00001712#line 1713 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001713#include "confdefs.h"
1714
Guido van Rossum7f43da71994-08-01 12:15:30 +00001715int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001716int t() {
1717thr_create()
1718; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001719EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001720if eval $ac_link; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001721 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001722 eval "ac_cv_lib_thread=yes"
1723else
1724 rm -rf conftest*
1725 eval "ac_cv_lib_thread=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001726fi
1727rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001728LIBS="$ac_save_LIBS"
1729
1730fi
1731if eval "test \"`echo '$ac_cv_lib_'thread`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001732 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001733 cat >> confdefs.h <<\EOF
1734#define WITH_THREAD 1
1735EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001736
Guido van Rossum7f43da71994-08-01 12:15:30 +00001737LIBS="$LIBS -lthread"
1738LIBOBJS="$LIBOBJS thread.o"
1739else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001740 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001741fi
1742
Guido van Rossum7f43da71994-08-01 12:15:30 +00001743
Guido van Rossumda88dad1995-01-26 00:46:29 +00001744else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001745 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001746fi
1747
Guido van Rossum7f43da71994-08-01 12:15:30 +00001748
1749# -I${DLINCLDIR} is added to the compile rule for import.o
1750
1751DLINCLDIR=/
1752
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001753echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001754# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00001755withval="$with_sgi_dl"
1756if test -n "$withval"; then
1757
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001758echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001759cat >> confdefs.h <<\EOF
1760#define WITH_SGI_DL 1
1761EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001762
1763dldir=$withval
1764if test -d "$dldir"
1765then LIBS="$LIBS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001766else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001767fi
1768DLINCLDIR=${dldir}
1769LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00001770else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001771 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00001772fi
1773
1774
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001775echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001776# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00001777withval="$with_dl_dld"
1778if test -n "$withval"; then
1779
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001780echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001781cat >> confdefs.h <<\EOF
1782#define WITH_DL_DLD 1
1783EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001784
1785dldir=`echo "$withval" | sed 's/,.*//'`
1786dlddir=`echo "$withval" | sed 's/.*,//'`
1787if test -d "$dldir" -a -d "$dlddir"
1788then LIBS="$LIBS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001789else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001790fi
1791DLINCLDIR=${dldir}
1792LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00001793else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001794 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00001795fi
1796
1797
Guido van Rossum627b2d71993-12-24 10:39:16 +00001798# checks for library functions
Guido van Rossume77438c1995-09-13 18:59:59 +00001799for ac_func in chown clock dlopen ftime ftruncate gethostname_r gettimeofday getpeername getpgrp getpid getwd link lstat nice readlink select setgid setuid setsid setpgid setpgrp setvbuf siginterrupt strftime symlink tcgetpgrp tcsetpgrp times truncate uname waitpid
Guido van Rossum627b2d71993-12-24 10:39:16 +00001800do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001801echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1802if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1803 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001804else
1805 cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00001806#line 1807 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001807#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001808/* System header to define __stub macros and hopefully few prototypes,
1809 which can conflict with char $ac_func(); below. */
1810#include <assert.h>
1811/* Override any gcc2 internal prototype to avoid an error. */
1812char $ac_func();
1813
Guido van Rossum7f43da71994-08-01 12:15:30 +00001814int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001815int t() {
1816
Guido van Rossum627b2d71993-12-24 10:39:16 +00001817/* The GNU C library defines this for functions which it implements
1818 to always fail with ENOSYS. Some functions are actually named
1819 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001820#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00001821choke me
1822#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001823$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00001824#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001825
Guido van Rossum7f43da71994-08-01 12:15:30 +00001826; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001827EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001828if eval $ac_link; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001829 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001830 eval "ac_cv_func_$ac_func=yes"
1831else
1832 rm -rf conftest*
1833 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001834fi
1835rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001836
1837fi
1838if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001839 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001840 ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
1841 cat >> confdefs.h <<EOF
1842#define $ac_tr_func 1
1843EOF
1844
1845else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001846 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001847fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001848done
1849
Guido van Rossum7f43da71994-08-01 12:15:30 +00001850for ac_func in dup2 getcwd strerror memmove
Guido van Rossum627b2d71993-12-24 10:39:16 +00001851do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001852echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1853if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1854 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001855else
1856 cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00001857#line 1858 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001858#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001859/* System header to define __stub macros and hopefully few prototypes,
1860 which can conflict with char $ac_func(); below. */
1861#include <assert.h>
1862/* Override any gcc2 internal prototype to avoid an error. */
1863char $ac_func();
1864
Guido van Rossum7f43da71994-08-01 12:15:30 +00001865int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001866int t() {
1867
Guido van Rossum627b2d71993-12-24 10:39:16 +00001868/* The GNU C library defines this for functions which it implements
1869 to always fail with ENOSYS. Some functions are actually named
1870 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001871#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00001872choke me
1873#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001874$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00001875#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001876
Guido van Rossum7f43da71994-08-01 12:15:30 +00001877; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001878EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001879if eval $ac_link; then
1880 rm -rf conftest*
1881 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001882else
1883 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001884 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001885fi
1886rm -f conftest*
1887
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001888fi
1889if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001890 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001891 :
1892else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001893 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001894LIBOBJS="$LIBOBJS ${ac_func}.o"
1895fi
1896
Guido van Rossum627b2d71993-12-24 10:39:16 +00001897done
1898
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001899echo $ac_n "checking for getpgrp""... $ac_c" 1>&6
1900if eval "test \"`echo '$''{'ac_cv_func_getpgrp'+set}'`\" = set"; then
1901 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001902else
1903 cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00001904#line 1905 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001905#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001906/* System header to define __stub macros and hopefully few prototypes,
1907 which can conflict with char getpgrp(); below. */
1908#include <assert.h>
1909/* Override any gcc2 internal prototype to avoid an error. */
1910char getpgrp();
1911
Guido van Rossum7f43da71994-08-01 12:15:30 +00001912int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001913int t() {
1914
Guido van Rossum627b2d71993-12-24 10:39:16 +00001915/* The GNU C library defines this for functions which it implements
1916 to always fail with ENOSYS. Some functions are actually named
1917 something starting with __ and the normal name is an alias. */
1918#if defined (__stub_getpgrp) || defined (__stub___getpgrp)
1919choke me
1920#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001921getpgrp();
Guido van Rossum627b2d71993-12-24 10:39:16 +00001922#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001923
1924; return 0; }
1925EOF
1926if eval $ac_link; then
1927 rm -rf conftest*
1928 eval "ac_cv_func_getpgrp=yes"
1929else
1930 rm -rf conftest*
1931 eval "ac_cv_func_getpgrp=no"
1932fi
1933rm -f conftest*
1934
1935fi
1936if eval "test \"`echo '$ac_cv_func_'getpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001937 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001938 cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00001939#line 1940 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001940#include "confdefs.h"
1941#include <unistd.h>
1942int main() { return 0; }
1943int t() {
1944getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00001945; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001946EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001947if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001948 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001949 cat >> confdefs.h <<\EOF
1950#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00001951EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001952
1953fi
1954rm -f conftest*
1955
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001956else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001957 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001958fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001959
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001960echo $ac_n "checking for setpgrp""... $ac_c" 1>&6
1961if eval "test \"`echo '$''{'ac_cv_func_setpgrp'+set}'`\" = set"; then
1962 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001963else
1964 cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00001965#line 1966 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00001966#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001967/* System header to define __stub macros and hopefully few prototypes,
1968 which can conflict with char setpgrp(); below. */
1969#include <assert.h>
1970/* Override any gcc2 internal prototype to avoid an error. */
1971char setpgrp();
1972
Guido van Rossum8eee56f1994-10-20 22:18:37 +00001973int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001974int t() {
1975
Guido van Rossum8eee56f1994-10-20 22:18:37 +00001976/* The GNU C library defines this for functions which it implements
1977 to always fail with ENOSYS. Some functions are actually named
1978 something starting with __ and the normal name is an alias. */
1979#if defined (__stub_setpgrp) || defined (__stub___setpgrp)
1980choke me
1981#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001982setpgrp();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00001983#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001984
1985; return 0; }
1986EOF
1987if eval $ac_link; then
1988 rm -rf conftest*
1989 eval "ac_cv_func_setpgrp=yes"
1990else
1991 rm -rf conftest*
1992 eval "ac_cv_func_setpgrp=no"
1993fi
1994rm -f conftest*
1995
1996fi
1997if eval "test \"`echo '$ac_cv_func_'setpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001998 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001999 cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00002000#line 2001 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002001#include "confdefs.h"
2002#include <unistd.h>
2003int main() { return 0; }
2004int t() {
2005setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002006; return 0; }
2007EOF
2008if eval $ac_compile; then
2009 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002010 cat >> confdefs.h <<\EOF
2011#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002012EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002013
2014fi
2015rm -f conftest*
2016
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002017else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002018 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002019fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002020
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002021echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
2022if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
2023 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002024else
2025 cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00002026#line 2027 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002027#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002028/* System header to define __stub macros and hopefully few prototypes,
2029 which can conflict with char gettimeofday(); below. */
2030#include <assert.h>
2031/* Override any gcc2 internal prototype to avoid an error. */
2032char gettimeofday();
2033
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002034int main() { return 0; }
2035int t() {
2036
2037/* The GNU C library defines this for functions which it implements
2038 to always fail with ENOSYS. Some functions are actually named
2039 something starting with __ and the normal name is an alias. */
2040#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
2041choke me
2042#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002043gettimeofday();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002044#endif
2045
2046; return 0; }
2047EOF
2048if eval $ac_link; then
2049 rm -rf conftest*
2050 eval "ac_cv_func_gettimeofday=yes"
2051else
2052 rm -rf conftest*
2053 eval "ac_cv_func_gettimeofday=no"
2054fi
2055rm -f conftest*
2056
2057fi
2058if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002059 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002060 cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00002061#line 2062 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002062#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002063#include <sys/time.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00002064int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002065int t() {
2066gettimeofday((struct timeval*)0,(struct timezone*)0);
2067; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002068EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002069if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002070 :
2071else
2072 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002073 cat >> confdefs.h <<\EOF
2074#define GETTIMEOFDAY_NO_TZ 1
2075EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002076
2077fi
2078rm -f conftest*
2079
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002080else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002081 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002082fi
2083
2084
2085# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002086echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2087if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2088 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002089else
2090 cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00002091#line 2092 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002092#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002093#include <sys/types.h>
2094#include <sys/time.h>
2095#include <time.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00002096int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002097int t() {
2098struct tm *tp;
2099; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002100EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002101if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002102 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002103 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002104else
2105 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002106 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002107fi
2108rm -f conftest*
2109
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002110fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002111echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002112if test $ac_cv_header_time = yes; then
2113 cat >> confdefs.h <<\EOF
2114#define TIME_WITH_SYS_TIME 1
2115EOF
2116
2117fi
2118
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002119echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
2120if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
2121 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002122else
2123 cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00002124#line 2125 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002125#include "confdefs.h"
2126#include <sys/types.h>
2127#include <time.h>
2128int main() { return 0; }
2129int t() {
2130struct tm *tp; tp->tm_sec;
2131; return 0; }
2132EOF
2133if eval $ac_compile; then
2134 rm -rf conftest*
2135 ac_cv_struct_tm=time.h
2136else
2137 rm -rf conftest*
2138 ac_cv_struct_tm=sys/time.h
2139fi
2140rm -f conftest*
2141
2142fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002143echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002144if test $ac_cv_struct_tm = sys/time.h; then
2145 cat >> confdefs.h <<\EOF
2146#define TM_IN_SYS_TIME 1
2147EOF
2148
2149fi
2150
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002151echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
2152if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
2153 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002154else
2155 cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00002156#line 2157 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002157#include "confdefs.h"
2158#include <sys/types.h>
2159#include <$ac_cv_struct_tm>
2160int main() { return 0; }
2161int t() {
2162struct tm tm; tm.tm_zone;
2163; return 0; }
2164EOF
2165if eval $ac_compile; then
2166 rm -rf conftest*
2167 ac_cv_struct_tm_zone=yes
2168else
2169 rm -rf conftest*
2170 ac_cv_struct_tm_zone=no
2171fi
2172rm -f conftest*
2173
2174fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002175echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002176if test "$ac_cv_struct_tm_zone" = yes; then
2177 cat >> confdefs.h <<\EOF
2178#define HAVE_TM_ZONE 1
2179EOF
2180
2181else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002182 echo $ac_n "checking for tzname""... $ac_c" 1>&6
2183if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
2184 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002185else
2186 cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00002187#line 2188 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002188#include "confdefs.h"
2189#include <time.h>
2190#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002191extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00002192#endif
Guido van Rossum7f43da71994-08-01 12:15:30 +00002193int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002194int t() {
2195atoi(*tzname);
2196; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002197EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002198if eval $ac_link; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002199 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002200 ac_cv_var_tzname=yes
2201else
2202 rm -rf conftest*
2203 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002204fi
2205rm -f conftest*
2206
2207fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002208 echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002209 if test $ac_cv_var_tzname = yes; then
2210 cat >> confdefs.h <<\EOF
2211#define HAVE_TZNAME 1
2212EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002213
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002214 fi
2215fi
2216
2217
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002218echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
2219if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
2220 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002221else
2222 cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00002223#line 2224 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002224#include "confdefs.h"
2225#include <time.h>
2226int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002227int t() {
2228return altzone;
2229; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002230EOF
2231if eval $ac_compile; then
2232 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002233 ac_cv_header_time_altzone=yes
2234else
2235 rm -rf conftest*
2236 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00002237fi
2238rm -f conftest*
2239
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002240fi
2241
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002242echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002243if test $ac_cv_header_time_altzone = yes; then
2244 cat >> confdefs.h <<\EOF
2245#define HAVE_ALTZONE 1
2246EOF
2247
2248fi
2249
Guido van Rossumda88dad1995-01-26 00:46:29 +00002250was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002251echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002252cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00002253#line 2254 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002254#include "confdefs.h"
2255
2256#include <sys/types.h>
2257#include <sys/select.h>
2258#include <sys/time.h>
2259
2260int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002261int t() {
2262;
2263; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002264EOF
2265if eval $ac_compile; then
2266 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002267 cat >> confdefs.h <<\EOF
2268#define SYS_SELECT_WITH_SYS_TIME 1
2269EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00002270 was_it_defined=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00002271fi
2272rm -f conftest*
2273
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002274echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002275
2276# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00002277
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002278echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
2279if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
2280 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002281else
2282 if test "$GCC" = yes; then
2283 # GCC predefines this symbol on systems where it applies.
2284cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00002285#line 2286 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002286#include "confdefs.h"
2287#ifdef __CHAR_UNSIGNED__
2288 yes
2289#endif
2290
2291EOF
2292if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2293 egrep "yes" >/dev/null 2>&1; then
2294 rm -rf conftest*
2295 ac_cv_c_char_unsigned=yes
2296else
2297 rm -rf conftest*
2298 ac_cv_c_char_unsigned=no
2299fi
2300rm -f conftest*
2301
2302else
2303if test "$cross_compiling" = yes; then
2304 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2305else
2306cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00002307#line 2308 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002308#include "confdefs.h"
2309/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002310#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00002311#define volatile
2312#endif
2313main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00002314 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00002315}
2316EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002317eval $ac_link
Guido van Rossum7f43da71994-08-01 12:15:30 +00002318if test -s conftest && (./conftest; exit) 2>/dev/null; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002319 ac_cv_c_char_unsigned=yes
2320else
2321 ac_cv_c_char_unsigned=no
2322fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00002323fi
2324rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002325fi
2326fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002327echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002328if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
2329 cat >> confdefs.h <<\EOF
2330#define __CHAR_UNSIGNED__ 1
2331EOF
2332
2333fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00002334
2335
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002336echo $ac_n "checking for working const""... $ac_c" 1>&6
2337if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2338 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002339else
2340 cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00002341#line 2342 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002342#include "confdefs.h"
2343
2344int main() { return 0; }
2345int t() {
2346
2347/* Ultrix mips cc rejects this. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00002348typedef int charset[2]; const charset x;
2349/* SunOS 4.1.1 cc rejects this. */
2350char const *const *ccp;
2351char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002352/* NEC SVR4.0.2 mips cc rejects this. */
2353struct point {int x, y;};
2354static struct point const zero;
Guido van Rossum627b2d71993-12-24 10:39:16 +00002355/* AIX XL C 1.02.0.0 rejects this.
2356 It does not let you subtract one const X* pointer from another in an arm
2357 of an if-expression whose if-part is not a constant expression */
2358const char *g = "string";
2359ccp = &g + (g ? g-g : 0);
2360/* HPUX 7.0 cc rejects these. */
2361++ccp;
2362p = (char**) ccp;
2363ccp = (char const *const *) p;
2364{ /* SCO 3.2v4 cc rejects this. */
2365 char *t;
2366 char const *s = 0 ? (char *) 0 : (char const *) 0;
2367
2368 *t++ = 0;
2369}
2370{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002371 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00002372 const int *foo = &x[0];
2373 ++foo;
2374}
2375{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2376 typedef const int *iptr;
2377 iptr p = 0;
2378 ++p;
2379}
2380{ /* AIX XL C 1.02.0.0 rejects this saying
2381 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2382 struct s { int j; const int *ap[3]; };
2383 struct s *b; b->j = 5;
2384}
2385{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2386 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002387}
2388
2389; return 0; }
2390EOF
2391if eval $ac_compile; then
2392 rm -rf conftest*
2393 ac_cv_c_const=yes
2394else
2395 rm -rf conftest*
2396 ac_cv_c_const=no
2397fi
2398rm -f conftest*
2399
2400fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002401echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002402if test $ac_cv_c_const = no; then
2403 cat >> confdefs.h <<\EOF
2404#define const
2405EOF
2406
2407fi
2408
2409
Guido van Rossumda88dad1995-01-26 00:46:29 +00002410works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002411echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002412cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00002413#line 2414 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002414#include "confdefs.h"
2415
Guido van Rossum7f43da71994-08-01 12:15:30 +00002416int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002417int t() {
2418volatile int x; x = 0;
2419; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002420EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002421if eval $ac_compile; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00002422 rm -rf conftest*
2423 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002424else
2425 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002426 cat >> confdefs.h <<\EOF
2427#define volatile
2428EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002429
2430fi
2431rm -f conftest*
2432
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002433echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002434
Guido van Rossumda88dad1995-01-26 00:46:29 +00002435works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002436echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002437cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00002438#line 2439 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00002439#include "confdefs.h"
2440
2441int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002442int t() {
2443signed char c;
2444; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00002445EOF
2446if eval $ac_compile; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00002447 rm -rf conftest*
2448 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00002449else
2450 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002451 cat >> confdefs.h <<\EOF
2452#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00002453EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002454
2455fi
2456rm -f conftest*
2457
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002458echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002459
Guido van Rossumda88dad1995-01-26 00:46:29 +00002460have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002461echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002462cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00002463#line 2464 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002464#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002465int foo(int x) { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002466int main() { return 0; }
2467int t() {
2468return foo(10);
2469; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002470EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002471if eval $ac_compile; then
2472 rm -rf conftest*
2473 cat >> confdefs.h <<\EOF
2474#define HAVE_PROTOTYPES 1
2475EOF
2476 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00002477fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002478rm -f conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00002479
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002480echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002481
Guido van Rossumda88dad1995-01-26 00:46:29 +00002482works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002483echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002484cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00002485#line 2486 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002486#include "confdefs.h"
2487
2488#include <stdarg.h>
2489int foo(int x, ...) { return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002490
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002491int main() { return 0; }
2492int t() {
2493return foo(10, 11, 12);
2494; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002495EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002496if eval $ac_compile; then
2497 rm -rf conftest*
2498 cat >> confdefs.h <<\EOF
2499#define HAVE_STDARG_PROTOTYPES 1
2500EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00002501 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002502fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002503rm -f conftest*
2504
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002505echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002506
Guido van Rossumda88dad1995-01-26 00:46:29 +00002507if test "$have_prototypes" = yes; then
2508bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002509echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002510cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00002511#line 2512 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002512#include "confdefs.h"
2513#include <unistd.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00002514int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002515int t() {
2516char **t;execve("@",t,t);
2517; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002518EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002519if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002520 :
2521else
2522 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002523 cat >> confdefs.h <<\EOF
2524#define BAD_EXEC_PROTOTYPES 1
2525EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00002526 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002527fi
2528rm -f conftest*
2529
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002530echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002531fi
2532
Guido van Rossumda88dad1995-01-26 00:46:29 +00002533bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002534echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002535if test "$cross_compiling" = yes; then
2536 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2537else
2538cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00002539#line 2540 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002540#include "confdefs.h"
2541
2542struct s { int a; int b; };
2543static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002544int foobar() {
2545 static int random;
2546 random = (int) &foo;
2547 return random;
2548}
Guido van Rossum7f43da71994-08-01 12:15:30 +00002549static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002550main() {
2551 exit(!((int)&foo == foobar()));
2552}
Guido van Rossum7f43da71994-08-01 12:15:30 +00002553
2554EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002555eval $ac_link
Guido van Rossum7f43da71994-08-01 12:15:30 +00002556if test -s conftest && (./conftest; exit) 2>/dev/null; then
2557 :
2558else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002559 cat >> confdefs.h <<\EOF
2560#define BAD_STATIC_FORWARD 1
2561EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00002562 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00002563fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002564fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00002565rm -fr conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002566echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002567
Guido van Rossumda88dad1995-01-26 00:46:29 +00002568va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002569echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002570cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00002571#line 2572 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002572#include "confdefs.h"
2573
2574#ifdef HAVE_STDARG_PROTOTYPES
2575#include <stdarg.h>
2576#else
2577#include <varargs.h>
2578#endif
2579
2580int main() { return 0; }
2581int t() {
2582va_list list1, list2; list1 = list2;
2583; return 0; }
2584EOF
2585if eval $ac_compile; then
2586 :
2587else
2588 rm -rf conftest*
2589 cat >> confdefs.h <<\EOF
2590#define VA_LIST_IS_ARRAY 1
2591EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00002592 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002593fi
2594rm -f conftest*
2595
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002596echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002597
Guido van Rossum627b2d71993-12-24 10:39:16 +00002598# checks for system services
2599# (none yet)
2600
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002601# Linux requires this for correct f.p. operations
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002602echo $ac_n "checking for -lieee""... $ac_c" 1>&6
2603if eval "test \"`echo '$''{'ac_cv_lib_ieee'+set}'`\" = set"; then
2604 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002605else
2606 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002607LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002608cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00002609#line 2610 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002610#include "confdefs.h"
2611
Guido van Rossum7f43da71994-08-01 12:15:30 +00002612int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002613int t() {
2614__fpu_control()
2615; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002616EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002617if eval $ac_link; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002618 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002619 eval "ac_cv_lib_ieee=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002620else
Guido van Rossum627b2d71993-12-24 10:39:16 +00002621 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002622 eval "ac_cv_lib_ieee=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002623fi
2624rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002625LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002626
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002627fi
2628if eval "test \"`echo '$ac_cv_lib_'ieee`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002629 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002630 ac_tr_lib=HAVE_LIB`echo ieee | tr '[a-z]' '[A-Z]'`
2631 cat >> confdefs.h <<EOF
2632#define $ac_tr_lib 1
2633EOF
2634
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002635 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002636
2637else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002638 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002639fi
2640
2641
Guido van Rossum7f43da71994-08-01 12:15:30 +00002642# check for --with-libm=...
2643
2644LIBM=-lm
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002645# Check whether --with-libm or --without-libm was given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00002646withval="$with_libm"
2647if test -n "$withval"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002648
2649if test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00002650then LIBM=$withval
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002651else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002652fi
2653fi
2654
2655
2656# check for --with-libc=...
2657
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002658# Check whether --with-libc or --without-libc was given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00002659withval="$with_libc"
2660if test -n "$withval"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002661
2662if test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00002663then LIBC=$withval
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002664else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002665fi
2666fi
2667
2668
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00002669# check for hypot() in math library
2670LIBS_SAVE=$LIBS
2671LIBS="$LIBS $LIBM"
2672for ac_func in hypot
2673do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002674echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2675if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2676 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00002677else
2678 cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00002679#line 2680 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00002680#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002681/* System header to define __stub macros and hopefully few prototypes,
2682 which can conflict with char $ac_func(); below. */
2683#include <assert.h>
2684/* Override any gcc2 internal prototype to avoid an error. */
2685char $ac_func();
2686
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00002687int main() { return 0; }
2688int t() {
2689
2690/* The GNU C library defines this for functions which it implements
2691 to always fail with ENOSYS. Some functions are actually named
2692 something starting with __ and the normal name is an alias. */
2693#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2694choke me
2695#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002696$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00002697#endif
2698
2699; return 0; }
2700EOF
2701if eval $ac_link; then
2702 rm -rf conftest*
2703 eval "ac_cv_func_$ac_func=yes"
2704else
2705 rm -rf conftest*
2706 eval "ac_cv_func_$ac_func=no"
2707fi
2708rm -f conftest*
2709
2710fi
2711if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002712 echo "$ac_t""yes" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00002713 ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
2714 cat >> confdefs.h <<EOF
2715#define $ac_tr_func 1
2716EOF
2717
2718else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002719 echo "$ac_t""no" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00002720fi
2721done
2722
2723LIBS=$LIBS_SAVE
2724
Guido van Rossumda88dad1995-01-26 00:46:29 +00002725# check for getopt
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002726echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6
2727if eval "test \"`echo '$''{'ac_cv_func_getopt'+set}'`\" = set"; then
2728 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00002729else
2730 if test "$cross_compiling" = yes; then
2731 ac_cv_func_getopt=no
2732else
2733cat > conftest.$ac_ext <<EOF
Guido van Rossume77438c1995-09-13 18:59:59 +00002734#line 2735 "configure"
Guido van Rossumda88dad1995-01-26 00:46:29 +00002735#include "confdefs.h"
2736#include <stdio.h>
2737extern int optind, opterr, getopt();
2738extern char* optarg;
2739int main() {
2740 char* av[] = { "testprog", "parameter", "-fFlag", NULL };
2741 opterr = 0;
2742 if (getopt(3, av, "f:") == 'f') { exit(1); }
2743 exit(0);
2744}
2745EOF
2746eval $ac_link
2747if test -s conftest && (./conftest; exit) 2>/dev/null; then
2748 ac_cv_func_getopt=yes
2749else
2750 ac_cv_func_getopt=no
2751fi
2752fi
2753rm -fr conftest*
2754fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002755echo "$ac_t""$ac_cv_func_getopt" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00002756test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o"
2757
Guido van Rossum627b2d71993-12-24 10:39:16 +00002758# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002759trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002760cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002761# This file is a shell script that caches the results of configure
2762# tests run on this system so they can be shared between configure
2763# scripts and configure runs. It is not useful on other systems.
2764# If it contains results you don't want to keep, you may remove or edit it.
2765#
2766# By default, configure uses ./config.cache as the cache file,
2767# creating it if it does not exist already. You can give configure
2768# the --cache-file=FILE option to use a different cache file; that is
2769# what configure does when it calls configure scripts in
2770# subdirectories, so they share the cache.
2771# Giving --cache-file=/dev/null disables caching, for debugging configure.
2772# config.status only pays attention to the cache file if you give it the
2773# --recheck option to rerun configure.
2774#
2775EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002776# Ultrix sh set writes to stderr and can't be redirected directly,
2777# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002778(set) 2>&1 |
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002779 sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
2780 >> confcache
2781if cmp -s $cache_file confcache; then
2782 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002783else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002784 if test -w $cache_file; then
2785 echo "updating cache $cache_file"
2786 cat confcache > $cache_file
2787 else
2788 echo "not updating unwritable cache $cache_file"
2789 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002790fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002791rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00002792
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002793trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002794
2795test "x$prefix" = xNONE && prefix=$ac_default_prefix
2796# Let make expand exec_prefix.
2797test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00002798
Guido van Rossum7f43da71994-08-01 12:15:30 +00002799# Any assignment to VPATH causes Sun make to only execute
2800# the first set of double-colon rules, so remove it if not needed.
2801# If there is a colon in the path, we need to keep it.
2802if test "x$srcdir" = x.; then
2803 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2804fi
2805
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002806trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00002807
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002808DEFS=-DHAVE_CONFIG_H
2809
2810# Without the "./", some shells look in PATH for config.status.
2811: ${CONFIG_STATUS=./config.status}
2812
2813echo creating $CONFIG_STATUS
2814rm -f $CONFIG_STATUS
2815cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002816#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002817# Generated automatically by configure.
2818# Run this file to recreate the current configuration.
2819# This directory was configured as follows,
2820# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2821#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002822# $0 $ac_configure_args
2823#
2824# Compiler output produced by configure, useful for debugging
2825# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00002826
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002827ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002828for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00002829do
Guido van Rossum7f43da71994-08-01 12:15:30 +00002830 case "\$ac_option" in
2831 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002832 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2833 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002834 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossume77438c1995-09-13 18:59:59 +00002835 echo "$CONFIG_STATUS generated by autoconf version 2.4"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002836 exit 0 ;;
2837 -help | --help | --hel | --he | --h)
2838 echo "\$ac_cs_usage"; exit 0 ;;
2839 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00002840 esac
2841done
2842
Guido van Rossum7f43da71994-08-01 12:15:30 +00002843ac_given_srcdir=$srcdir
Guido van Rossum627b2d71993-12-24 10:39:16 +00002844
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002845trap 'rm -fr `echo "Makefile Objects/Makefile Parser/Makefile Python/Makefile Modules/Makefile.pre config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum7f43da71994-08-01 12:15:30 +00002846
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002847# Protect against being on the right side of a sed subst in config.status.
2848sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g;
2849 s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002850$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00002851$extrasub
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002852s%@CFLAGS@%$CFLAGS%g
2853s%@CPPFLAGS@%$CPPFLAGS%g
2854s%@CXXFLAGS@%$CXXFLAGS%g
2855s%@DEFS@%$DEFS%g
2856s%@LDFLAGS@%$LDFLAGS%g
2857s%@LIBS@%$LIBS%g
2858s%@exec_prefix@%$exec_prefix%g
2859s%@prefix@%$prefix%g
2860s%@program_transform_name@%$program_transform_name%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00002861s%@CC@%$CC%g
2862s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00002863s%@AR@%$AR%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00002864s%@INSTALL@%$INSTALL%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00002865s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2866s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00002867s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00002868s%@CPP@%$CPP%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00002869s%@MACHDEP@%$MACHDEP%g
2870s%@SO@%$SO%g
2871s%@LDSHARED@%$LDSHARED%g
2872s%@CCSHARED@%$CCSHARED%g
2873s%@LINKFORSHARED@%$LINKFORSHARED%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00002874s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00002875s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00002876s%@LIBM@%$LIBM%g
2877s%@LIBC@%$LIBC%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002878
2879CEOF
2880EOF
2881cat >> $CONFIG_STATUS <<EOF
2882
2883CONFIG_FILES=\${CONFIG_FILES-"Makefile Objects/Makefile Parser/Makefile Python/Makefile Modules/Makefile.pre"}
2884EOF
2885cat >> $CONFIG_STATUS <<\EOF
2886for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2887 # Support "outfile[:infile]", defaulting infile="outfile.in".
2888 case "$ac_file" in
2889 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
2890 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2891 *) ac_file_in="${ac_file}.in" ;;
2892 esac
2893
2894 # Adjust relative srcdir, etc. for subdirectories.
2895
2896 # Remove last slash and all that follows it. Not all systems have dirname.
2897 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2898 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2899 # The file is in a subdirectory.
2900 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002901 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002902 # A "../" for each directory in $ac_dir_suffix.
2903 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2904 else
2905 ac_dir_suffix= ac_dots=
2906 fi
2907
2908 case "$ac_given_srcdir" in
2909 .) srcdir=.
2910 if test -z "$ac_dots"; then top_srcdir=.
2911 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2912 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2913 *) # Relative path.
2914 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2915 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2916 esac
2917
2918 echo creating "$ac_file"
2919 rm -f "$ac_file"
2920 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2921 case "$ac_file" in
2922 *Makefile*) ac_comsub="1i\\
2923# $configure_input" ;;
2924 *) ac_comsub= ;;
2925 esac
2926 sed -e "$ac_comsub
2927s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00002928s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00002929s%@top_srcdir@%$top_srcdir%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002930" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00002931fi; done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002932rm -f conftest.subs
Guido van Rossum627b2d71993-12-24 10:39:16 +00002933
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002934# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2935# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00002936#
2937# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002938ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2939ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00002940ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002941ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00002942# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002943ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2944ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00002945ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002946ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00002947# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002948ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2949ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00002950ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002951ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00002952
2953CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002954for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2955 # Support "outfile[:infile]", defaulting infile="outfile.in".
2956 case "$ac_file" in
2957 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
2958 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2959 *) ac_file_in="${ac_file}.in" ;;
2960 esac
2961
Guido van Rossum7f43da71994-08-01 12:15:30 +00002962 echo creating $ac_file
2963
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002964 rm -f conftest.frag conftest.in conftest.out
2965 cp $ac_given_srcdir/$ac_file_in conftest.in
2966
2967EOF
2968
2969# Transform confdefs.h into a sed script conftest.vals that substitutes
2970# the proper values into config.h.in to produce config.h. And first:
2971# Protect against being on the right side of a sed subst in config.status.
2972# Protect against being in an unquoted here document in config.status.
2973rm -f conftest.vals
2974cat > conftest.hdr <<\EOF
2975s/[\\&%]/\\&/g
2976s%[\\$`]%\\&%g
2977s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2978s%ac_d%ac_u%gp
2979s%ac_u%ac_e%gp
2980EOF
2981sed -n -f conftest.hdr confdefs.h > conftest.vals
2982rm -f conftest.hdr
2983
2984# This sed command replaces #undef with comments. This is necessary, for
2985# example, in the case of _POSIX_SOURCE, which is predefined and required
2986# on some systems where configure will not decide to define it.
2987cat >> conftest.vals <<\EOF
2988s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2989EOF
2990
2991# Break up conftest.vals because some shells have a limit on
2992# the size of here documents, and old seds have small limits too.
2993# Maximum number of lines to put in a single here document.
2994ac_max_here_lines=12
2995
2996rm -f conftest.tail
2997while :
2998do
2999 ac_lines=`grep -c . conftest.vals`
3000 # grep -c gives empty output for an empty file on some AIX systems.
3001 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3002 # Write a limited-size here document to conftest.frag.
3003 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3004 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3005 echo 'CEOF
3006 sed -f conftest.frag conftest.in > conftest.out
3007 rm -f conftest.in
3008 mv conftest.out conftest.in
3009' >> $CONFIG_STATUS
3010 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3011 rm -f conftest.vals
3012 mv conftest.tail conftest.vals
3013done
3014rm -f conftest.vals
3015
3016cat >> $CONFIG_STATUS <<\EOF
3017 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00003018 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003019 cat conftest.in >> conftest.h
3020 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00003021 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00003022 echo "$ac_file is unchanged"
3023 rm -f conftest.h
3024 else
3025 rm -f $ac_file
3026 mv conftest.h $ac_file
3027 fi
3028fi; done
3029
3030
Guido van Rossum627b2d71993-12-24 10:39:16 +00003031
3032exit 0
3033EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003034chmod +x $CONFIG_STATUS
3035rm -fr confdefs* $ac_clean_files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003036test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00003037