blob: 8a23f08c16cb6c7212134670e085a26c9dc123f4 [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 Rossum8ddd0ad1995-06-14 23:10:28 +00003# From configure.in Revision: 1.21
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 Rossum8ddd0ad1995-06-14 23:10:28 +00006# Generated automatically using autoconf version 2.3
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 Rossum8ddd0ad1995-06-14 23:10:28 +0000235 echo "configure generated by autoconf version 2.3"
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
434 without_gcc=no
Guido van Rossum7f43da71994-08-01 12:15:30 +0000435fi
436
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000437echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000438
Guido van Rossum8b131c51995-03-09 14:10:13 +0000439# If the user switches compilers, we can't believe the cache
440if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
441then
442 { echo "configure: error: cached CC is different -- throw away $cache_file
443(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
444fi
445
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000446# Extract the first word of "gcc", so it can be a program name with args.
447set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000448echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
449if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
450 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000451else
452 if test -n "$CC"; then
453 ac_cv_prog_CC="$CC" # Let the user override the test.
454else
Guido van Rossum7f43da71994-08-01 12:15:30 +0000455 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
456 for ac_dir in $PATH; do
457 test -z "$ac_dir" && ac_dir=.
458 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000459 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000460 break
461 fi
462 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000463 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000464 test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000465fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000466fi
467CC="$ac_cv_prog_CC"
468if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000469 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000470else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000471 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000472fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000473
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000474
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000475echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
476if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
477 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000478else
479 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000480#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000481 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +0000482#endif
483EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000484if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
485 ac_cv_prog_gcc=yes
486else
487 ac_cv_prog_gcc=no
488fi
489fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000490echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000491if test $ac_cv_prog_gcc = yes; then
492 GCC=yes
493 if test "${CFLAGS+set}" != set; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000494 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
495if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
496 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000497else
498 echo 'void f(){}' > conftest.c
499if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
500 ac_cv_prog_gcc_g=yes
501else
502 ac_cv_prog_gcc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000503fi
504rm -f conftest*
505
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000506fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000507 echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000508 if test $ac_cv_prog_gcc_g = yes; then
509 CFLAGS="-g -O"
510 else
511 CFLAGS="-O"
512 fi
513 fi
514else
515 GCC=
516 test "${CFLAGS+set}" = set || CFLAGS="-g"
517fi
518
519# Extract the first word of "ranlib", so it can be a program name with args.
520set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000521echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
522if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
523 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000524else
525 if test -n "$RANLIB"; then
526 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
527else
Guido van Rossum7f43da71994-08-01 12:15:30 +0000528 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
529 for ac_dir in $PATH; do
530 test -z "$ac_dir" && ac_dir=.
531 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000532 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000533 break
534 fi
535 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000536 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000537 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000538fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000539fi
540RANLIB="$ac_cv_prog_RANLIB"
541if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000542 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000543else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000544 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000545fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000546
547
Guido van Rossum7f43da71994-08-01 12:15:30 +0000548for ac_prog in ar aal
549do
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000550# Extract the first word of "$ac_prog", so it can be a program name with args.
551set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000552echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
553if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
554 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000555else
556 if test -n "$AR"; then
557 ac_cv_prog_AR="$AR" # Let the user override the test.
558else
Guido van Rossum7f43da71994-08-01 12:15:30 +0000559 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
560 for ac_dir in $PATH; do
561 test -z "$ac_dir" && ac_dir=.
562 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000563 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000564 break
565 fi
566 done
567 IFS="$ac_save_ifs"
568fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000569fi
570AR="$ac_cv_prog_AR"
571if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000572 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000573else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000574 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000575fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000576
577test -n "$AR" && break
578done
579test -n "$AR" || AR="ar"
580
581
Guido van Rossumda88dad1995-01-26 00:46:29 +0000582
583
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000584# Install just never works :-(
585if test -z "$INSTALL"
Guido van Rossumda88dad1995-01-26 00:46:29 +0000586then
587 INSTALL=cp
588 INSTALL_PROGRAM=cp
589 INSTALL_DATA=cp
590else
591 INSTALL_PROGRAM="$INSTALL"
592 INSTALL_DATA="$INSTALL -m 644"
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000593fi
594
595# Optimizer/debugger flags passed between Makefiles
596if test -z "$OPT"
597then OPT=-O
598fi
599
Guido van Rossum627b2d71993-12-24 10:39:16 +0000600# checks for UNIX variants that set C preprocessor variables
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000601echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000602# On Suns, sometimes $CPP names a directory.
603if test -n "$CPP" && test -d "$CPP"; then
604 CPP=
605fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000606if test -z "$CPP"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000607if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
608 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000609else
610 # This must be in double quotes, not single quotes, because CPP may get
611 # substituted into the Makefile and "${CC-cc}" will confuse make.
Guido van Rossum627b2d71993-12-24 10:39:16 +0000612 CPP="${CC-cc} -E"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000613 # On the NeXT, cc -E runs the code through the compiler's parser,
614 # not just through cpp.
615 cat > conftest.$ac_ext <<EOF
Guido van Rossum8b131c51995-03-09 14:10:13 +0000616#line 617 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000617#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000618#include <assert.h>
Guido van Rossum627b2d71993-12-24 10:39:16 +0000619Syntax Error
620EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000621eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
622ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000623if test -z "$ac_err"; then
624 :
625else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000626 echo "$ac_err" >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +0000627 rm -rf conftest*
628 CPP="${CC-cc} -E -traditional-cpp"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000629 cat > conftest.$ac_ext <<EOF
Guido van Rossum8b131c51995-03-09 14:10:13 +0000630#line 631 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000631#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000632#include <assert.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +0000633Syntax Error
634EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000635eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
636ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000637if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000638 :
639else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000640 echo "$ac_err" >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +0000641 rm -rf conftest*
642 CPP=/lib/cpp
643fi
644rm -f conftest*
645fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000646rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000647 ac_cv_prog_CPP="$CPP"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000648fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000649fi
650CPP="$ac_cv_prog_CPP"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000651echo "$ac_t""$CPP" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +0000652
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000653echo $ac_n "checking for AIX""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000654cat > conftest.$ac_ext <<EOF
Guido van Rossum8b131c51995-03-09 14:10:13 +0000655#line 656 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000656#include "confdefs.h"
657#ifdef _AIX
658 yes
659#endif
660
661EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000662if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
663 egrep "yes" >/dev/null 2>&1; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000664 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000665 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000666#define _ALL_SOURCE 1
667EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000668
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000669else
670 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000671 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +0000672fi
673rm -f conftest*
674
675
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000676ac_safe=`echo "minix/config.h" | tr './\055' '___'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000677echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
678if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
679 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000680else
681 cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000682#line 683 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000683#include "confdefs.h"
684#include <minix/config.h>
685EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000686eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
687ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000688if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000689 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000690 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000691else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000692 echo "$ac_err" >&5
693 rm -rf conftest*
694 eval "ac_cv_header_$ac_safe=no"
695fi
696rm -f conftest*
697fi
698if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000699 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000700 MINIX=yes
701else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000702 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000703MINIX=
Guido van Rossum627b2d71993-12-24 10:39:16 +0000704fi
705
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000706if test "$MINIX" = yes; then
707 cat >> confdefs.h <<\EOF
708#define _POSIX_SOURCE 1
709EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000710
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000711 cat >> confdefs.h <<\EOF
712#define _POSIX_1_SOURCE 2
713EOF
714
715 cat >> confdefs.h <<\EOF
716#define _MINIX 1
717EOF
718
719fi
720
Guido van Rossumda88dad1995-01-26 00:46:29 +0000721
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000722# checks for header files
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000723# If we cannot run a trivial program, we must be cross compiling.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000724echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
725if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
726 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000727else
728 if test "$cross_compiling" = yes; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000729 ac_cv_c_cross=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000730else
731cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000732#line 733 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000733#include "confdefs.h"
734main(){return(0);}
735EOF
736eval $ac_link
737if test -s conftest && (./conftest; exit) 2>/dev/null; then
738 ac_cv_c_cross=no
739else
740 ac_cv_c_cross=yes
741fi
742fi
743rm -fr conftest*
744fi
745cross_compiling=$ac_cv_c_cross
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000746echo "$ac_t""$ac_cv_c_cross" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000747
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000748echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
749if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
750 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000751else
752 cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000753#line 754 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000754#include "confdefs.h"
755#include <stdlib.h>
756#include <stdarg.h>
757#include <string.h>
758#include <float.h>
759EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000760eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
761ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000762if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000763 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000764 ac_cv_header_stdc=yes
765else
766 echo "$ac_err" >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +0000767 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000768 ac_cv_header_stdc=no
769fi
770rm -f conftest*
771
772if test $ac_cv_header_stdc = yes; then
773 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
774cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000775#line 776 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000776#include "confdefs.h"
777#include <string.h>
778EOF
779if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
780 egrep "memchr" >/dev/null 2>&1; then
781 :
782else
783 rm -rf conftest*
784 ac_cv_header_stdc=no
785fi
786rm -f conftest*
787
788fi
789
790if test $ac_cv_header_stdc = yes; then
791 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
792cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000793#line 794 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000794#include "confdefs.h"
795#include <stdlib.h>
796EOF
797if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
798 egrep "free" >/dev/null 2>&1; then
799 :
800else
801 rm -rf conftest*
802 ac_cv_header_stdc=no
803fi
804rm -f conftest*
805
806fi
807
808if test $ac_cv_header_stdc = yes; then
809 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
810if test "$cross_compiling" = yes; then
811 ac_cv_header_stdc=no
812else
813cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000814#line 815 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000815#include "confdefs.h"
816#include <ctype.h>
817#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
818#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000819#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +0000820int main () { int i; for (i = 0; i < 256; i++)
821if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
822exit (0); }
823
824EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000825eval $ac_link
Guido van Rossum627b2d71993-12-24 10:39:16 +0000826if test -s conftest && (./conftest; exit) 2>/dev/null; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000827 :
828else
829 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000830fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000831fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000832rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000833fi
834fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000835echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000836if test $ac_cv_header_stdc = yes; then
837 cat >> confdefs.h <<\EOF
838#define STDC_HEADERS 1
839EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000840
841fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000842
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000843for 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 +0000844do
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000845ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000846echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
847if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
848 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000849else
850 cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000851#line 852 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000852#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000853#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +0000854EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000855eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
856ac_err=`grep -v '^ *+' conftest.out`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000857if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000858 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000859 eval "ac_cv_header_$ac_safe=yes"
860else
861 echo "$ac_err" >&5
862 rm -rf conftest*
863 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000864fi
865rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000866fi
867if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000868 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869 ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
870 cat >> confdefs.h <<EOF
871#define $ac_tr_hdr 1
872EOF
873
874else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000875 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000876fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000877done
878
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000879ac_header_dirent=no
880for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
881do
882ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000883echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
884if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
885 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +0000886else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000887 cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000888#line 889 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000889#include "confdefs.h"
890#include <sys/types.h>
891#include <$ac_hdr>
892int main() { return 0; }
893int t() {
894DIR *dirp = 0;
895; return 0; }
896EOF
897if eval $ac_compile; then
898 rm -rf conftest*
899 eval "ac_cv_header_dirent_$ac_safe=yes"
900else
901 rm -rf conftest*
902 eval "ac_cv_header_dirent_$ac_safe=no"
903fi
904rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +0000905
906fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000907if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000908 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000909 ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
910 cat >> confdefs.h <<EOF
911#define $ac_tr_hdr 1
912EOF
913 ac_header_dirent=$ac_hdr; break
914else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000915 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000916fi
917done
918# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
919if test $ac_header_dirent = dirent.h; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000920echo $ac_n "checking for -ldir""... $ac_c" 1>&6
921if eval "test \"`echo '$''{'ac_cv_lib_dir'+set}'`\" = set"; then
922 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000923else
924 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000925LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000926cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000927#line 928 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000928#include "confdefs.h"
929
930int main() { return 0; }
931int t() {
932opendir()
933; return 0; }
934EOF
935if eval $ac_link; then
936 rm -rf conftest*
937 eval "ac_cv_lib_dir=yes"
938else
939 rm -rf conftest*
940 eval "ac_cv_lib_dir=no"
941fi
942rm -f conftest*
943LIBS="$ac_save_LIBS"
944
945fi
946if eval "test \"`echo '$ac_cv_lib_'dir`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000947 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000948 LIBS="$LIBS -ldir"
949else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000950 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000951fi
952
953else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000954echo $ac_n "checking for -lx""... $ac_c" 1>&6
955if eval "test \"`echo '$''{'ac_cv_lib_x'+set}'`\" = set"; then
956 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000957else
958 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000959LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000960cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000961#line 962 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000962#include "confdefs.h"
963
964int main() { return 0; }
965int t() {
966opendir()
967; return 0; }
968EOF
969if eval $ac_link; then
970 rm -rf conftest*
971 eval "ac_cv_lib_x=yes"
972else
973 rm -rf conftest*
974 eval "ac_cv_lib_x=no"
975fi
976rm -f conftest*
977LIBS="$ac_save_LIBS"
978
979fi
980if eval "test \"`echo '$ac_cv_lib_'x`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000981 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000982 LIBS="$LIBS -lx"
983else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000984 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000985fi
986
987fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000988
989
990# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +0000991was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000992echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000993cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000994#line 995 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000995#include "confdefs.h"
996#include <time.h>
997EOF
998if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
999 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00001000 rm -rf conftest*
1001 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001002else
1003 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001004 cat >> confdefs.h <<\EOF
1005#define clock_t long
1006EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001007
1008fi
1009rm -f conftest*
1010
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001011echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00001012
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001013echo $ac_n "checking for mode_t""... $ac_c" 1>&6
1014if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1015 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001016else
1017 cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001018#line 1019 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001019#include "confdefs.h"
1020#include <sys/types.h>
1021#if STDC_HEADERS
1022#include <stdlib.h>
1023#endif
1024EOF
1025if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1026 egrep "mode_t" >/dev/null 2>&1; then
1027 rm -rf conftest*
1028 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001029else
1030 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001031 ac_cv_type_mode_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001032fi
1033rm -f conftest*
1034
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001035fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001036echo "$ac_t""$ac_cv_type_mode_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001037if test $ac_cv_type_mode_t = no; then
1038 cat >> confdefs.h <<\EOF
1039#define mode_t int
1040EOF
1041
1042fi
1043
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001044echo $ac_n "checking for off_t""... $ac_c" 1>&6
1045if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1046 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001047else
1048 cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001049#line 1050 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001050#include "confdefs.h"
1051#include <sys/types.h>
1052#if STDC_HEADERS
1053#include <stdlib.h>
1054#endif
1055EOF
1056if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1057 egrep "off_t" >/dev/null 2>&1; then
1058 rm -rf conftest*
1059 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001060else
1061 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001062 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001063fi
1064rm -f conftest*
1065
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001066fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001067echo "$ac_t""$ac_cv_type_off_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001068if test $ac_cv_type_off_t = no; then
1069 cat >> confdefs.h <<\EOF
1070#define off_t long
1071EOF
1072
1073fi
1074
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001075echo $ac_n "checking for pid_t""... $ac_c" 1>&6
1076if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1077 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001078else
1079 cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001080#line 1081 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001081#include "confdefs.h"
1082#include <sys/types.h>
1083#if STDC_HEADERS
1084#include <stdlib.h>
1085#endif
1086EOF
1087if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1088 egrep "pid_t" >/dev/null 2>&1; then
1089 rm -rf conftest*
1090 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001091else
1092 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001093 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001094fi
1095rm -f conftest*
1096
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001097fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001098echo "$ac_t""$ac_cv_type_pid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001099if test $ac_cv_type_pid_t = no; then
1100 cat >> confdefs.h <<\EOF
1101#define pid_t int
1102EOF
1103
1104fi
1105
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001106echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1107if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1108 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001109else
1110 cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001111#line 1112 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001112#include "confdefs.h"
1113#include <sys/types.h>
1114#include <signal.h>
1115#ifdef signal
1116#undef signal
1117#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001118#ifdef __cplusplus
1119extern "C"
1120#endif
1121void (*signal ()) ();
Guido van Rossum7f43da71994-08-01 12:15:30 +00001122int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001123int t() {
1124int i;
1125; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001126EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001127if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001128 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001129 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00001130else
1131 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001132 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00001133fi
1134rm -f conftest*
1135
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001136fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001137echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001138cat >> confdefs.h <<EOF
1139#define RETSIGTYPE $ac_cv_type_signal
1140EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001141
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001142
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001143echo $ac_n "checking for size_t""... $ac_c" 1>&6
1144if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1145 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001146else
1147 cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001148#line 1149 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001149#include "confdefs.h"
1150#include <sys/types.h>
1151#if STDC_HEADERS
1152#include <stdlib.h>
1153#endif
1154EOF
1155if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1156 egrep "size_t" >/dev/null 2>&1; then
1157 rm -rf conftest*
1158 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001159else
1160 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001161 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001162fi
1163rm -f conftest*
1164
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001165fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001166echo "$ac_t""$ac_cv_type_size_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001167if test $ac_cv_type_size_t = no; then
1168 cat >> confdefs.h <<\EOF
1169#define size_t unsigned
1170EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001171
1172fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001173
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001174echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
1175if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
1176 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001177else
1178 cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001179#line 1180 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001180#include "confdefs.h"
1181#include <sys/types.h>
1182EOF
1183if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1184 egrep "uid_t" >/dev/null 2>&1; then
1185 rm -rf conftest*
1186 ac_cv_type_uid_t=yes
1187else
1188 rm -rf conftest*
1189 ac_cv_type_uid_t=no
1190fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001191rm -f conftest*
1192
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001193fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001194echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001195if test $ac_cv_type_uid_t = no; then
1196 cat >> confdefs.h <<\EOF
1197#define uid_t int
1198EOF
1199
1200 cat >> confdefs.h <<\EOF
1201#define gid_t int
1202EOF
1203
1204fi
1205
Guido van Rossum627b2d71993-12-24 10:39:16 +00001206
Guido van Rossum0a516c91994-09-12 10:58:40 +00001207# Set name for machine-dependent library files
1208
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001209echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001210if test -z "$MACHDEP"
1211then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001212 ac_sys_system=`uname -s | tr -d ' ' | tr '[A-Z]' '[a-z]'`
1213 ac_sys_release=`uname -r | tr -d ' ' | sed 's/\..*//'`
1214 MACHDEP="$ac_sys_system$ac_sys_release"
Guido van Rossum0a516c91994-09-12 10:58:40 +00001215 case MACHDEP in
1216 '') MACHDEP=unknown;;
1217 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001218fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001219echo "$ac_t""$MACHDEP" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001220
1221# Set info about shared libraries.
1222# XXX This should try things out instead of testing uname!
1223
1224
1225
1226
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001227ac_sys_system=`uname -s`
1228ac_sys_release=`uname -r`
Guido van Rossum0a516c91994-09-12 10:58:40 +00001229# SO is the extension of shared libraries `(including the dot!)
1230# -- usually .so, .sl on HP-UX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001231echo $ac_n "checking SO""... $ac_c" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001232if test -z "$SO"
1233then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001234 case $ac_sys_system in
Guido van Rossum0a516c91994-09-12 10:58:40 +00001235 hp*|HP*) SO=.sl;;
1236 *) SO=.so;;
1237 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001238fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001239echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001240# LDSHARED is the ld *command* used to create shared library
1241# -- "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 +00001242echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001243if test -z "$LDSHARED"
1244then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001245 case $ac_sys_system/$ac_sys_release in
Guido van Rossum0a516c91994-09-12 10:58:40 +00001246 IRIX*) LDSHARED="ld -shared";;
1247 SunOS/4*) LDSHARED="ld";;
1248 SunOS/5*) LDSHARED="ld -G";;
1249 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00001250 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
1251 DYNIX/ptx*) LDSHARED="ld -G";;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001252 Linux*) LDSHARED="gcc-elf -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001253 *) LDSHARED="ld";;
1254 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001255fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001256echo "$ac_t""$LDSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001257# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001258# library -- this is only needed for a few systems
1259echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001260if test -z "$CCSHARED"
1261then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001262 case $ac_sys_system in
Guido van Rossumaf07a441995-02-13 19:45:27 +00001263 hp*|HP*) if test "$GCC" = yes;
1264 then CCSHARED="-fpic";
1265 else CCSHARED="+z";
1266 fi;;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001267 Linux*) CCSHARED="-fpic";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001268 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001269fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001270echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001271# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001272# the python executable -- this is only needed for a few systems
1273echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001274if test -z "$LINKFORSHARED"
1275then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001276 case $ac_sys_system in
Guido van Rossum0a516c91994-09-12 10:58:40 +00001277 hp*|HP*) LINKFORSHARED="-Wl,-E";;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001278 Linux*) LINKFORSHARED="-rdynamic";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00001279 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00001280fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001281echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00001282
Guido van Rossum627b2d71993-12-24 10:39:16 +00001283# checks for libraries
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001284echo $ac_n "checking for -ldl""... $ac_c" 1>&6
1285if eval "test \"`echo '$''{'ac_cv_lib_dl'+set}'`\" = set"; then
1286 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001287else
1288 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001289LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001290cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001291#line 1292 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001292#include "confdefs.h"
1293
Guido van Rossum7f43da71994-08-01 12:15:30 +00001294int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001295int t() {
1296dlopen()
1297; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001298EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001299if eval $ac_link; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001300 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001301 eval "ac_cv_lib_dl=yes"
1302else
1303 rm -rf conftest*
1304 eval "ac_cv_lib_dl=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001305fi
1306rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001307LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001308
Guido van Rossum627b2d71993-12-24 10:39:16 +00001309fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001310if eval "test \"`echo '$ac_cv_lib_'dl`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001311 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001312 ac_tr_lib=HAVE_LIB`echo dl | tr '[a-z]' '[A-Z]'`
1313 cat >> confdefs.h <<EOF
1314#define $ac_tr_lib 1
1315EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001316
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001317 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001318
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001319else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001320 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001321fi
1322 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001323echo $ac_n "checking for -ldld""... $ac_c" 1>&6
1324if eval "test \"`echo '$''{'ac_cv_lib_dld'+set}'`\" = set"; then
1325 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001326else
1327 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001328LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001329cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001330#line 1331 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001331#include "confdefs.h"
1332
Guido van Rossum7f43da71994-08-01 12:15:30 +00001333int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001334int t() {
1335shl_load()
1336; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001337EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001338if eval $ac_link; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001339 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001340 eval "ac_cv_lib_dld=yes"
1341else
1342 rm -rf conftest*
1343 eval "ac_cv_lib_dld=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001344fi
1345rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001346LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001347
Guido van Rossum627b2d71993-12-24 10:39:16 +00001348fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001349if eval "test \"`echo '$ac_cv_lib_'dld`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001350 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001351 ac_tr_lib=HAVE_LIB`echo dld | tr '[a-z]' '[A-Z]'`
1352 cat >> confdefs.h <<EOF
1353#define $ac_tr_lib 1
1354EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001355
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001356 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001357
1358else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001359 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001360fi
1361 # Dynamic linking for HP-UX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001362echo $ac_n "checking for -lsun""... $ac_c" 1>&6
1363if eval "test \"`echo '$''{'ac_cv_lib_sun'+set}'`\" = set"; then
1364 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001365else
1366 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001367LIBS="-lsun $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001368cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001369#line 1370 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001370#include "confdefs.h"
1371
1372int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001373int t() {
1374getpwnam()
1375; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001376EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001377if eval $ac_link; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001378 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001379 eval "ac_cv_lib_sun=yes"
1380else
1381 rm -rf conftest*
1382 eval "ac_cv_lib_sun=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001383fi
1384rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001385LIBS="$ac_save_LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001386
Guido van Rossum7f43da71994-08-01 12:15:30 +00001387fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001388if eval "test \"`echo '$ac_cv_lib_'sun`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001389 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001390 ac_tr_lib=HAVE_LIB`echo sun | tr '[a-z]' '[A-Z]'`
1391 cat >> confdefs.h <<EOF
1392#define $ac_tr_lib 1
1393EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001394
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001395 LIBS="-lsun $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001396
1397else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001398 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001399fi
1400 # NIS (== YP) interface for IRIX 4
Guido van Rossumda88dad1995-01-26 00:46:29 +00001401# The following three (nsl,inet,socket) are needed on Sequent;
1402# the order of checking must be this. Most SVR4 platforms will
1403# need -lsocket and -lnsl. However on SGI IRIX 5, these exist but
1404# broken. I see no elegant solution (probably CHECK_LIB should be
1405# fixed to only add the library if the given entry point is not
1406# satisfied without it).
1407if test "`uname -s`" != IRIX
1408then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001409echo $ac_n "checking for -lnsl""... $ac_c" 1>&6
1410if eval "test \"`echo '$''{'ac_cv_lib_nsl'+set}'`\" = set"; then
1411 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001412else
1413 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001414LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001415cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001416#line 1417 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001417#include "confdefs.h"
1418
1419int main() { return 0; }
1420int t() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00001421t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001422; return 0; }
1423EOF
1424if eval $ac_link; then
1425 rm -rf conftest*
1426 eval "ac_cv_lib_nsl=yes"
1427else
1428 rm -rf conftest*
1429 eval "ac_cv_lib_nsl=no"
1430fi
1431rm -f conftest*
1432LIBS="$ac_save_LIBS"
1433
1434fi
1435if eval "test \"`echo '$ac_cv_lib_'nsl`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001436 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001437 LIBS="-lnsl $LIBS"
1438else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001439 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001440fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00001441 # SVR4
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001442echo $ac_n "checking for -linet""... $ac_c" 1>&6
1443if eval "test \"`echo '$''{'ac_cv_lib_inet'+set}'`\" = set"; then
1444 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001445else
1446 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001447LIBS="-linet -lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001448cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001449#line 1450 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001450#include "confdefs.h"
1451
1452int main() { return 0; }
1453int t() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00001454gethostbyname()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001455; return 0; }
1456EOF
1457if eval $ac_link; then
1458 rm -rf conftest*
1459 eval "ac_cv_lib_inet=yes"
1460else
1461 rm -rf conftest*
1462 eval "ac_cv_lib_inet=no"
1463fi
1464rm -f conftest*
1465LIBS="$ac_save_LIBS"
1466
1467fi
1468if eval "test \"`echo '$ac_cv_lib_'inet`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001469 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001470 LIBS="-linet $LIBS"
1471else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001472 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001473fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00001474 # Sequent
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001475echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
1476if eval "test \"`echo '$''{'ac_cv_lib_socket'+set}'`\" = set"; then
1477 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001478else
1479 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001480LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001481cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001482#line 1483 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001483#include "confdefs.h"
1484
1485int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001486int t() {
1487socket()
1488; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001489EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001490if eval $ac_link; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001491 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001492 eval "ac_cv_lib_socket=yes"
1493else
1494 rm -rf conftest*
1495 eval "ac_cv_lib_socket=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001496fi
1497rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001498LIBS="$ac_save_LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001499
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001500fi
1501if eval "test \"`echo '$ac_cv_lib_'socket`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001502 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001503 LIBS="-lsocket $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001504else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001505 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00001506fi
Guido van Rossum79dddcb1995-01-12 12:25:42 +00001507 # SVR4 sockets
Guido van Rossumda88dad1995-01-26 00:46:29 +00001508fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001509
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001510echo $ac_n "checking for --with-readline""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001511# Check whether --with-readline or --without-readline was given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00001512withval="$with_readline"
1513if test -n "$withval"; then
1514
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001515echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001516cat >> confdefs.h <<\EOF
1517#define WITH_READLINE 1
1518EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001519
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001520if test ! -d "$withval"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001521then { echo "configure: error: proper usage is --with-readline=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001522fi
1523termcap=
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001524echo $ac_n "checking for -ltermcap""... $ac_c" 1>&6
1525if eval "test \"`echo '$''{'ac_cv_lib_termcap'+set}'`\" = set"; then
1526 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001527else
1528 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001529LIBS="-ltermcap $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001530cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001531#line 1532 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001532#include "confdefs.h"
1533
Guido van Rossum7f43da71994-08-01 12:15:30 +00001534int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001535int t() {
1536tgetent()
1537; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001538EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001539if eval $ac_link; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001540 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001541 eval "ac_cv_lib_termcap=yes"
1542else
1543 rm -rf conftest*
1544 eval "ac_cv_lib_termcap=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001545fi
1546rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001547LIBS="$ac_save_LIBS"
1548
1549fi
1550if eval "test \"`echo '$ac_cv_lib_'termcap`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001551 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001552 termcap=termcap
Guido van Rossum7f43da71994-08-01 12:15:30 +00001553else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001554 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001555
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001556echo $ac_n "checking for -ltermlib""... $ac_c" 1>&6
1557if eval "test \"`echo '$''{'ac_cv_lib_termlib'+set}'`\" = set"; then
1558 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001559else
1560 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001561LIBS="-ltermlib $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001562cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001563#line 1564 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001564#include "confdefs.h"
1565
1566int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001567int t() {
1568tgetent()
1569; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001570EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001571if eval $ac_link; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001572 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001573 eval "ac_cv_lib_termlib=yes"
1574else
1575 rm -rf conftest*
1576 eval "ac_cv_lib_termlib=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001577fi
1578rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001579LIBS="$ac_save_LIBS"
1580
1581fi
1582if eval "test \"`echo '$ac_cv_lib_'termlib`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001583 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001584 termcap=termlib
Guido van Rossum7f43da71994-08-01 12:15:30 +00001585else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001586 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00001587fi
1588
1589fi
1590
1591if test ! -z "$termcap"
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001592then LIBS="$LIBS $withval/libreadline.a"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001593 # Avoid possible conflict between shared libraries termcap and gl
1594 # on IRIX 5: both contain a routine called clear.
1595 if test -f /usr/lib/lib$termcap.a
1596 then LIBS="$LIBS /usr/lib/lib$termcap.a"
1597 else LIBS="$LIBS -l$termcap"
1598 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001599else { echo "configure: error: no working termcap/termlib" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001600fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00001601else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001602 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00001603fi
1604
1605
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001606echo $ac_n "checking for --with-thread""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001607# Check whether --with-thread or --without-thread was given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00001608withval="$with_thread"
1609if test -n "$withval"; then
1610
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001611echo "$ac_t""$withval" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00001612if test -d "$withval"
1613then LIBS="$LIBS -L$withval"
1614fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001615echo $ac_n "checking for -lpthreads""... $ac_c" 1>&6
1616if eval "test \"`echo '$''{'ac_cv_lib_pthreads'+set}'`\" = set"; then
1617 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001618else
1619 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001620LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001621cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001622#line 1623 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001623#include "confdefs.h"
1624
1625int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001626int t() {
1627pthread_create()
1628; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001629EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001630if eval $ac_link; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001631 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001632 eval "ac_cv_lib_pthreads=yes"
1633else
1634 rm -rf conftest*
1635 eval "ac_cv_lib_pthreads=no"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001636fi
1637rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001638LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001639
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001640fi
1641if eval "test \"`echo '$ac_cv_lib_'pthreads`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001642 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001643 cat >> confdefs.h <<\EOF
1644#define WITH_THREAD 1
1645EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001646
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001647cat >> confdefs.h <<\EOF
1648#define _POSIX_THREADS 1
1649EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001650
1651LIBS="$LIBS -lpthreads"
1652LIBOBJS="$LIBOBJS thread.o"
1653else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001654 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001655fi
1656
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001657echo $ac_n "checking for -lmpc""... $ac_c" 1>&6
1658if eval "test \"`echo '$''{'ac_cv_lib_mpc'+set}'`\" = set"; then
1659 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001660else
1661 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001662LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001663cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001664#line 1665 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001665#include "confdefs.h"
1666
Guido van Rossum7f43da71994-08-01 12:15:30 +00001667int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001668int t() {
1669usconfig()
1670; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001671EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001672if eval $ac_link; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001673 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001674 eval "ac_cv_lib_mpc=yes"
1675else
1676 rm -rf conftest*
1677 eval "ac_cv_lib_mpc=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001678fi
1679rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001680LIBS="$ac_save_LIBS"
1681
1682fi
1683if eval "test \"`echo '$ac_cv_lib_'mpc`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001684 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001685 cat >> confdefs.h <<\EOF
1686#define WITH_THREAD 1
1687EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001688
Guido van Rossum7f43da71994-08-01 12:15:30 +00001689LIBS="$LIBS -lmpc"
1690LIBOBJS="$LIBOBJS thread.o"
1691else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001692 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001693fi
1694
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001695echo $ac_n "checking for -lthread""... $ac_c" 1>&6
1696if eval "test \"`echo '$''{'ac_cv_lib_thread'+set}'`\" = set"; then
1697 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001698else
1699 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001700LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001701cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001702#line 1703 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001703#include "confdefs.h"
1704
Guido van Rossum7f43da71994-08-01 12:15:30 +00001705int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001706int t() {
1707thr_create()
1708; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001709EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001710if eval $ac_link; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001711 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001712 eval "ac_cv_lib_thread=yes"
1713else
1714 rm -rf conftest*
1715 eval "ac_cv_lib_thread=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001716fi
1717rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001718LIBS="$ac_save_LIBS"
1719
1720fi
1721if eval "test \"`echo '$ac_cv_lib_'thread`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001722 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001723 cat >> confdefs.h <<\EOF
1724#define WITH_THREAD 1
1725EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001726
Guido van Rossum7f43da71994-08-01 12:15:30 +00001727LIBS="$LIBS -lthread"
1728LIBOBJS="$LIBOBJS thread.o"
1729else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001730 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001731fi
1732
Guido van Rossum7f43da71994-08-01 12:15:30 +00001733
Guido van Rossumda88dad1995-01-26 00:46:29 +00001734else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001735 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001736fi
1737
Guido van Rossum7f43da71994-08-01 12:15:30 +00001738
1739# -I${DLINCLDIR} is added to the compile rule for import.o
1740
1741DLINCLDIR=/
1742
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001743echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001744# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00001745withval="$with_sgi_dl"
1746if test -n "$withval"; then
1747
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001748echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001749cat >> confdefs.h <<\EOF
1750#define WITH_SGI_DL 1
1751EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001752
1753dldir=$withval
1754if test -d "$dldir"
1755then LIBS="$LIBS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001756else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001757fi
1758DLINCLDIR=${dldir}
1759LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00001760else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001761 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00001762fi
1763
1764
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001765echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001766# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00001767withval="$with_dl_dld"
1768if test -n "$withval"; then
1769
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001770echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001771cat >> confdefs.h <<\EOF
1772#define WITH_DL_DLD 1
1773EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001774
1775dldir=`echo "$withval" | sed 's/,.*//'`
1776dlddir=`echo "$withval" | sed 's/.*,//'`
1777if test -d "$dldir" -a -d "$dlddir"
1778then LIBS="$LIBS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001779else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001780fi
1781DLINCLDIR=${dldir}
1782LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00001783else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001784 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00001785fi
1786
1787
Guido van Rossum627b2d71993-12-24 10:39:16 +00001788# checks for library functions
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001789for 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 symlink tcgetpgrp tcsetpgrp times truncate uname waitpid
Guido van Rossum627b2d71993-12-24 10:39:16 +00001790do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001791echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1792if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1793 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001794else
1795 cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001796#line 1797 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001797#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001798/* System header to define __stub macros and hopefully few prototypes,
1799 which can conflict with char $ac_func(); below. */
1800#include <assert.h>
1801/* Override any gcc2 internal prototype to avoid an error. */
1802char $ac_func();
1803
Guido van Rossum7f43da71994-08-01 12:15:30 +00001804int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001805int t() {
1806
Guido van Rossum627b2d71993-12-24 10:39:16 +00001807/* The GNU C library defines this for functions which it implements
1808 to always fail with ENOSYS. Some functions are actually named
1809 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001810#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00001811choke me
1812#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001813$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00001814#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001815
Guido van Rossum7f43da71994-08-01 12:15:30 +00001816; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001817EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001818if eval $ac_link; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001819 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001820 eval "ac_cv_func_$ac_func=yes"
1821else
1822 rm -rf conftest*
1823 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001824fi
1825rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001826
1827fi
1828if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001829 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001830 ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
1831 cat >> confdefs.h <<EOF
1832#define $ac_tr_func 1
1833EOF
1834
1835else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001836 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001837fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001838done
1839
Guido van Rossum7f43da71994-08-01 12:15:30 +00001840for ac_func in dup2 getcwd strerror memmove
Guido van Rossum627b2d71993-12-24 10:39:16 +00001841do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001842echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1843if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1844 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001845else
1846 cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001847#line 1848 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001848#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001849/* System header to define __stub macros and hopefully few prototypes,
1850 which can conflict with char $ac_func(); below. */
1851#include <assert.h>
1852/* Override any gcc2 internal prototype to avoid an error. */
1853char $ac_func();
1854
Guido van Rossum7f43da71994-08-01 12:15:30 +00001855int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001856int t() {
1857
Guido van Rossum627b2d71993-12-24 10:39:16 +00001858/* The GNU C library defines this for functions which it implements
1859 to always fail with ENOSYS. Some functions are actually named
1860 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001861#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00001862choke me
1863#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001864$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00001865#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001866
Guido van Rossum7f43da71994-08-01 12:15:30 +00001867; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001868EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001869if eval $ac_link; then
1870 rm -rf conftest*
1871 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001872else
1873 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001874 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001875fi
1876rm -f conftest*
1877
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001878fi
1879if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001880 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001881 :
1882else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001883 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001884LIBOBJS="$LIBOBJS ${ac_func}.o"
1885fi
1886
Guido van Rossum627b2d71993-12-24 10:39:16 +00001887done
1888
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001889echo $ac_n "checking for getpgrp""... $ac_c" 1>&6
1890if eval "test \"`echo '$''{'ac_cv_func_getpgrp'+set}'`\" = set"; then
1891 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001892else
1893 cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001894#line 1895 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001895#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001896/* System header to define __stub macros and hopefully few prototypes,
1897 which can conflict with char getpgrp(); below. */
1898#include <assert.h>
1899/* Override any gcc2 internal prototype to avoid an error. */
1900char getpgrp();
1901
Guido van Rossum7f43da71994-08-01 12:15:30 +00001902int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001903int t() {
1904
Guido van Rossum627b2d71993-12-24 10:39:16 +00001905/* The GNU C library defines this for functions which it implements
1906 to always fail with ENOSYS. Some functions are actually named
1907 something starting with __ and the normal name is an alias. */
1908#if defined (__stub_getpgrp) || defined (__stub___getpgrp)
1909choke me
1910#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001911getpgrp();
Guido van Rossum627b2d71993-12-24 10:39:16 +00001912#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001913
1914; return 0; }
1915EOF
1916if eval $ac_link; then
1917 rm -rf conftest*
1918 eval "ac_cv_func_getpgrp=yes"
1919else
1920 rm -rf conftest*
1921 eval "ac_cv_func_getpgrp=no"
1922fi
1923rm -f conftest*
1924
1925fi
1926if eval "test \"`echo '$ac_cv_func_'getpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001927 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001928 cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001929#line 1930 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001930#include "confdefs.h"
1931#include <unistd.h>
1932int main() { return 0; }
1933int t() {
1934getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00001935; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001936EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001937if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001938 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001939 cat >> confdefs.h <<\EOF
1940#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00001941EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001942
1943fi
1944rm -f conftest*
1945
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001946else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001947 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001948fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001949
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001950echo $ac_n "checking for setpgrp""... $ac_c" 1>&6
1951if eval "test \"`echo '$''{'ac_cv_func_setpgrp'+set}'`\" = set"; then
1952 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001953else
1954 cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001955#line 1956 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00001956#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001957/* System header to define __stub macros and hopefully few prototypes,
1958 which can conflict with char setpgrp(); below. */
1959#include <assert.h>
1960/* Override any gcc2 internal prototype to avoid an error. */
1961char setpgrp();
1962
Guido van Rossum8eee56f1994-10-20 22:18:37 +00001963int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001964int t() {
1965
Guido van Rossum8eee56f1994-10-20 22:18:37 +00001966/* The GNU C library defines this for functions which it implements
1967 to always fail with ENOSYS. Some functions are actually named
1968 something starting with __ and the normal name is an alias. */
1969#if defined (__stub_setpgrp) || defined (__stub___setpgrp)
1970choke me
1971#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001972setpgrp();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00001973#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001974
1975; return 0; }
1976EOF
1977if eval $ac_link; then
1978 rm -rf conftest*
1979 eval "ac_cv_func_setpgrp=yes"
1980else
1981 rm -rf conftest*
1982 eval "ac_cv_func_setpgrp=no"
1983fi
1984rm -f conftest*
1985
1986fi
1987if eval "test \"`echo '$ac_cv_func_'setpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001988 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001989 cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001990#line 1991 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001991#include "confdefs.h"
1992#include <unistd.h>
1993int main() { return 0; }
1994int t() {
1995setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00001996; return 0; }
1997EOF
1998if eval $ac_compile; then
1999 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002000 cat >> confdefs.h <<\EOF
2001#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002002EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002003
2004fi
2005rm -f conftest*
2006
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002007else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002008 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002009fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002010
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002011echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
2012if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
2013 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002014else
2015 cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002016#line 2017 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002017#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002018/* System header to define __stub macros and hopefully few prototypes,
2019 which can conflict with char gettimeofday(); below. */
2020#include <assert.h>
2021/* Override any gcc2 internal prototype to avoid an error. */
2022char gettimeofday();
2023
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002024int main() { return 0; }
2025int t() {
2026
2027/* The GNU C library defines this for functions which it implements
2028 to always fail with ENOSYS. Some functions are actually named
2029 something starting with __ and the normal name is an alias. */
2030#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
2031choke me
2032#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002033gettimeofday();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002034#endif
2035
2036; return 0; }
2037EOF
2038if eval $ac_link; then
2039 rm -rf conftest*
2040 eval "ac_cv_func_gettimeofday=yes"
2041else
2042 rm -rf conftest*
2043 eval "ac_cv_func_gettimeofday=no"
2044fi
2045rm -f conftest*
2046
2047fi
2048if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002049 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002050 cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002051#line 2052 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002052#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002053#include <sys/time.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00002054int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002055int t() {
2056gettimeofday((struct timeval*)0,(struct timezone*)0);
2057; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002058EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002059if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002060 :
2061else
2062 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002063 cat >> confdefs.h <<\EOF
2064#define GETTIMEOFDAY_NO_TZ 1
2065EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002066
2067fi
2068rm -f conftest*
2069
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002070else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002071 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002072fi
2073
2074
2075# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002076echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2077if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2078 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002079else
2080 cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002081#line 2082 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002082#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002083#include <sys/types.h>
2084#include <sys/time.h>
2085#include <time.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00002086int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002087int t() {
2088struct tm *tp;
2089; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002090EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002091if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002092 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002093 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002094else
2095 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002096 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002097fi
2098rm -f conftest*
2099
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002100fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002101echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002102if test $ac_cv_header_time = yes; then
2103 cat >> confdefs.h <<\EOF
2104#define TIME_WITH_SYS_TIME 1
2105EOF
2106
2107fi
2108
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002109echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
2110if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
2111 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002112else
2113 cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002114#line 2115 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002115#include "confdefs.h"
2116#include <sys/types.h>
2117#include <time.h>
2118int main() { return 0; }
2119int t() {
2120struct tm *tp; tp->tm_sec;
2121; return 0; }
2122EOF
2123if eval $ac_compile; then
2124 rm -rf conftest*
2125 ac_cv_struct_tm=time.h
2126else
2127 rm -rf conftest*
2128 ac_cv_struct_tm=sys/time.h
2129fi
2130rm -f conftest*
2131
2132fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002133echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002134if test $ac_cv_struct_tm = sys/time.h; then
2135 cat >> confdefs.h <<\EOF
2136#define TM_IN_SYS_TIME 1
2137EOF
2138
2139fi
2140
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002141echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
2142if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
2143 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002144else
2145 cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002146#line 2147 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002147#include "confdefs.h"
2148#include <sys/types.h>
2149#include <$ac_cv_struct_tm>
2150int main() { return 0; }
2151int t() {
2152struct tm tm; tm.tm_zone;
2153; return 0; }
2154EOF
2155if eval $ac_compile; then
2156 rm -rf conftest*
2157 ac_cv_struct_tm_zone=yes
2158else
2159 rm -rf conftest*
2160 ac_cv_struct_tm_zone=no
2161fi
2162rm -f conftest*
2163
2164fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002165echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002166if test "$ac_cv_struct_tm_zone" = yes; then
2167 cat >> confdefs.h <<\EOF
2168#define HAVE_TM_ZONE 1
2169EOF
2170
2171else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002172 echo $ac_n "checking for tzname""... $ac_c" 1>&6
2173if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
2174 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002175else
2176 cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002177#line 2178 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002178#include "confdefs.h"
2179#include <time.h>
2180#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002181extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00002182#endif
Guido van Rossum7f43da71994-08-01 12:15:30 +00002183int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002184int t() {
2185atoi(*tzname);
2186; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002187EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002188if eval $ac_link; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002189 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002190 ac_cv_var_tzname=yes
2191else
2192 rm -rf conftest*
2193 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002194fi
2195rm -f conftest*
2196
2197fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002198 echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002199 if test $ac_cv_var_tzname = yes; then
2200 cat >> confdefs.h <<\EOF
2201#define HAVE_TZNAME 1
2202EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002203
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002204 fi
2205fi
2206
2207
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002208echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
2209if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
2210 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002211else
2212 cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002213#line 2214 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002214#include "confdefs.h"
2215#include <time.h>
2216int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002217int t() {
2218return altzone;
2219; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002220EOF
2221if eval $ac_compile; then
2222 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002223 ac_cv_header_time_altzone=yes
2224else
2225 rm -rf conftest*
2226 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00002227fi
2228rm -f conftest*
2229
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002230fi
2231
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002232echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002233if test $ac_cv_header_time_altzone = yes; then
2234 cat >> confdefs.h <<\EOF
2235#define HAVE_ALTZONE 1
2236EOF
2237
2238fi
2239
Guido van Rossumda88dad1995-01-26 00:46:29 +00002240was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002241echo $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 +00002242cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002243#line 2244 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002244#include "confdefs.h"
2245
2246#include <sys/types.h>
2247#include <sys/select.h>
2248#include <sys/time.h>
2249
2250int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002251int t() {
2252;
2253; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002254EOF
2255if eval $ac_compile; then
2256 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002257 cat >> confdefs.h <<\EOF
2258#define SYS_SELECT_WITH_SYS_TIME 1
2259EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00002260 was_it_defined=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00002261fi
2262rm -f conftest*
2263
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002264echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002265
2266# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00002267
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002268echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
2269if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
2270 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002271else
2272 if test "$GCC" = yes; then
2273 # GCC predefines this symbol on systems where it applies.
2274cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002275#line 2276 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002276#include "confdefs.h"
2277#ifdef __CHAR_UNSIGNED__
2278 yes
2279#endif
2280
2281EOF
2282if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2283 egrep "yes" >/dev/null 2>&1; then
2284 rm -rf conftest*
2285 ac_cv_c_char_unsigned=yes
2286else
2287 rm -rf conftest*
2288 ac_cv_c_char_unsigned=no
2289fi
2290rm -f conftest*
2291
2292else
2293if test "$cross_compiling" = yes; then
2294 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2295else
2296cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002297#line 2298 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002298#include "confdefs.h"
2299/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002300#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00002301#define volatile
2302#endif
2303main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00002304 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00002305}
2306EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002307eval $ac_link
Guido van Rossum7f43da71994-08-01 12:15:30 +00002308if test -s conftest && (./conftest; exit) 2>/dev/null; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002309 ac_cv_c_char_unsigned=yes
2310else
2311 ac_cv_c_char_unsigned=no
2312fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00002313fi
2314rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002315fi
2316fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002317echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002318if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
2319 cat >> confdefs.h <<\EOF
2320#define __CHAR_UNSIGNED__ 1
2321EOF
2322
2323fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00002324
2325
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002326echo $ac_n "checking for working const""... $ac_c" 1>&6
2327if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2328 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002329else
2330 cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002331#line 2332 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002332#include "confdefs.h"
2333
2334int main() { return 0; }
2335int t() {
2336
2337/* Ultrix mips cc rejects this. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00002338typedef int charset[2]; const charset x;
2339/* SunOS 4.1.1 cc rejects this. */
2340char const *const *ccp;
2341char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002342/* NEC SVR4.0.2 mips cc rejects this. */
2343struct point {int x, y;};
2344static struct point const zero;
Guido van Rossum627b2d71993-12-24 10:39:16 +00002345/* AIX XL C 1.02.0.0 rejects this.
2346 It does not let you subtract one const X* pointer from another in an arm
2347 of an if-expression whose if-part is not a constant expression */
2348const char *g = "string";
2349ccp = &g + (g ? g-g : 0);
2350/* HPUX 7.0 cc rejects these. */
2351++ccp;
2352p = (char**) ccp;
2353ccp = (char const *const *) p;
2354{ /* SCO 3.2v4 cc rejects this. */
2355 char *t;
2356 char const *s = 0 ? (char *) 0 : (char const *) 0;
2357
2358 *t++ = 0;
2359}
2360{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002361 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00002362 const int *foo = &x[0];
2363 ++foo;
2364}
2365{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2366 typedef const int *iptr;
2367 iptr p = 0;
2368 ++p;
2369}
2370{ /* AIX XL C 1.02.0.0 rejects this saying
2371 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2372 struct s { int j; const int *ap[3]; };
2373 struct s *b; b->j = 5;
2374}
2375{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2376 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002377}
2378
2379; return 0; }
2380EOF
2381if eval $ac_compile; then
2382 rm -rf conftest*
2383 ac_cv_c_const=yes
2384else
2385 rm -rf conftest*
2386 ac_cv_c_const=no
2387fi
2388rm -f conftest*
2389
2390fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002391echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002392if test $ac_cv_c_const = no; then
2393 cat >> confdefs.h <<\EOF
2394#define const
2395EOF
2396
2397fi
2398
2399
Guido van Rossumda88dad1995-01-26 00:46:29 +00002400works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002401echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002402cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002403#line 2404 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002404#include "confdefs.h"
2405
Guido van Rossum7f43da71994-08-01 12:15:30 +00002406int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002407int t() {
2408volatile int x; x = 0;
2409; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002410EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002411if eval $ac_compile; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00002412 rm -rf conftest*
2413 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002414else
2415 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002416 cat >> confdefs.h <<\EOF
2417#define volatile
2418EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002419
2420fi
2421rm -f conftest*
2422
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002423echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002424
Guido van Rossumda88dad1995-01-26 00:46:29 +00002425works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002426echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002427cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002428#line 2429 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00002429#include "confdefs.h"
2430
2431int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002432int t() {
2433signed char c;
2434; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00002435EOF
2436if eval $ac_compile; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00002437 rm -rf conftest*
2438 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00002439else
2440 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002441 cat >> confdefs.h <<\EOF
2442#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00002443EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002444
2445fi
2446rm -f conftest*
2447
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002448echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002449
Guido van Rossumda88dad1995-01-26 00:46:29 +00002450have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002451echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002452cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002453#line 2454 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002454#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002455int foo(int x) { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002456int main() { return 0; }
2457int t() {
2458return foo(10);
2459; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002460EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002461if eval $ac_compile; then
2462 rm -rf conftest*
2463 cat >> confdefs.h <<\EOF
2464#define HAVE_PROTOTYPES 1
2465EOF
2466 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00002467fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002468rm -f conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00002469
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002470echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002471
Guido van Rossumda88dad1995-01-26 00:46:29 +00002472works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002473echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002474cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002475#line 2476 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002476#include "confdefs.h"
2477
2478#include <stdarg.h>
2479int foo(int x, ...) { return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002480
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002481int main() { return 0; }
2482int t() {
2483return foo(10, 11, 12);
2484; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002485EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002486if eval $ac_compile; then
2487 rm -rf conftest*
2488 cat >> confdefs.h <<\EOF
2489#define HAVE_STDARG_PROTOTYPES 1
2490EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00002491 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002492fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002493rm -f conftest*
2494
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002495echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002496
Guido van Rossumda88dad1995-01-26 00:46:29 +00002497if test "$have_prototypes" = yes; then
2498bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002499echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002500cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002501#line 2502 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002502#include "confdefs.h"
2503#include <unistd.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00002504int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002505int t() {
2506char **t;execve("@",t,t);
2507; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002508EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002509if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002510 :
2511else
2512 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002513 cat >> confdefs.h <<\EOF
2514#define BAD_EXEC_PROTOTYPES 1
2515EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00002516 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002517fi
2518rm -f conftest*
2519
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002520echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002521fi
2522
Guido van Rossumda88dad1995-01-26 00:46:29 +00002523bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002524echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002525if test "$cross_compiling" = yes; then
2526 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2527else
2528cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002529#line 2530 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002530#include "confdefs.h"
2531
2532struct s { int a; int b; };
2533static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002534int foobar() {
2535 static int random;
2536 random = (int) &foo;
2537 return random;
2538}
Guido van Rossum7f43da71994-08-01 12:15:30 +00002539static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002540main() {
2541 exit(!((int)&foo == foobar()));
2542}
Guido van Rossum7f43da71994-08-01 12:15:30 +00002543
2544EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002545eval $ac_link
Guido van Rossum7f43da71994-08-01 12:15:30 +00002546if test -s conftest && (./conftest; exit) 2>/dev/null; then
2547 :
2548else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002549 cat >> confdefs.h <<\EOF
2550#define BAD_STATIC_FORWARD 1
2551EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00002552 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00002553fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002554fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00002555rm -fr conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002556echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00002557
Guido van Rossumda88dad1995-01-26 00:46:29 +00002558va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002559echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002560cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002561#line 2562 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002562#include "confdefs.h"
2563
2564#ifdef HAVE_STDARG_PROTOTYPES
2565#include <stdarg.h>
2566#else
2567#include <varargs.h>
2568#endif
2569
2570int main() { return 0; }
2571int t() {
2572va_list list1, list2; list1 = list2;
2573; return 0; }
2574EOF
2575if eval $ac_compile; then
2576 :
2577else
2578 rm -rf conftest*
2579 cat >> confdefs.h <<\EOF
2580#define VA_LIST_IS_ARRAY 1
2581EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00002582 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002583fi
2584rm -f conftest*
2585
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002586echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002587
Guido van Rossum627b2d71993-12-24 10:39:16 +00002588# checks for system services
2589# (none yet)
2590
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002591# Linux requires this for correct f.p. operations
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002592echo $ac_n "checking for -lieee""... $ac_c" 1>&6
2593if eval "test \"`echo '$''{'ac_cv_lib_ieee'+set}'`\" = set"; then
2594 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002595else
2596 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002597LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002598cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002599#line 2600 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002600#include "confdefs.h"
2601
Guido van Rossum7f43da71994-08-01 12:15:30 +00002602int main() { return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002603int t() {
2604__fpu_control()
2605; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002606EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002607if eval $ac_link; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002608 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002609 eval "ac_cv_lib_ieee=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002610else
Guido van Rossum627b2d71993-12-24 10:39:16 +00002611 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002612 eval "ac_cv_lib_ieee=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002613fi
2614rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002615LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002616
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002617fi
2618if eval "test \"`echo '$ac_cv_lib_'ieee`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002619 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002620 ac_tr_lib=HAVE_LIB`echo ieee | tr '[a-z]' '[A-Z]'`
2621 cat >> confdefs.h <<EOF
2622#define $ac_tr_lib 1
2623EOF
2624
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002625 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002626
2627else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002628 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002629fi
2630
2631
Guido van Rossum7f43da71994-08-01 12:15:30 +00002632# check for --with-libm=...
2633
2634LIBM=-lm
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002635# Check whether --with-libm or --without-libm was given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00002636withval="$with_libm"
2637if test -n "$withval"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002638
2639if test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00002640then LIBM=$withval
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002641else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002642fi
2643fi
2644
2645
2646# check for --with-libc=...
2647
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002648# Check whether --with-libc or --without-libc was given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00002649withval="$with_libc"
2650if test -n "$withval"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002651
2652if test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00002653then LIBC=$withval
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002654else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00002655fi
2656fi
2657
2658
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00002659# check for hypot() in math library
2660LIBS_SAVE=$LIBS
2661LIBS="$LIBS $LIBM"
2662for ac_func in hypot
2663do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002664echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2665if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2666 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00002667else
2668 cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002669#line 2670 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00002670#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002671/* System header to define __stub macros and hopefully few prototypes,
2672 which can conflict with char $ac_func(); below. */
2673#include <assert.h>
2674/* Override any gcc2 internal prototype to avoid an error. */
2675char $ac_func();
2676
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00002677int main() { return 0; }
2678int t() {
2679
2680/* The GNU C library defines this for functions which it implements
2681 to always fail with ENOSYS. Some functions are actually named
2682 something starting with __ and the normal name is an alias. */
2683#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2684choke me
2685#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002686$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00002687#endif
2688
2689; return 0; }
2690EOF
2691if eval $ac_link; then
2692 rm -rf conftest*
2693 eval "ac_cv_func_$ac_func=yes"
2694else
2695 rm -rf conftest*
2696 eval "ac_cv_func_$ac_func=no"
2697fi
2698rm -f conftest*
2699
2700fi
2701if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002702 echo "$ac_t""yes" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00002703 ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
2704 cat >> confdefs.h <<EOF
2705#define $ac_tr_func 1
2706EOF
2707
2708else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002709 echo "$ac_t""no" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00002710fi
2711done
2712
2713LIBS=$LIBS_SAVE
2714
Guido van Rossumda88dad1995-01-26 00:46:29 +00002715# check for getopt
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002716echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6
2717if eval "test \"`echo '$''{'ac_cv_func_getopt'+set}'`\" = set"; then
2718 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00002719else
2720 if test "$cross_compiling" = yes; then
2721 ac_cv_func_getopt=no
2722else
2723cat > conftest.$ac_ext <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002724#line 2725 "configure"
Guido van Rossumda88dad1995-01-26 00:46:29 +00002725#include "confdefs.h"
2726#include <stdio.h>
2727extern int optind, opterr, getopt();
2728extern char* optarg;
2729int main() {
2730 char* av[] = { "testprog", "parameter", "-fFlag", NULL };
2731 opterr = 0;
2732 if (getopt(3, av, "f:") == 'f') { exit(1); }
2733 exit(0);
2734}
2735EOF
2736eval $ac_link
2737if test -s conftest && (./conftest; exit) 2>/dev/null; then
2738 ac_cv_func_getopt=yes
2739else
2740 ac_cv_func_getopt=no
2741fi
2742fi
2743rm -fr conftest*
2744fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002745echo "$ac_t""$ac_cv_func_getopt" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00002746test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o"
2747
Guido van Rossum627b2d71993-12-24 10:39:16 +00002748# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002749trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002750cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002751# This file is a shell script that caches the results of configure
2752# tests run on this system so they can be shared between configure
2753# scripts and configure runs. It is not useful on other systems.
2754# If it contains results you don't want to keep, you may remove or edit it.
2755#
2756# By default, configure uses ./config.cache as the cache file,
2757# creating it if it does not exist already. You can give configure
2758# the --cache-file=FILE option to use a different cache file; that is
2759# what configure does when it calls configure scripts in
2760# subdirectories, so they share the cache.
2761# Giving --cache-file=/dev/null disables caching, for debugging configure.
2762# config.status only pays attention to the cache file if you give it the
2763# --recheck option to rerun configure.
2764#
2765EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002766# Ultrix sh set writes to stderr and can't be redirected directly,
2767# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002768(set) 2>&1 |
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002769 sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
2770 >> confcache
2771if cmp -s $cache_file confcache; then
2772 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002773else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002774 if test -w $cache_file; then
2775 echo "updating cache $cache_file"
2776 cat confcache > $cache_file
2777 else
2778 echo "not updating unwritable cache $cache_file"
2779 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002780fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002781rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00002782
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002783trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002784
2785test "x$prefix" = xNONE && prefix=$ac_default_prefix
2786# Let make expand exec_prefix.
2787test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00002788
Guido van Rossum7f43da71994-08-01 12:15:30 +00002789# Any assignment to VPATH causes Sun make to only execute
2790# the first set of double-colon rules, so remove it if not needed.
2791# If there is a colon in the path, we need to keep it.
2792if test "x$srcdir" = x.; then
2793 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2794fi
2795
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002796trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00002797
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002798DEFS=-DHAVE_CONFIG_H
2799
2800# Without the "./", some shells look in PATH for config.status.
2801: ${CONFIG_STATUS=./config.status}
2802
2803echo creating $CONFIG_STATUS
2804rm -f $CONFIG_STATUS
2805cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002806#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002807# Generated automatically by configure.
2808# Run this file to recreate the current configuration.
2809# This directory was configured as follows,
2810# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2811#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002812# $0 $ac_configure_args
2813#
2814# Compiler output produced by configure, useful for debugging
2815# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00002816
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002817ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002818for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00002819do
Guido van Rossum7f43da71994-08-01 12:15:30 +00002820 case "\$ac_option" in
2821 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002822 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2823 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002824 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002825 echo "$CONFIG_STATUS generated by autoconf version 2.3"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002826 exit 0 ;;
2827 -help | --help | --hel | --he | --h)
2828 echo "\$ac_cs_usage"; exit 0 ;;
2829 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00002830 esac
2831done
2832
Guido van Rossum7f43da71994-08-01 12:15:30 +00002833ac_given_srcdir=$srcdir
Guido van Rossum627b2d71993-12-24 10:39:16 +00002834
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002835trap '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 +00002836
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002837# Protect against being on the right side of a sed subst in config.status.
2838sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g;
2839 s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002840$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00002841$extrasub
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002842s%@CFLAGS@%$CFLAGS%g
2843s%@CPPFLAGS@%$CPPFLAGS%g
2844s%@CXXFLAGS@%$CXXFLAGS%g
2845s%@DEFS@%$DEFS%g
2846s%@LDFLAGS@%$LDFLAGS%g
2847s%@LIBS@%$LIBS%g
2848s%@exec_prefix@%$exec_prefix%g
2849s%@prefix@%$prefix%g
2850s%@program_transform_name@%$program_transform_name%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00002851s%@CC@%$CC%g
2852s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00002853s%@AR@%$AR%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00002854s%@INSTALL@%$INSTALL%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00002855s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2856s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00002857s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00002858s%@CPP@%$CPP%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00002859s%@MACHDEP@%$MACHDEP%g
2860s%@SO@%$SO%g
2861s%@LDSHARED@%$LDSHARED%g
2862s%@CCSHARED@%$CCSHARED%g
2863s%@LINKFORSHARED@%$LINKFORSHARED%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00002864s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00002865s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00002866s%@LIBM@%$LIBM%g
2867s%@LIBC@%$LIBC%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002868
2869CEOF
2870EOF
2871cat >> $CONFIG_STATUS <<EOF
2872
2873CONFIG_FILES=\${CONFIG_FILES-"Makefile Objects/Makefile Parser/Makefile Python/Makefile Modules/Makefile.pre"}
2874EOF
2875cat >> $CONFIG_STATUS <<\EOF
2876for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2877 # Support "outfile[:infile]", defaulting infile="outfile.in".
2878 case "$ac_file" in
2879 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
2880 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2881 *) ac_file_in="${ac_file}.in" ;;
2882 esac
2883
2884 # Adjust relative srcdir, etc. for subdirectories.
2885
2886 # Remove last slash and all that follows it. Not all systems have dirname.
2887 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2888 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2889 # The file is in a subdirectory.
2890 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002891 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002892 # A "../" for each directory in $ac_dir_suffix.
2893 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2894 else
2895 ac_dir_suffix= ac_dots=
2896 fi
2897
2898 case "$ac_given_srcdir" in
2899 .) srcdir=.
2900 if test -z "$ac_dots"; then top_srcdir=.
2901 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2902 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2903 *) # Relative path.
2904 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2905 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2906 esac
2907
2908 echo creating "$ac_file"
2909 rm -f "$ac_file"
2910 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2911 case "$ac_file" in
2912 *Makefile*) ac_comsub="1i\\
2913# $configure_input" ;;
2914 *) ac_comsub= ;;
2915 esac
2916 sed -e "$ac_comsub
2917s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00002918s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00002919s%@top_srcdir@%$top_srcdir%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002920" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00002921fi; done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002922rm -f conftest.subs
Guido van Rossum627b2d71993-12-24 10:39:16 +00002923
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002924# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2925# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00002926#
2927# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002928ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2929ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00002930ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002931ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00002932# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002933ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2934ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00002935ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002936ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00002937# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002938ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2939ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00002940ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002941ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00002942
2943CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002944for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2945 # Support "outfile[:infile]", defaulting infile="outfile.in".
2946 case "$ac_file" in
2947 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
2948 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2949 *) ac_file_in="${ac_file}.in" ;;
2950 esac
2951
Guido van Rossum7f43da71994-08-01 12:15:30 +00002952 echo creating $ac_file
2953
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002954 rm -f conftest.frag conftest.in conftest.out
2955 cp $ac_given_srcdir/$ac_file_in conftest.in
2956
2957EOF
2958
2959# Transform confdefs.h into a sed script conftest.vals that substitutes
2960# the proper values into config.h.in to produce config.h. And first:
2961# Protect against being on the right side of a sed subst in config.status.
2962# Protect against being in an unquoted here document in config.status.
2963rm -f conftest.vals
2964cat > conftest.hdr <<\EOF
2965s/[\\&%]/\\&/g
2966s%[\\$`]%\\&%g
2967s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2968s%ac_d%ac_u%gp
2969s%ac_u%ac_e%gp
2970EOF
2971sed -n -f conftest.hdr confdefs.h > conftest.vals
2972rm -f conftest.hdr
2973
2974# This sed command replaces #undef with comments. This is necessary, for
2975# example, in the case of _POSIX_SOURCE, which is predefined and required
2976# on some systems where configure will not decide to define it.
2977cat >> conftest.vals <<\EOF
2978s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2979EOF
2980
2981# Break up conftest.vals because some shells have a limit on
2982# the size of here documents, and old seds have small limits too.
2983# Maximum number of lines to put in a single here document.
2984ac_max_here_lines=12
2985
2986rm -f conftest.tail
2987while :
2988do
2989 ac_lines=`grep -c . conftest.vals`
2990 # grep -c gives empty output for an empty file on some AIX systems.
2991 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2992 # Write a limited-size here document to conftest.frag.
2993 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2994 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2995 echo 'CEOF
2996 sed -f conftest.frag conftest.in > conftest.out
2997 rm -f conftest.in
2998 mv conftest.out conftest.in
2999' >> $CONFIG_STATUS
3000 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3001 rm -f conftest.vals
3002 mv conftest.tail conftest.vals
3003done
3004rm -f conftest.vals
3005
3006cat >> $CONFIG_STATUS <<\EOF
3007 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00003008 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003009 cat conftest.in >> conftest.h
3010 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00003011 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00003012 echo "$ac_file is unchanged"
3013 rm -f conftest.h
3014 else
3015 rm -f $ac_file
3016 mv conftest.h $ac_file
3017 fi
3018fi; done
3019
3020
Guido van Rossum627b2d71993-12-24 10:39:16 +00003021
3022exit 0
3023EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003024chmod +x $CONFIG_STATUS
3025rm -fr confdefs* $ac_clean_files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003026test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00003027