blob: 4c7a436660a2b98cb5fa9359d5f19dbbfe9ff03c [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Skip Montanaro57454e52002-06-14 20:30:31 +00002# From configure.in Revision: 1.323 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Martin v. Löwis11437992002-04-12 09:54:03 +00004# Generated by GNU Autoconf 2.53.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis11437992002-04-12 09:54:03 +00006# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
7# Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008# This configure script is free software; the Free Software Foundation
9# gives unlimited permission to copy, distribute and modify it.
Guido van Rossum627b2d71993-12-24 10:39:16 +000010
Martin v. Löwis11437992002-04-12 09:54:03 +000011if expr a : '\(a\)' >/dev/null 2>&1; then
12 as_expr=expr
13else
14 as_expr=false
15fi
16
17
18## --------------------- ##
19## M4sh Initialization. ##
20## --------------------- ##
21
22# Be Bourne compatible
23if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24 emulate sh
25 NULLCMD=:
26elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
27 set -o posix
28fi
29
30# NLS nuisances.
31# Support unset when possible.
32if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
33 as_unset=unset
34else
35 as_unset=false
36fi
37
38(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
39 { $as_unset LANG || test "${LANG+set}" != set; } ||
40 { LANG=C; export LANG; }
41(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
42 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
43 { LC_ALL=C; export LC_ALL; }
44(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
45 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
46 { LC_TIME=C; export LC_TIME; }
47(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
48 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
49 { LC_CTYPE=C; export LC_CTYPE; }
50(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
51 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
52 { LANGUAGE=C; export LANGUAGE; }
53(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
54 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
55 { LC_COLLATE=C; export LC_COLLATE; }
56(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
57 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
58 { LC_NUMERIC=C; export LC_NUMERIC; }
59(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
60 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
61 { LC_MESSAGES=C; export LC_MESSAGES; }
62
63
64# Name of the executable.
65as_me=`(basename "$0") 2>/dev/null ||
66$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
67 X"$0" : 'X\(//\)$' \| \
68 X"$0" : 'X\(/\)$' \| \
69 . : '\(.\)' 2>/dev/null ||
70echo X/"$0" |
71 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
72 /^X\/\(\/\/\)$/{ s//\1/; q; }
73 /^X\/\(\/\).*/{ s//\1/; q; }
74 s/.*/./; q'`
75
76# PATH needs CR, and LINENO needs CR and PATH.
77# Avoid depending upon Character Ranges.
78as_cr_letters='abcdefghijklmnopqrstuvwxyz'
79as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
80as_cr_Letters=$as_cr_letters$as_cr_LETTERS
81as_cr_digits='0123456789'
82as_cr_alnum=$as_cr_Letters$as_cr_digits
83
84# The user is always right.
85if test "${PATH_SEPARATOR+set}" != set; then
86 echo "#! /bin/sh" >conftest.sh
87 echo "exit 0" >>conftest.sh
88 chmod +x conftest.sh
89 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
90 PATH_SEPARATOR=';'
91 else
92 PATH_SEPARATOR=:
93 fi
94 rm -f conftest.sh
95fi
96
97
98 as_lineno_1=$LINENO
99 as_lineno_2=$LINENO
100 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
101 test "x$as_lineno_1" != "x$as_lineno_2" &&
102 test "x$as_lineno_3" = "x$as_lineno_2" || {
103 # Find who we are. Look in the path if we contain no path at all
104 # relative or not.
105 case $0 in
106 *[\\/]* ) as_myself=$0 ;;
107 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
108for as_dir in $PATH
109do
110 IFS=$as_save_IFS
111 test -z "$as_dir" && as_dir=.
112 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
113done
114
115 ;;
116 esac
117 # We did not find ourselves, most probably we were run as `sh COMMAND'
118 # in which case we are not to be found in the path.
119 if test "x$as_myself" = x; then
120 as_myself=$0
121 fi
122 if test ! -f "$as_myself"; then
123 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
124 { (exit 1); exit 1; }; }
125 fi
126 case $CONFIG_SHELL in
127 '')
128 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
129for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
130do
131 IFS=$as_save_IFS
132 test -z "$as_dir" && as_dir=.
133 for as_base in sh bash ksh sh5; do
134 case $as_dir in
135 /*)
136 if ("$as_dir/$as_base" -c '
137 as_lineno_1=$LINENO
138 as_lineno_2=$LINENO
139 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
140 test "x$as_lineno_1" != "x$as_lineno_2" &&
141 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
142 CONFIG_SHELL=$as_dir/$as_base
143 export CONFIG_SHELL
144 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
145 fi;;
146 esac
147 done
148done
149;;
150 esac
151
152 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
153 # uniformly replaced by the line number. The first 'sed' inserts a
154 # line-number line before each line; the second 'sed' does the real
155 # work. The second script uses 'N' to pair each line-number line
156 # with the numbered line, and appends trailing '-' during
157 # substitution so that $LINENO is not a special case at line end.
158 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
159 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
160 sed '=' <$as_myself |
161 sed '
162 N
163 s,$,-,
164 : loop
165 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
166 t loop
167 s,-$,,
168 s,^['$as_cr_digits']*\n,,
169 ' >$as_me.lineno &&
170 chmod +x $as_me.lineno ||
171 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
172 { (exit 1); exit 1; }; }
173
174 # Don't try to exec as it changes $[0], causing all sort of problems
175 # (the dirname of $[0] is not the place where we might find the
176 # original and so on. Autoconf is especially sensible to this).
177 . ./$as_me.lineno
178 # Exit status is that of the last command.
179 exit
180}
181
182
183case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
184 *c*,-n*) ECHO_N= ECHO_C='
185' ECHO_T=' ' ;;
186 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
187 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
188esac
189
190if expr a : '\(a\)' >/dev/null 2>&1; then
191 as_expr=expr
192else
193 as_expr=false
194fi
195
196rm -f conf$$ conf$$.exe conf$$.file
197echo >conf$$.file
198if ln -s conf$$.file conf$$ 2>/dev/null; then
199 # We could just check for DJGPP; but this test a) works b) is more generic
200 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
201 if test -f conf$$.exe; then
202 # Don't use ln at all; we don't have any links
203 as_ln_s='cp -p'
204 else
205 as_ln_s='ln -s'
206 fi
207elif ln conf$$.file conf$$ 2>/dev/null; then
208 as_ln_s=ln
209else
210 as_ln_s='cp -p'
211fi
212rm -f conf$$ conf$$.exe conf$$.file
213
214as_executable_p="test -f"
215
216# Sed expression to map a string onto a valid CPP name.
217as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
218
219# Sed expression to map a string onto a valid variable name.
220as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
221
222
223# IFS
224# We need space, tab and new line, in precisely that order.
225as_nl='
226'
227IFS=" $as_nl"
228
229# CDPATH.
230$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
231
232
233# Name of the host.
234# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
235# so uname gets run too.
236ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
237
238exec 6>&1
239
240#
241# Initializations.
242#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000243ac_default_prefix=/usr/local
Martin v. Löwis11437992002-04-12 09:54:03 +0000244cross_compiling=no
245subdirs=
246MFLAGS=
247MAKEFLAGS=
248SHELL=${CONFIG_SHELL-/bin/sh}
249
250# Maximum number of lines to put in a shell here document.
251# This variable seems obsolete. It should probably be removed, and
252# only ac_max_sed_lines should be used.
253: ${ac_max_here_lines=38}
254
255# Identity of this package.
256PACKAGE_NAME=
257PACKAGE_TARNAME=
258PACKAGE_VERSION=
259PACKAGE_STRING=
260PACKAGE_BUGREPORT=
261
262ac_unique_file="Include/object.h"
263# Factoring default headers for most tests.
264ac_includes_default="\
265#include <stdio.h>
266#if HAVE_SYS_TYPES_H
267# include <sys/types.h>
268#endif
269#if HAVE_SYS_STAT_H
270# include <sys/stat.h>
271#endif
272#if STDC_HEADERS
273# include <stdlib.h>
274# include <stddef.h>
275#else
276# if HAVE_STDLIB_H
277# include <stdlib.h>
278# endif
279#endif
280#if HAVE_STRING_H
281# if !STDC_HEADERS && HAVE_MEMORY_H
282# include <memory.h>
283# endif
284# include <string.h>
285#endif
286#if HAVE_STRINGS_H
287# include <strings.h>
288#endif
289#if HAVE_INTTYPES_H
290# include <inttypes.h>
291#else
292# if HAVE_STDINT_H
293# include <stdint.h>
294# endif
295#endif
296#if HAVE_UNISTD_H
297# include <unistd.h>
298#endif"
299
Guido van Rossum627b2d71993-12-24 10:39:16 +0000300
Guido van Rossum7f43da71994-08-01 12:15:30 +0000301# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000302ac_init_help=
303ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000304# The variables have the same names as the options, with
305# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000306cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000307exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000308no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000309no_recursion=
310prefix=NONE
311program_prefix=NONE
312program_suffix=NONE
313program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000314silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000315site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000316srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000317verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000318x_includes=NONE
319x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000320
321# Installation directory options.
322# These are left unexpanded so users can "make install exec_prefix=/foo"
323# and all the variables that are supposed to be based on exec_prefix
324# by default will actually change.
325# Use braces instead of parens because sh, perl, etc. also accept them.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000326bindir='${exec_prefix}/bin'
327sbindir='${exec_prefix}/sbin'
328libexecdir='${exec_prefix}/libexec'
329datadir='${prefix}/share'
330sysconfdir='${prefix}/etc'
331sharedstatedir='${prefix}/com'
332localstatedir='${prefix}/var'
333libdir='${exec_prefix}/lib'
334includedir='${prefix}/include'
335oldincludedir='/usr/include'
336infodir='${prefix}/info'
337mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000338
Guido van Rossum7f43da71994-08-01 12:15:30 +0000339ac_prev=
340for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000341do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000342 # If the previous option needs an argument, assign it.
343 if test -n "$ac_prev"; then
344 eval "$ac_prev=\$ac_option"
345 ac_prev=
346 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000347 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000348
Martin v. Löwis11437992002-04-12 09:54:03 +0000349 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000350
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000351 # Accept the important Cygnus configure options, so we can diagnose typos.
352
Martin v. Löwis11437992002-04-12 09:54:03 +0000353 case $ac_option in
Guido van Rossum7f43da71994-08-01 12:15:30 +0000354
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000355 -bindir | --bindir | --bindi | --bind | --bin | --bi)
356 ac_prev=bindir ;;
357 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000358 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000359
360 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000361 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000362 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000363 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000364
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000365 -cache-file | --cache-file | --cache-fil | --cache-fi \
366 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
367 ac_prev=cache_file ;;
368 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
369 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000370 cache_file=$ac_optarg ;;
371
372 --config-cache | -C)
373 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000374
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000375 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
376 ac_prev=datadir ;;
377 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
378 | --da=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000379 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000380
Guido van Rossum7f43da71994-08-01 12:15:30 +0000381 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000382 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000383 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000384 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
385 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
386 { (exit 1); exit 1; }; }
387 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
388 eval "enable_$ac_feature=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000389
390 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000391 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000392 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000393 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
394 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
395 { (exit 1); exit 1; }; }
396 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
397 case $ac_option in
398 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000399 *) ac_optarg=yes ;;
400 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000401 eval "enable_$ac_feature='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000402
Guido van Rossum7f43da71994-08-01 12:15:30 +0000403 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
404 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
405 | --exec | --exe | --ex)
406 ac_prev=exec_prefix ;;
407 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
408 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
409 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000410 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000411
412 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000413 # Obsolete; use --with-gas.
414 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000415
Martin v. Löwis11437992002-04-12 09:54:03 +0000416 -help | --help | --hel | --he | -h)
417 ac_init_help=long ;;
418 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
419 ac_init_help=recursive ;;
420 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
421 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000422
423 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000424 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000425 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000426 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000427
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000428 -includedir | --includedir | --includedi | --included | --include \
429 | --includ | --inclu | --incl | --inc)
430 ac_prev=includedir ;;
431 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
432 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000433 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000434
435 -infodir | --infodir | --infodi | --infod | --info | --inf)
436 ac_prev=infodir ;;
437 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000439
440 -libdir | --libdir | --libdi | --libd)
441 ac_prev=libdir ;;
442 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000443 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000444
445 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
446 | --libexe | --libex | --libe)
447 ac_prev=libexecdir ;;
448 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
449 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000451
452 -localstatedir | --localstatedir | --localstatedi | --localstated \
453 | --localstate | --localstat | --localsta | --localst \
454 | --locals | --local | --loca | --loc | --lo)
455 ac_prev=localstatedir ;;
456 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
457 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
458 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000459 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000460
461 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
462 ac_prev=mandir ;;
463 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000465
Guido van Rossum7f43da71994-08-01 12:15:30 +0000466 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000467 # Obsolete; use --without-fp.
468 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000469
470 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000471 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000472 no_create=yes ;;
473
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000474 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
475 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
476 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000477
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000478 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
479 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
480 | --oldin | --oldi | --old | --ol | --o)
481 ac_prev=oldincludedir ;;
482 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
483 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
484 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000486
Guido van Rossum7f43da71994-08-01 12:15:30 +0000487 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
488 ac_prev=prefix ;;
489 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000490 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000491
492 -program-prefix | --program-prefix | --program-prefi | --program-pref \
493 | --program-pre | --program-pr | --program-p)
494 ac_prev=program_prefix ;;
495 -program-prefix=* | --program-prefix=* | --program-prefi=* \
496 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000497 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000498
499 -program-suffix | --program-suffix | --program-suffi | --program-suff \
500 | --program-suf | --program-su | --program-s)
501 ac_prev=program_suffix ;;
502 -program-suffix=* | --program-suffix=* | --program-suffi=* \
503 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000504 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000505
506 -program-transform-name | --program-transform-name \
507 | --program-transform-nam | --program-transform-na \
508 | --program-transform-n | --program-transform- \
509 | --program-transform | --program-transfor \
510 | --program-transfo | --program-transf \
511 | --program-trans | --program-tran \
512 | --progr-tra | --program-tr | --program-t)
513 ac_prev=program_transform_name ;;
514 -program-transform-name=* | --program-transform-name=* \
515 | --program-transform-nam=* | --program-transform-na=* \
516 | --program-transform-n=* | --program-transform-=* \
517 | --program-transform=* | --program-transfor=* \
518 | --program-transfo=* | --program-transf=* \
519 | --program-trans=* | --program-tran=* \
520 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000521 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000522
523 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
524 | -silent | --silent | --silen | --sile | --sil)
525 silent=yes ;;
526
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000527 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
528 ac_prev=sbindir ;;
529 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
530 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000531 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000532
533 -sharedstatedir | --sharedstatedir | --sharedstatedi \
534 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
535 | --sharedst | --shareds | --shared | --share | --shar \
536 | --sha | --sh)
537 ac_prev=sharedstatedir ;;
538 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
539 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
540 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
541 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000542 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000543
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000544 -site | --site | --sit)
545 ac_prev=site ;;
546 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000547 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000548
Guido van Rossum7f43da71994-08-01 12:15:30 +0000549 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
550 ac_prev=srcdir ;;
551 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000552 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000553
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000554 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
555 | --syscon | --sysco | --sysc | --sys | --sy)
556 ac_prev=sysconfdir ;;
557 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
558 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000559 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000560
Guido van Rossum7f43da71994-08-01 12:15:30 +0000561 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +0000562 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000563 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000564 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000565
566 -v | -verbose | --verbose | --verbos | --verbo | --verb)
567 verbose=yes ;;
568
Martin v. Löwis11437992002-04-12 09:54:03 +0000569 -version | --version | --versio | --versi | --vers | -V)
570 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000571
572 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000573 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000574 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000575 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
576 { echo "$as_me: error: invalid package name: $ac_package" >&2
577 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000578 ac_package=`echo $ac_package| sed 's/-/_/g'`
Martin v. Löwis11437992002-04-12 09:54:03 +0000579 case $ac_option in
580 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000581 *) ac_optarg=yes ;;
582 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000583 eval "with_$ac_package='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000584
585 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000586 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000587 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000588 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
589 { echo "$as_me: error: invalid package name: $ac_package" >&2
590 { (exit 1); exit 1; }; }
591 ac_package=`echo $ac_package | sed 's/-/_/g'`
592 eval "with_$ac_package=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000593
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000594 --x)
595 # Obsolete; use --with-x.
596 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000597
598 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
599 | --x-incl | --x-inc | --x-in | --x-i)
600 ac_prev=x_includes ;;
601 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
602 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000603 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000604
605 -x-libraries | --x-libraries | --x-librarie | --x-librari \
606 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
607 ac_prev=x_libraries ;;
608 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
609 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000610 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000611
Martin v. Löwis11437992002-04-12 09:54:03 +0000612 -*) { echo "$as_me: error: unrecognized option: $ac_option
613Try \`$0 --help' for more information." >&2
614 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000615 ;;
616
Martin v. Löwis11437992002-04-12 09:54:03 +0000617 *=*)
618 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
619 # Reject names that are not valid shell variable names.
620 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
621 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
622 { (exit 1); exit 1; }; }
623 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
624 eval "$ac_envvar='$ac_optarg'"
625 export $ac_envvar ;;
626
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000627 *)
Martin v. Löwis11437992002-04-12 09:54:03 +0000628 # FIXME: should be removed in autoconf 3.0.
629 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
630 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
631 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
632 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000633 ;;
634
635 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000636done
637
Guido van Rossum7f43da71994-08-01 12:15:30 +0000638if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000639 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
640 { echo "$as_me: error: missing argument to $ac_option" >&2
641 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000642fi
643
Martin v. Löwis11437992002-04-12 09:54:03 +0000644# Be sure to have absolute paths.
645for ac_var in exec_prefix prefix
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000646do
Martin v. Löwis11437992002-04-12 09:54:03 +0000647 eval ac_val=$`echo $ac_var`
648 case $ac_val in
649 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
650 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
651 { (exit 1); exit 1; }; };;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000652 esac
653done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000654
Martin v. Löwis11437992002-04-12 09:54:03 +0000655# Be sure to have absolute paths.
656for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
657 localstatedir libdir includedir oldincludedir infodir mandir
658do
659 eval ac_val=$`echo $ac_var`
660 case $ac_val in
661 [\\/$]* | ?:[\\/]* ) ;;
662 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
663 { (exit 1); exit 1; }; };;
664 esac
665done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000666
Martin v. Löwis11437992002-04-12 09:54:03 +0000667# There might be people who depend on the old broken behavior: `$host'
668# used to hold the argument of --host etc.
669# FIXME: To remove some day.
670build=$build_alias
671host=$host_alias
672target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +0000673
Martin v. Löwis11437992002-04-12 09:54:03 +0000674# FIXME: To remove some day.
675if test "x$host_alias" != x; then
676 if test "x$build_alias" = x; then
677 cross_compiling=maybe
678 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
679 If a cross compiler is detected then cross compile mode will be used." >&2
680 elif test "x$build_alias" != "x$host_alias"; then
681 cross_compiling=yes
682 fi
683fi
684
685ac_tool_prefix=
686test -n "$host_alias" && ac_tool_prefix=$host_alias-
687
688test "$silent" = yes && exec 6>/dev/null
689
Guido van Rossum627b2d71993-12-24 10:39:16 +0000690
691# Find the source files, if location was not specified.
692if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000693 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000694 # Try the directory containing this script, then its parent.
Martin v. Löwis11437992002-04-12 09:54:03 +0000695 ac_confdir=`(dirname "$0") 2>/dev/null ||
696$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
697 X"$0" : 'X\(//\)[^/]' \| \
698 X"$0" : 'X\(//\)$' \| \
699 X"$0" : 'X\(/\)' \| \
700 . : '\(.\)' 2>/dev/null ||
701echo X"$0" |
702 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
703 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
704 /^X\(\/\/\)$/{ s//\1/; q; }
705 /^X\(\/\).*/{ s//\1/; q; }
706 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000707 srcdir=$ac_confdir
708 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000709 srcdir=..
710 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000711else
712 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000713fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000714if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000715 if test "$ac_srcdir_defaulted" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000716 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
717 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000718 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000719 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
720 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000721 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000722fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000723srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
724ac_env_build_alias_set=${build_alias+set}
725ac_env_build_alias_value=$build_alias
726ac_cv_env_build_alias_set=${build_alias+set}
727ac_cv_env_build_alias_value=$build_alias
728ac_env_host_alias_set=${host_alias+set}
729ac_env_host_alias_value=$host_alias
730ac_cv_env_host_alias_set=${host_alias+set}
731ac_cv_env_host_alias_value=$host_alias
732ac_env_target_alias_set=${target_alias+set}
733ac_env_target_alias_value=$target_alias
734ac_cv_env_target_alias_set=${target_alias+set}
735ac_cv_env_target_alias_value=$target_alias
736ac_env_CC_set=${CC+set}
737ac_env_CC_value=$CC
738ac_cv_env_CC_set=${CC+set}
739ac_cv_env_CC_value=$CC
740ac_env_CFLAGS_set=${CFLAGS+set}
741ac_env_CFLAGS_value=$CFLAGS
742ac_cv_env_CFLAGS_set=${CFLAGS+set}
743ac_cv_env_CFLAGS_value=$CFLAGS
744ac_env_LDFLAGS_set=${LDFLAGS+set}
745ac_env_LDFLAGS_value=$LDFLAGS
746ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
747ac_cv_env_LDFLAGS_value=$LDFLAGS
748ac_env_CPPFLAGS_set=${CPPFLAGS+set}
749ac_env_CPPFLAGS_value=$CPPFLAGS
750ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
751ac_cv_env_CPPFLAGS_value=$CPPFLAGS
752ac_env_CPP_set=${CPP+set}
753ac_env_CPP_value=$CPP
754ac_cv_env_CPP_set=${CPP+set}
755ac_cv_env_CPP_value=$CPP
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000756
Martin v. Löwis11437992002-04-12 09:54:03 +0000757#
758# Report the --help message.
759#
760if test "$ac_init_help" = "long"; then
761 # Omit some internal or obsolete options to make the list less imposing.
762 # This message is too long to be a string in the A/UX 3.1 sh.
763 cat <<_ACEOF
764\`configure' configures this package to adapt to many kinds of systems.
765
766Usage: $0 [OPTION]... [VAR=VALUE]...
767
768To assign environment variables (e.g., CC, CFLAGS...), specify them as
769VAR=VALUE. See below for descriptions of some of the useful variables.
770
771Defaults for the options are specified in brackets.
772
773Configuration:
774 -h, --help display this help and exit
775 --help=short display options specific to this package
776 --help=recursive display the short help of all the included packages
777 -V, --version display version information and exit
778 -q, --quiet, --silent do not print \`checking...' messages
779 --cache-file=FILE cache test results in FILE [disabled]
780 -C, --config-cache alias for \`--cache-file=config.cache'
781 -n, --no-create do not create output files
782 --srcdir=DIR find the sources in DIR [configure dir or \`..']
783
784_ACEOF
785
786 cat <<_ACEOF
787Installation directories:
788 --prefix=PREFIX install architecture-independent files in PREFIX
789 [$ac_default_prefix]
790 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
791 [PREFIX]
792
793By default, \`make install' will install all the files in
794\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
795an installation prefix other than \`$ac_default_prefix' using \`--prefix',
796for instance \`--prefix=\$HOME'.
797
798For better control, use the options below.
799
800Fine tuning of the installation directories:
801 --bindir=DIR user executables [EPREFIX/bin]
802 --sbindir=DIR system admin executables [EPREFIX/sbin]
803 --libexecdir=DIR program executables [EPREFIX/libexec]
804 --datadir=DIR read-only architecture-independent data [PREFIX/share]
805 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
806 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
807 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
808 --libdir=DIR object code libraries [EPREFIX/lib]
809 --includedir=DIR C header files [PREFIX/include]
810 --oldincludedir=DIR C header files for non-gcc [/usr/include]
811 --infodir=DIR info documentation [PREFIX/info]
812 --mandir=DIR man documentation [PREFIX/man]
813_ACEOF
814
815 cat <<\_ACEOF
816_ACEOF
817fi
818
819if test -n "$ac_init_help"; then
820
821 cat <<\_ACEOF
822
823Optional Features:
824 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
825 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
826 --enable-framework=INSTALLDIR Build (MacOSX|Darwin) framework
827 --enable-shared disable/enable building shared python library
828 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
829 --enable-ipv6 Enable ipv6 (with ipv4) support
830 --disable-ipv6 Disable ipv6 support
831 --enable-unicode=ucs2,ucs4 Enable Unicode strings (default is yes)
832
833Optional Packages:
834 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
835 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
836 --without-gcc never use gcc
837 --with-cxx=<compiler> enable C++ support
838 --with-suffix=.exe set executable suffix
839 --with-pydebug build with Py_DEBUG defined
840 --with-libs='lib1 ...' link against additional libs
841 --with-signal-module disable/enable signal module
842 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
843 --with(out)-threads=DIRECTORY disable/enable thread support
844 --with(out)-thread=DIRECTORY deprecated; use --with(out)-threads
845 --with-pth use GNU pth threading libraries
846 --with(out)-cycle-gc disable/enable garbage collection
Jack Jansen7b8c7542002-04-14 20:12:41 +0000847 --with(out)-universal-newlines disable/enable foreign newlines
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +0000848 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwis11437992002-04-12 09:54:03 +0000849 --with(out)-pymalloc disable/enable specialized mallocs
850 --with-wctype-functions use wctype.h functions
851 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking
852 --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking
853 --with-fpectl enable SIGFPE catching
854 --with-libm=STRING math library
855 --with-libc=STRING C library
856
857Some influential environment variables:
858 CC C compiler command
859 CFLAGS C compiler flags
860 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
861 nonstandard directory <lib dir>
862 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
863 headers in a nonstandard directory <include dir>
864 CPP C preprocessor
865
866Use these variables to override the choices made by `configure' or to help
867it to find libraries and programs with nonstandard names/locations.
868
869_ACEOF
870fi
871
872if test "$ac_init_help" = "recursive"; then
873 # If there are subdirs, report their specific --help.
874 ac_popdir=`pwd`
875 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
876 test -d $ac_dir || continue
877 ac_builddir=.
878
879if test "$ac_dir" != .; then
880 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
881 # A "../" for each directory in $ac_dir_suffix.
882 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
883else
884 ac_dir_suffix= ac_top_builddir=
885fi
886
887case $srcdir in
888 .) # No --srcdir option. We are building in place.
889 ac_srcdir=.
890 if test -z "$ac_top_builddir"; then
891 ac_top_srcdir=.
892 else
893 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
894 fi ;;
895 [\\/]* | ?:[\\/]* ) # Absolute path.
896 ac_srcdir=$srcdir$ac_dir_suffix;
897 ac_top_srcdir=$srcdir ;;
898 *) # Relative path.
899 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
900 ac_top_srcdir=$ac_top_builddir$srcdir ;;
901esac
902# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
903# absolute.
904ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
905ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
906ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
907ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
908
909 cd $ac_dir
910 # Check for guested configure; otherwise get Cygnus style configure.
911 if test -f $ac_srcdir/configure.gnu; then
912 echo
913 $SHELL $ac_srcdir/configure.gnu --help=recursive
914 elif test -f $ac_srcdir/configure; then
915 echo
916 $SHELL $ac_srcdir/configure --help=recursive
917 elif test -f $ac_srcdir/configure.ac ||
918 test -f $ac_srcdir/configure.in; then
919 echo
920 $ac_configure --help
921 else
922 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
923 fi
924 cd $ac_popdir
925 done
926fi
927
928test -n "$ac_init_help" && exit 0
929if $ac_init_version; then
930 cat <<\_ACEOF
931
932Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
933Free Software Foundation, Inc.
934This configure script is free software; the Free Software Foundation
935gives unlimited permission to copy, distribute and modify it.
936_ACEOF
937 exit 0
938fi
939exec 5>config.log
940cat >&5 <<_ACEOF
941This file contains any messages produced by compilers while
942running configure, to aid debugging if configure makes a mistake.
943
944It was created by $as_me, which was
945generated by GNU Autoconf 2.53. Invocation command line was
946
947 $ $0 $@
948
949_ACEOF
950{
951cat <<_ASUNAME
952## --------- ##
953## Platform. ##
954## --------- ##
955
956hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
957uname -m = `(uname -m) 2>/dev/null || echo unknown`
958uname -r = `(uname -r) 2>/dev/null || echo unknown`
959uname -s = `(uname -s) 2>/dev/null || echo unknown`
960uname -v = `(uname -v) 2>/dev/null || echo unknown`
961
962/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
963/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
964
965/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
966/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
967/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
968hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
969/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
970/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
971/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
972
973_ASUNAME
974
975as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
976for as_dir in $PATH
977do
978 IFS=$as_save_IFS
979 test -z "$as_dir" && as_dir=.
980 echo "PATH: $as_dir"
981done
982
983} >&5
984
985cat >&5 <<_ACEOF
986
987
988## ----------- ##
989## Core tests. ##
990## ----------- ##
991
992_ACEOF
993
994
995# Keep a trace of the command line.
996# Strip out --no-create and --no-recursion so they do not pile up.
997# Also quote any args containing shell meta-characters.
998ac_configure_args=
999ac_sep=
1000for ac_arg
1001do
1002 case $ac_arg in
1003 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1004 | --no-cr | --no-c | -n ) continue ;;
1005 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1006 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1007 continue ;;
1008 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1009 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1010 esac
1011 case " $ac_configure_args " in
1012 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1013 *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1014 ac_sep=" " ;;
1015 esac
1016 # Get rid of the leading space.
1017done
1018
1019# When interrupted or exit'd, cleanup temporary files, and complete
1020# config.log. We remove comments because anyway the quotes in there
1021# would cause problems or look ugly.
1022# WARNING: Be sure not to use single quotes in there, as some shells,
1023# such as our DU 5.0 friend, will then `close' the trap.
1024trap 'exit_status=$?
1025 # Save into config.log some information that might help in debugging.
1026 {
1027 echo
1028 cat <<\_ASBOX
1029## ---------------- ##
1030## Cache variables. ##
1031## ---------------- ##
1032_ASBOX
1033 echo
1034 # The following way of writing the cache mishandles newlines in values,
1035{
1036 (set) 2>&1 |
1037 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1038 *ac_space=\ *)
1039 sed -n \
1040 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1041 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1042 ;;
1043 *)
1044 sed -n \
1045 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1046 ;;
1047 esac;
1048}
1049 echo
1050 if test -s confdefs.h; then
1051 cat <<\_ASBOX
1052## ----------- ##
1053## confdefs.h. ##
1054## ----------- ##
1055_ASBOX
1056 echo
1057 sed "/^$/d" confdefs.h
1058 echo
1059 fi
1060 test "$ac_signal" != 0 &&
1061 echo "$as_me: caught signal $ac_signal"
1062 echo "$as_me: exit $exit_status"
1063 } >&5
1064 rm -f core core.* *.core &&
1065 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1066 exit $exit_status
1067 ' 0
1068for ac_signal in 1 2 13 15; do
1069 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1070done
1071ac_signal=0
1072
1073# confdefs.h avoids OS command line length limits that DEFS can exceed.
1074rm -rf conftest* confdefs.h
1075# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1076echo >confdefs.h
1077
1078# Predefined preprocessor variables.
1079
1080cat >>confdefs.h <<_ACEOF
1081#define PACKAGE_NAME "$PACKAGE_NAME"
1082_ACEOF
1083
1084
1085cat >>confdefs.h <<_ACEOF
1086#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1087_ACEOF
1088
1089
1090cat >>confdefs.h <<_ACEOF
1091#define PACKAGE_VERSION "$PACKAGE_VERSION"
1092_ACEOF
1093
1094
1095cat >>confdefs.h <<_ACEOF
1096#define PACKAGE_STRING "$PACKAGE_STRING"
1097_ACEOF
1098
1099
1100cat >>confdefs.h <<_ACEOF
1101#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1102_ACEOF
1103
1104
1105# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001106# Prefer explicitly selected file to automatically selected ones.
1107if test -z "$CONFIG_SITE"; then
1108 if test "x$prefix" != xNONE; then
1109 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1110 else
1111 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1112 fi
1113fi
1114for ac_site_file in $CONFIG_SITE; do
1115 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1117echo "$as_me: loading site script $ac_site_file" >&6;}
1118 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001119 . "$ac_site_file"
1120 fi
1121done
1122
1123if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001124 # Some versions of bash will fail to source /dev/null (special
1125 # files actually), so we avoid doing that.
1126 if test -f "$cache_file"; then
1127 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1128echo "$as_me: loading cache $cache_file" >&6;}
1129 case $cache_file in
1130 [\\/]* | ?:[\\/]* ) . $cache_file;;
1131 *) . ./$cache_file;;
1132 esac
1133 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001134else
Martin v. Löwis11437992002-04-12 09:54:03 +00001135 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1136echo "$as_me: creating cache $cache_file" >&6;}
1137 >$cache_file
1138fi
1139
1140# Check that the precious variables saved in the cache have kept the same
1141# value.
1142ac_cache_corrupted=false
1143for ac_var in `(set) 2>&1 |
1144 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1145 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1146 eval ac_new_set=\$ac_env_${ac_var}_set
1147 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1148 eval ac_new_val="\$ac_env_${ac_var}_value"
1149 case $ac_old_set,$ac_new_set in
1150 set,)
1151 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1152echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1153 ac_cache_corrupted=: ;;
1154 ,set)
1155 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1156echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1157 ac_cache_corrupted=: ;;
1158 ,);;
1159 *)
1160 if test "x$ac_old_val" != "x$ac_new_val"; then
1161 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1162echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1163 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1164echo "$as_me: former value: $ac_old_val" >&2;}
1165 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1166echo "$as_me: current value: $ac_new_val" >&2;}
1167 ac_cache_corrupted=:
1168 fi;;
1169 esac
1170 # Pass precious variables to config.status.
1171 if test "$ac_new_set" = set; then
1172 case $ac_new_val in
1173 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1174 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1175 *) ac_arg=$ac_var=$ac_new_val ;;
1176 esac
1177 case " $ac_configure_args " in
1178 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1179 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1180 esac
1181 fi
1182done
1183if $ac_cache_corrupted; then
1184 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1185echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1186 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1187echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1188 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001189fi
1190
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001192ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001193ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1194ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1195ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001196
Guido van Rossum627b2d71993-12-24 10:39:16 +00001197
Michael W. Hudson54241132001-12-07 15:38:26 +00001198
1199
Guido van Rossum627b2d71993-12-24 10:39:16 +00001200
Martin v. Löwis11437992002-04-12 09:54:03 +00001201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214ac_config_headers="$ac_config_headers pyconfig.h"
1215
1216
1217# This is for stuff that absolutely must end up in pyconfig.h.
1218# Please use pyport.h instead, if possible.
1219
1220
1221
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001222# Set VERSION so we only need to edit in one place (i.e., here)
1223
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00001224VERSION=2.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001225
Martin v. Löwis1142de32002-03-29 16:28:31 +00001226
1227SOVERSION=1.0
1228
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001229# Arguments passed to configure.
1230
1231CONFIG_ARGS="$ac_configure_args"
1232
Michael W. Hudson54241132001-12-07 15:38:26 +00001233
Jack Jansene578a632001-08-15 01:27:14 +00001234# Check whether --enable-framework or --disable-framework was given.
1235if test "${enable_framework+set}" = set; then
1236 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001237
Jack Jansene578a632001-08-15 01:27:14 +00001238 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001239 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001240 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001241 esac
1242 case $enableval in
1243 no)
1244 PYTHONFRAMEWORK=
1245 PYTHONFRAMEWORKDIR=no-framework
1246 PYTHONFRAMEWORKPREFIX=
1247 PYTHONFRAMEWORKINSTALLDIR=
1248 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001249 ;;
1250 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001251 PYTHONFRAMEWORK=Python
1252 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001253 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001254 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1255 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001256 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001257
Guido van Rossum563e7081996-09-10 18:20:48 +00001258else
Martin v. Löwis11437992002-04-12 09:54:03 +00001259
Jack Jansene578a632001-08-15 01:27:14 +00001260 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001261 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001262 PYTHONFRAMEWORKPREFIX=
1263 PYTHONFRAMEWORKINSTALLDIR=
1264 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001265
Martin v. Löwis11437992002-04-12 09:54:03 +00001266fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001267
1268
1269
1270
Jack Jansene578a632001-08-15 01:27:14 +00001271
1272##AC_ARG_WITH(dyld,
1273##[ --with-dyld Use (OpenStep|Rhapsody) dynamic linker],,)
1274##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001275# Set name for machine-dependent library files
1276
Martin v. Löwis11437992002-04-12 09:54:03 +00001277echo "$as_me:$LINENO: checking MACHDEP" >&5
1278echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001279if test -z "$MACHDEP"
1280then
Guido van Rossum563e7081996-09-10 18:20:48 +00001281 ac_sys_system=`uname -s`
Martin v. Löwis130fb172001-07-19 11:00:41 +00001282 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001283 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001284 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001285 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001286 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001287 ac_md_system=`echo $ac_sys_system |
1288 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1289 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001290 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001291 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001292
Guido van Rossum07397971997-04-29 21:49:50 +00001293 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001294 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001295 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001296 atheos*) MACHDEP="atheos";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001297 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001298 esac
1299fi
Guido van Rossum91922671997-10-09 20:24:13 +00001300
1301#
1302# SGI compilers allow the specification of the both the ABI and the
1303# ISA on the command line. Depending on the values of these switches,
1304# different and often incompatable code will be generated.
1305#
1306# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1307# thus supply support for various ABI/ISA combinations. The MACHDEP
1308# variable is also adjusted.
1309#
1310
1311if test ! -z "$SGI_ABI"
1312then
1313 CC="cc $SGI_ABI"
1314 LDFLAGS="$SGI_ABI $LDFLAGS"
1315 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1316fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001317echo "$as_me:$LINENO: result: $MACHDEP" >&5
1318echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001319
Guido van Rossum627b2d71993-12-24 10:39:16 +00001320# checks for alternative programs
Martin v. Löwis11437992002-04-12 09:54:03 +00001321echo "$as_me:$LINENO: checking for --without-gcc" >&5
1322echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1323
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001324# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001325if test "${with_gcc+set}" = set; then
1326 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001327
Guido van Rossum7f43da71994-08-01 12:15:30 +00001328 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001329 no) CC=cc
1330 without_gcc=yes;;
1331 yes) CC=gcc
1332 without_gcc=no;;
1333 *) CC=$withval
1334 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001335 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001336else
Martin v. Löwis11437992002-04-12 09:54:03 +00001337
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001338 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001339 AIX*) CC=cc_r
1340 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001341 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001342 case $BE_HOST_CPU in
1343 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001344 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001345 without_gcc=yes
Fred Drake5790be12000-10-09 17:06:13 +00001346 OPT="-O -D'DL_EXPORT(RTYPE)=__declspec(dllexport) RTYPE' -D'DL_IMPORT(RTYPE)=__declspec(dllexport) RTYPE' -export pragma"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001347 CCSHARED="-UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001348 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001349 ;;
1350 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001351 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001352 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +00001353 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001354 ;;
1355 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001356 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1357echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1358 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001359 ;;
1360 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001361 AR="\$(srcdir)/Modules/ar_beos"
1362 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001363 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001364 Monterey*)
1365 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001366 without_gcc=;;
1367 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001368 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001369fi;
1370echo "$as_me:$LINENO: result: $without_gcc" >&5
1371echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001372
1373
Guido van Rossum95012191999-12-16 17:50:52 +00001374
Fred Drakea1a84e72001-03-06 05:52:16 +00001375MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001376echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1377echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1378
Guido van Rossum95012191999-12-16 17:50:52 +00001379# Check whether --with-cxx or --without-cxx was given.
1380if test "${with_cxx+set}" = set; then
1381 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001382
Martin v. Löwis22352952000-12-13 17:37:02 +00001383 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001384 case $withval in
1385 no) CXX=
1386 with_cxx=no;;
1387 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001388 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001389 with_cxx=$withval;;
1390 esac
1391else
Martin v. Löwis11437992002-04-12 09:54:03 +00001392
Guido van Rossum95012191999-12-16 17:50:52 +00001393 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001394 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001395
Martin v. Löwis11437992002-04-12 09:54:03 +00001396fi;
1397echo "$as_me:$LINENO: result: $with_cxx" >&5
1398echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001399
1400if test "$with_cxx" = "yes"
1401then
Martin v. Löwis11437992002-04-12 09:54:03 +00001402 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1403echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1404 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001405fi
1406
1407
1408
1409
Martin v. Löwis11437992002-04-12 09:54:03 +00001410if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001411then
1412 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1413do
Martin v. Löwis11437992002-04-12 09:54:03 +00001414 # Extract the first word of "$ac_prog", so it can be a program name with args.
Martin v. Löwis22352952000-12-13 17:37:02 +00001415set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001416echo "$as_me:$LINENO: checking for $ac_word" >&5
1417echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1418if test "${ac_cv_prog_CXX+set}" = set; then
1419 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001420else
1421 if test -n "$CXX"; then
1422 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1423else
Martin v. Löwis11437992002-04-12 09:54:03 +00001424as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1425for as_dir in $PATH
1426do
1427 IFS=$as_save_IFS
1428 test -z "$as_dir" && as_dir=.
1429 for ac_exec_ext in '' $ac_executable_extensions; do
1430 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1431 ac_cv_prog_CXX="$ac_prog"
1432 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1433 break 2
1434 fi
1435done
1436done
1437
Martin v. Löwis22352952000-12-13 17:37:02 +00001438fi
1439fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001440CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001441if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001442 echo "$as_me:$LINENO: result: $CXX" >&5
1443echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001444else
Martin v. Löwis11437992002-04-12 09:54:03 +00001445 echo "$as_me:$LINENO: result: no" >&5
1446echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001447fi
1448
Martin v. Löwis11437992002-04-12 09:54:03 +00001449 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001450done
1451test -n "$CXX" || CXX="notfound"
1452
1453 if test "$CXX" = "notfound"
1454 then
1455 CXX=
1456 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001457 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001458ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001459ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1460ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1461ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1462 cat >conftest.$ac_ext <<_ACEOF
1463#line $LINENO "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +00001464#include "confdefs.h"
1465
Martin v. Löwis11437992002-04-12 09:54:03 +00001466#ifdef F77_DUMMY_MAIN
1467# ifdef __cplusplus
1468 extern "C"
1469# endif
1470 int F77_DUMMY_MAIN() { return 1; }
1471#endif
1472int
1473main ()
1474{
Michael W. Hudson54241132001-12-07 15:38:26 +00001475
Martin v. Löwis11437992002-04-12 09:54:03 +00001476 ;
1477 return 0;
1478}
1479_ACEOF
1480ac_clean_files_save=$ac_clean_files
1481ac_clean_files="$ac_clean_files a.out a.exe"
1482# Try to create an executable without -o first, disregard a.out.
1483# It will help us diagnose broken compilers, and finding out an intuition
1484# of exeext.
1485echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1486echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1487ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1488if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1489 (eval $ac_link_default) 2>&5
1490 ac_status=$?
1491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1492 (exit $ac_status); }; then
1493 # Find the output, starting from the most likely. This scheme is
1494# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1495# resort.
1496
1497# Be careful to initialize this variable, since it used to be cached.
1498# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1499ac_cv_exeext=
1500for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1501 ls a.out conftest 2>/dev/null;
1502 ls a.* conftest.* 2>/dev/null`; do
1503 case $ac_file in
1504 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1505 a.out ) # We found the default executable, but exeext='' is most
1506 # certainly right.
1507 break;;
1508 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1509 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1510 export ac_cv_exeext
1511 break;;
1512 * ) break;;
1513 esac
1514done
1515else
1516 echo "$as_me: failed program was:" >&5
1517cat conftest.$ac_ext >&5
1518{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables" >&5
1519echo "$as_me: error: C++ compiler cannot create executables" >&2;}
1520 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001521fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001522
1523ac_exeext=$ac_cv_exeext
1524echo "$as_me:$LINENO: result: $ac_file" >&5
1525echo "${ECHO_T}$ac_file" >&6
1526
1527# Check the compiler produces executables we can run. If not, either
1528# the compiler is broken, or we cross compile.
1529echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1530echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1531# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1532# If not cross compiling, check that we can run a simple program.
1533if test "$cross_compiling" != yes; then
1534 if { ac_try='./$ac_file'
1535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1536 (eval $ac_try) 2>&5
1537 ac_status=$?
1538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1539 (exit $ac_status); }; }; then
1540 cross_compiling=no
1541 else
1542 if test "$cross_compiling" = maybe; then
1543 cross_compiling=yes
1544 else
1545 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1546If you meant to cross compile, use \`--host'." >&5
1547echo "$as_me: error: cannot run C++ compiled programs.
1548If you meant to cross compile, use \`--host'." >&2;}
1549 { (exit 1); exit 1; }; }
1550 fi
1551 fi
1552fi
1553echo "$as_me:$LINENO: result: yes" >&5
1554echo "${ECHO_T}yes" >&6
1555
1556rm -f a.out a.exe conftest$ac_cv_exeext
1557ac_clean_files=$ac_clean_files_save
1558# Check the compiler produces executables we can run. If not, either
1559# the compiler is broken, or we cross compile.
1560echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1561echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1562echo "$as_me:$LINENO: result: $cross_compiling" >&5
1563echo "${ECHO_T}$cross_compiling" >&6
1564
1565echo "$as_me:$LINENO: checking for suffix of executables" >&5
1566echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1567if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1568 (eval $ac_link) 2>&5
1569 ac_status=$?
1570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1571 (exit $ac_status); }; then
1572 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1573# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1574# work properly (i.e., refer to `conftest.exe'), while it won't with
1575# `rm'.
1576for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1577 case $ac_file in
1578 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1579 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1580 export ac_cv_exeext
1581 break;;
1582 * ) break;;
1583 esac
1584done
1585else
1586 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1587echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1588 { (exit 1); exit 1; }; }
1589fi
1590
1591rm -f conftest$ac_cv_exeext
1592echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1593echo "${ECHO_T}$ac_cv_exeext" >&6
1594
1595rm -f conftest.$ac_ext
1596EXEEXT=$ac_cv_exeext
1597ac_exeext=$EXEEXT
1598
1599 ac_ext=c
1600ac_cpp='$CPP $CPPFLAGS'
1601ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1602ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1603ac_compiler_gnu=$ac_cv_c_compiler_gnu
1604
1605
Martin v. Löwis22352952000-12-13 17:37:02 +00001606
1607 fi
1608fi
1609
Guido van Rossum8b131c51995-03-09 14:10:13 +00001610# If the user switches compilers, we can't believe the cache
1611if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1612then
Martin v. Löwis11437992002-04-12 09:54:03 +00001613 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1614(it is also a good idea to do 'make clean' before compiling)" >&5
1615echo "$as_me: error: cached CC is different -- throw away $cache_file
1616(it is also a good idea to do 'make clean' before compiling)" >&2;}
1617 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001618fi
1619
Martin v. Löwis11437992002-04-12 09:54:03 +00001620ac_ext=c
1621ac_cpp='$CPP $CPPFLAGS'
1622ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1623ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1624ac_compiler_gnu=$ac_cv_c_compiler_gnu
1625if test -n "$ac_tool_prefix"; then
1626 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1627set dummy ${ac_tool_prefix}gcc; ac_word=$2
1628echo "$as_me:$LINENO: checking for $ac_word" >&5
1629echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1630if test "${ac_cv_prog_CC+set}" = set; then
1631 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001632else
1633 if test -n "$CC"; then
1634 ac_cv_prog_CC="$CC" # Let the user override the test.
1635else
Martin v. Löwis11437992002-04-12 09:54:03 +00001636as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1637for as_dir in $PATH
1638do
1639 IFS=$as_save_IFS
1640 test -z "$as_dir" && as_dir=.
1641 for ac_exec_ext in '' $ac_executable_extensions; do
1642 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1643 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1644 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1645 break 2
1646 fi
1647done
1648done
1649
Jack Jansendd19cf82001-12-06 22:36:17 +00001650fi
1651fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001652CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001653if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001654 echo "$as_me:$LINENO: result: $CC" >&5
1655echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001656else
Martin v. Löwis11437992002-04-12 09:54:03 +00001657 echo "$as_me:$LINENO: result: no" >&5
1658echo "${ECHO_T}no" >&6
1659fi
1660
1661fi
1662if test -z "$ac_cv_prog_CC"; then
1663 ac_ct_CC=$CC
1664 # Extract the first word of "gcc", so it can be a program name with args.
1665set dummy gcc; ac_word=$2
1666echo "$as_me:$LINENO: checking for $ac_word" >&5
1667echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1668if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1669 echo $ECHO_N "(cached) $ECHO_C" >&6
1670else
1671 if test -n "$ac_ct_CC"; then
1672 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1673else
1674as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1675for as_dir in $PATH
1676do
1677 IFS=$as_save_IFS
1678 test -z "$as_dir" && as_dir=.
1679 for ac_exec_ext in '' $ac_executable_extensions; do
1680 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1681 ac_cv_prog_ac_ct_CC="gcc"
1682 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1683 break 2
1684 fi
1685done
1686done
1687
1688fi
1689fi
1690ac_ct_CC=$ac_cv_prog_ac_ct_CC
1691if test -n "$ac_ct_CC"; then
1692 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1693echo "${ECHO_T}$ac_ct_CC" >&6
1694else
1695 echo "$as_me:$LINENO: result: no" >&5
1696echo "${ECHO_T}no" >&6
1697fi
1698
1699 CC=$ac_ct_CC
1700else
1701 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001702fi
1703
Jack Jansendd19cf82001-12-06 22:36:17 +00001704if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001705 if test -n "$ac_tool_prefix"; then
1706 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1707set dummy ${ac_tool_prefix}cc; ac_word=$2
1708echo "$as_me:$LINENO: checking for $ac_word" >&5
1709echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1710if test "${ac_cv_prog_CC+set}" = set; then
1711 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001712else
1713 if test -n "$CC"; then
1714 ac_cv_prog_CC="$CC" # Let the user override the test.
1715else
Martin v. Löwis11437992002-04-12 09:54:03 +00001716as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1717for as_dir in $PATH
1718do
1719 IFS=$as_save_IFS
1720 test -z "$as_dir" && as_dir=.
1721 for ac_exec_ext in '' $ac_executable_extensions; do
1722 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1723 ac_cv_prog_CC="${ac_tool_prefix}cc"
1724 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1725 break 2
1726 fi
1727done
1728done
1729
1730fi
1731fi
1732CC=$ac_cv_prog_CC
1733if test -n "$CC"; then
1734 echo "$as_me:$LINENO: result: $CC" >&5
1735echo "${ECHO_T}$CC" >&6
1736else
1737 echo "$as_me:$LINENO: result: no" >&5
1738echo "${ECHO_T}no" >&6
1739fi
1740
1741fi
1742if test -z "$ac_cv_prog_CC"; then
1743 ac_ct_CC=$CC
1744 # Extract the first word of "cc", so it can be a program name with args.
1745set dummy cc; ac_word=$2
1746echo "$as_me:$LINENO: checking for $ac_word" >&5
1747echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1748if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1749 echo $ECHO_N "(cached) $ECHO_C" >&6
1750else
1751 if test -n "$ac_ct_CC"; then
1752 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1753else
1754as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1755for as_dir in $PATH
1756do
1757 IFS=$as_save_IFS
1758 test -z "$as_dir" && as_dir=.
1759 for ac_exec_ext in '' $ac_executable_extensions; do
1760 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1761 ac_cv_prog_ac_ct_CC="cc"
1762 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1763 break 2
1764 fi
1765done
1766done
1767
1768fi
1769fi
1770ac_ct_CC=$ac_cv_prog_ac_ct_CC
1771if test -n "$ac_ct_CC"; then
1772 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1773echo "${ECHO_T}$ac_ct_CC" >&6
1774else
1775 echo "$as_me:$LINENO: result: no" >&5
1776echo "${ECHO_T}no" >&6
1777fi
1778
1779 CC=$ac_ct_CC
1780else
1781 CC="$ac_cv_prog_CC"
1782fi
1783
1784fi
1785if test -z "$CC"; then
1786 # Extract the first word of "cc", so it can be a program name with args.
1787set dummy cc; ac_word=$2
1788echo "$as_me:$LINENO: checking for $ac_word" >&5
1789echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1790if test "${ac_cv_prog_CC+set}" = set; then
1791 echo $ECHO_N "(cached) $ECHO_C" >&6
1792else
1793 if test -n "$CC"; then
1794 ac_cv_prog_CC="$CC" # Let the user override the test.
1795else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001796 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001797as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1798for as_dir in $PATH
1799do
1800 IFS=$as_save_IFS
1801 test -z "$as_dir" && as_dir=.
1802 for ac_exec_ext in '' $ac_executable_extensions; do
1803 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1804 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1805 ac_prog_rejected=yes
1806 continue
1807 fi
1808 ac_cv_prog_CC="cc"
1809 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1810 break 2
1811 fi
1812done
1813done
1814
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001815if test $ac_prog_rejected = yes; then
1816 # We found a bogon in the path, so make sure we never use it.
1817 set dummy $ac_cv_prog_CC
1818 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001819 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001820 # We chose a different compiler from the bogus one.
1821 # However, it has the same basename, so the bogon will be chosen
1822 # first if we set CC to just the basename; use the full file name.
1823 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001824 set dummy "$as_dir/$ac_word" ${1+"$@"}
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001825 shift
1826 ac_cv_prog_CC="$@"
1827 fi
1828fi
1829fi
1830fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001831CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001832if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001833 echo "$as_me:$LINENO: result: $CC" >&5
1834echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001835else
Martin v. Löwis11437992002-04-12 09:54:03 +00001836 echo "$as_me:$LINENO: result: no" >&5
1837echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001838fi
1839
Martin v. Löwis11437992002-04-12 09:54:03 +00001840fi
1841if test -z "$CC"; then
1842 if test -n "$ac_tool_prefix"; then
1843 for ac_prog in cl
1844 do
1845 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1846set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1847echo "$as_me:$LINENO: checking for $ac_word" >&5
1848echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1849if test "${ac_cv_prog_CC+set}" = set; then
1850 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001851else
1852 if test -n "$CC"; then
1853 ac_cv_prog_CC="$CC" # Let the user override the test.
1854else
Martin v. Löwis11437992002-04-12 09:54:03 +00001855as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1856for as_dir in $PATH
1857do
1858 IFS=$as_save_IFS
1859 test -z "$as_dir" && as_dir=.
1860 for ac_exec_ext in '' $ac_executable_extensions; do
1861 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1862 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1863 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1864 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00001865 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001866done
1867done
1868
1869fi
1870fi
1871CC=$ac_cv_prog_CC
1872if test -n "$CC"; then
1873 echo "$as_me:$LINENO: result: $CC" >&5
1874echo "${ECHO_T}$CC" >&6
1875else
1876 echo "$as_me:$LINENO: result: no" >&5
1877echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001878fi
1879
Martin v. Löwis11437992002-04-12 09:54:03 +00001880 test -n "$CC" && break
1881 done
1882fi
1883if test -z "$CC"; then
1884 ac_ct_CC=$CC
1885 for ac_prog in cl
1886do
1887 # Extract the first word of "$ac_prog", so it can be a program name with args.
1888set dummy $ac_prog; ac_word=$2
1889echo "$as_me:$LINENO: checking for $ac_word" >&5
1890echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1891if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1892 echo $ECHO_N "(cached) $ECHO_C" >&6
1893else
1894 if test -n "$ac_ct_CC"; then
1895 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1896else
1897as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1898for as_dir in $PATH
1899do
1900 IFS=$as_save_IFS
1901 test -z "$as_dir" && as_dir=.
1902 for ac_exec_ext in '' $ac_executable_extensions; do
1903 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1904 ac_cv_prog_ac_ct_CC="$ac_prog"
1905 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1906 break 2
1907 fi
1908done
1909done
Jack Jansendd19cf82001-12-06 22:36:17 +00001910
Martin v. Löwis11437992002-04-12 09:54:03 +00001911fi
1912fi
1913ac_ct_CC=$ac_cv_prog_ac_ct_CC
1914if test -n "$ac_ct_CC"; then
1915 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1916echo "${ECHO_T}$ac_ct_CC" >&6
1917else
1918 echo "$as_me:$LINENO: result: no" >&5
1919echo "${ECHO_T}no" >&6
1920fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001921
Martin v. Löwis11437992002-04-12 09:54:03 +00001922 test -n "$ac_ct_CC" && break
1923done
Michael W. Hudson54241132001-12-07 15:38:26 +00001924
Martin v. Löwis11437992002-04-12 09:54:03 +00001925 CC=$ac_ct_CC
1926fi
1927
1928fi
1929
1930
1931test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
1932echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
1933 { (exit 1); exit 1; }; }
1934
1935# Provide some information about the compiler.
1936echo "$as_me:$LINENO:" \
1937 "checking for C compiler version" >&5
1938ac_compiler=`set X $ac_compile; echo $2`
1939{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1940 (eval $ac_compiler --version </dev/null >&5) 2>&5
1941 ac_status=$?
1942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1943 (exit $ac_status); }
1944{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1945 (eval $ac_compiler -v </dev/null >&5) 2>&5
1946 ac_status=$?
1947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1948 (exit $ac_status); }
1949{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1950 (eval $ac_compiler -V </dev/null >&5) 2>&5
1951 ac_status=$?
1952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1953 (exit $ac_status); }
1954
1955cat >conftest.$ac_ext <<_ACEOF
1956#line $LINENO "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00001957#include "confdefs.h"
1958
Martin v. Löwis11437992002-04-12 09:54:03 +00001959#ifdef F77_DUMMY_MAIN
1960# ifdef __cplusplus
1961 extern "C"
1962# endif
1963 int F77_DUMMY_MAIN() { return 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001964#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00001965int
1966main ()
1967{
1968
1969 ;
1970 return 0;
1971}
1972_ACEOF
1973ac_clean_files_save=$ac_clean_files
1974ac_clean_files="$ac_clean_files a.out a.exe"
1975# Try to create an executable without -o first, disregard a.out.
1976# It will help us diagnose broken compilers, and finding out an intuition
1977# of exeext.
1978echo "$as_me:$LINENO: checking for C compiler default output" >&5
1979echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1980ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1981if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1982 (eval $ac_link_default) 2>&5
1983 ac_status=$?
1984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1985 (exit $ac_status); }; then
1986 # Find the output, starting from the most likely. This scheme is
1987# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1988# resort.
1989
1990# Be careful to initialize this variable, since it used to be cached.
1991# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1992ac_cv_exeext=
1993for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1994 ls a.out conftest 2>/dev/null;
1995 ls a.* conftest.* 2>/dev/null`; do
1996 case $ac_file in
1997 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1998 a.out ) # We found the default executable, but exeext='' is most
1999 # certainly right.
2000 break;;
2001 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2002 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2003 export ac_cv_exeext
2004 break;;
2005 * ) break;;
2006 esac
2007done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002008else
Martin v. Löwis11437992002-04-12 09:54:03 +00002009 echo "$as_me: failed program was:" >&5
2010cat conftest.$ac_ext >&5
2011{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2012echo "$as_me: error: C compiler cannot create executables" >&2;}
2013 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002014fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002015
Martin v. Löwis11437992002-04-12 09:54:03 +00002016ac_exeext=$ac_cv_exeext
2017echo "$as_me:$LINENO: result: $ac_file" >&5
2018echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002019
Martin v. Löwis11437992002-04-12 09:54:03 +00002020# Check the compiler produces executables we can run. If not, either
2021# the compiler is broken, or we cross compile.
2022echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2023echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2024# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2025# If not cross compiling, check that we can run a simple program.
2026if test "$cross_compiling" != yes; then
2027 if { ac_try='./$ac_file'
2028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2029 (eval $ac_try) 2>&5
2030 ac_status=$?
2031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2032 (exit $ac_status); }; }; then
2033 cross_compiling=no
2034 else
2035 if test "$cross_compiling" = maybe; then
2036 cross_compiling=yes
2037 else
2038 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2039If you meant to cross compile, use \`--host'." >&5
2040echo "$as_me: error: cannot run C compiled programs.
2041If you meant to cross compile, use \`--host'." >&2;}
2042 { (exit 1); exit 1; }; }
2043 fi
2044 fi
2045fi
2046echo "$as_me:$LINENO: result: yes" >&5
2047echo "${ECHO_T}yes" >&6
2048
2049rm -f a.out a.exe conftest$ac_cv_exeext
2050ac_clean_files=$ac_clean_files_save
2051# Check the compiler produces executables we can run. If not, either
2052# the compiler is broken, or we cross compile.
2053echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2054echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2055echo "$as_me:$LINENO: result: $cross_compiling" >&5
2056echo "${ECHO_T}$cross_compiling" >&6
2057
2058echo "$as_me:$LINENO: checking for suffix of executables" >&5
2059echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2060if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2061 (eval $ac_link) 2>&5
2062 ac_status=$?
2063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2064 (exit $ac_status); }; then
2065 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2066# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2067# work properly (i.e., refer to `conftest.exe'), while it won't with
2068# `rm'.
2069for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2070 case $ac_file in
2071 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2072 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2073 export ac_cv_exeext
2074 break;;
2075 * ) break;;
2076 esac
2077done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002078else
Martin v. Löwis11437992002-04-12 09:54:03 +00002079 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2080echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2081 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002082fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002083
Martin v. Löwis11437992002-04-12 09:54:03 +00002084rm -f conftest$ac_cv_exeext
2085echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2086echo "${ECHO_T}$ac_cv_exeext" >&6
2087
2088rm -f conftest.$ac_ext
2089EXEEXT=$ac_cv_exeext
2090ac_exeext=$EXEEXT
2091echo "$as_me:$LINENO: checking for suffix of object files" >&5
2092echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2093if test "${ac_cv_objext+set}" = set; then
2094 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002095else
Martin v. Löwis11437992002-04-12 09:54:03 +00002096 cat >conftest.$ac_ext <<_ACEOF
2097#line $LINENO "configure"
2098#include "confdefs.h"
2099
2100#ifdef F77_DUMMY_MAIN
2101# ifdef __cplusplus
2102 extern "C"
2103# endif
2104 int F77_DUMMY_MAIN() { return 1; }
2105#endif
2106int
2107main ()
2108{
2109
2110 ;
2111 return 0;
2112}
2113_ACEOF
2114rm -f conftest.o conftest.obj
2115if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2116 (eval $ac_compile) 2>&5
2117 ac_status=$?
2118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2119 (exit $ac_status); }; then
2120 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2121 case $ac_file in
2122 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2123 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2124 break;;
2125 esac
2126done
2127else
2128 echo "$as_me: failed program was:" >&5
2129cat conftest.$ac_ext >&5
2130{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2131echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2132 { (exit 1); exit 1; }; }
2133fi
2134
2135rm -f conftest.$ac_cv_objext conftest.$ac_ext
2136fi
2137echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2138echo "${ECHO_T}$ac_cv_objext" >&6
2139OBJEXT=$ac_cv_objext
2140ac_objext=$OBJEXT
2141echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2142echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2143if test "${ac_cv_c_compiler_gnu+set}" = set; then
2144 echo $ECHO_N "(cached) $ECHO_C" >&6
2145else
2146 cat >conftest.$ac_ext <<_ACEOF
2147#line $LINENO "configure"
2148#include "confdefs.h"
2149
2150#ifdef F77_DUMMY_MAIN
2151# ifdef __cplusplus
2152 extern "C"
2153# endif
2154 int F77_DUMMY_MAIN() { return 1; }
2155#endif
2156int
2157main ()
2158{
2159#ifndef __GNUC__
2160 choke me
2161#endif
2162
2163 ;
2164 return 0;
2165}
2166_ACEOF
2167rm -f conftest.$ac_objext
2168if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2169 (eval $ac_compile) 2>&5
2170 ac_status=$?
2171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2172 (exit $ac_status); } &&
2173 { ac_try='test -s conftest.$ac_objext'
2174 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2175 (eval $ac_try) 2>&5
2176 ac_status=$?
2177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2178 (exit $ac_status); }; }; then
2179 ac_compiler_gnu=yes
2180else
2181 echo "$as_me: failed program was:" >&5
2182cat conftest.$ac_ext >&5
2183ac_compiler_gnu=no
2184fi
2185rm -f conftest.$ac_objext conftest.$ac_ext
2186ac_cv_c_compiler_gnu=$ac_compiler_gnu
2187
2188fi
2189echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2190echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2191GCC=`test $ac_compiler_gnu = yes && echo yes`
2192ac_test_CFLAGS=${CFLAGS+set}
2193ac_save_CFLAGS=$CFLAGS
2194CFLAGS="-g"
2195echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2196echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2197if test "${ac_cv_prog_cc_g+set}" = set; then
2198 echo $ECHO_N "(cached) $ECHO_C" >&6
2199else
2200 cat >conftest.$ac_ext <<_ACEOF
2201#line $LINENO "configure"
2202#include "confdefs.h"
2203
2204#ifdef F77_DUMMY_MAIN
2205# ifdef __cplusplus
2206 extern "C"
2207# endif
2208 int F77_DUMMY_MAIN() { return 1; }
2209#endif
2210int
2211main ()
2212{
2213
2214 ;
2215 return 0;
2216}
2217_ACEOF
2218rm -f conftest.$ac_objext
2219if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2220 (eval $ac_compile) 2>&5
2221 ac_status=$?
2222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2223 (exit $ac_status); } &&
2224 { ac_try='test -s conftest.$ac_objext'
2225 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2226 (eval $ac_try) 2>&5
2227 ac_status=$?
2228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2229 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002230 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002231else
Martin v. Löwis11437992002-04-12 09:54:03 +00002232 echo "$as_me: failed program was:" >&5
2233cat conftest.$ac_ext >&5
2234ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002235fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002236rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002237fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002238echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2239echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002240if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002241 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002242elif test $ac_cv_prog_cc_g = yes; then
2243 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002244 CFLAGS="-g -O2"
2245 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002246 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002247 fi
2248else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002249 if test "$GCC" = yes; then
2250 CFLAGS="-O2"
2251 else
2252 CFLAGS=
2253 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002254fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002255# Some people use a C++ compiler to compile C. Since we use `exit',
2256# in C++ we need to declare it. In case someone uses the same compiler
2257# for both compiling C and C++ we need to have the C++ compiler decide
2258# the declaration of exit, since it's the most demanding environment.
2259cat >conftest.$ac_ext <<_ACEOF
2260#ifndef __cplusplus
2261 choke me
2262#endif
2263_ACEOF
2264rm -f conftest.$ac_objext
2265if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2266 (eval $ac_compile) 2>&5
2267 ac_status=$?
2268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2269 (exit $ac_status); } &&
2270 { ac_try='test -s conftest.$ac_objext'
2271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2272 (eval $ac_try) 2>&5
2273 ac_status=$?
2274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2275 (exit $ac_status); }; }; then
2276 for ac_declaration in \
2277 ''\
2278 '#include <stdlib.h>' \
2279 'extern "C" void std::exit (int) throw (); using std::exit;' \
2280 'extern "C" void std::exit (int); using std::exit;' \
2281 'extern "C" void exit (int) throw ();' \
2282 'extern "C" void exit (int);' \
2283 'void exit (int);'
2284do
2285 cat >conftest.$ac_ext <<_ACEOF
2286#line $LINENO "configure"
2287#include "confdefs.h"
2288#include <stdlib.h>
2289$ac_declaration
2290#ifdef F77_DUMMY_MAIN
2291# ifdef __cplusplus
2292 extern "C"
2293# endif
2294 int F77_DUMMY_MAIN() { return 1; }
2295#endif
2296int
2297main ()
2298{
2299exit (42);
2300 ;
2301 return 0;
2302}
2303_ACEOF
2304rm -f conftest.$ac_objext
2305if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2306 (eval $ac_compile) 2>&5
2307 ac_status=$?
2308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2309 (exit $ac_status); } &&
2310 { ac_try='test -s conftest.$ac_objext'
2311 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2312 (eval $ac_try) 2>&5
2313 ac_status=$?
2314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2315 (exit $ac_status); }; }; then
2316 :
2317else
2318 echo "$as_me: failed program was:" >&5
2319cat conftest.$ac_ext >&5
2320continue
2321fi
2322rm -f conftest.$ac_objext conftest.$ac_ext
2323 cat >conftest.$ac_ext <<_ACEOF
2324#line $LINENO "configure"
2325#include "confdefs.h"
2326$ac_declaration
2327#ifdef F77_DUMMY_MAIN
2328# ifdef __cplusplus
2329 extern "C"
2330# endif
2331 int F77_DUMMY_MAIN() { return 1; }
2332#endif
2333int
2334main ()
2335{
2336exit (42);
2337 ;
2338 return 0;
2339}
2340_ACEOF
2341rm -f conftest.$ac_objext
2342if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2343 (eval $ac_compile) 2>&5
2344 ac_status=$?
2345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2346 (exit $ac_status); } &&
2347 { ac_try='test -s conftest.$ac_objext'
2348 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2349 (eval $ac_try) 2>&5
2350 ac_status=$?
2351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2352 (exit $ac_status); }; }; then
2353 break
2354else
2355 echo "$as_me: failed program was:" >&5
2356cat conftest.$ac_ext >&5
2357fi
2358rm -f conftest.$ac_objext conftest.$ac_ext
2359done
2360rm -f conftest*
2361if test -n "$ac_declaration"; then
2362 echo '#ifdef __cplusplus' >>confdefs.h
2363 echo $ac_declaration >>confdefs.h
2364 echo '#endif' >>confdefs.h
2365fi
2366
2367else
2368 echo "$as_me: failed program was:" >&5
2369cat conftest.$ac_ext >&5
2370fi
2371rm -f conftest.$ac_objext conftest.$ac_ext
2372ac_ext=c
2373ac_cpp='$CPP $CPPFLAGS'
2374ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2375ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2376ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002377
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002378
2379# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002380
2381ac_ext=c
2382ac_cpp='$CPP $CPPFLAGS'
2383ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2384ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2385ac_compiler_gnu=$ac_cv_c_compiler_gnu
2386echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2387echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002388# On Suns, sometimes $CPP names a directory.
2389if test -n "$CPP" && test -d "$CPP"; then
2390 CPP=
2391fi
2392if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002393 if test "${ac_cv_prog_CPP+set}" = set; then
2394 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002395else
Martin v. Löwis11437992002-04-12 09:54:03 +00002396 # Double quotes because CPP needs to be expanded
2397 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2398 do
2399 ac_preproc_ok=false
2400for ac_c_preproc_warn_flag in '' yes
2401do
2402 # Use a header file that comes with gcc, so configuring glibc
2403 # with a fresh cross-compiler works.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002404 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002405 # not just through cpp. "Syntax error" is here to catch this case.
2406 cat >conftest.$ac_ext <<_ACEOF
2407#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002408#include "confdefs.h"
2409#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002410 Syntax error
2411_ACEOF
2412if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2413 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2414 ac_status=$?
2415 egrep -v '^ *\+' conftest.er1 >conftest.err
2416 rm -f conftest.er1
2417 cat conftest.err >&5
2418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2419 (exit $ac_status); } >/dev/null; then
2420 if test -s conftest.err; then
2421 ac_cpp_err=$ac_c_preproc_warn_flag
2422 else
2423 ac_cpp_err=
2424 fi
2425else
2426 ac_cpp_err=yes
2427fi
2428if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002429 :
2430else
Martin v. Löwis11437992002-04-12 09:54:03 +00002431 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002432 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002433 # Broken: fails on valid input.
2434continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002435fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002436rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002437
Martin v. Löwis11437992002-04-12 09:54:03 +00002438 # OK, works on sane cases. Now check whether non-existent headers
2439 # can be detected and how.
2440 cat >conftest.$ac_ext <<_ACEOF
2441#line $LINENO "configure"
2442#include "confdefs.h"
2443#include <ac_nonexistent.h>
2444_ACEOF
2445if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2446 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2447 ac_status=$?
2448 egrep -v '^ *\+' conftest.er1 >conftest.err
2449 rm -f conftest.er1
2450 cat conftest.err >&5
2451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2452 (exit $ac_status); } >/dev/null; then
2453 if test -s conftest.err; then
2454 ac_cpp_err=$ac_c_preproc_warn_flag
2455 else
2456 ac_cpp_err=
2457 fi
2458else
2459 ac_cpp_err=yes
2460fi
2461if test -z "$ac_cpp_err"; then
2462 # Broken: success on invalid input.
2463continue
2464else
2465 echo "$as_me: failed program was:" >&5
2466 cat conftest.$ac_ext >&5
2467 # Passes both tests.
2468ac_preproc_ok=:
2469break
2470fi
2471rm -f conftest.err conftest.$ac_ext
2472
2473done
2474# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2475rm -f conftest.err conftest.$ac_ext
2476if $ac_preproc_ok; then
2477 break
2478fi
2479
2480 done
2481 ac_cv_prog_CPP=$CPP
2482
2483fi
2484 CPP=$ac_cv_prog_CPP
2485else
2486 ac_cv_prog_CPP=$CPP
2487fi
2488echo "$as_me:$LINENO: result: $CPP" >&5
2489echo "${ECHO_T}$CPP" >&6
2490ac_preproc_ok=false
2491for ac_c_preproc_warn_flag in '' yes
2492do
2493 # Use a header file that comes with gcc, so configuring glibc
2494 # with a fresh cross-compiler works.
2495 # On the NeXT, cc -E runs the code through the compiler's parser,
2496 # not just through cpp. "Syntax error" is here to catch this case.
2497 cat >conftest.$ac_ext <<_ACEOF
2498#line $LINENO "configure"
2499#include "confdefs.h"
2500#include <assert.h>
2501 Syntax error
2502_ACEOF
2503if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2504 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2505 ac_status=$?
2506 egrep -v '^ *\+' conftest.er1 >conftest.err
2507 rm -f conftest.er1
2508 cat conftest.err >&5
2509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2510 (exit $ac_status); } >/dev/null; then
2511 if test -s conftest.err; then
2512 ac_cpp_err=$ac_c_preproc_warn_flag
2513 else
2514 ac_cpp_err=
2515 fi
2516else
2517 ac_cpp_err=yes
2518fi
2519if test -z "$ac_cpp_err"; then
2520 :
2521else
2522 echo "$as_me: failed program was:" >&5
2523 cat conftest.$ac_ext >&5
2524 # Broken: fails on valid input.
2525continue
2526fi
2527rm -f conftest.err conftest.$ac_ext
2528
2529 # OK, works on sane cases. Now check whether non-existent headers
2530 # can be detected and how.
2531 cat >conftest.$ac_ext <<_ACEOF
2532#line $LINENO "configure"
2533#include "confdefs.h"
2534#include <ac_nonexistent.h>
2535_ACEOF
2536if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2537 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2538 ac_status=$?
2539 egrep -v '^ *\+' conftest.er1 >conftest.err
2540 rm -f conftest.er1
2541 cat conftest.err >&5
2542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2543 (exit $ac_status); } >/dev/null; then
2544 if test -s conftest.err; then
2545 ac_cpp_err=$ac_c_preproc_warn_flag
2546 else
2547 ac_cpp_err=
2548 fi
2549else
2550 ac_cpp_err=yes
2551fi
2552if test -z "$ac_cpp_err"; then
2553 # Broken: success on invalid input.
2554continue
2555else
2556 echo "$as_me: failed program was:" >&5
2557 cat conftest.$ac_ext >&5
2558 # Passes both tests.
2559ac_preproc_ok=:
2560break
2561fi
2562rm -f conftest.err conftest.$ac_ext
2563
2564done
2565# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2566rm -f conftest.err conftest.$ac_ext
2567if $ac_preproc_ok; then
2568 :
2569else
2570 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2571echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2572 { (exit 1); exit 1; }; }
2573fi
2574
2575ac_ext=c
2576ac_cpp='$CPP $CPPFLAGS'
2577ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2578ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2579ac_compiler_gnu=$ac_cv_c_compiler_gnu
2580
2581
2582
2583echo "$as_me:$LINENO: checking for AIX" >&5
2584echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2585cat >conftest.$ac_ext <<_ACEOF
2586#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002587#include "confdefs.h"
2588#ifdef _AIX
2589 yes
2590#endif
2591
Martin v. Löwis11437992002-04-12 09:54:03 +00002592_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002593if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2594 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002595 echo "$as_me:$LINENO: result: yes" >&5
2596echo "${ECHO_T}yes" >&6
2597cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002598#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002599_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002600
2601else
Martin v. Löwis11437992002-04-12 09:54:03 +00002602 echo "$as_me:$LINENO: result: no" >&5
2603echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002604fi
2605rm -f conftest*
2606
Michael W. Hudson54241132001-12-07 15:38:26 +00002607
Martin v. Löwis11437992002-04-12 09:54:03 +00002608echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2609echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2610if test "${ac_cv_header_stdc+set}" = set; then
2611 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002612else
Martin v. Löwis11437992002-04-12 09:54:03 +00002613 cat >conftest.$ac_ext <<_ACEOF
2614#line $LINENO "configure"
2615#include "confdefs.h"
2616#include <stdlib.h>
2617#include <stdarg.h>
2618#include <string.h>
2619#include <float.h>
2620
2621_ACEOF
2622if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2623 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2624 ac_status=$?
2625 egrep -v '^ *\+' conftest.er1 >conftest.err
2626 rm -f conftest.er1
2627 cat conftest.err >&5
2628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2629 (exit $ac_status); } >/dev/null; then
2630 if test -s conftest.err; then
2631 ac_cpp_err=$ac_c_preproc_warn_flag
2632 else
2633 ac_cpp_err=
2634 fi
2635else
2636 ac_cpp_err=yes
2637fi
2638if test -z "$ac_cpp_err"; then
2639 ac_cv_header_stdc=yes
2640else
2641 echo "$as_me: failed program was:" >&5
2642 cat conftest.$ac_ext >&5
2643 ac_cv_header_stdc=no
2644fi
2645rm -f conftest.err conftest.$ac_ext
2646
2647if test $ac_cv_header_stdc = yes; then
2648 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2649 cat >conftest.$ac_ext <<_ACEOF
2650#line $LINENO "configure"
2651#include "confdefs.h"
2652#include <string.h>
2653
2654_ACEOF
2655if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2656 egrep "memchr" >/dev/null 2>&1; then
2657 :
2658else
2659 ac_cv_header_stdc=no
2660fi
2661rm -f conftest*
2662
2663fi
2664
2665if test $ac_cv_header_stdc = yes; then
2666 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2667 cat >conftest.$ac_ext <<_ACEOF
2668#line $LINENO "configure"
2669#include "confdefs.h"
2670#include <stdlib.h>
2671
2672_ACEOF
2673if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2674 egrep "free" >/dev/null 2>&1; then
2675 :
2676else
2677 ac_cv_header_stdc=no
2678fi
2679rm -f conftest*
2680
2681fi
2682
2683if test $ac_cv_header_stdc = yes; then
2684 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2685 if test "$cross_compiling" = yes; then
2686 :
2687else
2688 cat >conftest.$ac_ext <<_ACEOF
2689#line $LINENO "configure"
2690#include "confdefs.h"
2691#include <ctype.h>
2692#if ((' ' & 0x0FF) == 0x020)
2693# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2694# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2695#else
2696# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
2697 || ('j' <= (c) && (c) <= 'r') \
2698 || ('s' <= (c) && (c) <= 'z'))
2699# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2700#endif
2701
2702#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2703int
2704main ()
2705{
2706 int i;
2707 for (i = 0; i < 256; i++)
2708 if (XOR (islower (i), ISLOWER (i))
2709 || toupper (i) != TOUPPER (i))
2710 exit(2);
2711 exit (0);
2712}
2713_ACEOF
2714rm -f conftest$ac_exeext
2715if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2716 (eval $ac_link) 2>&5
2717 ac_status=$?
2718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2719 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2721 (eval $ac_try) 2>&5
2722 ac_status=$?
2723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2724 (exit $ac_status); }; }; then
2725 :
2726else
2727 echo "$as_me: program exited with status $ac_status" >&5
2728echo "$as_me: failed program was:" >&5
2729cat conftest.$ac_ext >&5
2730( exit $ac_status )
2731ac_cv_header_stdc=no
2732fi
2733rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2734fi
2735fi
2736fi
2737echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2738echo "${ECHO_T}$ac_cv_header_stdc" >&6
2739if test $ac_cv_header_stdc = yes; then
2740
2741cat >>confdefs.h <<\_ACEOF
2742#define STDC_HEADERS 1
2743_ACEOF
2744
2745fi
2746
2747# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2758 inttypes.h stdint.h unistd.h
2759do
2760as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2761echo "$as_me:$LINENO: checking for $ac_header" >&5
2762echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2763if eval "test \"\${$as_ac_Header+set}\" = set"; then
2764 echo $ECHO_N "(cached) $ECHO_C" >&6
2765else
2766 cat >conftest.$ac_ext <<_ACEOF
2767#line $LINENO "configure"
2768#include "confdefs.h"
2769$ac_includes_default
2770
2771#include <$ac_header>
2772_ACEOF
2773rm -f conftest.$ac_objext
2774if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2775 (eval $ac_compile) 2>&5
2776 ac_status=$?
2777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2778 (exit $ac_status); } &&
2779 { ac_try='test -s conftest.$ac_objext'
2780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2781 (eval $ac_try) 2>&5
2782 ac_status=$?
2783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2784 (exit $ac_status); }; }; then
2785 eval "$as_ac_Header=yes"
2786else
2787 echo "$as_me: failed program was:" >&5
2788cat conftest.$ac_ext >&5
2789eval "$as_ac_Header=no"
2790fi
2791rm -f conftest.$ac_objext conftest.$ac_ext
2792fi
2793echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2794echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2795if test `eval echo '${'$as_ac_Header'}'` = yes; then
2796 cat >>confdefs.h <<_ACEOF
2797#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2798_ACEOF
2799
2800fi
2801
2802done
2803
2804
2805if test "${ac_cv_header_minix_config_h+set}" = set; then
2806 echo "$as_me:$LINENO: checking for minix/config.h" >&5
2807echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2808if test "${ac_cv_header_minix_config_h+set}" = set; then
2809 echo $ECHO_N "(cached) $ECHO_C" >&6
2810fi
2811echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2812echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2813else
2814 # Is the header compilable?
2815echo "$as_me:$LINENO: checking minix/config.h usability" >&5
2816echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
2817cat >conftest.$ac_ext <<_ACEOF
2818#line $LINENO "configure"
2819#include "confdefs.h"
2820$ac_includes_default
2821#include <minix/config.h>
2822_ACEOF
2823rm -f conftest.$ac_objext
2824if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2825 (eval $ac_compile) 2>&5
2826 ac_status=$?
2827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2828 (exit $ac_status); } &&
2829 { ac_try='test -s conftest.$ac_objext'
2830 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2831 (eval $ac_try) 2>&5
2832 ac_status=$?
2833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2834 (exit $ac_status); }; }; then
2835 ac_header_compiler=yes
2836else
2837 echo "$as_me: failed program was:" >&5
2838cat conftest.$ac_ext >&5
2839ac_header_compiler=no
2840fi
2841rm -f conftest.$ac_objext conftest.$ac_ext
2842echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2843echo "${ECHO_T}$ac_header_compiler" >&6
2844
2845# Is the header present?
2846echo "$as_me:$LINENO: checking minix/config.h presence" >&5
2847echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
2848cat >conftest.$ac_ext <<_ACEOF
2849#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002850#include "confdefs.h"
2851#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002852_ACEOF
2853if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2854 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2855 ac_status=$?
2856 egrep -v '^ *\+' conftest.er1 >conftest.err
2857 rm -f conftest.er1
2858 cat conftest.err >&5
2859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2860 (exit $ac_status); } >/dev/null; then
2861 if test -s conftest.err; then
2862 ac_cpp_err=$ac_c_preproc_warn_flag
2863 else
2864 ac_cpp_err=
2865 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002866else
Martin v. Löwis11437992002-04-12 09:54:03 +00002867 ac_cpp_err=yes
2868fi
2869if test -z "$ac_cpp_err"; then
2870 ac_header_preproc=yes
2871else
2872 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002873 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002874 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002875fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002876rm -f conftest.err conftest.$ac_ext
2877echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
2878echo "${ECHO_T}$ac_header_preproc" >&6
2879
2880# So? What about this header?
2881case $ac_header_compiler:$ac_header_preproc in
2882 yes:no )
2883 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
2884echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
2885 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2886echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2887 no:yes )
2888 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
2889echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
2890 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
2891echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
2892 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2893echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2894esac
2895echo "$as_me:$LINENO: checking for minix/config.h" >&5
2896echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2897if test "${ac_cv_header_minix_config_h+set}" = set; then
2898 echo $ECHO_N "(cached) $ECHO_C" >&6
2899else
2900 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002901fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002902echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2903echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2904
2905fi
2906if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002907 MINIX=yes
2908else
Martin v. Löwis11437992002-04-12 09:54:03 +00002909 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002910fi
2911
Martin v. Löwis11437992002-04-12 09:54:03 +00002912
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002913if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002914
2915cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002916#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002917_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002918
Martin v. Löwis11437992002-04-12 09:54:03 +00002919
2920cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002921#define _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002922_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002923
Martin v. Löwis11437992002-04-12 09:54:03 +00002924
2925cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002926#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002927_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002928
2929fi
2930
2931
Michael W. Hudson54241132001-12-07 15:38:26 +00002932
Martin v. Löwis11437992002-04-12 09:54:03 +00002933echo "$as_me:$LINENO: checking for --with-suffix" >&5
2934echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002935
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00002936# Check whether --with-suffix or --without-suffix was given.
2937if test "${with_suffix+set}" = set; then
2938 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00002939
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00002940 case $withval in
2941 no) EXEEXT=;;
2942 yes) EXEEXT=.exe;;
2943 *) EXEEXT=$withval;;
2944 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002945fi;
2946echo "$as_me:$LINENO: result: $EXEEXT" >&5
2947echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002948
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002949# Test whether we're running on a non-case-sensitive system, in which
2950# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00002951
Martin v. Löwis11437992002-04-12 09:54:03 +00002952echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
2953echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002954if test -d "python"
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002955then
Martin v. Löwis11437992002-04-12 09:54:03 +00002956 echo "$as_me:$LINENO: result: yes" >&5
2957echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002958 BUILDEXEEXT=.exe
2959else
Martin v. Löwis11437992002-04-12 09:54:03 +00002960 echo "$as_me:$LINENO: result: no" >&5
2961echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002962 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002963fi
Guido van Rossumff555e32000-09-22 15:38:21 +00002964
Guido van Rossumdd997f71998-10-07 19:58:26 +00002965case $MACHDEP in
2966bsdos*)
2967 case $CC in
2968 gcc) CC="$CC -D_HAVE_BSDI";;
2969 esac;;
2970esac
2971
Guido van Rossum24b1e751997-08-21 02:29:16 +00002972case $ac_sys_system in
2973hp*|HP*)
2974 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00002975 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00002976 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002977Monterey*)
2978 case $CC in
2979 cc) CC="$CC -Wl,-Bexport";;
2980 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00002981SunOS*)
2982 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00002983
2984cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00002985#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002986_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00002987
2988 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00002989esac
2990
Michael W. Hudson54241132001-12-07 15:38:26 +00002991
2992
Martin v. Löwis11437992002-04-12 09:54:03 +00002993echo "$as_me:$LINENO: checking LIBRARY" >&5
2994echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00002995if test -z "$LIBRARY"
2996then
2997 LIBRARY='libpython$(VERSION).a'
2998fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002999echo "$as_me:$LINENO: result: $LIBRARY" >&5
3000echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003001
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003002# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003003# name of the library into which to insert object files). BLDLIBRARY is also
3004# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3005# is blank as the main program is not linked directly against LDLIBRARY.
3006# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3007# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3008# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3009# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003010#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003011# RUNSHARED is used to run shared python without installed libraries
3012#
3013# INSTSONAME is the name of the shared library that will be use to install
3014# on the system - some systems like version suffix, others don't
3015
3016
Michael W. Hudson54241132001-12-07 15:38:26 +00003017
3018
3019
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003020
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003021LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003022BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003023INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003024DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003025LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003026RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003027
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003028# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003029# If CXX is set, and if it is needed to link a main function that was
3030# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3031# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003032# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003033# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003034
Martin v. Löwis11437992002-04-12 09:54:03 +00003035echo "$as_me:$LINENO: checking LINKCC" >&5
3036echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003037if test -z "$LINKCC"
3038then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003039 if test -z "$CXX"; then
3040 LINKCC="\$(PURIFY) \$(CC)"
3041 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003042 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003043 $CXX -c conftest.$ac_ext 2>&5
3044 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3045 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3046 then
3047 LINKCC="\$(PURIFY) \$(CC)"
3048 else
3049 LINKCC="\$(PURIFY) \$(CXX)"
3050 fi
3051 rm -fr conftest*
3052 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003053 case $ac_sys_system in
3054 AIX*)
Jack Jansen524a0982002-03-12 15:25:52 +00003055 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003056 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003057 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003058 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003059 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003060 esac
3061fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003062echo "$as_me:$LINENO: result: $LINKCC" >&5
3063echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003064
Martin v. Löwis11437992002-04-12 09:54:03 +00003065echo "$as_me:$LINENO: checking for --enable-shared" >&5
3066echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003067# Check whether --enable-shared or --disable-shared was given.
3068if test "${enable_shared+set}" = set; then
3069 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003070
Martin v. Löwis11437992002-04-12 09:54:03 +00003071fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003072
3073if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003074then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003075 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003076 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003077 enable_shared="yes";;
3078 *)
3079 enable_shared="no";;
3080 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003081fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003082echo "$as_me:$LINENO: result: $enable_shared" >&5
3083echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003084
3085
Martin v. Löwis11437992002-04-12 09:54:03 +00003086echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3087echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003088
Guido van Rossumb8552162001-09-05 14:58:11 +00003089# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3090# library that we build, but we do not want to link against it (we
3091# will find it with a -framework option). For this reason there is an
3092# extra variable BLDLIBRARY against which Python and the extension
3093# modules are linked, BLDLIBRARY. This is normally the same as
3094# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003095if test "$enable_framework"
3096then
3097 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
3098 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
3099 BLDLIBRARY=''
3100else
3101 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003102fi
Jack Jansene578a632001-08-15 01:27:14 +00003103
Martin v. Löwis1142de32002-03-29 16:28:31 +00003104# Other platforms follow
3105if test $enable_shared = "yes"; then
3106 case $ac_sys_system in
3107 BeOS*)
3108 LDLIBRARY='libpython$(VERSION).so'
3109 ;;
3110 CYGWIN*)
3111 LDLIBRARY='libpython$(VERSION).dll.a'
3112 DLLLIBRARY='libpython$(VERSION).dll'
3113 ;;
3114 SunOS*)
3115 LDLIBRARY='libpython$(VERSION).so'
3116 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
3117 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3118 ;;
3119 Linux*)
3120 LDLIBRARY='libpython$(VERSION).so'
3121 BLDLIBRARY='-L. -lpython$(VERSION)'
3122 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3123 INSTSONAME="$LDLIBRARY".$SOVERSION
3124 ;;
3125 hp*|HP*)
3126 LDLIBRARY='libpython$(VERSION).sl'
3127 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3128 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3129 ;;
3130 OSF*)
3131 LDLIBRARY='libpython$(VERSION).so'
3132 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3133 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3134 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003135 atheos*)
3136 LDLIBRARY='libpython$(VERSION).so'
3137 BLDLIBRARY='-L. -lpython$(VERSION)'
3138 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3139 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003140 esac
3141 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3142 case $MACHDEP in
3143 dguxR4)
3144 LDLIBRARY='libpython$(VERSION).so'
3145 OPT="$OPT -pic"
3146 ;;
3147 esac
3148fi
3149
Martin v. Löwis11437992002-04-12 09:54:03 +00003150echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3151echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003152
Martin v. Löwis11437992002-04-12 09:54:03 +00003153if test -n "$ac_tool_prefix"; then
3154 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3155set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3156echo "$as_me:$LINENO: checking for $ac_word" >&5
3157echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3158if test "${ac_cv_prog_RANLIB+set}" = set; then
3159 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003160else
3161 if test -n "$RANLIB"; then
3162 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3163else
Martin v. Löwis11437992002-04-12 09:54:03 +00003164as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3165for as_dir in $PATH
3166do
3167 IFS=$as_save_IFS
3168 test -z "$as_dir" && as_dir=.
3169 for ac_exec_ext in '' $ac_executable_extensions; do
3170 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3171 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3172 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3173 break 2
3174 fi
3175done
3176done
3177
Guido van Rossum627b2d71993-12-24 10:39:16 +00003178fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003179fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003180RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003181if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003182 echo "$as_me:$LINENO: result: $RANLIB" >&5
3183echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003184else
Martin v. Löwis11437992002-04-12 09:54:03 +00003185 echo "$as_me:$LINENO: result: no" >&5
3186echo "${ECHO_T}no" >&6
3187fi
3188
3189fi
3190if test -z "$ac_cv_prog_RANLIB"; then
3191 ac_ct_RANLIB=$RANLIB
3192 # Extract the first word of "ranlib", so it can be a program name with args.
3193set dummy ranlib; ac_word=$2
3194echo "$as_me:$LINENO: checking for $ac_word" >&5
3195echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3196if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3197 echo $ECHO_N "(cached) $ECHO_C" >&6
3198else
3199 if test -n "$ac_ct_RANLIB"; then
3200 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3201else
3202as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3203for as_dir in $PATH
3204do
3205 IFS=$as_save_IFS
3206 test -z "$as_dir" && as_dir=.
3207 for ac_exec_ext in '' $ac_executable_extensions; do
3208 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3209 ac_cv_prog_ac_ct_RANLIB="ranlib"
3210 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3211 break 2
3212 fi
3213done
3214done
3215
3216 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3217fi
3218fi
3219ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3220if test -n "$ac_ct_RANLIB"; then
3221 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3222echo "${ECHO_T}$ac_ct_RANLIB" >&6
3223else
3224 echo "$as_me:$LINENO: result: no" >&5
3225echo "${ECHO_T}no" >&6
3226fi
3227
3228 RANLIB=$ac_ct_RANLIB
3229else
3230 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003231fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003232
3233
Guido van Rossum7f43da71994-08-01 12:15:30 +00003234for ac_prog in ar aal
3235do
Martin v. Löwis11437992002-04-12 09:54:03 +00003236 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003237set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003238echo "$as_me:$LINENO: checking for $ac_word" >&5
3239echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3240if test "${ac_cv_prog_AR+set}" = set; then
3241 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003242else
3243 if test -n "$AR"; then
3244 ac_cv_prog_AR="$AR" # Let the user override the test.
3245else
Martin v. Löwis11437992002-04-12 09:54:03 +00003246as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3247for as_dir in $PATH
3248do
3249 IFS=$as_save_IFS
3250 test -z "$as_dir" && as_dir=.
3251 for ac_exec_ext in '' $ac_executable_extensions; do
3252 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3253 ac_cv_prog_AR="$ac_prog"
3254 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3255 break 2
3256 fi
3257done
3258done
3259
Guido van Rossum7f43da71994-08-01 12:15:30 +00003260fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003261fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003262AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003263if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003264 echo "$as_me:$LINENO: result: $AR" >&5
3265echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003266else
Martin v. Löwis11437992002-04-12 09:54:03 +00003267 echo "$as_me:$LINENO: result: no" >&5
3268echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003269fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003270
Martin v. Löwis11437992002-04-12 09:54:03 +00003271 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003272done
3273test -n "$AR" || AR="ar"
3274
Michael W. Hudson54241132001-12-07 15:38:26 +00003275
Neil Schemenauera42c8272001-03-31 00:01:55 +00003276case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003277bsdos*|hp*|HP*)
3278 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003279 if test -z "$INSTALL"
3280 then
3281 INSTALL="${srcdir}/install-sh -c"
3282 fi
3283esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003284ac_aux_dir=
3285for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3286 if test -f $ac_dir/install-sh; then
3287 ac_aux_dir=$ac_dir
3288 ac_install_sh="$ac_aux_dir/install-sh -c"
3289 break
3290 elif test -f $ac_dir/install.sh; then
3291 ac_aux_dir=$ac_dir
3292 ac_install_sh="$ac_aux_dir/install.sh -c"
3293 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003294 elif test -f $ac_dir/shtool; then
3295 ac_aux_dir=$ac_dir
3296 ac_install_sh="$ac_aux_dir/shtool install -c"
3297 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003298 fi
3299done
3300if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003301 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3302echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3303 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003304fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003305ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3306ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3307ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003308
3309# Find a good install program. We prefer a C program (faster),
3310# so one script is as good as another. But avoid the broken or
3311# incompatible versions:
3312# SysV /etc/install, /usr/sbin/install
3313# SunOS /usr/etc/install
3314# IRIX /sbin/install
3315# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003316# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003317# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3318# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3319# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3320# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003321echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3322echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003323if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003324if test "${ac_cv_path_install+set}" = set; then
3325 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003326else
Martin v. Löwis11437992002-04-12 09:54:03 +00003327 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3328for as_dir in $PATH
3329do
3330 IFS=$as_save_IFS
3331 test -z "$as_dir" && as_dir=.
3332 # Account for people who put trailing slashes in PATH elements.
3333case $as_dir/ in
3334 ./ | .// | /cC/* | \
3335 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3336 /usr/ucb/* ) ;;
3337 *)
3338 # OSF1 and SCO ODT 3.0 have their own names for install.
3339 # Don't use installbsd from OSF since it installs stuff as root
3340 # by default.
3341 for ac_prog in ginstall scoinst install; do
3342 for ac_exec_ext in '' $ac_executable_extensions; do
3343 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3344 if test $ac_prog = install &&
3345 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3346 # AIX install. It has an incompatible calling convention.
3347 :
3348 elif test $ac_prog = install &&
3349 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3350 # program-specific install script used by HP pwplus--don't use.
3351 :
3352 else
3353 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3354 break 3
3355 fi
3356 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003357 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003358 done
3359 ;;
3360esac
3361done
3362
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003363
3364fi
3365 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003366 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003367 else
3368 # As a last resort, use the slow shell script. We don't cache a
3369 # path for INSTALL within a source directory, because that will
3370 # break other packages using the cache if that directory is
3371 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003372 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003373 fi
3374fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003375echo "$as_me:$LINENO: result: $INSTALL" >&5
3376echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003377
3378# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3379# It thinks the first close brace ends the variable substitution.
3380test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3381
Martin v. Löwis11437992002-04-12 09:54:03 +00003382test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003383
3384test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3385
Michael W. Hudson54241132001-12-07 15:38:26 +00003386
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003387# Not every filesystem supports hard links
3388
3389if test -z "$LN" ; then
3390 case $ac_sys_system in
3391 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003392 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003393 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003394 *) LN=ln;;
3395 esac
3396fi
3397
Fred Drake109d9862001-07-11 06:27:56 +00003398# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003399echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3400echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3401
Fred Drake109d9862001-07-11 06:27:56 +00003402# Check whether --with-pydebug or --without-pydebug was given.
3403if test "${with_pydebug+set}" = set; then
3404 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003405
Fred Drake109d9862001-07-11 06:27:56 +00003406if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003407then
3408
3409cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003410#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003411_ACEOF
3412
3413 echo "$as_me:$LINENO: result: yes" >&5
3414echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003415 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003416else echo "$as_me:$LINENO: result: no" >&5
3417echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003418fi
3419else
Martin v. Löwis11437992002-04-12 09:54:03 +00003420 echo "$as_me:$LINENO: result: no" >&5
3421echo "${ECHO_T}no" >&6
3422fi;
Fred Drake109d9862001-07-11 06:27:56 +00003423
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003424# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003425
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003426if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003427then
Guido van Rossumedca74a1997-07-18 23:29:40 +00003428 case $GCC in
3429 yes)
3430 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003431 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003432 if test "$Py_DEBUG" = 'true' ; then
3433 # Optimization messes up debuggers, so turn it off for
3434 # debug builds.
3435 OPT="-g -Wall -Wstrict-prototypes"
3436 else
3437 OPT="-g -O3 -Wall -Wstrict-prototypes"
3438 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003439 *)
Fred Drake109d9862001-07-11 06:27:56 +00003440 OPT="-O3 -Wall -Wstrict-prototypes";;
3441 esac
3442 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003443 *)
3444 case $ac_sys_system in
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003445 OpenUNIX*|UnixWare*)
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003446 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
3447 *)
3448 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003449 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003450 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00003451 case $ac_sys_system in
3452 Darwin*)
Jack Jansen524a0982002-03-12 15:25:52 +00003453 OPT="$OPT -Wno-long-double -no-cpp-precomp";;
Jack Jansenca06bc62001-08-03 15:32:23 +00003454 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003455fi
3456
Fred Drakee1ceaa02001-12-04 20:55:47 +00003457if test "$Py_DEBUG" = 'true'; then
3458 :
3459else
3460 OPT="-DNDEBUG $OPT"
3461fi
3462
Trent Mick635f6fb2000-08-23 21:33:05 +00003463# The current (beta) Monterey compiler dies with optimizations
3464case $ac_sys_system in
3465Monterey*) OPT="";;
3466esac
3467
Guido van Rossum563e7081996-09-10 18:20:48 +00003468if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003469then
3470 OPT="$OPT $ac_arch_flags"
3471fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003472
Martin v. Löwis11437992002-04-12 09:54:03 +00003473echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3474echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3475if test "${ac_cv_opt_olimit_ok+set}" = set; then
3476 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003477else
3478 ac_save_cc="$CC"
3479CC="$CC -OPT:Olimit=0"
3480if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003481 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003482else
Martin v. Löwis11437992002-04-12 09:54:03 +00003483 cat >conftest.$ac_ext <<_ACEOF
3484#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003485#include "confdefs.h"
3486int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003487_ACEOF
3488rm -f conftest$ac_exeext
3489if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3490 (eval $ac_link) 2>&5
3491 ac_status=$?
3492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3493 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3494 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3495 (eval $ac_try) 2>&5
3496 ac_status=$?
3497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3498 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003499 ac_cv_opt_olimit_ok=yes
3500else
Martin v. Löwis11437992002-04-12 09:54:03 +00003501 echo "$as_me: program exited with status $ac_status" >&5
3502echo "$as_me: failed program was:" >&5
3503cat conftest.$ac_ext >&5
3504( exit $ac_status )
3505ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003506fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003507rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003508fi
Guido van Rossum91922671997-10-09 20:24:13 +00003509CC="$ac_save_cc"
3510fi
3511
Martin v. Löwis11437992002-04-12 09:54:03 +00003512echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3513echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003514if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003515 case $ac_sys_system in
3516 Darwin*) OPT="$OPT" ;;
3517 *) OPT="$OPT -OPT:Olimit=0";;
3518 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003519else
Martin v. Löwis11437992002-04-12 09:54:03 +00003520 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3521echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3522 if test "${ac_cv_olimit_ok+set}" = set; then
3523 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003524else
3525 ac_save_cc="$CC"
3526 CC="$CC -Olimit 1500"
3527 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003528 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003529else
Martin v. Löwis11437992002-04-12 09:54:03 +00003530 cat >conftest.$ac_ext <<_ACEOF
3531#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003532#include "confdefs.h"
3533int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003534_ACEOF
3535rm -f conftest$ac_exeext
3536if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3537 (eval $ac_link) 2>&5
3538 ac_status=$?
3539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3540 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3542 (eval $ac_try) 2>&5
3543 ac_status=$?
3544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3545 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003546 ac_cv_olimit_ok=yes
3547else
Martin v. Löwis11437992002-04-12 09:54:03 +00003548 echo "$as_me: program exited with status $ac_status" >&5
3549echo "$as_me: failed program was:" >&5
3550cat conftest.$ac_ext >&5
3551( exit $ac_status )
3552ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003553fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003554rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003555fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003556 CC="$ac_save_cc"
3557fi
3558
Martin v. Löwis11437992002-04-12 09:54:03 +00003559 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3560echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003561 if test $ac_cv_olimit_ok = yes; then
3562 OPT="$OPT -Olimit 1500"
3563 fi
3564fi
3565
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003566# On some compilers, pthreads are available without further options
3567# (e.g. MacOS X). On some of these systems, the compiler will not
3568# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3569# So we have to see first whether pthreads are available without
3570# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003571echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3572echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3573if test "${ac_cv_pthread_is_default+set}" = set; then
3574 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003575else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003576 if test "$cross_compiling" = yes; then
3577 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003578else
Martin v. Löwis11437992002-04-12 09:54:03 +00003579 cat >conftest.$ac_ext <<_ACEOF
3580#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003581#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003582
Martin v. Löwis130fb172001-07-19 11:00:41 +00003583#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003584
3585void* routine(void* p){return NULL;}
3586
3587int main(){
3588 pthread_t p;
3589 if(pthread_create(&p,NULL,routine,NULL)!=0)
3590 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003591 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003592 return 0;
3593}
3594
Martin v. Löwis11437992002-04-12 09:54:03 +00003595_ACEOF
3596rm -f conftest$ac_exeext
3597if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3598 (eval $ac_link) 2>&5
3599 ac_status=$?
3600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3601 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3602 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3603 (eval $ac_try) 2>&5
3604 ac_status=$?
3605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3606 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003607 ac_cv_pthread_is_default=yes
3608else
Martin v. Löwis11437992002-04-12 09:54:03 +00003609 echo "$as_me: program exited with status $ac_status" >&5
3610echo "$as_me: failed program was:" >&5
3611cat conftest.$ac_ext >&5
3612( exit $ac_status )
3613ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003614fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003615rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003616fi
3617
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003618fi
3619
Martin v. Löwis11437992002-04-12 09:54:03 +00003620echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3621echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003622
Michael W. Hudson54241132001-12-07 15:38:26 +00003623
Martin v. Löwis11437992002-04-12 09:54:03 +00003624if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003625then
3626 ac_cv_kpthread=no
3627else
3628# -Kpthread, if available, provides the right #defines
3629# and linker options to make pthread_create available
3630# Some compilers won't report that they do not support -Kpthread,
3631# so we need to run a program to see whether it really made the
3632# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003633echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3634echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3635if test "${ac_cv_kpthread+set}" = set; then
3636 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003637else
3638 ac_save_cc="$CC"
3639CC="$CC -Kpthread"
3640if test "$cross_compiling" = yes; then
3641 ac_cv_kpthread=no
3642else
Martin v. Löwis11437992002-04-12 09:54:03 +00003643 cat >conftest.$ac_ext <<_ACEOF
3644#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003645#include "confdefs.h"
3646
3647#include <pthread.h>
3648
3649void* routine(void* p){return NULL;}
3650
3651int main(){
3652 pthread_t p;
3653 if(pthread_create(&p,NULL,routine,NULL)!=0)
3654 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003655 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003656 return 0;
3657}
3658
Martin v. Löwis11437992002-04-12 09:54:03 +00003659_ACEOF
3660rm -f conftest$ac_exeext
3661if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3662 (eval $ac_link) 2>&5
3663 ac_status=$?
3664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3665 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3667 (eval $ac_try) 2>&5
3668 ac_status=$?
3669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3670 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003671 ac_cv_kpthread=yes
3672else
Martin v. Löwis11437992002-04-12 09:54:03 +00003673 echo "$as_me: program exited with status $ac_status" >&5
3674echo "$as_me: failed program was:" >&5
3675cat conftest.$ac_ext >&5
3676( exit $ac_status )
3677ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003678fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003679rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003680fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003681CC="$ac_save_cc"
3682fi
3683
Martin v. Löwis11437992002-04-12 09:54:03 +00003684echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3685echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003686fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003687
Michael W. Hudson54241132001-12-07 15:38:26 +00003688
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003689# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00003690echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3691echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3692if test "${ac_cv_header_stdc+set}" = set; then
3693 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003694else
Martin v. Löwis11437992002-04-12 09:54:03 +00003695 cat >conftest.$ac_ext <<_ACEOF
3696#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003697#include "confdefs.h"
3698#include <stdlib.h>
3699#include <stdarg.h>
3700#include <string.h>
3701#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003702
3703_ACEOF
3704if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3705 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3706 ac_status=$?
3707 egrep -v '^ *\+' conftest.er1 >conftest.err
3708 rm -f conftest.er1
3709 cat conftest.err >&5
3710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3711 (exit $ac_status); } >/dev/null; then
3712 if test -s conftest.err; then
3713 ac_cpp_err=$ac_c_preproc_warn_flag
3714 else
3715 ac_cpp_err=
3716 fi
3717else
3718 ac_cpp_err=yes
3719fi
3720if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003721 ac_cv_header_stdc=yes
3722else
Martin v. Löwis11437992002-04-12 09:54:03 +00003723 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003724 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003725 ac_cv_header_stdc=no
3726fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003727rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003728
3729if test $ac_cv_header_stdc = yes; then
3730 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003731 cat >conftest.$ac_ext <<_ACEOF
3732#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003733#include "confdefs.h"
3734#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003735
3736_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003737if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3738 egrep "memchr" >/dev/null 2>&1; then
3739 :
3740else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003741 ac_cv_header_stdc=no
3742fi
3743rm -f conftest*
3744
3745fi
3746
3747if test $ac_cv_header_stdc = yes; then
3748 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003749 cat >conftest.$ac_ext <<_ACEOF
3750#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003751#include "confdefs.h"
3752#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003753
3754_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003755if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3756 egrep "free" >/dev/null 2>&1; then
3757 :
3758else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003759 ac_cv_header_stdc=no
3760fi
3761rm -f conftest*
3762
3763fi
3764
3765if test $ac_cv_header_stdc = yes; then
3766 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00003767 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003768 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003769else
Martin v. Löwis11437992002-04-12 09:54:03 +00003770 cat >conftest.$ac_ext <<_ACEOF
3771#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003772#include "confdefs.h"
3773#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003774#if ((' ' & 0x0FF) == 0x020)
3775# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3776# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3777#else
3778# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3779 || ('j' <= (c) && (c) <= 'r') \
3780 || ('s' <= (c) && (c) <= 'z'))
3781# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3782#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00003783
Martin v. Löwis11437992002-04-12 09:54:03 +00003784#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3785int
3786main ()
3787{
3788 int i;
3789 for (i = 0; i < 256; i++)
3790 if (XOR (islower (i), ISLOWER (i))
3791 || toupper (i) != TOUPPER (i))
3792 exit(2);
3793 exit (0);
3794}
3795_ACEOF
3796rm -f conftest$ac_exeext
3797if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3798 (eval $ac_link) 2>&5
3799 ac_status=$?
3800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3801 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3802 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3803 (eval $ac_try) 2>&5
3804 ac_status=$?
3805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3806 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003807 :
3808else
Martin v. Löwis11437992002-04-12 09:54:03 +00003809 echo "$as_me: program exited with status $ac_status" >&5
3810echo "$as_me: failed program was:" >&5
3811cat conftest.$ac_ext >&5
3812( exit $ac_status )
3813ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003814fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003815rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00003816fi
3817fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003818fi
3819echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3820echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003821if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003822
3823cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003824#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003825_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003826
3827fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003828
Martin v. Löwis11437992002-04-12 09:54:03 +00003829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
Martin v. Löwis11437992002-04-12 09:54:03 +00003868for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003869libintl.h locale.h ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00003870signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Skip Montanaro57454e52002-06-14 20:30:31 +00003871sys/audioio.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003872sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Martin v. Löwis69532332001-10-13 09:12:41 +00003873sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Skip Montanaro57454e52002-06-14 20:30:31 +00003874ndbm.h gdbm/ndbm.h sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00003875do
Martin v. Löwis11437992002-04-12 09:54:03 +00003876as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3877if eval "test \"\${$as_ac_Header+set}\" = set"; then
3878 echo "$as_me:$LINENO: checking for $ac_header" >&5
3879echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3880if eval "test \"\${$as_ac_Header+set}\" = set"; then
3881 echo $ECHO_N "(cached) $ECHO_C" >&6
3882fi
3883echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3884echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003885else
Martin v. Löwis11437992002-04-12 09:54:03 +00003886 # Is the header compilable?
3887echo "$as_me:$LINENO: checking $ac_header usability" >&5
3888echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3889cat >conftest.$ac_ext <<_ACEOF
3890#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003891#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00003892$ac_includes_default
3893#include <$ac_header>
3894_ACEOF
3895rm -f conftest.$ac_objext
3896if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3897 (eval $ac_compile) 2>&5
3898 ac_status=$?
3899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3900 (exit $ac_status); } &&
3901 { ac_try='test -s conftest.$ac_objext'
3902 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3903 (eval $ac_try) 2>&5
3904 ac_status=$?
3905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3906 (exit $ac_status); }; }; then
3907 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00003908else
Martin v. Löwis11437992002-04-12 09:54:03 +00003909 echo "$as_me: failed program was:" >&5
3910cat conftest.$ac_ext >&5
3911ac_header_compiler=no
3912fi
3913rm -f conftest.$ac_objext conftest.$ac_ext
3914echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3915echo "${ECHO_T}$ac_header_compiler" >&6
3916
3917# Is the header present?
3918echo "$as_me:$LINENO: checking $ac_header presence" >&5
3919echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3920cat >conftest.$ac_ext <<_ACEOF
3921#line $LINENO "configure"
3922#include "confdefs.h"
3923#include <$ac_header>
3924_ACEOF
3925if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3926 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3927 ac_status=$?
3928 egrep -v '^ *\+' conftest.er1 >conftest.err
3929 rm -f conftest.er1
3930 cat conftest.err >&5
3931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3932 (exit $ac_status); } >/dev/null; then
3933 if test -s conftest.err; then
3934 ac_cpp_err=$ac_c_preproc_warn_flag
3935 else
3936 ac_cpp_err=
3937 fi
3938else
3939 ac_cpp_err=yes
3940fi
3941if test -z "$ac_cpp_err"; then
3942 ac_header_preproc=yes
3943else
3944 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003945 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003946 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00003947fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003948rm -f conftest.err conftest.$ac_ext
3949echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3950echo "${ECHO_T}$ac_header_preproc" >&6
3951
3952# So? What about this header?
3953case $ac_header_compiler:$ac_header_preproc in
3954 yes:no )
3955 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3956echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3957 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3958echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3959 no:yes )
3960 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3961echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3962 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3963echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3964 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3965echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3966esac
3967echo "$as_me:$LINENO: checking for $ac_header" >&5
3968echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3969if eval "test \"\${$as_ac_Header+set}\" = set"; then
3970 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003971else
Martin v. Löwis11437992002-04-12 09:54:03 +00003972 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003973fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003974echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3975echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3976
3977fi
3978if test `eval echo '${'$as_ac_Header'}'` = yes; then
3979 cat >>confdefs.h <<_ACEOF
3980#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3981_ACEOF
3982
3983fi
3984
Guido van Rossum627b2d71993-12-24 10:39:16 +00003985done
3986
Martin v. Löwis11437992002-04-12 09:54:03 +00003987
3988
3989
3990
3991
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003992ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003993for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
3994 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
3995echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
3996echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
3997if eval "test \"\${$as_ac_Header+set}\" = set"; then
3998 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003999else
Martin v. Löwis11437992002-04-12 09:54:03 +00004000 cat >conftest.$ac_ext <<_ACEOF
4001#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004002#include "confdefs.h"
4003#include <sys/types.h>
4004#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004005
4006#ifdef F77_DUMMY_MAIN
4007# ifdef __cplusplus
4008 extern "C"
4009# endif
4010 int F77_DUMMY_MAIN() { return 1; }
4011#endif
4012int
4013main ()
4014{
4015if ((DIR *) 0)
4016return 0;
4017 ;
4018 return 0;
4019}
4020_ACEOF
4021rm -f conftest.$ac_objext
4022if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4023 (eval $ac_compile) 2>&5
4024 ac_status=$?
4025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4026 (exit $ac_status); } &&
4027 { ac_try='test -s conftest.$ac_objext'
4028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4029 (eval $ac_try) 2>&5
4030 ac_status=$?
4031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4032 (exit $ac_status); }; }; then
4033 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004034else
Martin v. Löwis11437992002-04-12 09:54:03 +00004035 echo "$as_me: failed program was:" >&5
4036cat conftest.$ac_ext >&5
4037eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004038fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004039rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004040fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004041echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4042echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4043if test `eval echo '${'$as_ac_Header'}'` = yes; then
4044 cat >>confdefs.h <<_ACEOF
4045#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4046_ACEOF
4047
4048ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004049fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004050
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004051done
4052# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4053if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004054 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4055echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4056if test "${ac_cv_search_opendir+set}" = set; then
4057 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004058else
Martin v. Löwis11437992002-04-12 09:54:03 +00004059 ac_func_search_save_LIBS=$LIBS
4060ac_cv_search_opendir=no
4061cat >conftest.$ac_ext <<_ACEOF
4062#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004063#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004064
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004065/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004066#ifdef __cplusplus
4067extern "C"
4068#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004069/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004070 builtin and then its argument prototype would still apply. */
4071char opendir ();
4072#ifdef F77_DUMMY_MAIN
4073# ifdef __cplusplus
4074 extern "C"
4075# endif
4076 int F77_DUMMY_MAIN() { return 1; }
4077#endif
4078int
4079main ()
4080{
4081opendir ();
4082 ;
4083 return 0;
4084}
4085_ACEOF
4086rm -f conftest.$ac_objext conftest$ac_exeext
4087if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4088 (eval $ac_link) 2>&5
4089 ac_status=$?
4090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4091 (exit $ac_status); } &&
4092 { ac_try='test -s conftest$ac_exeext'
4093 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4094 (eval $ac_try) 2>&5
4095 ac_status=$?
4096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4097 (exit $ac_status); }; }; then
4098 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004099else
Martin v. Löwis11437992002-04-12 09:54:03 +00004100 echo "$as_me: failed program was:" >&5
4101cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004102fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004103rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4104if test "$ac_cv_search_opendir" = no; then
4105 for ac_lib in dir; do
4106 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4107 cat >conftest.$ac_ext <<_ACEOF
4108#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004109#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004110
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004111/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004112#ifdef __cplusplus
4113extern "C"
4114#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004115/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004116 builtin and then its argument prototype would still apply. */
4117char opendir ();
4118#ifdef F77_DUMMY_MAIN
4119# ifdef __cplusplus
4120 extern "C"
4121# endif
4122 int F77_DUMMY_MAIN() { return 1; }
4123#endif
4124int
4125main ()
4126{
4127opendir ();
4128 ;
4129 return 0;
4130}
4131_ACEOF
4132rm -f conftest.$ac_objext conftest$ac_exeext
4133if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4134 (eval $ac_link) 2>&5
4135 ac_status=$?
4136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4137 (exit $ac_status); } &&
4138 { ac_try='test -s conftest$ac_exeext'
4139 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4140 (eval $ac_try) 2>&5
4141 ac_status=$?
4142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4143 (exit $ac_status); }; }; then
4144 ac_cv_search_opendir="-l$ac_lib"
4145break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004146else
Martin v. Löwis11437992002-04-12 09:54:03 +00004147 echo "$as_me: failed program was:" >&5
4148cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004149fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004150rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4151 done
4152fi
4153LIBS=$ac_func_search_save_LIBS
4154fi
4155echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4156echo "${ECHO_T}$ac_cv_search_opendir" >&6
4157if test "$ac_cv_search_opendir" != no; then
4158 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004159
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004160fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004161
Michael W. Hudson54241132001-12-07 15:38:26 +00004162else
Martin v. Löwis11437992002-04-12 09:54:03 +00004163 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4164echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4165if test "${ac_cv_search_opendir+set}" = set; then
4166 echo $ECHO_N "(cached) $ECHO_C" >&6
4167else
4168 ac_func_search_save_LIBS=$LIBS
4169ac_cv_search_opendir=no
4170cat >conftest.$ac_ext <<_ACEOF
4171#line $LINENO "configure"
4172#include "confdefs.h"
4173
4174/* Override any gcc2 internal prototype to avoid an error. */
4175#ifdef __cplusplus
4176extern "C"
4177#endif
4178/* We use char because int might match the return type of a gcc2
4179 builtin and then its argument prototype would still apply. */
4180char opendir ();
4181#ifdef F77_DUMMY_MAIN
4182# ifdef __cplusplus
4183 extern "C"
4184# endif
4185 int F77_DUMMY_MAIN() { return 1; }
4186#endif
4187int
4188main ()
4189{
4190opendir ();
4191 ;
4192 return 0;
4193}
4194_ACEOF
4195rm -f conftest.$ac_objext conftest$ac_exeext
4196if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4197 (eval $ac_link) 2>&5
4198 ac_status=$?
4199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4200 (exit $ac_status); } &&
4201 { ac_try='test -s conftest$ac_exeext'
4202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4203 (eval $ac_try) 2>&5
4204 ac_status=$?
4205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4206 (exit $ac_status); }; }; then
4207 ac_cv_search_opendir="none required"
4208else
4209 echo "$as_me: failed program was:" >&5
4210cat conftest.$ac_ext >&5
4211fi
4212rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4213if test "$ac_cv_search_opendir" = no; then
4214 for ac_lib in x; do
4215 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4216 cat >conftest.$ac_ext <<_ACEOF
4217#line $LINENO "configure"
4218#include "confdefs.h"
4219
4220/* Override any gcc2 internal prototype to avoid an error. */
4221#ifdef __cplusplus
4222extern "C"
4223#endif
4224/* We use char because int might match the return type of a gcc2
4225 builtin and then its argument prototype would still apply. */
4226char opendir ();
4227#ifdef F77_DUMMY_MAIN
4228# ifdef __cplusplus
4229 extern "C"
4230# endif
4231 int F77_DUMMY_MAIN() { return 1; }
4232#endif
4233int
4234main ()
4235{
4236opendir ();
4237 ;
4238 return 0;
4239}
4240_ACEOF
4241rm -f conftest.$ac_objext conftest$ac_exeext
4242if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4243 (eval $ac_link) 2>&5
4244 ac_status=$?
4245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4246 (exit $ac_status); } &&
4247 { ac_try='test -s conftest$ac_exeext'
4248 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4249 (eval $ac_try) 2>&5
4250 ac_status=$?
4251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4252 (exit $ac_status); }; }; then
4253 ac_cv_search_opendir="-l$ac_lib"
4254break
4255else
4256 echo "$as_me: failed program was:" >&5
4257cat conftest.$ac_ext >&5
4258fi
4259rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4260 done
4261fi
4262LIBS=$ac_func_search_save_LIBS
4263fi
4264echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4265echo "${ECHO_T}$ac_cv_search_opendir" >&6
4266if test "$ac_cv_search_opendir" != no; then
4267 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4268
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004269fi
4270
4271fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004272
Michael W. Hudson54241132001-12-07 15:38:26 +00004273
Guido van Rossum627b2d71993-12-24 10:39:16 +00004274# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004275was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004276echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4277echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4278cat >conftest.$ac_ext <<_ACEOF
4279#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004280#include "confdefs.h"
4281#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004282
4283_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004284if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4285 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004286 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004287else
Martin v. Löwis11437992002-04-12 09:54:03 +00004288
4289
4290cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004291#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004292_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004293
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004294
Guido van Rossum627b2d71993-12-24 10:39:16 +00004295fi
4296rm -f conftest*
4297
Martin v. Löwis11437992002-04-12 09:54:03 +00004298echo "$as_me:$LINENO: result: $was_it_defined" >&5
4299echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004300
Guido van Rossum810cc512001-09-09 23:51:39 +00004301# Two defines needed to enable largefile support on various platforms
4302# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00004303
Martin v. Löwis11437992002-04-12 09:54:03 +00004304cat >>confdefs.h <<\_ACEOF
4305#define _LARGEFILE_SOURCE 1
4306_ACEOF
4307
4308
4309cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004310#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00004311_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004312
Michael W. Hudson54241132001-12-07 15:38:26 +00004313
Guido van Rossum84e7b241996-08-19 21:59:00 +00004314# Add some code to confdefs.h so that the test for off_t works on SCO
4315cat >> confdefs.h <<\EOF
4316#if defined(SCO_DS)
4317#undef _OFF_T
4318#endif
4319EOF
4320
Guido van Rossumef2255b2000-03-10 22:30:29 +00004321# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00004322echo "$as_me:$LINENO: checking for mode_t" >&5
4323echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
4324if test "${ac_cv_type_mode_t+set}" = set; then
4325 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004326else
Martin v. Löwis11437992002-04-12 09:54:03 +00004327 cat >conftest.$ac_ext <<_ACEOF
4328#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004329#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004330$ac_includes_default
4331#ifdef F77_DUMMY_MAIN
4332# ifdef __cplusplus
4333 extern "C"
4334# endif
4335 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004336#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004337int
4338main ()
4339{
4340if ((mode_t *) 0)
4341 return 0;
4342if (sizeof (mode_t))
4343 return 0;
4344 ;
4345 return 0;
4346}
4347_ACEOF
4348rm -f conftest.$ac_objext
4349if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4350 (eval $ac_compile) 2>&5
4351 ac_status=$?
4352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4353 (exit $ac_status); } &&
4354 { ac_try='test -s conftest.$ac_objext'
4355 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4356 (eval $ac_try) 2>&5
4357 ac_status=$?
4358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4359 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00004360 ac_cv_type_mode_t=yes
4361else
Martin v. Löwis11437992002-04-12 09:54:03 +00004362 echo "$as_me: failed program was:" >&5
4363cat conftest.$ac_ext >&5
4364ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00004365fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004366rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004367fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004368echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4369echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4370if test $ac_cv_type_mode_t = yes; then
4371 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004372else
Martin v. Löwis11437992002-04-12 09:54:03 +00004373
4374cat >>confdefs.h <<_ACEOF
4375#define mode_t int
4376_ACEOF
4377
4378fi
4379
4380echo "$as_me:$LINENO: checking for off_t" >&5
4381echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4382if test "${ac_cv_type_off_t+set}" = set; then
4383 echo $ECHO_N "(cached) $ECHO_C" >&6
4384else
4385 cat >conftest.$ac_ext <<_ACEOF
4386#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004387#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004388$ac_includes_default
4389#ifdef F77_DUMMY_MAIN
4390# ifdef __cplusplus
4391 extern "C"
4392# endif
4393 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004394#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004395int
4396main ()
4397{
4398if ((off_t *) 0)
4399 return 0;
4400if (sizeof (off_t))
4401 return 0;
4402 ;
4403 return 0;
4404}
4405_ACEOF
4406rm -f conftest.$ac_objext
4407if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4408 (eval $ac_compile) 2>&5
4409 ac_status=$?
4410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4411 (exit $ac_status); } &&
4412 { ac_try='test -s conftest.$ac_objext'
4413 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4414 (eval $ac_try) 2>&5
4415 ac_status=$?
4416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4417 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004418 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004419else
Martin v. Löwis11437992002-04-12 09:54:03 +00004420 echo "$as_me: failed program was:" >&5
4421cat conftest.$ac_ext >&5
4422ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004423fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004424rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004425fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004426echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
4427echo "${ECHO_T}$ac_cv_type_off_t" >&6
4428if test $ac_cv_type_off_t = yes; then
4429 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004430else
Martin v. Löwis11437992002-04-12 09:54:03 +00004431
4432cat >>confdefs.h <<_ACEOF
4433#define off_t long
4434_ACEOF
4435
4436fi
4437
4438echo "$as_me:$LINENO: checking for pid_t" >&5
4439echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4440if test "${ac_cv_type_pid_t+set}" = set; then
4441 echo $ECHO_N "(cached) $ECHO_C" >&6
4442else
4443 cat >conftest.$ac_ext <<_ACEOF
4444#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004445#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004446$ac_includes_default
4447#ifdef F77_DUMMY_MAIN
4448# ifdef __cplusplus
4449 extern "C"
4450# endif
4451 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004452#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004453int
4454main ()
4455{
4456if ((pid_t *) 0)
4457 return 0;
4458if (sizeof (pid_t))
4459 return 0;
4460 ;
4461 return 0;
4462}
4463_ACEOF
4464rm -f conftest.$ac_objext
4465if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4466 (eval $ac_compile) 2>&5
4467 ac_status=$?
4468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4469 (exit $ac_status); } &&
4470 { ac_try='test -s conftest.$ac_objext'
4471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4472 (eval $ac_try) 2>&5
4473 ac_status=$?
4474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4475 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004476 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004477else
Martin v. Löwis11437992002-04-12 09:54:03 +00004478 echo "$as_me: failed program was:" >&5
4479cat conftest.$ac_ext >&5
4480ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004481fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004482rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004483fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004484echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
4485echo "${ECHO_T}$ac_cv_type_pid_t" >&6
4486if test $ac_cv_type_pid_t = yes; then
4487 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004488else
Martin v. Löwis11437992002-04-12 09:54:03 +00004489
4490cat >>confdefs.h <<_ACEOF
4491#define pid_t int
4492_ACEOF
4493
4494fi
4495
4496echo "$as_me:$LINENO: checking return type of signal handlers" >&5
4497echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
4498if test "${ac_cv_type_signal+set}" = set; then
4499 echo $ECHO_N "(cached) $ECHO_C" >&6
4500else
4501 cat >conftest.$ac_ext <<_ACEOF
4502#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004503#include "confdefs.h"
4504#include <sys/types.h>
4505#include <signal.h>
4506#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004507# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00004508#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004509#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004510extern "C" void (*signal (int, void (*)(int)))(int);
4511#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004512void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004513#endif
4514
Martin v. Löwis11437992002-04-12 09:54:03 +00004515#ifdef F77_DUMMY_MAIN
4516# ifdef __cplusplus
4517 extern "C"
4518# endif
4519 int F77_DUMMY_MAIN() { return 1; }
4520#endif
4521int
4522main ()
4523{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004524int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00004525 ;
4526 return 0;
4527}
4528_ACEOF
4529rm -f conftest.$ac_objext
4530if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4531 (eval $ac_compile) 2>&5
4532 ac_status=$?
4533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4534 (exit $ac_status); } &&
4535 { ac_try='test -s conftest.$ac_objext'
4536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4537 (eval $ac_try) 2>&5
4538 ac_status=$?
4539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4540 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004541 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00004542else
Martin v. Löwis11437992002-04-12 09:54:03 +00004543 echo "$as_me: failed program was:" >&5
4544cat conftest.$ac_ext >&5
4545ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00004546fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004547rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004548fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004549echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
4550echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004551
Martin v. Löwis11437992002-04-12 09:54:03 +00004552cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004553#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004554_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004555
Michael W. Hudson54241132001-12-07 15:38:26 +00004556
Martin v. Löwis11437992002-04-12 09:54:03 +00004557echo "$as_me:$LINENO: checking for size_t" >&5
4558echo $ECHO_N "checking for size_t... $ECHO_C" >&6
4559if test "${ac_cv_type_size_t+set}" = set; then
4560 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004561else
Martin v. Löwis11437992002-04-12 09:54:03 +00004562 cat >conftest.$ac_ext <<_ACEOF
4563#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004564#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004565$ac_includes_default
4566#ifdef F77_DUMMY_MAIN
4567# ifdef __cplusplus
4568 extern "C"
4569# endif
4570 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004571#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004572int
4573main ()
4574{
4575if ((size_t *) 0)
4576 return 0;
4577if (sizeof (size_t))
4578 return 0;
4579 ;
4580 return 0;
4581}
4582_ACEOF
4583rm -f conftest.$ac_objext
4584if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4585 (eval $ac_compile) 2>&5
4586 ac_status=$?
4587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4588 (exit $ac_status); } &&
4589 { ac_try='test -s conftest.$ac_objext'
4590 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4591 (eval $ac_try) 2>&5
4592 ac_status=$?
4593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4594 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004595 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004596else
Martin v. Löwis11437992002-04-12 09:54:03 +00004597 echo "$as_me: failed program was:" >&5
4598cat conftest.$ac_ext >&5
4599ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004600fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004601rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004602fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004603echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
4604echo "${ECHO_T}$ac_cv_type_size_t" >&6
4605if test $ac_cv_type_size_t = yes; then
4606 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004607else
Martin v. Löwis11437992002-04-12 09:54:03 +00004608
4609cat >>confdefs.h <<_ACEOF
4610#define size_t unsigned
4611_ACEOF
4612
4613fi
4614
4615echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
4616echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
4617if test "${ac_cv_type_uid_t+set}" = set; then
4618 echo $ECHO_N "(cached) $ECHO_C" >&6
4619else
4620 cat >conftest.$ac_ext <<_ACEOF
4621#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004622#include "confdefs.h"
4623#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004624
4625_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004626if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4627 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004628 ac_cv_type_uid_t=yes
4629else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004630 ac_cv_type_uid_t=no
4631fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004632rm -f conftest*
4633
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004634fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004635echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
4636echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004637if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004638
Martin v. Löwis11437992002-04-12 09:54:03 +00004639cat >>confdefs.h <<\_ACEOF
4640#define uid_t int
4641_ACEOF
4642
4643
4644cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004645#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00004646_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004647
4648fi
4649
Jack Jansendd19cf82001-12-06 22:36:17 +00004650
Michael W. Hudson54241132001-12-07 15:38:26 +00004651# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00004652echo "$as_me:$LINENO: checking for int" >&5
4653echo $ECHO_N "checking for int... $ECHO_C" >&6
4654if test "${ac_cv_type_int+set}" = set; then
4655 echo $ECHO_N "(cached) $ECHO_C" >&6
4656else
4657 cat >conftest.$ac_ext <<_ACEOF
4658#line $LINENO "configure"
4659#include "confdefs.h"
4660$ac_includes_default
4661#ifdef F77_DUMMY_MAIN
4662# ifdef __cplusplus
4663 extern "C"
4664# endif
4665 int F77_DUMMY_MAIN() { return 1; }
4666#endif
4667int
4668main ()
4669{
4670if ((int *) 0)
4671 return 0;
4672if (sizeof (int))
4673 return 0;
4674 ;
4675 return 0;
4676}
4677_ACEOF
4678rm -f conftest.$ac_objext
4679if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4680 (eval $ac_compile) 2>&5
4681 ac_status=$?
4682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4683 (exit $ac_status); } &&
4684 { ac_try='test -s conftest.$ac_objext'
4685 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4686 (eval $ac_try) 2>&5
4687 ac_status=$?
4688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4689 (exit $ac_status); }; }; then
4690 ac_cv_type_int=yes
4691else
4692 echo "$as_me: failed program was:" >&5
4693cat conftest.$ac_ext >&5
4694ac_cv_type_int=no
4695fi
4696rm -f conftest.$ac_objext conftest.$ac_ext
4697fi
4698echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
4699echo "${ECHO_T}$ac_cv_type_int" >&6
4700
4701echo "$as_me:$LINENO: checking size of int" >&5
4702echo $ECHO_N "checking size of int... $ECHO_C" >&6
4703if test "${ac_cv_sizeof_int+set}" = set; then
4704 echo $ECHO_N "(cached) $ECHO_C" >&6
4705else
4706 if test "$ac_cv_type_int" = yes; then
4707 # The cast to unsigned long works around a bug in the HP C Compiler
4708 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4709 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4710 # This bug is HP SR number 8606223364.
4711 if test "$cross_compiling" = yes; then
4712 # Depending upon the size, compute the lo and hi bounds.
4713cat >conftest.$ac_ext <<_ACEOF
4714#line $LINENO "configure"
4715#include "confdefs.h"
4716$ac_includes_default
4717#ifdef F77_DUMMY_MAIN
4718# ifdef __cplusplus
4719 extern "C"
4720# endif
4721 int F77_DUMMY_MAIN() { return 1; }
4722#endif
4723int
4724main ()
4725{
4726static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
4727test_array [0] = 0
4728
4729 ;
4730 return 0;
4731}
4732_ACEOF
4733rm -f conftest.$ac_objext
4734if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4735 (eval $ac_compile) 2>&5
4736 ac_status=$?
4737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4738 (exit $ac_status); } &&
4739 { ac_try='test -s conftest.$ac_objext'
4740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4741 (eval $ac_try) 2>&5
4742 ac_status=$?
4743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4744 (exit $ac_status); }; }; then
4745 ac_lo=0 ac_mid=0
4746 while :; do
4747 cat >conftest.$ac_ext <<_ACEOF
4748#line $LINENO "configure"
4749#include "confdefs.h"
4750$ac_includes_default
4751#ifdef F77_DUMMY_MAIN
4752# ifdef __cplusplus
4753 extern "C"
4754# endif
4755 int F77_DUMMY_MAIN() { return 1; }
4756#endif
4757int
4758main ()
4759{
4760static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4761test_array [0] = 0
4762
4763 ;
4764 return 0;
4765}
4766_ACEOF
4767rm -f conftest.$ac_objext
4768if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4769 (eval $ac_compile) 2>&5
4770 ac_status=$?
4771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4772 (exit $ac_status); } &&
4773 { ac_try='test -s conftest.$ac_objext'
4774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4775 (eval $ac_try) 2>&5
4776 ac_status=$?
4777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4778 (exit $ac_status); }; }; then
4779 ac_hi=$ac_mid; break
4780else
4781 echo "$as_me: failed program was:" >&5
4782cat conftest.$ac_ext >&5
4783ac_lo=`expr $ac_mid + 1`
4784 if test $ac_lo -le $ac_mid; then
4785 ac_lo= ac_hi=
4786 break
4787 fi
4788 ac_mid=`expr 2 '*' $ac_mid + 1`
4789fi
4790rm -f conftest.$ac_objext conftest.$ac_ext
4791 done
4792else
4793 echo "$as_me: failed program was:" >&5
4794cat conftest.$ac_ext >&5
4795cat >conftest.$ac_ext <<_ACEOF
4796#line $LINENO "configure"
4797#include "confdefs.h"
4798$ac_includes_default
4799#ifdef F77_DUMMY_MAIN
4800# ifdef __cplusplus
4801 extern "C"
4802# endif
4803 int F77_DUMMY_MAIN() { return 1; }
4804#endif
4805int
4806main ()
4807{
4808static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
4809test_array [0] = 0
4810
4811 ;
4812 return 0;
4813}
4814_ACEOF
4815rm -f conftest.$ac_objext
4816if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4817 (eval $ac_compile) 2>&5
4818 ac_status=$?
4819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4820 (exit $ac_status); } &&
4821 { ac_try='test -s conftest.$ac_objext'
4822 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4823 (eval $ac_try) 2>&5
4824 ac_status=$?
4825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4826 (exit $ac_status); }; }; then
4827 ac_hi=-1 ac_mid=-1
4828 while :; do
4829 cat >conftest.$ac_ext <<_ACEOF
4830#line $LINENO "configure"
4831#include "confdefs.h"
4832$ac_includes_default
4833#ifdef F77_DUMMY_MAIN
4834# ifdef __cplusplus
4835 extern "C"
4836# endif
4837 int F77_DUMMY_MAIN() { return 1; }
4838#endif
4839int
4840main ()
4841{
4842static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
4843test_array [0] = 0
4844
4845 ;
4846 return 0;
4847}
4848_ACEOF
4849rm -f conftest.$ac_objext
4850if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4851 (eval $ac_compile) 2>&5
4852 ac_status=$?
4853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4854 (exit $ac_status); } &&
4855 { ac_try='test -s conftest.$ac_objext'
4856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4857 (eval $ac_try) 2>&5
4858 ac_status=$?
4859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4860 (exit $ac_status); }; }; then
4861 ac_lo=$ac_mid; break
4862else
4863 echo "$as_me: failed program was:" >&5
4864cat conftest.$ac_ext >&5
4865ac_hi=`expr '(' $ac_mid ')' - 1`
4866 if test $ac_mid -le $ac_hi; then
4867 ac_lo= ac_hi=
4868 break
4869 fi
4870 ac_mid=`expr 2 '*' $ac_mid`
4871fi
4872rm -f conftest.$ac_objext conftest.$ac_ext
4873 done
4874else
4875 echo "$as_me: failed program was:" >&5
4876cat conftest.$ac_ext >&5
4877ac_lo= ac_hi=
4878fi
4879rm -f conftest.$ac_objext conftest.$ac_ext
4880fi
4881rm -f conftest.$ac_objext conftest.$ac_ext
4882# Binary search between lo and hi bounds.
4883while test "x$ac_lo" != "x$ac_hi"; do
4884 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4885 cat >conftest.$ac_ext <<_ACEOF
4886#line $LINENO "configure"
4887#include "confdefs.h"
4888$ac_includes_default
4889#ifdef F77_DUMMY_MAIN
4890# ifdef __cplusplus
4891 extern "C"
4892# endif
4893 int F77_DUMMY_MAIN() { return 1; }
4894#endif
4895int
4896main ()
4897{
4898static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4899test_array [0] = 0
4900
4901 ;
4902 return 0;
4903}
4904_ACEOF
4905rm -f conftest.$ac_objext
4906if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4907 (eval $ac_compile) 2>&5
4908 ac_status=$?
4909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4910 (exit $ac_status); } &&
4911 { ac_try='test -s conftest.$ac_objext'
4912 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4913 (eval $ac_try) 2>&5
4914 ac_status=$?
4915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4916 (exit $ac_status); }; }; then
4917 ac_hi=$ac_mid
4918else
4919 echo "$as_me: failed program was:" >&5
4920cat conftest.$ac_ext >&5
4921ac_lo=`expr '(' $ac_mid ')' + 1`
4922fi
4923rm -f conftest.$ac_objext conftest.$ac_ext
4924done
4925case $ac_lo in
4926?*) ac_cv_sizeof_int=$ac_lo;;
4927'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
4928echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
4929 { (exit 1); exit 1; }; } ;;
4930esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004931else
4932 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004933 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
4934echo "$as_me: error: cannot run test program while cross compiling" >&2;}
4935 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004936else
Martin v. Löwis11437992002-04-12 09:54:03 +00004937 cat >conftest.$ac_ext <<_ACEOF
4938#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004939#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004940$ac_includes_default
4941long longval () { return (long) (sizeof (int)); }
4942unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00004943#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004944#include <stdlib.h>
4945#ifdef F77_DUMMY_MAIN
4946# ifdef __cplusplus
4947 extern "C"
4948# endif
4949 int F77_DUMMY_MAIN() { return 1; }
4950#endif
4951int
4952main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004953{
Martin v. Löwis11437992002-04-12 09:54:03 +00004954
4955 FILE *f = fopen ("conftest.val", "w");
4956 if (! f)
4957 exit (1);
4958 if (((long) (sizeof (int))) < 0)
4959 {
4960 long i = longval ();
4961 if (i != ((long) (sizeof (int))))
4962 exit (1);
4963 fprintf (f, "%ld\n", i);
4964 }
4965 else
4966 {
4967 unsigned long i = ulongval ();
4968 if (i != ((long) (sizeof (int))))
4969 exit (1);
4970 fprintf (f, "%lu\n", i);
4971 }
4972 exit (ferror (f) || fclose (f) != 0);
4973
4974 ;
4975 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004976}
Martin v. Löwis11437992002-04-12 09:54:03 +00004977_ACEOF
4978rm -f conftest$ac_exeext
4979if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4980 (eval $ac_link) 2>&5
4981 ac_status=$?
4982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4983 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4984 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4985 (eval $ac_try) 2>&5
4986 ac_status=$?
4987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4988 (exit $ac_status); }; }; then
4989 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004990else
Martin v. Löwis11437992002-04-12 09:54:03 +00004991 echo "$as_me: program exited with status $ac_status" >&5
4992echo "$as_me: failed program was:" >&5
4993cat conftest.$ac_ext >&5
4994( exit $ac_status )
4995{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
4996echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
4997 { (exit 1); exit 1; }; }
4998fi
4999rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5000fi
5001fi
5002rm -f conftest.val
5003else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005004 ac_cv_sizeof_int=0
5005fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005006fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005007echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5008echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5009cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005010#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005011_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005012
5013
Martin v. Löwis11437992002-04-12 09:54:03 +00005014echo "$as_me:$LINENO: checking for long" >&5
5015echo $ECHO_N "checking for long... $ECHO_C" >&6
5016if test "${ac_cv_type_long+set}" = set; then
5017 echo $ECHO_N "(cached) $ECHO_C" >&6
5018else
5019 cat >conftest.$ac_ext <<_ACEOF
5020#line $LINENO "configure"
5021#include "confdefs.h"
5022$ac_includes_default
5023#ifdef F77_DUMMY_MAIN
5024# ifdef __cplusplus
5025 extern "C"
5026# endif
5027 int F77_DUMMY_MAIN() { return 1; }
5028#endif
5029int
5030main ()
5031{
5032if ((long *) 0)
5033 return 0;
5034if (sizeof (long))
5035 return 0;
5036 ;
5037 return 0;
5038}
5039_ACEOF
5040rm -f conftest.$ac_objext
5041if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5042 (eval $ac_compile) 2>&5
5043 ac_status=$?
5044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5045 (exit $ac_status); } &&
5046 { ac_try='test -s conftest.$ac_objext'
5047 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5048 (eval $ac_try) 2>&5
5049 ac_status=$?
5050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5051 (exit $ac_status); }; }; then
5052 ac_cv_type_long=yes
5053else
5054 echo "$as_me: failed program was:" >&5
5055cat conftest.$ac_ext >&5
5056ac_cv_type_long=no
5057fi
5058rm -f conftest.$ac_objext conftest.$ac_ext
5059fi
5060echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5061echo "${ECHO_T}$ac_cv_type_long" >&6
5062
5063echo "$as_me:$LINENO: checking size of long" >&5
5064echo $ECHO_N "checking size of long... $ECHO_C" >&6
5065if test "${ac_cv_sizeof_long+set}" = set; then
5066 echo $ECHO_N "(cached) $ECHO_C" >&6
5067else
5068 if test "$ac_cv_type_long" = yes; then
5069 # The cast to unsigned long works around a bug in the HP C Compiler
5070 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5071 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5072 # This bug is HP SR number 8606223364.
5073 if test "$cross_compiling" = yes; then
5074 # Depending upon the size, compute the lo and hi bounds.
5075cat >conftest.$ac_ext <<_ACEOF
5076#line $LINENO "configure"
5077#include "confdefs.h"
5078$ac_includes_default
5079#ifdef F77_DUMMY_MAIN
5080# ifdef __cplusplus
5081 extern "C"
5082# endif
5083 int F77_DUMMY_MAIN() { return 1; }
5084#endif
5085int
5086main ()
5087{
5088static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5089test_array [0] = 0
5090
5091 ;
5092 return 0;
5093}
5094_ACEOF
5095rm -f conftest.$ac_objext
5096if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5097 (eval $ac_compile) 2>&5
5098 ac_status=$?
5099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5100 (exit $ac_status); } &&
5101 { ac_try='test -s conftest.$ac_objext'
5102 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5103 (eval $ac_try) 2>&5
5104 ac_status=$?
5105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5106 (exit $ac_status); }; }; then
5107 ac_lo=0 ac_mid=0
5108 while :; do
5109 cat >conftest.$ac_ext <<_ACEOF
5110#line $LINENO "configure"
5111#include "confdefs.h"
5112$ac_includes_default
5113#ifdef F77_DUMMY_MAIN
5114# ifdef __cplusplus
5115 extern "C"
5116# endif
5117 int F77_DUMMY_MAIN() { return 1; }
5118#endif
5119int
5120main ()
5121{
5122static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5123test_array [0] = 0
5124
5125 ;
5126 return 0;
5127}
5128_ACEOF
5129rm -f conftest.$ac_objext
5130if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5131 (eval $ac_compile) 2>&5
5132 ac_status=$?
5133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5134 (exit $ac_status); } &&
5135 { ac_try='test -s conftest.$ac_objext'
5136 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5137 (eval $ac_try) 2>&5
5138 ac_status=$?
5139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5140 (exit $ac_status); }; }; then
5141 ac_hi=$ac_mid; break
5142else
5143 echo "$as_me: failed program was:" >&5
5144cat conftest.$ac_ext >&5
5145ac_lo=`expr $ac_mid + 1`
5146 if test $ac_lo -le $ac_mid; then
5147 ac_lo= ac_hi=
5148 break
5149 fi
5150 ac_mid=`expr 2 '*' $ac_mid + 1`
5151fi
5152rm -f conftest.$ac_objext conftest.$ac_ext
5153 done
5154else
5155 echo "$as_me: failed program was:" >&5
5156cat conftest.$ac_ext >&5
5157cat >conftest.$ac_ext <<_ACEOF
5158#line $LINENO "configure"
5159#include "confdefs.h"
5160$ac_includes_default
5161#ifdef F77_DUMMY_MAIN
5162# ifdef __cplusplus
5163 extern "C"
5164# endif
5165 int F77_DUMMY_MAIN() { return 1; }
5166#endif
5167int
5168main ()
5169{
5170static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5171test_array [0] = 0
5172
5173 ;
5174 return 0;
5175}
5176_ACEOF
5177rm -f conftest.$ac_objext
5178if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5179 (eval $ac_compile) 2>&5
5180 ac_status=$?
5181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5182 (exit $ac_status); } &&
5183 { ac_try='test -s conftest.$ac_objext'
5184 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5185 (eval $ac_try) 2>&5
5186 ac_status=$?
5187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5188 (exit $ac_status); }; }; then
5189 ac_hi=-1 ac_mid=-1
5190 while :; do
5191 cat >conftest.$ac_ext <<_ACEOF
5192#line $LINENO "configure"
5193#include "confdefs.h"
5194$ac_includes_default
5195#ifdef F77_DUMMY_MAIN
5196# ifdef __cplusplus
5197 extern "C"
5198# endif
5199 int F77_DUMMY_MAIN() { return 1; }
5200#endif
5201int
5202main ()
5203{
5204static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5205test_array [0] = 0
5206
5207 ;
5208 return 0;
5209}
5210_ACEOF
5211rm -f conftest.$ac_objext
5212if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5213 (eval $ac_compile) 2>&5
5214 ac_status=$?
5215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5216 (exit $ac_status); } &&
5217 { ac_try='test -s conftest.$ac_objext'
5218 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5219 (eval $ac_try) 2>&5
5220 ac_status=$?
5221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5222 (exit $ac_status); }; }; then
5223 ac_lo=$ac_mid; break
5224else
5225 echo "$as_me: failed program was:" >&5
5226cat conftest.$ac_ext >&5
5227ac_hi=`expr '(' $ac_mid ')' - 1`
5228 if test $ac_mid -le $ac_hi; then
5229 ac_lo= ac_hi=
5230 break
5231 fi
5232 ac_mid=`expr 2 '*' $ac_mid`
5233fi
5234rm -f conftest.$ac_objext conftest.$ac_ext
5235 done
5236else
5237 echo "$as_me: failed program was:" >&5
5238cat conftest.$ac_ext >&5
5239ac_lo= ac_hi=
5240fi
5241rm -f conftest.$ac_objext conftest.$ac_ext
5242fi
5243rm -f conftest.$ac_objext conftest.$ac_ext
5244# Binary search between lo and hi bounds.
5245while test "x$ac_lo" != "x$ac_hi"; do
5246 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5247 cat >conftest.$ac_ext <<_ACEOF
5248#line $LINENO "configure"
5249#include "confdefs.h"
5250$ac_includes_default
5251#ifdef F77_DUMMY_MAIN
5252# ifdef __cplusplus
5253 extern "C"
5254# endif
5255 int F77_DUMMY_MAIN() { return 1; }
5256#endif
5257int
5258main ()
5259{
5260static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5261test_array [0] = 0
5262
5263 ;
5264 return 0;
5265}
5266_ACEOF
5267rm -f conftest.$ac_objext
5268if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5269 (eval $ac_compile) 2>&5
5270 ac_status=$?
5271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5272 (exit $ac_status); } &&
5273 { ac_try='test -s conftest.$ac_objext'
5274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5275 (eval $ac_try) 2>&5
5276 ac_status=$?
5277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5278 (exit $ac_status); }; }; then
5279 ac_hi=$ac_mid
5280else
5281 echo "$as_me: failed program was:" >&5
5282cat conftest.$ac_ext >&5
5283ac_lo=`expr '(' $ac_mid ')' + 1`
5284fi
5285rm -f conftest.$ac_objext conftest.$ac_ext
5286done
5287case $ac_lo in
5288?*) ac_cv_sizeof_long=$ac_lo;;
5289'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5290echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5291 { (exit 1); exit 1; }; } ;;
5292esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005293else
5294 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005295 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5296echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5297 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005298else
Martin v. Löwis11437992002-04-12 09:54:03 +00005299 cat >conftest.$ac_ext <<_ACEOF
5300#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005301#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005302$ac_includes_default
5303long longval () { return (long) (sizeof (long)); }
5304unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005305#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005306#include <stdlib.h>
5307#ifdef F77_DUMMY_MAIN
5308# ifdef __cplusplus
5309 extern "C"
5310# endif
5311 int F77_DUMMY_MAIN() { return 1; }
5312#endif
5313int
5314main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005315{
Martin v. Löwis11437992002-04-12 09:54:03 +00005316
5317 FILE *f = fopen ("conftest.val", "w");
5318 if (! f)
5319 exit (1);
5320 if (((long) (sizeof (long))) < 0)
5321 {
5322 long i = longval ();
5323 if (i != ((long) (sizeof (long))))
5324 exit (1);
5325 fprintf (f, "%ld\n", i);
5326 }
5327 else
5328 {
5329 unsigned long i = ulongval ();
5330 if (i != ((long) (sizeof (long))))
5331 exit (1);
5332 fprintf (f, "%lu\n", i);
5333 }
5334 exit (ferror (f) || fclose (f) != 0);
5335
5336 ;
5337 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005338}
Martin v. Löwis11437992002-04-12 09:54:03 +00005339_ACEOF
5340rm -f conftest$ac_exeext
5341if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5342 (eval $ac_link) 2>&5
5343 ac_status=$?
5344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5345 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5347 (eval $ac_try) 2>&5
5348 ac_status=$?
5349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5350 (exit $ac_status); }; }; then
5351 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005352else
Martin v. Löwis11437992002-04-12 09:54:03 +00005353 echo "$as_me: program exited with status $ac_status" >&5
5354echo "$as_me: failed program was:" >&5
5355cat conftest.$ac_ext >&5
5356( exit $ac_status )
5357{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5358echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5359 { (exit 1); exit 1; }; }
5360fi
5361rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5362fi
5363fi
5364rm -f conftest.val
5365else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005366 ac_cv_sizeof_long=0
5367fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005368fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005369echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5370echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5371cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005372#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00005373_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005374
5375
Martin v. Löwis11437992002-04-12 09:54:03 +00005376echo "$as_me:$LINENO: checking for void *" >&5
5377echo $ECHO_N "checking for void *... $ECHO_C" >&6
5378if test "${ac_cv_type_void_p+set}" = set; then
5379 echo $ECHO_N "(cached) $ECHO_C" >&6
5380else
5381 cat >conftest.$ac_ext <<_ACEOF
5382#line $LINENO "configure"
5383#include "confdefs.h"
5384$ac_includes_default
5385#ifdef F77_DUMMY_MAIN
5386# ifdef __cplusplus
5387 extern "C"
5388# endif
5389 int F77_DUMMY_MAIN() { return 1; }
5390#endif
5391int
5392main ()
5393{
5394if ((void * *) 0)
5395 return 0;
5396if (sizeof (void *))
5397 return 0;
5398 ;
5399 return 0;
5400}
5401_ACEOF
5402rm -f conftest.$ac_objext
5403if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5404 (eval $ac_compile) 2>&5
5405 ac_status=$?
5406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5407 (exit $ac_status); } &&
5408 { ac_try='test -s conftest.$ac_objext'
5409 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5410 (eval $ac_try) 2>&5
5411 ac_status=$?
5412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5413 (exit $ac_status); }; }; then
5414 ac_cv_type_void_p=yes
5415else
5416 echo "$as_me: failed program was:" >&5
5417cat conftest.$ac_ext >&5
5418ac_cv_type_void_p=no
5419fi
5420rm -f conftest.$ac_objext conftest.$ac_ext
5421fi
5422echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
5423echo "${ECHO_T}$ac_cv_type_void_p" >&6
5424
5425echo "$as_me:$LINENO: checking size of void *" >&5
5426echo $ECHO_N "checking size of void *... $ECHO_C" >&6
5427if test "${ac_cv_sizeof_void_p+set}" = set; then
5428 echo $ECHO_N "(cached) $ECHO_C" >&6
5429else
5430 if test "$ac_cv_type_void_p" = yes; then
5431 # The cast to unsigned long works around a bug in the HP C Compiler
5432 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5433 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5434 # This bug is HP SR number 8606223364.
5435 if test "$cross_compiling" = yes; then
5436 # Depending upon the size, compute the lo and hi bounds.
5437cat >conftest.$ac_ext <<_ACEOF
5438#line $LINENO "configure"
5439#include "confdefs.h"
5440$ac_includes_default
5441#ifdef F77_DUMMY_MAIN
5442# ifdef __cplusplus
5443 extern "C"
5444# endif
5445 int F77_DUMMY_MAIN() { return 1; }
5446#endif
5447int
5448main ()
5449{
5450static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
5451test_array [0] = 0
5452
5453 ;
5454 return 0;
5455}
5456_ACEOF
5457rm -f conftest.$ac_objext
5458if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5459 (eval $ac_compile) 2>&5
5460 ac_status=$?
5461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5462 (exit $ac_status); } &&
5463 { ac_try='test -s conftest.$ac_objext'
5464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5465 (eval $ac_try) 2>&5
5466 ac_status=$?
5467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5468 (exit $ac_status); }; }; then
5469 ac_lo=0 ac_mid=0
5470 while :; do
5471 cat >conftest.$ac_ext <<_ACEOF
5472#line $LINENO "configure"
5473#include "confdefs.h"
5474$ac_includes_default
5475#ifdef F77_DUMMY_MAIN
5476# ifdef __cplusplus
5477 extern "C"
5478# endif
5479 int F77_DUMMY_MAIN() { return 1; }
5480#endif
5481int
5482main ()
5483{
5484static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5485test_array [0] = 0
5486
5487 ;
5488 return 0;
5489}
5490_ACEOF
5491rm -f conftest.$ac_objext
5492if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5493 (eval $ac_compile) 2>&5
5494 ac_status=$?
5495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5496 (exit $ac_status); } &&
5497 { ac_try='test -s conftest.$ac_objext'
5498 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5499 (eval $ac_try) 2>&5
5500 ac_status=$?
5501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5502 (exit $ac_status); }; }; then
5503 ac_hi=$ac_mid; break
5504else
5505 echo "$as_me: failed program was:" >&5
5506cat conftest.$ac_ext >&5
5507ac_lo=`expr $ac_mid + 1`
5508 if test $ac_lo -le $ac_mid; then
5509 ac_lo= ac_hi=
5510 break
5511 fi
5512 ac_mid=`expr 2 '*' $ac_mid + 1`
5513fi
5514rm -f conftest.$ac_objext conftest.$ac_ext
5515 done
5516else
5517 echo "$as_me: failed program was:" >&5
5518cat conftest.$ac_ext >&5
5519cat >conftest.$ac_ext <<_ACEOF
5520#line $LINENO "configure"
5521#include "confdefs.h"
5522$ac_includes_default
5523#ifdef F77_DUMMY_MAIN
5524# ifdef __cplusplus
5525 extern "C"
5526# endif
5527 int F77_DUMMY_MAIN() { return 1; }
5528#endif
5529int
5530main ()
5531{
5532static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
5533test_array [0] = 0
5534
5535 ;
5536 return 0;
5537}
5538_ACEOF
5539rm -f conftest.$ac_objext
5540if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5541 (eval $ac_compile) 2>&5
5542 ac_status=$?
5543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5544 (exit $ac_status); } &&
5545 { ac_try='test -s conftest.$ac_objext'
5546 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5547 (eval $ac_try) 2>&5
5548 ac_status=$?
5549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5550 (exit $ac_status); }; }; then
5551 ac_hi=-1 ac_mid=-1
5552 while :; do
5553 cat >conftest.$ac_ext <<_ACEOF
5554#line $LINENO "configure"
5555#include "confdefs.h"
5556$ac_includes_default
5557#ifdef F77_DUMMY_MAIN
5558# ifdef __cplusplus
5559 extern "C"
5560# endif
5561 int F77_DUMMY_MAIN() { return 1; }
5562#endif
5563int
5564main ()
5565{
5566static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
5567test_array [0] = 0
5568
5569 ;
5570 return 0;
5571}
5572_ACEOF
5573rm -f conftest.$ac_objext
5574if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5575 (eval $ac_compile) 2>&5
5576 ac_status=$?
5577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5578 (exit $ac_status); } &&
5579 { ac_try='test -s conftest.$ac_objext'
5580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5581 (eval $ac_try) 2>&5
5582 ac_status=$?
5583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5584 (exit $ac_status); }; }; then
5585 ac_lo=$ac_mid; break
5586else
5587 echo "$as_me: failed program was:" >&5
5588cat conftest.$ac_ext >&5
5589ac_hi=`expr '(' $ac_mid ')' - 1`
5590 if test $ac_mid -le $ac_hi; then
5591 ac_lo= ac_hi=
5592 break
5593 fi
5594 ac_mid=`expr 2 '*' $ac_mid`
5595fi
5596rm -f conftest.$ac_objext conftest.$ac_ext
5597 done
5598else
5599 echo "$as_me: failed program was:" >&5
5600cat conftest.$ac_ext >&5
5601ac_lo= ac_hi=
5602fi
5603rm -f conftest.$ac_objext conftest.$ac_ext
5604fi
5605rm -f conftest.$ac_objext conftest.$ac_ext
5606# Binary search between lo and hi bounds.
5607while test "x$ac_lo" != "x$ac_hi"; do
5608 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5609 cat >conftest.$ac_ext <<_ACEOF
5610#line $LINENO "configure"
5611#include "confdefs.h"
5612$ac_includes_default
5613#ifdef F77_DUMMY_MAIN
5614# ifdef __cplusplus
5615 extern "C"
5616# endif
5617 int F77_DUMMY_MAIN() { return 1; }
5618#endif
5619int
5620main ()
5621{
5622static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5623test_array [0] = 0
5624
5625 ;
5626 return 0;
5627}
5628_ACEOF
5629rm -f conftest.$ac_objext
5630if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5631 (eval $ac_compile) 2>&5
5632 ac_status=$?
5633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5634 (exit $ac_status); } &&
5635 { ac_try='test -s conftest.$ac_objext'
5636 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5637 (eval $ac_try) 2>&5
5638 ac_status=$?
5639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5640 (exit $ac_status); }; }; then
5641 ac_hi=$ac_mid
5642else
5643 echo "$as_me: failed program was:" >&5
5644cat conftest.$ac_ext >&5
5645ac_lo=`expr '(' $ac_mid ')' + 1`
5646fi
5647rm -f conftest.$ac_objext conftest.$ac_ext
5648done
5649case $ac_lo in
5650?*) ac_cv_sizeof_void_p=$ac_lo;;
5651'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
5652echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
5653 { (exit 1); exit 1; }; } ;;
5654esac
Guido van Rossumad678af1998-10-02 14:42:15 +00005655else
5656 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005657 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5658echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5659 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00005660else
Martin v. Löwis11437992002-04-12 09:54:03 +00005661 cat >conftest.$ac_ext <<_ACEOF
5662#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00005663#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005664$ac_includes_default
5665long longval () { return (long) (sizeof (void *)); }
5666unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005667#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005668#include <stdlib.h>
5669#ifdef F77_DUMMY_MAIN
5670# ifdef __cplusplus
5671 extern "C"
5672# endif
5673 int F77_DUMMY_MAIN() { return 1; }
5674#endif
5675int
5676main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00005677{
Martin v. Löwis11437992002-04-12 09:54:03 +00005678
5679 FILE *f = fopen ("conftest.val", "w");
5680 if (! f)
5681 exit (1);
5682 if (((long) (sizeof (void *))) < 0)
5683 {
5684 long i = longval ();
5685 if (i != ((long) (sizeof (void *))))
5686 exit (1);
5687 fprintf (f, "%ld\n", i);
5688 }
5689 else
5690 {
5691 unsigned long i = ulongval ();
5692 if (i != ((long) (sizeof (void *))))
5693 exit (1);
5694 fprintf (f, "%lu\n", i);
5695 }
5696 exit (ferror (f) || fclose (f) != 0);
5697
5698 ;
5699 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00005700}
Martin v. Löwis11437992002-04-12 09:54:03 +00005701_ACEOF
5702rm -f conftest$ac_exeext
5703if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5704 (eval $ac_link) 2>&5
5705 ac_status=$?
5706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5707 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5708 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5709 (eval $ac_try) 2>&5
5710 ac_status=$?
5711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5712 (exit $ac_status); }; }; then
5713 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00005714else
Martin v. Löwis11437992002-04-12 09:54:03 +00005715 echo "$as_me: program exited with status $ac_status" >&5
5716echo "$as_me: failed program was:" >&5
5717cat conftest.$ac_ext >&5
5718( exit $ac_status )
5719{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
5720echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
5721 { (exit 1); exit 1; }; }
5722fi
5723rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5724fi
5725fi
5726rm -f conftest.val
5727else
Guido van Rossumad678af1998-10-02 14:42:15 +00005728 ac_cv_sizeof_void_p=0
5729fi
Guido van Rossumad678af1998-10-02 14:42:15 +00005730fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005731echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
5732echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
5733cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00005734#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00005735_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00005736
5737
Martin v. Löwis11437992002-04-12 09:54:03 +00005738echo "$as_me:$LINENO: checking for char" >&5
5739echo $ECHO_N "checking for char... $ECHO_C" >&6
5740if test "${ac_cv_type_char+set}" = set; then
5741 echo $ECHO_N "(cached) $ECHO_C" >&6
5742else
5743 cat >conftest.$ac_ext <<_ACEOF
5744#line $LINENO "configure"
5745#include "confdefs.h"
5746$ac_includes_default
5747#ifdef F77_DUMMY_MAIN
5748# ifdef __cplusplus
5749 extern "C"
5750# endif
5751 int F77_DUMMY_MAIN() { return 1; }
5752#endif
5753int
5754main ()
5755{
5756if ((char *) 0)
5757 return 0;
5758if (sizeof (char))
5759 return 0;
5760 ;
5761 return 0;
5762}
5763_ACEOF
5764rm -f conftest.$ac_objext
5765if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5766 (eval $ac_compile) 2>&5
5767 ac_status=$?
5768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5769 (exit $ac_status); } &&
5770 { ac_try='test -s conftest.$ac_objext'
5771 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5772 (eval $ac_try) 2>&5
5773 ac_status=$?
5774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5775 (exit $ac_status); }; }; then
5776 ac_cv_type_char=yes
5777else
5778 echo "$as_me: failed program was:" >&5
5779cat conftest.$ac_ext >&5
5780ac_cv_type_char=no
5781fi
5782rm -f conftest.$ac_objext conftest.$ac_ext
5783fi
5784echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
5785echo "${ECHO_T}$ac_cv_type_char" >&6
5786
5787echo "$as_me:$LINENO: checking size of char" >&5
5788echo $ECHO_N "checking size of char... $ECHO_C" >&6
5789if test "${ac_cv_sizeof_char+set}" = set; then
5790 echo $ECHO_N "(cached) $ECHO_C" >&6
5791else
5792 if test "$ac_cv_type_char" = yes; then
5793 # The cast to unsigned long works around a bug in the HP C Compiler
5794 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5795 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5796 # This bug is HP SR number 8606223364.
5797 if test "$cross_compiling" = yes; then
5798 # Depending upon the size, compute the lo and hi bounds.
5799cat >conftest.$ac_ext <<_ACEOF
5800#line $LINENO "configure"
5801#include "confdefs.h"
5802$ac_includes_default
5803#ifdef F77_DUMMY_MAIN
5804# ifdef __cplusplus
5805 extern "C"
5806# endif
5807 int F77_DUMMY_MAIN() { return 1; }
5808#endif
5809int
5810main ()
5811{
5812static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
5813test_array [0] = 0
5814
5815 ;
5816 return 0;
5817}
5818_ACEOF
5819rm -f conftest.$ac_objext
5820if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5821 (eval $ac_compile) 2>&5
5822 ac_status=$?
5823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5824 (exit $ac_status); } &&
5825 { ac_try='test -s conftest.$ac_objext'
5826 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5827 (eval $ac_try) 2>&5
5828 ac_status=$?
5829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5830 (exit $ac_status); }; }; then
5831 ac_lo=0 ac_mid=0
5832 while :; do
5833 cat >conftest.$ac_ext <<_ACEOF
5834#line $LINENO "configure"
5835#include "confdefs.h"
5836$ac_includes_default
5837#ifdef F77_DUMMY_MAIN
5838# ifdef __cplusplus
5839 extern "C"
5840# endif
5841 int F77_DUMMY_MAIN() { return 1; }
5842#endif
5843int
5844main ()
5845{
5846static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
5847test_array [0] = 0
5848
5849 ;
5850 return 0;
5851}
5852_ACEOF
5853rm -f conftest.$ac_objext
5854if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5855 (eval $ac_compile) 2>&5
5856 ac_status=$?
5857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5858 (exit $ac_status); } &&
5859 { ac_try='test -s conftest.$ac_objext'
5860 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5861 (eval $ac_try) 2>&5
5862 ac_status=$?
5863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5864 (exit $ac_status); }; }; then
5865 ac_hi=$ac_mid; break
5866else
5867 echo "$as_me: failed program was:" >&5
5868cat conftest.$ac_ext >&5
5869ac_lo=`expr $ac_mid + 1`
5870 if test $ac_lo -le $ac_mid; then
5871 ac_lo= ac_hi=
5872 break
5873 fi
5874 ac_mid=`expr 2 '*' $ac_mid + 1`
5875fi
5876rm -f conftest.$ac_objext conftest.$ac_ext
5877 done
5878else
5879 echo "$as_me: failed program was:" >&5
5880cat conftest.$ac_ext >&5
5881cat >conftest.$ac_ext <<_ACEOF
5882#line $LINENO "configure"
5883#include "confdefs.h"
5884$ac_includes_default
5885#ifdef F77_DUMMY_MAIN
5886# ifdef __cplusplus
5887 extern "C"
5888# endif
5889 int F77_DUMMY_MAIN() { return 1; }
5890#endif
5891int
5892main ()
5893{
5894static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
5895test_array [0] = 0
5896
5897 ;
5898 return 0;
5899}
5900_ACEOF
5901rm -f conftest.$ac_objext
5902if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5903 (eval $ac_compile) 2>&5
5904 ac_status=$?
5905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5906 (exit $ac_status); } &&
5907 { ac_try='test -s conftest.$ac_objext'
5908 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5909 (eval $ac_try) 2>&5
5910 ac_status=$?
5911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5912 (exit $ac_status); }; }; then
5913 ac_hi=-1 ac_mid=-1
5914 while :; do
5915 cat >conftest.$ac_ext <<_ACEOF
5916#line $LINENO "configure"
5917#include "confdefs.h"
5918$ac_includes_default
5919#ifdef F77_DUMMY_MAIN
5920# ifdef __cplusplus
5921 extern "C"
5922# endif
5923 int F77_DUMMY_MAIN() { return 1; }
5924#endif
5925int
5926main ()
5927{
5928static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
5929test_array [0] = 0
5930
5931 ;
5932 return 0;
5933}
5934_ACEOF
5935rm -f conftest.$ac_objext
5936if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5937 (eval $ac_compile) 2>&5
5938 ac_status=$?
5939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5940 (exit $ac_status); } &&
5941 { ac_try='test -s conftest.$ac_objext'
5942 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5943 (eval $ac_try) 2>&5
5944 ac_status=$?
5945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5946 (exit $ac_status); }; }; then
5947 ac_lo=$ac_mid; break
5948else
5949 echo "$as_me: failed program was:" >&5
5950cat conftest.$ac_ext >&5
5951ac_hi=`expr '(' $ac_mid ')' - 1`
5952 if test $ac_mid -le $ac_hi; then
5953 ac_lo= ac_hi=
5954 break
5955 fi
5956 ac_mid=`expr 2 '*' $ac_mid`
5957fi
5958rm -f conftest.$ac_objext conftest.$ac_ext
5959 done
5960else
5961 echo "$as_me: failed program was:" >&5
5962cat conftest.$ac_ext >&5
5963ac_lo= ac_hi=
5964fi
5965rm -f conftest.$ac_objext conftest.$ac_ext
5966fi
5967rm -f conftest.$ac_objext conftest.$ac_ext
5968# Binary search between lo and hi bounds.
5969while test "x$ac_lo" != "x$ac_hi"; do
5970 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5971 cat >conftest.$ac_ext <<_ACEOF
5972#line $LINENO "configure"
5973#include "confdefs.h"
5974$ac_includes_default
5975#ifdef F77_DUMMY_MAIN
5976# ifdef __cplusplus
5977 extern "C"
5978# endif
5979 int F77_DUMMY_MAIN() { return 1; }
5980#endif
5981int
5982main ()
5983{
5984static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
5985test_array [0] = 0
5986
5987 ;
5988 return 0;
5989}
5990_ACEOF
5991rm -f conftest.$ac_objext
5992if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5993 (eval $ac_compile) 2>&5
5994 ac_status=$?
5995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5996 (exit $ac_status); } &&
5997 { ac_try='test -s conftest.$ac_objext'
5998 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5999 (eval $ac_try) 2>&5
6000 ac_status=$?
6001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6002 (exit $ac_status); }; }; then
6003 ac_hi=$ac_mid
6004else
6005 echo "$as_me: failed program was:" >&5
6006cat conftest.$ac_ext >&5
6007ac_lo=`expr '(' $ac_mid ')' + 1`
6008fi
6009rm -f conftest.$ac_objext conftest.$ac_ext
6010done
6011case $ac_lo in
6012?*) ac_cv_sizeof_char=$ac_lo;;
6013'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6014echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6015 { (exit 1); exit 1; }; } ;;
6016esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006017else
6018 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006019 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6020echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6021 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006022else
Martin v. Löwis11437992002-04-12 09:54:03 +00006023 cat >conftest.$ac_ext <<_ACEOF
6024#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006025#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006026$ac_includes_default
6027long longval () { return (long) (sizeof (char)); }
6028unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006029#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006030#include <stdlib.h>
6031#ifdef F77_DUMMY_MAIN
6032# ifdef __cplusplus
6033 extern "C"
6034# endif
6035 int F77_DUMMY_MAIN() { return 1; }
6036#endif
6037int
6038main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006039{
Martin v. Löwis11437992002-04-12 09:54:03 +00006040
6041 FILE *f = fopen ("conftest.val", "w");
6042 if (! f)
6043 exit (1);
6044 if (((long) (sizeof (char))) < 0)
6045 {
6046 long i = longval ();
6047 if (i != ((long) (sizeof (char))))
6048 exit (1);
6049 fprintf (f, "%ld\n", i);
6050 }
6051 else
6052 {
6053 unsigned long i = ulongval ();
6054 if (i != ((long) (sizeof (char))))
6055 exit (1);
6056 fprintf (f, "%lu\n", i);
6057 }
6058 exit (ferror (f) || fclose (f) != 0);
6059
6060 ;
6061 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006062}
Martin v. Löwis11437992002-04-12 09:54:03 +00006063_ACEOF
6064rm -f conftest$ac_exeext
6065if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6066 (eval $ac_link) 2>&5
6067 ac_status=$?
6068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6069 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6070 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6071 (eval $ac_try) 2>&5
6072 ac_status=$?
6073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6074 (exit $ac_status); }; }; then
6075 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006076else
Martin v. Löwis11437992002-04-12 09:54:03 +00006077 echo "$as_me: program exited with status $ac_status" >&5
6078echo "$as_me: failed program was:" >&5
6079cat conftest.$ac_ext >&5
6080( exit $ac_status )
6081{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6082echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6083 { (exit 1); exit 1; }; }
6084fi
6085rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6086fi
6087fi
6088rm -f conftest.val
6089else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006090 ac_cv_sizeof_char=0
6091fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006092fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006093echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6094echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6095cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006096#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006097_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006098
6099
Martin v. Löwis11437992002-04-12 09:54:03 +00006100echo "$as_me:$LINENO: checking for short" >&5
6101echo $ECHO_N "checking for short... $ECHO_C" >&6
6102if test "${ac_cv_type_short+set}" = set; then
6103 echo $ECHO_N "(cached) $ECHO_C" >&6
6104else
6105 cat >conftest.$ac_ext <<_ACEOF
6106#line $LINENO "configure"
6107#include "confdefs.h"
6108$ac_includes_default
6109#ifdef F77_DUMMY_MAIN
6110# ifdef __cplusplus
6111 extern "C"
6112# endif
6113 int F77_DUMMY_MAIN() { return 1; }
6114#endif
6115int
6116main ()
6117{
6118if ((short *) 0)
6119 return 0;
6120if (sizeof (short))
6121 return 0;
6122 ;
6123 return 0;
6124}
6125_ACEOF
6126rm -f conftest.$ac_objext
6127if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6128 (eval $ac_compile) 2>&5
6129 ac_status=$?
6130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6131 (exit $ac_status); } &&
6132 { ac_try='test -s conftest.$ac_objext'
6133 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6134 (eval $ac_try) 2>&5
6135 ac_status=$?
6136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6137 (exit $ac_status); }; }; then
6138 ac_cv_type_short=yes
6139else
6140 echo "$as_me: failed program was:" >&5
6141cat conftest.$ac_ext >&5
6142ac_cv_type_short=no
6143fi
6144rm -f conftest.$ac_objext conftest.$ac_ext
6145fi
6146echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6147echo "${ECHO_T}$ac_cv_type_short" >&6
6148
6149echo "$as_me:$LINENO: checking size of short" >&5
6150echo $ECHO_N "checking size of short... $ECHO_C" >&6
6151if test "${ac_cv_sizeof_short+set}" = set; then
6152 echo $ECHO_N "(cached) $ECHO_C" >&6
6153else
6154 if test "$ac_cv_type_short" = yes; then
6155 # The cast to unsigned long works around a bug in the HP C Compiler
6156 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6157 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6158 # This bug is HP SR number 8606223364.
6159 if test "$cross_compiling" = yes; then
6160 # Depending upon the size, compute the lo and hi bounds.
6161cat >conftest.$ac_ext <<_ACEOF
6162#line $LINENO "configure"
6163#include "confdefs.h"
6164$ac_includes_default
6165#ifdef F77_DUMMY_MAIN
6166# ifdef __cplusplus
6167 extern "C"
6168# endif
6169 int F77_DUMMY_MAIN() { return 1; }
6170#endif
6171int
6172main ()
6173{
6174static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6175test_array [0] = 0
6176
6177 ;
6178 return 0;
6179}
6180_ACEOF
6181rm -f conftest.$ac_objext
6182if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6183 (eval $ac_compile) 2>&5
6184 ac_status=$?
6185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6186 (exit $ac_status); } &&
6187 { ac_try='test -s conftest.$ac_objext'
6188 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6189 (eval $ac_try) 2>&5
6190 ac_status=$?
6191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6192 (exit $ac_status); }; }; then
6193 ac_lo=0 ac_mid=0
6194 while :; do
6195 cat >conftest.$ac_ext <<_ACEOF
6196#line $LINENO "configure"
6197#include "confdefs.h"
6198$ac_includes_default
6199#ifdef F77_DUMMY_MAIN
6200# ifdef __cplusplus
6201 extern "C"
6202# endif
6203 int F77_DUMMY_MAIN() { return 1; }
6204#endif
6205int
6206main ()
6207{
6208static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6209test_array [0] = 0
6210
6211 ;
6212 return 0;
6213}
6214_ACEOF
6215rm -f conftest.$ac_objext
6216if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6217 (eval $ac_compile) 2>&5
6218 ac_status=$?
6219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6220 (exit $ac_status); } &&
6221 { ac_try='test -s conftest.$ac_objext'
6222 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6223 (eval $ac_try) 2>&5
6224 ac_status=$?
6225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6226 (exit $ac_status); }; }; then
6227 ac_hi=$ac_mid; break
6228else
6229 echo "$as_me: failed program was:" >&5
6230cat conftest.$ac_ext >&5
6231ac_lo=`expr $ac_mid + 1`
6232 if test $ac_lo -le $ac_mid; then
6233 ac_lo= ac_hi=
6234 break
6235 fi
6236 ac_mid=`expr 2 '*' $ac_mid + 1`
6237fi
6238rm -f conftest.$ac_objext conftest.$ac_ext
6239 done
6240else
6241 echo "$as_me: failed program was:" >&5
6242cat conftest.$ac_ext >&5
6243cat >conftest.$ac_ext <<_ACEOF
6244#line $LINENO "configure"
6245#include "confdefs.h"
6246$ac_includes_default
6247#ifdef F77_DUMMY_MAIN
6248# ifdef __cplusplus
6249 extern "C"
6250# endif
6251 int F77_DUMMY_MAIN() { return 1; }
6252#endif
6253int
6254main ()
6255{
6256static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6257test_array [0] = 0
6258
6259 ;
6260 return 0;
6261}
6262_ACEOF
6263rm -f conftest.$ac_objext
6264if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6265 (eval $ac_compile) 2>&5
6266 ac_status=$?
6267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6268 (exit $ac_status); } &&
6269 { ac_try='test -s conftest.$ac_objext'
6270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6271 (eval $ac_try) 2>&5
6272 ac_status=$?
6273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6274 (exit $ac_status); }; }; then
6275 ac_hi=-1 ac_mid=-1
6276 while :; do
6277 cat >conftest.$ac_ext <<_ACEOF
6278#line $LINENO "configure"
6279#include "confdefs.h"
6280$ac_includes_default
6281#ifdef F77_DUMMY_MAIN
6282# ifdef __cplusplus
6283 extern "C"
6284# endif
6285 int F77_DUMMY_MAIN() { return 1; }
6286#endif
6287int
6288main ()
6289{
6290static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6291test_array [0] = 0
6292
6293 ;
6294 return 0;
6295}
6296_ACEOF
6297rm -f conftest.$ac_objext
6298if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6299 (eval $ac_compile) 2>&5
6300 ac_status=$?
6301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6302 (exit $ac_status); } &&
6303 { ac_try='test -s conftest.$ac_objext'
6304 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6305 (eval $ac_try) 2>&5
6306 ac_status=$?
6307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6308 (exit $ac_status); }; }; then
6309 ac_lo=$ac_mid; break
6310else
6311 echo "$as_me: failed program was:" >&5
6312cat conftest.$ac_ext >&5
6313ac_hi=`expr '(' $ac_mid ')' - 1`
6314 if test $ac_mid -le $ac_hi; then
6315 ac_lo= ac_hi=
6316 break
6317 fi
6318 ac_mid=`expr 2 '*' $ac_mid`
6319fi
6320rm -f conftest.$ac_objext conftest.$ac_ext
6321 done
6322else
6323 echo "$as_me: failed program was:" >&5
6324cat conftest.$ac_ext >&5
6325ac_lo= ac_hi=
6326fi
6327rm -f conftest.$ac_objext conftest.$ac_ext
6328fi
6329rm -f conftest.$ac_objext conftest.$ac_ext
6330# Binary search between lo and hi bounds.
6331while test "x$ac_lo" != "x$ac_hi"; do
6332 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6333 cat >conftest.$ac_ext <<_ACEOF
6334#line $LINENO "configure"
6335#include "confdefs.h"
6336$ac_includes_default
6337#ifdef F77_DUMMY_MAIN
6338# ifdef __cplusplus
6339 extern "C"
6340# endif
6341 int F77_DUMMY_MAIN() { return 1; }
6342#endif
6343int
6344main ()
6345{
6346static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6347test_array [0] = 0
6348
6349 ;
6350 return 0;
6351}
6352_ACEOF
6353rm -f conftest.$ac_objext
6354if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6355 (eval $ac_compile) 2>&5
6356 ac_status=$?
6357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6358 (exit $ac_status); } &&
6359 { ac_try='test -s conftest.$ac_objext'
6360 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6361 (eval $ac_try) 2>&5
6362 ac_status=$?
6363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6364 (exit $ac_status); }; }; then
6365 ac_hi=$ac_mid
6366else
6367 echo "$as_me: failed program was:" >&5
6368cat conftest.$ac_ext >&5
6369ac_lo=`expr '(' $ac_mid ')' + 1`
6370fi
6371rm -f conftest.$ac_objext conftest.$ac_ext
6372done
6373case $ac_lo in
6374?*) ac_cv_sizeof_short=$ac_lo;;
6375'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6376echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6377 { (exit 1); exit 1; }; } ;;
6378esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006379else
6380 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006381 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6382echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6383 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006384else
Martin v. Löwis11437992002-04-12 09:54:03 +00006385 cat >conftest.$ac_ext <<_ACEOF
6386#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006387#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006388$ac_includes_default
6389long longval () { return (long) (sizeof (short)); }
6390unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006391#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006392#include <stdlib.h>
6393#ifdef F77_DUMMY_MAIN
6394# ifdef __cplusplus
6395 extern "C"
6396# endif
6397 int F77_DUMMY_MAIN() { return 1; }
6398#endif
6399int
6400main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006401{
Martin v. Löwis11437992002-04-12 09:54:03 +00006402
6403 FILE *f = fopen ("conftest.val", "w");
6404 if (! f)
6405 exit (1);
6406 if (((long) (sizeof (short))) < 0)
6407 {
6408 long i = longval ();
6409 if (i != ((long) (sizeof (short))))
6410 exit (1);
6411 fprintf (f, "%ld\n", i);
6412 }
6413 else
6414 {
6415 unsigned long i = ulongval ();
6416 if (i != ((long) (sizeof (short))))
6417 exit (1);
6418 fprintf (f, "%lu\n", i);
6419 }
6420 exit (ferror (f) || fclose (f) != 0);
6421
6422 ;
6423 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006424}
Martin v. Löwis11437992002-04-12 09:54:03 +00006425_ACEOF
6426rm -f conftest$ac_exeext
6427if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6428 (eval $ac_link) 2>&5
6429 ac_status=$?
6430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6431 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6432 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6433 (eval $ac_try) 2>&5
6434 ac_status=$?
6435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6436 (exit $ac_status); }; }; then
6437 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006438else
Martin v. Löwis11437992002-04-12 09:54:03 +00006439 echo "$as_me: program exited with status $ac_status" >&5
6440echo "$as_me: failed program was:" >&5
6441cat conftest.$ac_ext >&5
6442( exit $ac_status )
6443{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6444echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6445 { (exit 1); exit 1; }; }
6446fi
6447rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6448fi
6449fi
6450rm -f conftest.val
6451else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006452 ac_cv_sizeof_short=0
6453fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006454fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006455echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
6456echo "${ECHO_T}$ac_cv_sizeof_short" >&6
6457cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006458#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006459_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006460
6461
Martin v. Löwis11437992002-04-12 09:54:03 +00006462echo "$as_me:$LINENO: checking for float" >&5
6463echo $ECHO_N "checking for float... $ECHO_C" >&6
6464if test "${ac_cv_type_float+set}" = set; then
6465 echo $ECHO_N "(cached) $ECHO_C" >&6
6466else
6467 cat >conftest.$ac_ext <<_ACEOF
6468#line $LINENO "configure"
6469#include "confdefs.h"
6470$ac_includes_default
6471#ifdef F77_DUMMY_MAIN
6472# ifdef __cplusplus
6473 extern "C"
6474# endif
6475 int F77_DUMMY_MAIN() { return 1; }
6476#endif
6477int
6478main ()
6479{
6480if ((float *) 0)
6481 return 0;
6482if (sizeof (float))
6483 return 0;
6484 ;
6485 return 0;
6486}
6487_ACEOF
6488rm -f conftest.$ac_objext
6489if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6490 (eval $ac_compile) 2>&5
6491 ac_status=$?
6492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6493 (exit $ac_status); } &&
6494 { ac_try='test -s conftest.$ac_objext'
6495 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6496 (eval $ac_try) 2>&5
6497 ac_status=$?
6498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6499 (exit $ac_status); }; }; then
6500 ac_cv_type_float=yes
6501else
6502 echo "$as_me: failed program was:" >&5
6503cat conftest.$ac_ext >&5
6504ac_cv_type_float=no
6505fi
6506rm -f conftest.$ac_objext conftest.$ac_ext
6507fi
6508echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
6509echo "${ECHO_T}$ac_cv_type_float" >&6
6510
6511echo "$as_me:$LINENO: checking size of float" >&5
6512echo $ECHO_N "checking size of float... $ECHO_C" >&6
6513if test "${ac_cv_sizeof_float+set}" = set; then
6514 echo $ECHO_N "(cached) $ECHO_C" >&6
6515else
6516 if test "$ac_cv_type_float" = yes; then
6517 # The cast to unsigned long works around a bug in the HP C Compiler
6518 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6519 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6520 # This bug is HP SR number 8606223364.
6521 if test "$cross_compiling" = yes; then
6522 # Depending upon the size, compute the lo and hi bounds.
6523cat >conftest.$ac_ext <<_ACEOF
6524#line $LINENO "configure"
6525#include "confdefs.h"
6526$ac_includes_default
6527#ifdef F77_DUMMY_MAIN
6528# ifdef __cplusplus
6529 extern "C"
6530# endif
6531 int F77_DUMMY_MAIN() { return 1; }
6532#endif
6533int
6534main ()
6535{
6536static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
6537test_array [0] = 0
6538
6539 ;
6540 return 0;
6541}
6542_ACEOF
6543rm -f conftest.$ac_objext
6544if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6545 (eval $ac_compile) 2>&5
6546 ac_status=$?
6547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6548 (exit $ac_status); } &&
6549 { ac_try='test -s conftest.$ac_objext'
6550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6551 (eval $ac_try) 2>&5
6552 ac_status=$?
6553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6554 (exit $ac_status); }; }; then
6555 ac_lo=0 ac_mid=0
6556 while :; do
6557 cat >conftest.$ac_ext <<_ACEOF
6558#line $LINENO "configure"
6559#include "confdefs.h"
6560$ac_includes_default
6561#ifdef F77_DUMMY_MAIN
6562# ifdef __cplusplus
6563 extern "C"
6564# endif
6565 int F77_DUMMY_MAIN() { return 1; }
6566#endif
6567int
6568main ()
6569{
6570static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
6571test_array [0] = 0
6572
6573 ;
6574 return 0;
6575}
6576_ACEOF
6577rm -f conftest.$ac_objext
6578if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6579 (eval $ac_compile) 2>&5
6580 ac_status=$?
6581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6582 (exit $ac_status); } &&
6583 { ac_try='test -s conftest.$ac_objext'
6584 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6585 (eval $ac_try) 2>&5
6586 ac_status=$?
6587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6588 (exit $ac_status); }; }; then
6589 ac_hi=$ac_mid; break
6590else
6591 echo "$as_me: failed program was:" >&5
6592cat conftest.$ac_ext >&5
6593ac_lo=`expr $ac_mid + 1`
6594 if test $ac_lo -le $ac_mid; then
6595 ac_lo= ac_hi=
6596 break
6597 fi
6598 ac_mid=`expr 2 '*' $ac_mid + 1`
6599fi
6600rm -f conftest.$ac_objext conftest.$ac_ext
6601 done
6602else
6603 echo "$as_me: failed program was:" >&5
6604cat conftest.$ac_ext >&5
6605cat >conftest.$ac_ext <<_ACEOF
6606#line $LINENO "configure"
6607#include "confdefs.h"
6608$ac_includes_default
6609#ifdef F77_DUMMY_MAIN
6610# ifdef __cplusplus
6611 extern "C"
6612# endif
6613 int F77_DUMMY_MAIN() { return 1; }
6614#endif
6615int
6616main ()
6617{
6618static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
6619test_array [0] = 0
6620
6621 ;
6622 return 0;
6623}
6624_ACEOF
6625rm -f conftest.$ac_objext
6626if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6627 (eval $ac_compile) 2>&5
6628 ac_status=$?
6629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6630 (exit $ac_status); } &&
6631 { ac_try='test -s conftest.$ac_objext'
6632 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6633 (eval $ac_try) 2>&5
6634 ac_status=$?
6635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6636 (exit $ac_status); }; }; then
6637 ac_hi=-1 ac_mid=-1
6638 while :; do
6639 cat >conftest.$ac_ext <<_ACEOF
6640#line $LINENO "configure"
6641#include "confdefs.h"
6642$ac_includes_default
6643#ifdef F77_DUMMY_MAIN
6644# ifdef __cplusplus
6645 extern "C"
6646# endif
6647 int F77_DUMMY_MAIN() { return 1; }
6648#endif
6649int
6650main ()
6651{
6652static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
6653test_array [0] = 0
6654
6655 ;
6656 return 0;
6657}
6658_ACEOF
6659rm -f conftest.$ac_objext
6660if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6661 (eval $ac_compile) 2>&5
6662 ac_status=$?
6663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6664 (exit $ac_status); } &&
6665 { ac_try='test -s conftest.$ac_objext'
6666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6667 (eval $ac_try) 2>&5
6668 ac_status=$?
6669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6670 (exit $ac_status); }; }; then
6671 ac_lo=$ac_mid; break
6672else
6673 echo "$as_me: failed program was:" >&5
6674cat conftest.$ac_ext >&5
6675ac_hi=`expr '(' $ac_mid ')' - 1`
6676 if test $ac_mid -le $ac_hi; then
6677 ac_lo= ac_hi=
6678 break
6679 fi
6680 ac_mid=`expr 2 '*' $ac_mid`
6681fi
6682rm -f conftest.$ac_objext conftest.$ac_ext
6683 done
6684else
6685 echo "$as_me: failed program was:" >&5
6686cat conftest.$ac_ext >&5
6687ac_lo= ac_hi=
6688fi
6689rm -f conftest.$ac_objext conftest.$ac_ext
6690fi
6691rm -f conftest.$ac_objext conftest.$ac_ext
6692# Binary search between lo and hi bounds.
6693while test "x$ac_lo" != "x$ac_hi"; do
6694 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6695 cat >conftest.$ac_ext <<_ACEOF
6696#line $LINENO "configure"
6697#include "confdefs.h"
6698$ac_includes_default
6699#ifdef F77_DUMMY_MAIN
6700# ifdef __cplusplus
6701 extern "C"
6702# endif
6703 int F77_DUMMY_MAIN() { return 1; }
6704#endif
6705int
6706main ()
6707{
6708static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
6709test_array [0] = 0
6710
6711 ;
6712 return 0;
6713}
6714_ACEOF
6715rm -f conftest.$ac_objext
6716if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6717 (eval $ac_compile) 2>&5
6718 ac_status=$?
6719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6720 (exit $ac_status); } &&
6721 { ac_try='test -s conftest.$ac_objext'
6722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6723 (eval $ac_try) 2>&5
6724 ac_status=$?
6725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6726 (exit $ac_status); }; }; then
6727 ac_hi=$ac_mid
6728else
6729 echo "$as_me: failed program was:" >&5
6730cat conftest.$ac_ext >&5
6731ac_lo=`expr '(' $ac_mid ')' + 1`
6732fi
6733rm -f conftest.$ac_objext conftest.$ac_ext
6734done
6735case $ac_lo in
6736?*) ac_cv_sizeof_float=$ac_lo;;
6737'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
6738echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
6739 { (exit 1); exit 1; }; } ;;
6740esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006741else
6742 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006743 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6744echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6745 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006746else
Martin v. Löwis11437992002-04-12 09:54:03 +00006747 cat >conftest.$ac_ext <<_ACEOF
6748#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006749#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006750$ac_includes_default
6751long longval () { return (long) (sizeof (float)); }
6752unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006753#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006754#include <stdlib.h>
6755#ifdef F77_DUMMY_MAIN
6756# ifdef __cplusplus
6757 extern "C"
6758# endif
6759 int F77_DUMMY_MAIN() { return 1; }
6760#endif
6761int
6762main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006763{
Martin v. Löwis11437992002-04-12 09:54:03 +00006764
6765 FILE *f = fopen ("conftest.val", "w");
6766 if (! f)
6767 exit (1);
6768 if (((long) (sizeof (float))) < 0)
6769 {
6770 long i = longval ();
6771 if (i != ((long) (sizeof (float))))
6772 exit (1);
6773 fprintf (f, "%ld\n", i);
6774 }
6775 else
6776 {
6777 unsigned long i = ulongval ();
6778 if (i != ((long) (sizeof (float))))
6779 exit (1);
6780 fprintf (f, "%lu\n", i);
6781 }
6782 exit (ferror (f) || fclose (f) != 0);
6783
6784 ;
6785 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006786}
Martin v. Löwis11437992002-04-12 09:54:03 +00006787_ACEOF
6788rm -f conftest$ac_exeext
6789if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6790 (eval $ac_link) 2>&5
6791 ac_status=$?
6792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6793 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6795 (eval $ac_try) 2>&5
6796 ac_status=$?
6797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6798 (exit $ac_status); }; }; then
6799 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006800else
Martin v. Löwis11437992002-04-12 09:54:03 +00006801 echo "$as_me: program exited with status $ac_status" >&5
6802echo "$as_me: failed program was:" >&5
6803cat conftest.$ac_ext >&5
6804( exit $ac_status )
6805{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
6806echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
6807 { (exit 1); exit 1; }; }
6808fi
6809rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6810fi
6811fi
6812rm -f conftest.val
6813else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006814 ac_cv_sizeof_float=0
6815fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006816fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006817echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
6818echo "${ECHO_T}$ac_cv_sizeof_float" >&6
6819cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006820#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006821_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006822
6823
Martin v. Löwis11437992002-04-12 09:54:03 +00006824echo "$as_me:$LINENO: checking for double" >&5
6825echo $ECHO_N "checking for double... $ECHO_C" >&6
6826if test "${ac_cv_type_double+set}" = set; then
6827 echo $ECHO_N "(cached) $ECHO_C" >&6
6828else
6829 cat >conftest.$ac_ext <<_ACEOF
6830#line $LINENO "configure"
6831#include "confdefs.h"
6832$ac_includes_default
6833#ifdef F77_DUMMY_MAIN
6834# ifdef __cplusplus
6835 extern "C"
6836# endif
6837 int F77_DUMMY_MAIN() { return 1; }
6838#endif
6839int
6840main ()
6841{
6842if ((double *) 0)
6843 return 0;
6844if (sizeof (double))
6845 return 0;
6846 ;
6847 return 0;
6848}
6849_ACEOF
6850rm -f conftest.$ac_objext
6851if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6852 (eval $ac_compile) 2>&5
6853 ac_status=$?
6854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6855 (exit $ac_status); } &&
6856 { ac_try='test -s conftest.$ac_objext'
6857 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6858 (eval $ac_try) 2>&5
6859 ac_status=$?
6860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6861 (exit $ac_status); }; }; then
6862 ac_cv_type_double=yes
6863else
6864 echo "$as_me: failed program was:" >&5
6865cat conftest.$ac_ext >&5
6866ac_cv_type_double=no
6867fi
6868rm -f conftest.$ac_objext conftest.$ac_ext
6869fi
6870echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
6871echo "${ECHO_T}$ac_cv_type_double" >&6
6872
6873echo "$as_me:$LINENO: checking size of double" >&5
6874echo $ECHO_N "checking size of double... $ECHO_C" >&6
6875if test "${ac_cv_sizeof_double+set}" = set; then
6876 echo $ECHO_N "(cached) $ECHO_C" >&6
6877else
6878 if test "$ac_cv_type_double" = yes; then
6879 # The cast to unsigned long works around a bug in the HP C Compiler
6880 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6881 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6882 # This bug is HP SR number 8606223364.
6883 if test "$cross_compiling" = yes; then
6884 # Depending upon the size, compute the lo and hi bounds.
6885cat >conftest.$ac_ext <<_ACEOF
6886#line $LINENO "configure"
6887#include "confdefs.h"
6888$ac_includes_default
6889#ifdef F77_DUMMY_MAIN
6890# ifdef __cplusplus
6891 extern "C"
6892# endif
6893 int F77_DUMMY_MAIN() { return 1; }
6894#endif
6895int
6896main ()
6897{
6898static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
6899test_array [0] = 0
6900
6901 ;
6902 return 0;
6903}
6904_ACEOF
6905rm -f conftest.$ac_objext
6906if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6907 (eval $ac_compile) 2>&5
6908 ac_status=$?
6909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6910 (exit $ac_status); } &&
6911 { ac_try='test -s conftest.$ac_objext'
6912 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6913 (eval $ac_try) 2>&5
6914 ac_status=$?
6915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6916 (exit $ac_status); }; }; then
6917 ac_lo=0 ac_mid=0
6918 while :; do
6919 cat >conftest.$ac_ext <<_ACEOF
6920#line $LINENO "configure"
6921#include "confdefs.h"
6922$ac_includes_default
6923#ifdef F77_DUMMY_MAIN
6924# ifdef __cplusplus
6925 extern "C"
6926# endif
6927 int F77_DUMMY_MAIN() { return 1; }
6928#endif
6929int
6930main ()
6931{
6932static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
6933test_array [0] = 0
6934
6935 ;
6936 return 0;
6937}
6938_ACEOF
6939rm -f conftest.$ac_objext
6940if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6941 (eval $ac_compile) 2>&5
6942 ac_status=$?
6943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6944 (exit $ac_status); } &&
6945 { ac_try='test -s conftest.$ac_objext'
6946 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6947 (eval $ac_try) 2>&5
6948 ac_status=$?
6949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6950 (exit $ac_status); }; }; then
6951 ac_hi=$ac_mid; break
6952else
6953 echo "$as_me: failed program was:" >&5
6954cat conftest.$ac_ext >&5
6955ac_lo=`expr $ac_mid + 1`
6956 if test $ac_lo -le $ac_mid; then
6957 ac_lo= ac_hi=
6958 break
6959 fi
6960 ac_mid=`expr 2 '*' $ac_mid + 1`
6961fi
6962rm -f conftest.$ac_objext conftest.$ac_ext
6963 done
6964else
6965 echo "$as_me: failed program was:" >&5
6966cat conftest.$ac_ext >&5
6967cat >conftest.$ac_ext <<_ACEOF
6968#line $LINENO "configure"
6969#include "confdefs.h"
6970$ac_includes_default
6971#ifdef F77_DUMMY_MAIN
6972# ifdef __cplusplus
6973 extern "C"
6974# endif
6975 int F77_DUMMY_MAIN() { return 1; }
6976#endif
6977int
6978main ()
6979{
6980static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
6981test_array [0] = 0
6982
6983 ;
6984 return 0;
6985}
6986_ACEOF
6987rm -f conftest.$ac_objext
6988if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6989 (eval $ac_compile) 2>&5
6990 ac_status=$?
6991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6992 (exit $ac_status); } &&
6993 { ac_try='test -s conftest.$ac_objext'
6994 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6995 (eval $ac_try) 2>&5
6996 ac_status=$?
6997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6998 (exit $ac_status); }; }; then
6999 ac_hi=-1 ac_mid=-1
7000 while :; do
7001 cat >conftest.$ac_ext <<_ACEOF
7002#line $LINENO "configure"
7003#include "confdefs.h"
7004$ac_includes_default
7005#ifdef F77_DUMMY_MAIN
7006# ifdef __cplusplus
7007 extern "C"
7008# endif
7009 int F77_DUMMY_MAIN() { return 1; }
7010#endif
7011int
7012main ()
7013{
7014static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7015test_array [0] = 0
7016
7017 ;
7018 return 0;
7019}
7020_ACEOF
7021rm -f conftest.$ac_objext
7022if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7023 (eval $ac_compile) 2>&5
7024 ac_status=$?
7025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7026 (exit $ac_status); } &&
7027 { ac_try='test -s conftest.$ac_objext'
7028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7029 (eval $ac_try) 2>&5
7030 ac_status=$?
7031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7032 (exit $ac_status); }; }; then
7033 ac_lo=$ac_mid; break
7034else
7035 echo "$as_me: failed program was:" >&5
7036cat conftest.$ac_ext >&5
7037ac_hi=`expr '(' $ac_mid ')' - 1`
7038 if test $ac_mid -le $ac_hi; then
7039 ac_lo= ac_hi=
7040 break
7041 fi
7042 ac_mid=`expr 2 '*' $ac_mid`
7043fi
7044rm -f conftest.$ac_objext conftest.$ac_ext
7045 done
7046else
7047 echo "$as_me: failed program was:" >&5
7048cat conftest.$ac_ext >&5
7049ac_lo= ac_hi=
7050fi
7051rm -f conftest.$ac_objext conftest.$ac_ext
7052fi
7053rm -f conftest.$ac_objext conftest.$ac_ext
7054# Binary search between lo and hi bounds.
7055while test "x$ac_lo" != "x$ac_hi"; do
7056 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7057 cat >conftest.$ac_ext <<_ACEOF
7058#line $LINENO "configure"
7059#include "confdefs.h"
7060$ac_includes_default
7061#ifdef F77_DUMMY_MAIN
7062# ifdef __cplusplus
7063 extern "C"
7064# endif
7065 int F77_DUMMY_MAIN() { return 1; }
7066#endif
7067int
7068main ()
7069{
7070static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7071test_array [0] = 0
7072
7073 ;
7074 return 0;
7075}
7076_ACEOF
7077rm -f conftest.$ac_objext
7078if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7079 (eval $ac_compile) 2>&5
7080 ac_status=$?
7081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7082 (exit $ac_status); } &&
7083 { ac_try='test -s conftest.$ac_objext'
7084 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7085 (eval $ac_try) 2>&5
7086 ac_status=$?
7087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7088 (exit $ac_status); }; }; then
7089 ac_hi=$ac_mid
7090else
7091 echo "$as_me: failed program was:" >&5
7092cat conftest.$ac_ext >&5
7093ac_lo=`expr '(' $ac_mid ')' + 1`
7094fi
7095rm -f conftest.$ac_objext conftest.$ac_ext
7096done
7097case $ac_lo in
7098?*) ac_cv_sizeof_double=$ac_lo;;
7099'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7100echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7101 { (exit 1); exit 1; }; } ;;
7102esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007103else
7104 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007105 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7106echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7107 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007108else
Martin v. Löwis11437992002-04-12 09:54:03 +00007109 cat >conftest.$ac_ext <<_ACEOF
7110#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007111#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007112$ac_includes_default
7113long longval () { return (long) (sizeof (double)); }
7114unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007115#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007116#include <stdlib.h>
7117#ifdef F77_DUMMY_MAIN
7118# ifdef __cplusplus
7119 extern "C"
7120# endif
7121 int F77_DUMMY_MAIN() { return 1; }
7122#endif
7123int
7124main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007125{
Martin v. Löwis11437992002-04-12 09:54:03 +00007126
7127 FILE *f = fopen ("conftest.val", "w");
7128 if (! f)
7129 exit (1);
7130 if (((long) (sizeof (double))) < 0)
7131 {
7132 long i = longval ();
7133 if (i != ((long) (sizeof (double))))
7134 exit (1);
7135 fprintf (f, "%ld\n", i);
7136 }
7137 else
7138 {
7139 unsigned long i = ulongval ();
7140 if (i != ((long) (sizeof (double))))
7141 exit (1);
7142 fprintf (f, "%lu\n", i);
7143 }
7144 exit (ferror (f) || fclose (f) != 0);
7145
7146 ;
7147 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007148}
Martin v. Löwis11437992002-04-12 09:54:03 +00007149_ACEOF
7150rm -f conftest$ac_exeext
7151if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7152 (eval $ac_link) 2>&5
7153 ac_status=$?
7154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7155 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7156 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7157 (eval $ac_try) 2>&5
7158 ac_status=$?
7159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7160 (exit $ac_status); }; }; then
7161 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007162else
Martin v. Löwis11437992002-04-12 09:54:03 +00007163 echo "$as_me: program exited with status $ac_status" >&5
7164echo "$as_me: failed program was:" >&5
7165cat conftest.$ac_ext >&5
7166( exit $ac_status )
7167{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7168echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7169 { (exit 1); exit 1; }; }
7170fi
7171rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7172fi
7173fi
7174rm -f conftest.val
7175else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007176 ac_cv_sizeof_double=0
7177fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007178fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007179echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7180echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7181cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007182#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007183_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007184
7185
Martin v. Löwis11437992002-04-12 09:54:03 +00007186echo "$as_me:$LINENO: checking for fpos_t" >&5
7187echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7188if test "${ac_cv_type_fpos_t+set}" = set; then
7189 echo $ECHO_N "(cached) $ECHO_C" >&6
7190else
7191 cat >conftest.$ac_ext <<_ACEOF
7192#line $LINENO "configure"
7193#include "confdefs.h"
7194$ac_includes_default
7195#ifdef F77_DUMMY_MAIN
7196# ifdef __cplusplus
7197 extern "C"
7198# endif
7199 int F77_DUMMY_MAIN() { return 1; }
7200#endif
7201int
7202main ()
7203{
7204if ((fpos_t *) 0)
7205 return 0;
7206if (sizeof (fpos_t))
7207 return 0;
7208 ;
7209 return 0;
7210}
7211_ACEOF
7212rm -f conftest.$ac_objext
7213if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7214 (eval $ac_compile) 2>&5
7215 ac_status=$?
7216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7217 (exit $ac_status); } &&
7218 { ac_try='test -s conftest.$ac_objext'
7219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7220 (eval $ac_try) 2>&5
7221 ac_status=$?
7222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7223 (exit $ac_status); }; }; then
7224 ac_cv_type_fpos_t=yes
7225else
7226 echo "$as_me: failed program was:" >&5
7227cat conftest.$ac_ext >&5
7228ac_cv_type_fpos_t=no
7229fi
7230rm -f conftest.$ac_objext conftest.$ac_ext
7231fi
7232echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7233echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7234
7235echo "$as_me:$LINENO: checking size of fpos_t" >&5
7236echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7237if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7238 echo $ECHO_N "(cached) $ECHO_C" >&6
7239else
7240 if test "$ac_cv_type_fpos_t" = yes; then
7241 # The cast to unsigned long works around a bug in the HP C Compiler
7242 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7243 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7244 # This bug is HP SR number 8606223364.
7245 if test "$cross_compiling" = yes; then
7246 # Depending upon the size, compute the lo and hi bounds.
7247cat >conftest.$ac_ext <<_ACEOF
7248#line $LINENO "configure"
7249#include "confdefs.h"
7250$ac_includes_default
7251#ifdef F77_DUMMY_MAIN
7252# ifdef __cplusplus
7253 extern "C"
7254# endif
7255 int F77_DUMMY_MAIN() { return 1; }
7256#endif
7257int
7258main ()
7259{
7260static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7261test_array [0] = 0
7262
7263 ;
7264 return 0;
7265}
7266_ACEOF
7267rm -f conftest.$ac_objext
7268if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7269 (eval $ac_compile) 2>&5
7270 ac_status=$?
7271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7272 (exit $ac_status); } &&
7273 { ac_try='test -s conftest.$ac_objext'
7274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7275 (eval $ac_try) 2>&5
7276 ac_status=$?
7277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7278 (exit $ac_status); }; }; then
7279 ac_lo=0 ac_mid=0
7280 while :; do
7281 cat >conftest.$ac_ext <<_ACEOF
7282#line $LINENO "configure"
7283#include "confdefs.h"
7284$ac_includes_default
7285#ifdef F77_DUMMY_MAIN
7286# ifdef __cplusplus
7287 extern "C"
7288# endif
7289 int F77_DUMMY_MAIN() { return 1; }
7290#endif
7291int
7292main ()
7293{
7294static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7295test_array [0] = 0
7296
7297 ;
7298 return 0;
7299}
7300_ACEOF
7301rm -f conftest.$ac_objext
7302if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7303 (eval $ac_compile) 2>&5
7304 ac_status=$?
7305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7306 (exit $ac_status); } &&
7307 { ac_try='test -s conftest.$ac_objext'
7308 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7309 (eval $ac_try) 2>&5
7310 ac_status=$?
7311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7312 (exit $ac_status); }; }; then
7313 ac_hi=$ac_mid; break
7314else
7315 echo "$as_me: failed program was:" >&5
7316cat conftest.$ac_ext >&5
7317ac_lo=`expr $ac_mid + 1`
7318 if test $ac_lo -le $ac_mid; then
7319 ac_lo= ac_hi=
7320 break
7321 fi
7322 ac_mid=`expr 2 '*' $ac_mid + 1`
7323fi
7324rm -f conftest.$ac_objext conftest.$ac_ext
7325 done
7326else
7327 echo "$as_me: failed program was:" >&5
7328cat conftest.$ac_ext >&5
7329cat >conftest.$ac_ext <<_ACEOF
7330#line $LINENO "configure"
7331#include "confdefs.h"
7332$ac_includes_default
7333#ifdef F77_DUMMY_MAIN
7334# ifdef __cplusplus
7335 extern "C"
7336# endif
7337 int F77_DUMMY_MAIN() { return 1; }
7338#endif
7339int
7340main ()
7341{
7342static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7343test_array [0] = 0
7344
7345 ;
7346 return 0;
7347}
7348_ACEOF
7349rm -f conftest.$ac_objext
7350if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7351 (eval $ac_compile) 2>&5
7352 ac_status=$?
7353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7354 (exit $ac_status); } &&
7355 { ac_try='test -s conftest.$ac_objext'
7356 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7357 (eval $ac_try) 2>&5
7358 ac_status=$?
7359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7360 (exit $ac_status); }; }; then
7361 ac_hi=-1 ac_mid=-1
7362 while :; do
7363 cat >conftest.$ac_ext <<_ACEOF
7364#line $LINENO "configure"
7365#include "confdefs.h"
7366$ac_includes_default
7367#ifdef F77_DUMMY_MAIN
7368# ifdef __cplusplus
7369 extern "C"
7370# endif
7371 int F77_DUMMY_MAIN() { return 1; }
7372#endif
7373int
7374main ()
7375{
7376static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
7377test_array [0] = 0
7378
7379 ;
7380 return 0;
7381}
7382_ACEOF
7383rm -f conftest.$ac_objext
7384if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7385 (eval $ac_compile) 2>&5
7386 ac_status=$?
7387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7388 (exit $ac_status); } &&
7389 { ac_try='test -s conftest.$ac_objext'
7390 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7391 (eval $ac_try) 2>&5
7392 ac_status=$?
7393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7394 (exit $ac_status); }; }; then
7395 ac_lo=$ac_mid; break
7396else
7397 echo "$as_me: failed program was:" >&5
7398cat conftest.$ac_ext >&5
7399ac_hi=`expr '(' $ac_mid ')' - 1`
7400 if test $ac_mid -le $ac_hi; then
7401 ac_lo= ac_hi=
7402 break
7403 fi
7404 ac_mid=`expr 2 '*' $ac_mid`
7405fi
7406rm -f conftest.$ac_objext conftest.$ac_ext
7407 done
7408else
7409 echo "$as_me: failed program was:" >&5
7410cat conftest.$ac_ext >&5
7411ac_lo= ac_hi=
7412fi
7413rm -f conftest.$ac_objext conftest.$ac_ext
7414fi
7415rm -f conftest.$ac_objext conftest.$ac_ext
7416# Binary search between lo and hi bounds.
7417while test "x$ac_lo" != "x$ac_hi"; do
7418 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7419 cat >conftest.$ac_ext <<_ACEOF
7420#line $LINENO "configure"
7421#include "confdefs.h"
7422$ac_includes_default
7423#ifdef F77_DUMMY_MAIN
7424# ifdef __cplusplus
7425 extern "C"
7426# endif
7427 int F77_DUMMY_MAIN() { return 1; }
7428#endif
7429int
7430main ()
7431{
7432static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7433test_array [0] = 0
7434
7435 ;
7436 return 0;
7437}
7438_ACEOF
7439rm -f conftest.$ac_objext
7440if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7441 (eval $ac_compile) 2>&5
7442 ac_status=$?
7443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7444 (exit $ac_status); } &&
7445 { ac_try='test -s conftest.$ac_objext'
7446 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7447 (eval $ac_try) 2>&5
7448 ac_status=$?
7449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7450 (exit $ac_status); }; }; then
7451 ac_hi=$ac_mid
7452else
7453 echo "$as_me: failed program was:" >&5
7454cat conftest.$ac_ext >&5
7455ac_lo=`expr '(' $ac_mid ')' + 1`
7456fi
7457rm -f conftest.$ac_objext conftest.$ac_ext
7458done
7459case $ac_lo in
7460?*) ac_cv_sizeof_fpos_t=$ac_lo;;
7461'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7462echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7463 { (exit 1); exit 1; }; } ;;
7464esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007465else
7466 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007467 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7468echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7469 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007470else
Martin v. Löwis11437992002-04-12 09:54:03 +00007471 cat >conftest.$ac_ext <<_ACEOF
7472#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007473#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007474$ac_includes_default
7475long longval () { return (long) (sizeof (fpos_t)); }
7476unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007477#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007478#include <stdlib.h>
7479#ifdef F77_DUMMY_MAIN
7480# ifdef __cplusplus
7481 extern "C"
7482# endif
7483 int F77_DUMMY_MAIN() { return 1; }
7484#endif
7485int
7486main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007487{
Martin v. Löwis11437992002-04-12 09:54:03 +00007488
7489 FILE *f = fopen ("conftest.val", "w");
7490 if (! f)
7491 exit (1);
7492 if (((long) (sizeof (fpos_t))) < 0)
7493 {
7494 long i = longval ();
7495 if (i != ((long) (sizeof (fpos_t))))
7496 exit (1);
7497 fprintf (f, "%ld\n", i);
7498 }
7499 else
7500 {
7501 unsigned long i = ulongval ();
7502 if (i != ((long) (sizeof (fpos_t))))
7503 exit (1);
7504 fprintf (f, "%lu\n", i);
7505 }
7506 exit (ferror (f) || fclose (f) != 0);
7507
7508 ;
7509 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007510}
Martin v. Löwis11437992002-04-12 09:54:03 +00007511_ACEOF
7512rm -f conftest$ac_exeext
7513if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7514 (eval $ac_link) 2>&5
7515 ac_status=$?
7516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7517 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7518 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7519 (eval $ac_try) 2>&5
7520 ac_status=$?
7521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7522 (exit $ac_status); }; }; then
7523 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007524else
Martin v. Löwis11437992002-04-12 09:54:03 +00007525 echo "$as_me: program exited with status $ac_status" >&5
7526echo "$as_me: failed program was:" >&5
7527cat conftest.$ac_ext >&5
7528( exit $ac_status )
7529{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7530echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7531 { (exit 1); exit 1; }; }
7532fi
7533rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7534fi
7535fi
7536rm -f conftest.val
7537else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007538 ac_cv_sizeof_fpos_t=0
7539fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007540fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007541echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
7542echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
7543cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007544#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007545_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007546
Michael W. Hudson54241132001-12-07 15:38:26 +00007547
7548
Martin v. Löwis11437992002-04-12 09:54:03 +00007549echo "$as_me:$LINENO: checking for long long support" >&5
7550echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007551have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007552cat >conftest.$ac_ext <<_ACEOF
7553#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007554#include "confdefs.h"
7555
Martin v. Löwis11437992002-04-12 09:54:03 +00007556#ifdef F77_DUMMY_MAIN
7557# ifdef __cplusplus
7558 extern "C"
7559# endif
7560 int F77_DUMMY_MAIN() { return 1; }
7561#endif
7562int
7563main ()
7564{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007565long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007566 ;
7567 return 0;
7568}
7569_ACEOF
7570rm -f conftest.$ac_objext
7571if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7572 (eval $ac_compile) 2>&5
7573 ac_status=$?
7574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7575 (exit $ac_status); } &&
7576 { ac_try='test -s conftest.$ac_objext'
7577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7578 (eval $ac_try) 2>&5
7579 ac_status=$?
7580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7581 (exit $ac_status); }; }; then
7582
7583
7584cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007585#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007586_ACEOF
7587
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007588 have_long_long=yes
7589
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007590else
Martin v. Löwis11437992002-04-12 09:54:03 +00007591 echo "$as_me: failed program was:" >&5
7592cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007593fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007594rm -f conftest.$ac_objext conftest.$ac_ext
7595echo "$as_me:$LINENO: result: $have_long_long" >&5
7596echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007597if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007598echo "$as_me:$LINENO: checking for long long" >&5
7599echo $ECHO_N "checking for long long... $ECHO_C" >&6
7600if test "${ac_cv_type_long_long+set}" = set; then
7601 echo $ECHO_N "(cached) $ECHO_C" >&6
7602else
7603 cat >conftest.$ac_ext <<_ACEOF
7604#line $LINENO "configure"
7605#include "confdefs.h"
7606$ac_includes_default
7607#ifdef F77_DUMMY_MAIN
7608# ifdef __cplusplus
7609 extern "C"
7610# endif
7611 int F77_DUMMY_MAIN() { return 1; }
7612#endif
7613int
7614main ()
7615{
7616if ((long long *) 0)
7617 return 0;
7618if (sizeof (long long))
7619 return 0;
7620 ;
7621 return 0;
7622}
7623_ACEOF
7624rm -f conftest.$ac_objext
7625if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7626 (eval $ac_compile) 2>&5
7627 ac_status=$?
7628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7629 (exit $ac_status); } &&
7630 { ac_try='test -s conftest.$ac_objext'
7631 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7632 (eval $ac_try) 2>&5
7633 ac_status=$?
7634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7635 (exit $ac_status); }; }; then
7636 ac_cv_type_long_long=yes
7637else
7638 echo "$as_me: failed program was:" >&5
7639cat conftest.$ac_ext >&5
7640ac_cv_type_long_long=no
7641fi
7642rm -f conftest.$ac_objext conftest.$ac_ext
7643fi
7644echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
7645echo "${ECHO_T}$ac_cv_type_long_long" >&6
7646
7647echo "$as_me:$LINENO: checking size of long long" >&5
7648echo $ECHO_N "checking size of long long... $ECHO_C" >&6
7649if test "${ac_cv_sizeof_long_long+set}" = set; then
7650 echo $ECHO_N "(cached) $ECHO_C" >&6
7651else
7652 if test "$ac_cv_type_long_long" = yes; then
7653 # The cast to unsigned long works around a bug in the HP C Compiler
7654 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7655 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7656 # This bug is HP SR number 8606223364.
7657 if test "$cross_compiling" = yes; then
7658 # Depending upon the size, compute the lo and hi bounds.
7659cat >conftest.$ac_ext <<_ACEOF
7660#line $LINENO "configure"
7661#include "confdefs.h"
7662$ac_includes_default
7663#ifdef F77_DUMMY_MAIN
7664# ifdef __cplusplus
7665 extern "C"
7666# endif
7667 int F77_DUMMY_MAIN() { return 1; }
7668#endif
7669int
7670main ()
7671{
7672static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
7673test_array [0] = 0
7674
7675 ;
7676 return 0;
7677}
7678_ACEOF
7679rm -f conftest.$ac_objext
7680if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7681 (eval $ac_compile) 2>&5
7682 ac_status=$?
7683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7684 (exit $ac_status); } &&
7685 { ac_try='test -s conftest.$ac_objext'
7686 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7687 (eval $ac_try) 2>&5
7688 ac_status=$?
7689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7690 (exit $ac_status); }; }; then
7691 ac_lo=0 ac_mid=0
7692 while :; do
7693 cat >conftest.$ac_ext <<_ACEOF
7694#line $LINENO "configure"
7695#include "confdefs.h"
7696$ac_includes_default
7697#ifdef F77_DUMMY_MAIN
7698# ifdef __cplusplus
7699 extern "C"
7700# endif
7701 int F77_DUMMY_MAIN() { return 1; }
7702#endif
7703int
7704main ()
7705{
7706static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
7707test_array [0] = 0
7708
7709 ;
7710 return 0;
7711}
7712_ACEOF
7713rm -f conftest.$ac_objext
7714if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7715 (eval $ac_compile) 2>&5
7716 ac_status=$?
7717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7718 (exit $ac_status); } &&
7719 { ac_try='test -s conftest.$ac_objext'
7720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7721 (eval $ac_try) 2>&5
7722 ac_status=$?
7723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7724 (exit $ac_status); }; }; then
7725 ac_hi=$ac_mid; break
7726else
7727 echo "$as_me: failed program was:" >&5
7728cat conftest.$ac_ext >&5
7729ac_lo=`expr $ac_mid + 1`
7730 if test $ac_lo -le $ac_mid; then
7731 ac_lo= ac_hi=
7732 break
7733 fi
7734 ac_mid=`expr 2 '*' $ac_mid + 1`
7735fi
7736rm -f conftest.$ac_objext conftest.$ac_ext
7737 done
7738else
7739 echo "$as_me: failed program was:" >&5
7740cat conftest.$ac_ext >&5
7741cat >conftest.$ac_ext <<_ACEOF
7742#line $LINENO "configure"
7743#include "confdefs.h"
7744$ac_includes_default
7745#ifdef F77_DUMMY_MAIN
7746# ifdef __cplusplus
7747 extern "C"
7748# endif
7749 int F77_DUMMY_MAIN() { return 1; }
7750#endif
7751int
7752main ()
7753{
7754static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
7755test_array [0] = 0
7756
7757 ;
7758 return 0;
7759}
7760_ACEOF
7761rm -f conftest.$ac_objext
7762if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7763 (eval $ac_compile) 2>&5
7764 ac_status=$?
7765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7766 (exit $ac_status); } &&
7767 { ac_try='test -s conftest.$ac_objext'
7768 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7769 (eval $ac_try) 2>&5
7770 ac_status=$?
7771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7772 (exit $ac_status); }; }; then
7773 ac_hi=-1 ac_mid=-1
7774 while :; do
7775 cat >conftest.$ac_ext <<_ACEOF
7776#line $LINENO "configure"
7777#include "confdefs.h"
7778$ac_includes_default
7779#ifdef F77_DUMMY_MAIN
7780# ifdef __cplusplus
7781 extern "C"
7782# endif
7783 int F77_DUMMY_MAIN() { return 1; }
7784#endif
7785int
7786main ()
7787{
7788static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
7789test_array [0] = 0
7790
7791 ;
7792 return 0;
7793}
7794_ACEOF
7795rm -f conftest.$ac_objext
7796if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7797 (eval $ac_compile) 2>&5
7798 ac_status=$?
7799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7800 (exit $ac_status); } &&
7801 { ac_try='test -s conftest.$ac_objext'
7802 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7803 (eval $ac_try) 2>&5
7804 ac_status=$?
7805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7806 (exit $ac_status); }; }; then
7807 ac_lo=$ac_mid; break
7808else
7809 echo "$as_me: failed program was:" >&5
7810cat conftest.$ac_ext >&5
7811ac_hi=`expr '(' $ac_mid ')' - 1`
7812 if test $ac_mid -le $ac_hi; then
7813 ac_lo= ac_hi=
7814 break
7815 fi
7816 ac_mid=`expr 2 '*' $ac_mid`
7817fi
7818rm -f conftest.$ac_objext conftest.$ac_ext
7819 done
7820else
7821 echo "$as_me: failed program was:" >&5
7822cat conftest.$ac_ext >&5
7823ac_lo= ac_hi=
7824fi
7825rm -f conftest.$ac_objext conftest.$ac_ext
7826fi
7827rm -f conftest.$ac_objext conftest.$ac_ext
7828# Binary search between lo and hi bounds.
7829while test "x$ac_lo" != "x$ac_hi"; do
7830 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7831 cat >conftest.$ac_ext <<_ACEOF
7832#line $LINENO "configure"
7833#include "confdefs.h"
7834$ac_includes_default
7835#ifdef F77_DUMMY_MAIN
7836# ifdef __cplusplus
7837 extern "C"
7838# endif
7839 int F77_DUMMY_MAIN() { return 1; }
7840#endif
7841int
7842main ()
7843{
7844static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
7845test_array [0] = 0
7846
7847 ;
7848 return 0;
7849}
7850_ACEOF
7851rm -f conftest.$ac_objext
7852if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7853 (eval $ac_compile) 2>&5
7854 ac_status=$?
7855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7856 (exit $ac_status); } &&
7857 { ac_try='test -s conftest.$ac_objext'
7858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7859 (eval $ac_try) 2>&5
7860 ac_status=$?
7861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7862 (exit $ac_status); }; }; then
7863 ac_hi=$ac_mid
7864else
7865 echo "$as_me: failed program was:" >&5
7866cat conftest.$ac_ext >&5
7867ac_lo=`expr '(' $ac_mid ')' + 1`
7868fi
7869rm -f conftest.$ac_objext conftest.$ac_ext
7870done
7871case $ac_lo in
7872?*) ac_cv_sizeof_long_long=$ac_lo;;
7873'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
7874echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
7875 { (exit 1); exit 1; }; } ;;
7876esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007877else
7878 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007879 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7880echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7881 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007882else
Martin v. Löwis11437992002-04-12 09:54:03 +00007883 cat >conftest.$ac_ext <<_ACEOF
7884#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007885#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007886$ac_includes_default
7887long longval () { return (long) (sizeof (long long)); }
7888unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007889#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007890#include <stdlib.h>
7891#ifdef F77_DUMMY_MAIN
7892# ifdef __cplusplus
7893 extern "C"
7894# endif
7895 int F77_DUMMY_MAIN() { return 1; }
7896#endif
7897int
7898main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007899{
Martin v. Löwis11437992002-04-12 09:54:03 +00007900
7901 FILE *f = fopen ("conftest.val", "w");
7902 if (! f)
7903 exit (1);
7904 if (((long) (sizeof (long long))) < 0)
7905 {
7906 long i = longval ();
7907 if (i != ((long) (sizeof (long long))))
7908 exit (1);
7909 fprintf (f, "%ld\n", i);
7910 }
7911 else
7912 {
7913 unsigned long i = ulongval ();
7914 if (i != ((long) (sizeof (long long))))
7915 exit (1);
7916 fprintf (f, "%lu\n", i);
7917 }
7918 exit (ferror (f) || fclose (f) != 0);
7919
7920 ;
7921 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007922}
Martin v. Löwis11437992002-04-12 09:54:03 +00007923_ACEOF
7924rm -f conftest$ac_exeext
7925if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7926 (eval $ac_link) 2>&5
7927 ac_status=$?
7928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7929 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7931 (eval $ac_try) 2>&5
7932 ac_status=$?
7933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7934 (exit $ac_status); }; }; then
7935 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007936else
Martin v. Löwis11437992002-04-12 09:54:03 +00007937 echo "$as_me: program exited with status $ac_status" >&5
7938echo "$as_me: failed program was:" >&5
7939cat conftest.$ac_ext >&5
7940( exit $ac_status )
7941{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
7942echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
7943 { (exit 1); exit 1; }; }
7944fi
7945rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7946fi
7947fi
7948rm -f conftest.val
7949else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007950 ac_cv_sizeof_long_long=0
7951fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007952fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007953echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
7954echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
7955cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007956#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007957_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007958
Michael W. Hudson54241132001-12-07 15:38:26 +00007959
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007960fi
7961
Martin v. Löwis11437992002-04-12 09:54:03 +00007962echo "$as_me:$LINENO: checking for uintptr_t support" >&5
7963echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007964have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007965cat >conftest.$ac_ext <<_ACEOF
7966#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007967#include "confdefs.h"
7968
Martin v. Löwis11437992002-04-12 09:54:03 +00007969#ifdef F77_DUMMY_MAIN
7970# ifdef __cplusplus
7971 extern "C"
7972# endif
7973 int F77_DUMMY_MAIN() { return 1; }
7974#endif
7975int
7976main ()
7977{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007978uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007979 ;
7980 return 0;
7981}
7982_ACEOF
7983rm -f conftest.$ac_objext
7984if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7985 (eval $ac_compile) 2>&5
7986 ac_status=$?
7987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7988 (exit $ac_status); } &&
7989 { ac_try='test -s conftest.$ac_objext'
7990 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7991 (eval $ac_try) 2>&5
7992 ac_status=$?
7993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7994 (exit $ac_status); }; }; then
7995
7996
7997cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007998#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007999_ACEOF
8000
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008001 have_uintptr_t=yes
8002
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008003else
Martin v. Löwis11437992002-04-12 09:54:03 +00008004 echo "$as_me: failed program was:" >&5
8005cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008006fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008007rm -f conftest.$ac_objext conftest.$ac_ext
8008echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8009echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008010if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008011echo "$as_me:$LINENO: checking for uintptr_t" >&5
8012echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8013if test "${ac_cv_type_uintptr_t+set}" = set; then
8014 echo $ECHO_N "(cached) $ECHO_C" >&6
8015else
8016 cat >conftest.$ac_ext <<_ACEOF
8017#line $LINENO "configure"
8018#include "confdefs.h"
8019$ac_includes_default
8020#ifdef F77_DUMMY_MAIN
8021# ifdef __cplusplus
8022 extern "C"
8023# endif
8024 int F77_DUMMY_MAIN() { return 1; }
8025#endif
8026int
8027main ()
8028{
8029if ((uintptr_t *) 0)
8030 return 0;
8031if (sizeof (uintptr_t))
8032 return 0;
8033 ;
8034 return 0;
8035}
8036_ACEOF
8037rm -f conftest.$ac_objext
8038if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8039 (eval $ac_compile) 2>&5
8040 ac_status=$?
8041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8042 (exit $ac_status); } &&
8043 { ac_try='test -s conftest.$ac_objext'
8044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8045 (eval $ac_try) 2>&5
8046 ac_status=$?
8047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8048 (exit $ac_status); }; }; then
8049 ac_cv_type_uintptr_t=yes
8050else
8051 echo "$as_me: failed program was:" >&5
8052cat conftest.$ac_ext >&5
8053ac_cv_type_uintptr_t=no
8054fi
8055rm -f conftest.$ac_objext conftest.$ac_ext
8056fi
8057echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8058echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8059
8060echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8061echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8062if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8063 echo $ECHO_N "(cached) $ECHO_C" >&6
8064else
8065 if test "$ac_cv_type_uintptr_t" = yes; then
8066 # The cast to unsigned long works around a bug in the HP C Compiler
8067 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8068 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8069 # This bug is HP SR number 8606223364.
8070 if test "$cross_compiling" = yes; then
8071 # Depending upon the size, compute the lo and hi bounds.
8072cat >conftest.$ac_ext <<_ACEOF
8073#line $LINENO "configure"
8074#include "confdefs.h"
8075$ac_includes_default
8076#ifdef F77_DUMMY_MAIN
8077# ifdef __cplusplus
8078 extern "C"
8079# endif
8080 int F77_DUMMY_MAIN() { return 1; }
8081#endif
8082int
8083main ()
8084{
8085static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8086test_array [0] = 0
8087
8088 ;
8089 return 0;
8090}
8091_ACEOF
8092rm -f conftest.$ac_objext
8093if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8094 (eval $ac_compile) 2>&5
8095 ac_status=$?
8096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8097 (exit $ac_status); } &&
8098 { ac_try='test -s conftest.$ac_objext'
8099 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8100 (eval $ac_try) 2>&5
8101 ac_status=$?
8102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8103 (exit $ac_status); }; }; then
8104 ac_lo=0 ac_mid=0
8105 while :; do
8106 cat >conftest.$ac_ext <<_ACEOF
8107#line $LINENO "configure"
8108#include "confdefs.h"
8109$ac_includes_default
8110#ifdef F77_DUMMY_MAIN
8111# ifdef __cplusplus
8112 extern "C"
8113# endif
8114 int F77_DUMMY_MAIN() { return 1; }
8115#endif
8116int
8117main ()
8118{
8119static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8120test_array [0] = 0
8121
8122 ;
8123 return 0;
8124}
8125_ACEOF
8126rm -f conftest.$ac_objext
8127if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8128 (eval $ac_compile) 2>&5
8129 ac_status=$?
8130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8131 (exit $ac_status); } &&
8132 { ac_try='test -s conftest.$ac_objext'
8133 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8134 (eval $ac_try) 2>&5
8135 ac_status=$?
8136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8137 (exit $ac_status); }; }; then
8138 ac_hi=$ac_mid; break
8139else
8140 echo "$as_me: failed program was:" >&5
8141cat conftest.$ac_ext >&5
8142ac_lo=`expr $ac_mid + 1`
8143 if test $ac_lo -le $ac_mid; then
8144 ac_lo= ac_hi=
8145 break
8146 fi
8147 ac_mid=`expr 2 '*' $ac_mid + 1`
8148fi
8149rm -f conftest.$ac_objext conftest.$ac_ext
8150 done
8151else
8152 echo "$as_me: failed program was:" >&5
8153cat conftest.$ac_ext >&5
8154cat >conftest.$ac_ext <<_ACEOF
8155#line $LINENO "configure"
8156#include "confdefs.h"
8157$ac_includes_default
8158#ifdef F77_DUMMY_MAIN
8159# ifdef __cplusplus
8160 extern "C"
8161# endif
8162 int F77_DUMMY_MAIN() { return 1; }
8163#endif
8164int
8165main ()
8166{
8167static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8168test_array [0] = 0
8169
8170 ;
8171 return 0;
8172}
8173_ACEOF
8174rm -f conftest.$ac_objext
8175if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8176 (eval $ac_compile) 2>&5
8177 ac_status=$?
8178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8179 (exit $ac_status); } &&
8180 { ac_try='test -s conftest.$ac_objext'
8181 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8182 (eval $ac_try) 2>&5
8183 ac_status=$?
8184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8185 (exit $ac_status); }; }; then
8186 ac_hi=-1 ac_mid=-1
8187 while :; do
8188 cat >conftest.$ac_ext <<_ACEOF
8189#line $LINENO "configure"
8190#include "confdefs.h"
8191$ac_includes_default
8192#ifdef F77_DUMMY_MAIN
8193# ifdef __cplusplus
8194 extern "C"
8195# endif
8196 int F77_DUMMY_MAIN() { return 1; }
8197#endif
8198int
8199main ()
8200{
8201static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8202test_array [0] = 0
8203
8204 ;
8205 return 0;
8206}
8207_ACEOF
8208rm -f conftest.$ac_objext
8209if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8210 (eval $ac_compile) 2>&5
8211 ac_status=$?
8212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8213 (exit $ac_status); } &&
8214 { ac_try='test -s conftest.$ac_objext'
8215 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8216 (eval $ac_try) 2>&5
8217 ac_status=$?
8218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8219 (exit $ac_status); }; }; then
8220 ac_lo=$ac_mid; break
8221else
8222 echo "$as_me: failed program was:" >&5
8223cat conftest.$ac_ext >&5
8224ac_hi=`expr '(' $ac_mid ')' - 1`
8225 if test $ac_mid -le $ac_hi; then
8226 ac_lo= ac_hi=
8227 break
8228 fi
8229 ac_mid=`expr 2 '*' $ac_mid`
8230fi
8231rm -f conftest.$ac_objext conftest.$ac_ext
8232 done
8233else
8234 echo "$as_me: failed program was:" >&5
8235cat conftest.$ac_ext >&5
8236ac_lo= ac_hi=
8237fi
8238rm -f conftest.$ac_objext conftest.$ac_ext
8239fi
8240rm -f conftest.$ac_objext conftest.$ac_ext
8241# Binary search between lo and hi bounds.
8242while test "x$ac_lo" != "x$ac_hi"; do
8243 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8244 cat >conftest.$ac_ext <<_ACEOF
8245#line $LINENO "configure"
8246#include "confdefs.h"
8247$ac_includes_default
8248#ifdef F77_DUMMY_MAIN
8249# ifdef __cplusplus
8250 extern "C"
8251# endif
8252 int F77_DUMMY_MAIN() { return 1; }
8253#endif
8254int
8255main ()
8256{
8257static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8258test_array [0] = 0
8259
8260 ;
8261 return 0;
8262}
8263_ACEOF
8264rm -f conftest.$ac_objext
8265if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8266 (eval $ac_compile) 2>&5
8267 ac_status=$?
8268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8269 (exit $ac_status); } &&
8270 { ac_try='test -s conftest.$ac_objext'
8271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8272 (eval $ac_try) 2>&5
8273 ac_status=$?
8274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8275 (exit $ac_status); }; }; then
8276 ac_hi=$ac_mid
8277else
8278 echo "$as_me: failed program was:" >&5
8279cat conftest.$ac_ext >&5
8280ac_lo=`expr '(' $ac_mid ')' + 1`
8281fi
8282rm -f conftest.$ac_objext conftest.$ac_ext
8283done
8284case $ac_lo in
8285?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8286'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8287echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8288 { (exit 1); exit 1; }; } ;;
8289esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008290else
8291 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008292 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8293echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8294 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008295else
Martin v. Löwis11437992002-04-12 09:54:03 +00008296 cat >conftest.$ac_ext <<_ACEOF
8297#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008298#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008299$ac_includes_default
8300long longval () { return (long) (sizeof (uintptr_t)); }
8301unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008302#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008303#include <stdlib.h>
8304#ifdef F77_DUMMY_MAIN
8305# ifdef __cplusplus
8306 extern "C"
8307# endif
8308 int F77_DUMMY_MAIN() { return 1; }
8309#endif
8310int
8311main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008312{
Martin v. Löwis11437992002-04-12 09:54:03 +00008313
8314 FILE *f = fopen ("conftest.val", "w");
8315 if (! f)
8316 exit (1);
8317 if (((long) (sizeof (uintptr_t))) < 0)
8318 {
8319 long i = longval ();
8320 if (i != ((long) (sizeof (uintptr_t))))
8321 exit (1);
8322 fprintf (f, "%ld\n", i);
8323 }
8324 else
8325 {
8326 unsigned long i = ulongval ();
8327 if (i != ((long) (sizeof (uintptr_t))))
8328 exit (1);
8329 fprintf (f, "%lu\n", i);
8330 }
8331 exit (ferror (f) || fclose (f) != 0);
8332
8333 ;
8334 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008335}
Martin v. Löwis11437992002-04-12 09:54:03 +00008336_ACEOF
8337rm -f conftest$ac_exeext
8338if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8339 (eval $ac_link) 2>&5
8340 ac_status=$?
8341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8342 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8344 (eval $ac_try) 2>&5
8345 ac_status=$?
8346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8347 (exit $ac_status); }; }; then
8348 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008349else
Martin v. Löwis11437992002-04-12 09:54:03 +00008350 echo "$as_me: program exited with status $ac_status" >&5
8351echo "$as_me: failed program was:" >&5
8352cat conftest.$ac_ext >&5
8353( exit $ac_status )
8354{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8355echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8356 { (exit 1); exit 1; }; }
8357fi
8358rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8359fi
8360fi
8361rm -f conftest.val
8362else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008363 ac_cv_sizeof_uintptr_t=0
8364fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008365fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008366echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8367echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8368cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008369#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008370_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008371
Michael W. Hudson54241132001-12-07 15:38:26 +00008372
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008373fi
8374
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008375# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008376echo "$as_me:$LINENO: checking size of off_t" >&5
8377echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
8378if test "${ac_cv_sizeof_off_t+set}" = set; then
8379 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008380else
8381 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008382 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008383else
Martin v. Löwis11437992002-04-12 09:54:03 +00008384 cat >conftest.$ac_ext <<_ACEOF
8385#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008386#include "confdefs.h"
8387#include <stdio.h>
8388#include <sys/types.h>
8389main()
8390{
8391 FILE *f=fopen("conftestval", "w");
8392 if (!f) exit(1);
8393 fprintf(f, "%d\n", sizeof(off_t));
8394 exit(0);
8395}
Martin v. Löwis11437992002-04-12 09:54:03 +00008396_ACEOF
8397rm -f conftest$ac_exeext
8398if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8399 (eval $ac_link) 2>&5
8400 ac_status=$?
8401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8402 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8403 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8404 (eval $ac_try) 2>&5
8405 ac_status=$?
8406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8407 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008408 ac_cv_sizeof_off_t=`cat conftestval`
8409else
Martin v. Löwis11437992002-04-12 09:54:03 +00008410 echo "$as_me: program exited with status $ac_status" >&5
8411echo "$as_me: failed program was:" >&5
8412cat conftest.$ac_ext >&5
8413( exit $ac_status )
8414ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008415fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008416rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008417fi
8418
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008419fi
8420
Martin v. Löwis11437992002-04-12 09:54:03 +00008421echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
8422echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
8423
8424cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008425#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008426_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008427
Michael W. Hudson54241132001-12-07 15:38:26 +00008428
Martin v. Löwis11437992002-04-12 09:54:03 +00008429echo "$as_me:$LINENO: checking whether to enable large file support" >&5
8430echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008431if test "$have_long_long" = yes -a \
8432 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
8433 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008434
Martin v. Löwis11437992002-04-12 09:54:03 +00008435cat >>confdefs.h <<\_ACEOF
8436#define HAVE_LARGEFILE_SUPPORT 1
8437_ACEOF
8438
8439 echo "$as_me:$LINENO: result: yes" >&5
8440echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008441else
Martin v. Löwis11437992002-04-12 09:54:03 +00008442 echo "$as_me:$LINENO: result: no" >&5
8443echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008444fi
8445
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008446# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008447echo "$as_me:$LINENO: checking size of time_t" >&5
8448echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
8449if test "${ac_cv_sizeof_time_t+set}" = set; then
8450 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008451else
8452 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008453 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008454else
Martin v. Löwis11437992002-04-12 09:54:03 +00008455 cat >conftest.$ac_ext <<_ACEOF
8456#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008457#include "confdefs.h"
8458#include <stdio.h>
8459#include <time.h>
8460main()
8461{
8462 FILE *f=fopen("conftestval", "w");
8463 if (!f) exit(1);
8464 fprintf(f, "%d\n", sizeof(time_t));
8465 exit(0);
8466}
Martin v. Löwis11437992002-04-12 09:54:03 +00008467_ACEOF
8468rm -f conftest$ac_exeext
8469if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8470 (eval $ac_link) 2>&5
8471 ac_status=$?
8472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8473 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8475 (eval $ac_try) 2>&5
8476 ac_status=$?
8477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8478 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008479 ac_cv_sizeof_time_t=`cat conftestval`
8480else
Martin v. Löwis11437992002-04-12 09:54:03 +00008481 echo "$as_me: program exited with status $ac_status" >&5
8482echo "$as_me: failed program was:" >&5
8483cat conftest.$ac_ext >&5
8484( exit $ac_status )
8485ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008486fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008487rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008488fi
8489
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008490fi
8491
Martin v. Löwis11437992002-04-12 09:54:03 +00008492echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
8493echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
8494
8495cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008496#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008497_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008498
Michael W. Hudson54241132001-12-07 15:38:26 +00008499
8500
Trent Mick635f6fb2000-08-23 21:33:05 +00008501# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008502ac_save_cc="$CC"
8503if test "$ac_cv_kpthread" = "yes"
8504then CC="$CC -Kpthread"
8505fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008506echo "$as_me:$LINENO: checking for pthread_t" >&5
8507echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008508have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008509cat >conftest.$ac_ext <<_ACEOF
8510#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008511#include "confdefs.h"
8512#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008513#ifdef F77_DUMMY_MAIN
8514# ifdef __cplusplus
8515 extern "C"
8516# endif
8517 int F77_DUMMY_MAIN() { return 1; }
8518#endif
8519int
8520main ()
8521{
Guido van Rossum12580492000-09-24 16:47:19 +00008522pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008523 ;
8524 return 0;
8525}
8526_ACEOF
8527rm -f conftest.$ac_objext
8528if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8529 (eval $ac_compile) 2>&5
8530 ac_status=$?
8531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8532 (exit $ac_status); } &&
8533 { ac_try='test -s conftest.$ac_objext'
8534 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8535 (eval $ac_try) 2>&5
8536 ac_status=$?
8537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8538 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008539 have_pthread_t=yes
8540else
Martin v. Löwis11437992002-04-12 09:54:03 +00008541 echo "$as_me: failed program was:" >&5
8542cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00008543fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008544rm -f conftest.$ac_objext conftest.$ac_ext
8545echo "$as_me:$LINENO: result: $have_pthread_t" >&5
8546echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008547if test "$have_pthread_t" = yes ; then
8548 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008549 echo "$as_me:$LINENO: checking size of pthread_t" >&5
8550echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
8551 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
8552 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008553else
8554 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008555 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00008556else
Martin v. Löwis11437992002-04-12 09:54:03 +00008557 cat >conftest.$ac_ext <<_ACEOF
8558#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008559#include "confdefs.h"
8560#include <stdio.h>
8561 #include <pthread.h>
8562 main()
8563 {
8564 FILE *f=fopen("conftestval", "w");
8565 if (!f) exit(1);
8566 fprintf(f, "%d\n", sizeof(pthread_t));
8567 exit(0);
8568 }
Martin v. Löwis11437992002-04-12 09:54:03 +00008569_ACEOF
8570rm -f conftest$ac_exeext
8571if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8572 (eval $ac_link) 2>&5
8573 ac_status=$?
8574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8575 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8576 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8577 (eval $ac_try) 2>&5
8578 ac_status=$?
8579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8580 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008581 ac_cv_sizeof_pthread_t=`cat conftestval`
8582else
Martin v. Löwis11437992002-04-12 09:54:03 +00008583 echo "$as_me: program exited with status $ac_status" >&5
8584echo "$as_me: failed program was:" >&5
8585cat conftest.$ac_ext >&5
8586( exit $ac_status )
8587ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00008588fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008589rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00008590fi
8591
Trent Mick635f6fb2000-08-23 21:33:05 +00008592fi
8593
Martin v. Löwis11437992002-04-12 09:54:03 +00008594 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
8595echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
8596
8597cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008598#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008599_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008600
8601fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008602CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008603
Martin v. Löwis11437992002-04-12 09:54:03 +00008604echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
8605echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008606# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
8607if test "${enable_toolbox_glue+set}" = set; then
8608 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00008609
Martin v. Löwis11437992002-04-12 09:54:03 +00008610fi;
Jack Jansene578a632001-08-15 01:27:14 +00008611
8612if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00008613then
Jack Jansene578a632001-08-15 01:27:14 +00008614 case $ac_sys_system/$ac_sys_release in
8615 Darwin/*)
8616 enable_toolbox_glue="yes";;
8617 *)
8618 enable_toolbox_glue="no";;
8619 esac
8620fi
8621case "$enable_toolbox_glue" in
8622yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00008623 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00008624 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00008625 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00008626
8627cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008628#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008629_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008630
8631 ;;
8632*)
8633 extra_frameworks=""
8634 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00008635 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00008636 ;;
8637esac
Martin v. Löwis11437992002-04-12 09:54:03 +00008638echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
8639echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00008640
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008641
8642case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00008643 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00008644 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00008645 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym"
8646 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00008647 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8648 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008649 Darwin/*)
8650 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00008651 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -flat_namespace -U $ns_undef_sym"
8652 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00008653 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8654 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008655esac
8656
Martin v. Löwis11437992002-04-12 09:54:03 +00008657echo "$as_me:$LINENO: checking for --enable-framework" >&5
8658echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008659if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008660then
Jack Jansenca06bc62001-08-03 15:32:23 +00008661 OPT="$OPT -fno-common -dynamic"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008662 # -U __environ is needed since bundles don't have access
8663 # to crt0 when built but will always be linked against it
Martin v. Löwis11437992002-04-12 09:54:03 +00008664 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008665 # in the build location.
Martin v. Löwis11437992002-04-12 09:54:03 +00008666
Jack Jansena3891ea2001-09-07 14:25:12 +00008667 case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00008668 Darwin/1.3*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym";;
8669 Darwin/*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-flat_namespace,-U,$ns_undef_sym";;
Jack Jansena3891ea2001-09-07 14:25:12 +00008670 esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008671
Martin v. Löwis11437992002-04-12 09:54:03 +00008672cat >>confdefs.h <<\_ACEOF
8673#define WITH_NEXT_FRAMEWORK 1
8674_ACEOF
8675
8676 echo "$as_me:$LINENO: result: yes" >&5
8677echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008678else
Martin v. Löwis11437992002-04-12 09:54:03 +00008679 echo "$as_me:$LINENO: result: no" >&5
8680echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008681fi
8682
Martin v. Löwis11437992002-04-12 09:54:03 +00008683echo "$as_me:$LINENO: checking for dyld" >&5
8684echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008685case $ac_sys_system/$ac_sys_release in
8686 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008687
Martin v. Löwis11437992002-04-12 09:54:03 +00008688cat >>confdefs.h <<\_ACEOF
8689#define WITH_DYLD 1
8690_ACEOF
8691
8692 echo "$as_me:$LINENO: result: always on for Darwin" >&5
8693echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008694 ;;
8695 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00008696 echo "$as_me:$LINENO: result: no" >&5
8697echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008698 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008699esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008700
Guido van Rossum0a516c91994-09-12 10:58:40 +00008701# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008702
Michael W. Hudson54241132001-12-07 15:38:26 +00008703
8704
8705
8706
Guido van Rossum0a516c91994-09-12 10:58:40 +00008707# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008708# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00008709echo "$as_me:$LINENO: checking SO" >&5
8710echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008711if test -z "$SO"
8712then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008713 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00008714 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008715 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008716 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008717 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008718fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008719echo "$as_me:$LINENO: result: $SO" >&5
8720echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008721# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00008722# -- "ld" on SunOS 4.x.x, "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008723# (Shared libraries in this instance are shared modules to be loaded into
8724# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00008725echo "$as_me:$LINENO: checking LDSHARED" >&5
8726echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008727if test -z "$LDSHARED"
8728then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008729 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008730 AIX*)
8731 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008732 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008733 ;;
8734 BeOS*)
8735 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008736 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008737 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008738 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008739 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008740 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008741 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +00008742 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00008743 then LDSHARED='$(CC) -shared'
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00008744 else LDSHARED="$(CC) -G";
Greg Ward57c9a662000-05-26 12:22:54 +00008745 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008746 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008747 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
8748 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008749 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00008750 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8751 if test "$enable_framework" ; then
8752 # Link against the framework. All externals should be defined.
8753 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8754 else
8755 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008756 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008757 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00008758 Darwin/*)
8759 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8760 if test "$enable_framework" ; then
8761 # Link against the framework. All externals should be defined.
8762 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8763 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008764 # No framework, use the Python app as bundle-loader
8765 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8766 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008767 fi ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008768 Linux*|GNU*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00008769 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00008770 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00008771 OpenBSD*|NetBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008772 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008773 then
8774 LDSHARED="cc -shared ${LDFLAGS}"
8775 else
8776 LDSHARED="ld -Bshareable ${LDFLAGS}"
8777 fi;;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008778 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008779 if test "$GCC" = "yes"
8780 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008781 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008782 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008783 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00008784 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008785 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008786 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008787 *) LDSHARED="ld";;
8788 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008789fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008790echo "$as_me:$LINENO: result: $LDSHARED" >&5
8791echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008792BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008793# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008794# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008795echo "$as_me:$LINENO: checking CCSHARED" >&5
8796echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008797if test -z "$CCSHARED"
8798then
Guido van Rossum07397971997-04-29 21:49:50 +00008799 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008800 SunOS*) if test "$GCC" = yes;
8801 then CCSHARED="-fPIC";
8802 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008803 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008804 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008805 else CCSHARED="+z";
8806 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008807 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008808 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00008809 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008810 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008811 if test "$GCC" = "yes"
8812 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008813 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008814 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008815 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00008816 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008817 IRIX*/6*) case $CC in
8818 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008819 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008820 esac;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008821 CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008822 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008823 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008824fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008825echo "$as_me:$LINENO: result: $CCSHARED" >&5
8826echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008827# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008828# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008829echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
8830echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008831if test -z "$LINKFORSHARED"
8832then
Guido van Rossum07397971997-04-29 21:49:50 +00008833 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008834 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008835 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008836 LINKFORSHARED="-Wl,-E -Wl,+s";;
8837# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008838 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008839 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008840 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008841 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00008842 # -u __dummy makes the linker aware of the objc runtime
8843 # in System.framework; otherwise, __objcInit (referenced in
8844 # crt1.o) gets erroneously defined as common, which breaks dynamic
8845 # loading of any modules which reference it in System.framework.
8846 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
8847 # not used by the core itself but which needs to be in the core so
8848 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00008849 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00008850 if test "$enable_framework"
8851 then
8852 LINKFORSHARED="$LINKFORSHARED -framework Python"
8853 fi
8854 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008855 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008856 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008857 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008858 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008859 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8860 then
8861 LINKFORSHARED="-Wl,--export-dynamic"
8862 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008863 SunOS/5*) case $CC in
8864 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008865 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008866 then
8867 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008868 fi;;
8869 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008870 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008871fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008872echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
8873echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008874
Michael W. Hudson54241132001-12-07 15:38:26 +00008875
Martin v. Löwis11437992002-04-12 09:54:03 +00008876echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
8877echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008878if test ! "$LIBRARY" = "$LDLIBRARY"
8879then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008880 case $ac_sys_system in
8881 CYGWIN*)
8882 # Cygwin needs CCSHARED when building extension DLLs
8883 # but not when building the interpreter DLL.
8884 CFLAGSFORSHARED='';;
8885 *)
8886 CFLAGSFORSHARED='$(CCSHARED)'
8887 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008888fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008889echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
8890echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008891
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008892# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8893# library (with --enable-shared).
8894# For platforms on which shared libraries are not allowed to have unresolved
8895# symbols, this must be set to $(LIBS) (expanded by make).
8896
8897echo "$as_me:$LINENO: checking SHLIBS" >&5
8898echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
8899case "$ac_sys_system" in
8900 atheos*)
8901 SHLIBS='$(LIBS)';;
8902 *)
8903 SHLIBS='';;
8904esac
8905echo "$as_me:$LINENO: result: $SHLIBS" >&5
8906echo "${ECHO_T}$SHLIBS" >&6
8907
8908
Guido van Rossum627b2d71993-12-24 10:39:16 +00008909# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00008910
8911echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
8912echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
8913if test "${ac_cv_lib_dl_dlopen+set}" = set; then
8914 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008915else
Martin v. Löwis11437992002-04-12 09:54:03 +00008916 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008917LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008918cat >conftest.$ac_ext <<_ACEOF
8919#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00008920#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008921
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008922/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008923#ifdef __cplusplus
8924extern "C"
8925#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008926/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00008927 builtin and then its argument prototype would still apply. */
8928char dlopen ();
8929#ifdef F77_DUMMY_MAIN
8930# ifdef __cplusplus
8931 extern "C"
8932# endif
8933 int F77_DUMMY_MAIN() { return 1; }
8934#endif
8935int
8936main ()
8937{
8938dlopen ();
8939 ;
8940 return 0;
8941}
8942_ACEOF
8943rm -f conftest.$ac_objext conftest$ac_exeext
8944if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8945 (eval $ac_link) 2>&5
8946 ac_status=$?
8947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8948 (exit $ac_status); } &&
8949 { ac_try='test -s conftest$ac_exeext'
8950 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8951 (eval $ac_try) 2>&5
8952 ac_status=$?
8953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8954 (exit $ac_status); }; }; then
8955 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008956else
Martin v. Löwis11437992002-04-12 09:54:03 +00008957 echo "$as_me: failed program was:" >&5
8958cat conftest.$ac_ext >&5
8959ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008960fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008961rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8962LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008963fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008964echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
8965echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
8966if test $ac_cv_lib_dl_dlopen = yes; then
8967 cat >>confdefs.h <<_ACEOF
8968#define HAVE_LIBDL 1
8969_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008970
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008971 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008972
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008973fi
8974 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00008975
8976echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
8977echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
8978if test "${ac_cv_lib_dld_shl_load+set}" = set; then
8979 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008980else
Martin v. Löwis11437992002-04-12 09:54:03 +00008981 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008982LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008983cat >conftest.$ac_ext <<_ACEOF
8984#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00008985#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008986
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008987/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008988#ifdef __cplusplus
8989extern "C"
8990#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008991/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00008992 builtin and then its argument prototype would still apply. */
8993char shl_load ();
8994#ifdef F77_DUMMY_MAIN
8995# ifdef __cplusplus
8996 extern "C"
8997# endif
8998 int F77_DUMMY_MAIN() { return 1; }
8999#endif
9000int
9001main ()
9002{
9003shl_load ();
9004 ;
9005 return 0;
9006}
9007_ACEOF
9008rm -f conftest.$ac_objext conftest$ac_exeext
9009if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9010 (eval $ac_link) 2>&5
9011 ac_status=$?
9012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9013 (exit $ac_status); } &&
9014 { ac_try='test -s conftest$ac_exeext'
9015 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9016 (eval $ac_try) 2>&5
9017 ac_status=$?
9018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9019 (exit $ac_status); }; }; then
9020 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009021else
Martin v. Löwis11437992002-04-12 09:54:03 +00009022 echo "$as_me: failed program was:" >&5
9023cat conftest.$ac_ext >&5
9024ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009025fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009026rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9027LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009028fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009029echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9030echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9031if test $ac_cv_lib_dld_shl_load = yes; then
9032 cat >>confdefs.h <<_ACEOF
9033#define HAVE_LIBDLD 1
9034_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009035
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009036 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009037
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009038fi
9039 # Dynamic linking for HP-UX
Martin v. Löwis11437992002-04-12 09:54:03 +00009040
9041echo "$as_me:$LINENO: checking for sem_init in -lrt" >&5
9042echo $ECHO_N "checking for sem_init in -lrt... $ECHO_C" >&6
9043if test "${ac_cv_lib_rt_sem_init+set}" = set; then
9044 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009045else
Martin v. Löwis11437992002-04-12 09:54:03 +00009046 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009047LIBS="-lrt $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009048cat >conftest.$ac_ext <<_ACEOF
9049#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009050#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009051
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009052/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009053#ifdef __cplusplus
9054extern "C"
9055#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009056/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009057 builtin and then its argument prototype would still apply. */
9058char sem_init ();
9059#ifdef F77_DUMMY_MAIN
9060# ifdef __cplusplus
9061 extern "C"
9062# endif
9063 int F77_DUMMY_MAIN() { return 1; }
9064#endif
9065int
9066main ()
9067{
9068sem_init ();
9069 ;
9070 return 0;
9071}
9072_ACEOF
9073rm -f conftest.$ac_objext conftest$ac_exeext
9074if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9075 (eval $ac_link) 2>&5
9076 ac_status=$?
9077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9078 (exit $ac_status); } &&
9079 { ac_try='test -s conftest$ac_exeext'
9080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9081 (eval $ac_try) 2>&5
9082 ac_status=$?
9083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9084 (exit $ac_status); }; }; then
9085 ac_cv_lib_rt_sem_init=yes
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009086else
Martin v. Löwis11437992002-04-12 09:54:03 +00009087 echo "$as_me: failed program was:" >&5
9088cat conftest.$ac_ext >&5
9089ac_cv_lib_rt_sem_init=no
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009090fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009091rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9092LIBS=$ac_check_lib_save_LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009093fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009094echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sem_init" >&5
9095echo "${ECHO_T}$ac_cv_lib_rt_sem_init" >&6
9096if test $ac_cv_lib_rt_sem_init = yes; then
9097 cat >>confdefs.h <<_ACEOF
9098#define HAVE_LIBRT 1
9099_ACEOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009100
9101 LIBS="-lrt $LIBS"
9102
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009103fi
9104 # 'Real Time' functions on Solaris
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009105
9106# checks for system dependent C++ extensions support
9107case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009108 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9109echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9110 cat >conftest.$ac_ext <<_ACEOF
9111#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009112#include "confdefs.h"
9113#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009114#ifdef F77_DUMMY_MAIN
9115# ifdef __cplusplus
9116 extern "C"
9117# endif
9118 int F77_DUMMY_MAIN() { return 1; }
9119#endif
9120int
9121main ()
9122{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009123loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009124 ;
9125 return 0;
9126}
9127_ACEOF
9128rm -f conftest.$ac_objext conftest$ac_exeext
9129if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9130 (eval $ac_link) 2>&5
9131 ac_status=$?
9132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9133 (exit $ac_status); } &&
9134 { ac_try='test -s conftest$ac_exeext'
9135 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9136 (eval $ac_try) 2>&5
9137 ac_status=$?
9138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9139 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009140
Martin v. Löwis11437992002-04-12 09:54:03 +00009141cat >>confdefs.h <<\_ACEOF
9142#define AIX_GENUINE_CPLUSPLUS 1
9143_ACEOF
9144
9145 echo "$as_me:$LINENO: result: yes" >&5
9146echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009147else
Martin v. Löwis11437992002-04-12 09:54:03 +00009148 echo "$as_me: failed program was:" >&5
9149cat conftest.$ac_ext >&5
9150echo "$as_me:$LINENO: result: no" >&5
9151echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009152fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009153rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009154 *) ;;
9155esac
9156
Guido van Rossum70c7f481998-03-26 18:44:10 +00009157# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
9158# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009159# BeOS' sockets are stashed in libnet.
9160case "$ac_sys_system" in
9161IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009162*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009163echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9164echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9165if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9166 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009167else
Martin v. Löwis11437992002-04-12 09:54:03 +00009168 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009169LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009170cat >conftest.$ac_ext <<_ACEOF
9171#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009172#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009173
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009174/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009175#ifdef __cplusplus
9176extern "C"
9177#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009178/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009179 builtin and then its argument prototype would still apply. */
9180char t_open ();
9181#ifdef F77_DUMMY_MAIN
9182# ifdef __cplusplus
9183 extern "C"
9184# endif
9185 int F77_DUMMY_MAIN() { return 1; }
9186#endif
9187int
9188main ()
9189{
9190t_open ();
9191 ;
9192 return 0;
9193}
9194_ACEOF
9195rm -f conftest.$ac_objext conftest$ac_exeext
9196if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9197 (eval $ac_link) 2>&5
9198 ac_status=$?
9199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9200 (exit $ac_status); } &&
9201 { ac_try='test -s conftest$ac_exeext'
9202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9203 (eval $ac_try) 2>&5
9204 ac_status=$?
9205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9206 (exit $ac_status); }; }; then
9207 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009208else
Martin v. Löwis11437992002-04-12 09:54:03 +00009209 echo "$as_me: failed program was:" >&5
9210cat conftest.$ac_ext >&5
9211ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009212fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009213rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9214LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009215fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009216echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9217echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9218if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009219 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009220fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009221 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009222echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9223echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9224if test "${ac_cv_lib_socket_socket+set}" = set; then
9225 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009226else
Martin v. Löwis11437992002-04-12 09:54:03 +00009227 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009228LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009229cat >conftest.$ac_ext <<_ACEOF
9230#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009231#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009232
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009233/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009234#ifdef __cplusplus
9235extern "C"
9236#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009237/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009238 builtin and then its argument prototype would still apply. */
9239char socket ();
9240#ifdef F77_DUMMY_MAIN
9241# ifdef __cplusplus
9242 extern "C"
9243# endif
9244 int F77_DUMMY_MAIN() { return 1; }
9245#endif
9246int
9247main ()
9248{
9249socket ();
9250 ;
9251 return 0;
9252}
9253_ACEOF
9254rm -f conftest.$ac_objext conftest$ac_exeext
9255if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9256 (eval $ac_link) 2>&5
9257 ac_status=$?
9258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9259 (exit $ac_status); } &&
9260 { ac_try='test -s conftest$ac_exeext'
9261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9262 (eval $ac_try) 2>&5
9263 ac_status=$?
9264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9265 (exit $ac_status); }; }; then
9266 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009267else
Martin v. Löwis11437992002-04-12 09:54:03 +00009268 echo "$as_me: failed program was:" >&5
9269cat conftest.$ac_ext >&5
9270ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009271fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009272rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9273LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009274fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009275echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
9276echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
9277if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +00009278 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009279fi
9280 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009281;;
9282esac
9283case "$ac_sys_system" in
9284BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009285echo "$as_me:$LINENO: checking for socket in -lnet" >&5
9286echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
9287if test "${ac_cv_lib_net_socket+set}" = set; then
9288 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009289else
Martin v. Löwis11437992002-04-12 09:54:03 +00009290 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009291LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009292cat >conftest.$ac_ext <<_ACEOF
9293#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009294#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009295
Guido van Rossumad678af1998-10-02 14:42:15 +00009296/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009297#ifdef __cplusplus
9298extern "C"
9299#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009300/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009301 builtin and then its argument prototype would still apply. */
9302char socket ();
9303#ifdef F77_DUMMY_MAIN
9304# ifdef __cplusplus
9305 extern "C"
9306# endif
9307 int F77_DUMMY_MAIN() { return 1; }
9308#endif
9309int
9310main ()
9311{
9312socket ();
9313 ;
9314 return 0;
9315}
9316_ACEOF
9317rm -f conftest.$ac_objext conftest$ac_exeext
9318if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9319 (eval $ac_link) 2>&5
9320 ac_status=$?
9321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9322 (exit $ac_status); } &&
9323 { ac_try='test -s conftest$ac_exeext'
9324 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9325 (eval $ac_try) 2>&5
9326 ac_status=$?
9327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9328 (exit $ac_status); }; }; then
9329 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009330else
Martin v. Löwis11437992002-04-12 09:54:03 +00009331 echo "$as_me: failed program was:" >&5
9332cat conftest.$ac_ext >&5
9333ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009334fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009335rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9336LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009337fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009338echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
9339echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
9340if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009341 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009342fi
9343 # BeOS
9344;;
9345esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009346
Martin v. Löwis11437992002-04-12 09:54:03 +00009347echo "$as_me:$LINENO: checking for --with-libs" >&5
9348echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
9349
Guido van Rossuma68acba1996-07-31 17:36:39 +00009350# Check whether --with-libs or --without-libs was given.
9351if test "${with_libs+set}" = set; then
9352 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +00009353
9354echo "$as_me:$LINENO: result: $withval" >&5
9355echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00009356LIBS="$withval $LIBS"
9357
9358else
Martin v. Löwis11437992002-04-12 09:54:03 +00009359 echo "$as_me:$LINENO: result: no" >&5
9360echo "${ECHO_T}no" >&6
9361fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +00009362
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009363# Determine if signalmodule should be used.
9364
9365
Martin v. Löwis11437992002-04-12 09:54:03 +00009366echo "$as_me:$LINENO: checking for --with-signal-module" >&5
9367echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
9368
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009369# Check whether --with-signal-module or --without-signal-module was given.
9370if test "${with_signal_module+set}" = set; then
9371 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009372
Martin v. Löwis11437992002-04-12 09:54:03 +00009373fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009374
9375if test -z "$with_signal_module"
9376then with_signal_module="yes"
9377fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009378echo "$as_me:$LINENO: result: $with_signal_module" >&5
9379echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009380
9381if test "${with_signal_module}" = "yes"; then
9382 USE_SIGNAL_MODULE=""
9383 SIGNAL_OBJS=""
9384else
9385 USE_SIGNAL_MODULE="#"
9386 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9387fi
9388
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009389# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009390
Barry Warsawc0d24d82000-06-29 16:12:00 +00009391USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009392
Martin v. Löwis11437992002-04-12 09:54:03 +00009393echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
9394echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
9395
Guido van Rossumec2f0731997-01-22 20:54:01 +00009396
9397# Check whether --with-dec-threads or --without-dec-threads was given.
9398if test "${with_dec_threads+set}" = set; then
9399 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +00009400
9401echo "$as_me:$LINENO: result: $withval" >&5
9402echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00009403LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009404if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009405 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009406fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009407else
Martin v. Löwis11437992002-04-12 09:54:03 +00009408 echo "$as_me:$LINENO: result: no" >&5
9409echo "${ECHO_T}no" >&6
9410fi;
9411
9412# Templates for things AC_DEFINEd more than once.
9413# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009414
9415
Martin v. Löwis11437992002-04-12 09:54:03 +00009416
9417
9418
9419
9420
9421echo "$as_me:$LINENO: checking for --with-threads" >&5
9422echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
9423
Guido van Rossumec2f0731997-01-22 20:54:01 +00009424# Check whether --with-threads or --without-threads was given.
9425if test "${with_threads+set}" = set; then
9426 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +00009427
Martin v. Löwis11437992002-04-12 09:54:03 +00009428fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +00009429
Barry Warsawc0d24d82000-06-29 16:12:00 +00009430# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009431
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009432# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009433if test "${with_thread+set}" = set; then
9434 withval="$with_thread"
Michael W. Hudson54241132001-12-07 15:38:26 +00009435
Martin v. Löwis11437992002-04-12 09:54:03 +00009436with_threads=$with_thread
9437fi;
Barry Warsawc0d24d82000-06-29 16:12:00 +00009438
9439if test -z "$with_threads"
9440then with_threads="yes"
9441fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009442echo "$as_me:$LINENO: result: $with_threads" >&5
9443echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d82000-06-29 16:12:00 +00009444
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009445
Barry Warsawc0d24d82000-06-29 16:12:00 +00009446if test "$with_threads" = "no"
9447then
9448 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009449elif test "$ac_cv_pthread_is_default" = yes
9450then
Martin v. Löwis11437992002-04-12 09:54:03 +00009451 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009452#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009453_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009454
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009455 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +00009456 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009457#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009458_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009459
9460 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009461 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009462elif test "$ac_cv_kpthread" = "yes"
9463then
9464 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009465 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009466#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009467_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009468
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009469 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009470 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009471else
9472 if test ! -z "$with_threads" -a -d "$with_threads"
9473 then LDFLAGS="$LDFLAGS -L$with_threads"
9474 fi
9475 if test ! -z "$withval" -a -d "$withval"
9476 then LDFLAGS="$LDFLAGS -L$withval"
9477 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009478
9479 # According to the POSIX spec, a pthreads implementation must
9480 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +00009481 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
9482echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
9483 cat >conftest.$ac_ext <<_ACEOF
9484#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009485#include "confdefs.h"
9486#include <unistd.h>
9487 #ifdef _POSIX_THREADS
9488 yes
9489 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009490
9491_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009492if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9493 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009494 unistd_defines_pthreads=yes
9495else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009496 unistd_defines_pthreads=no
9497fi
9498rm -f conftest*
9499
Martin v. Löwis11437992002-04-12 09:54:03 +00009500 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
9501echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009502
Martin v. Löwis11437992002-04-12 09:54:03 +00009503 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009504#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009505_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009506
Martin v. Löwis11437992002-04-12 09:54:03 +00009507 if test "${ac_cv_header_cthreads_h+set}" = set; then
9508 echo "$as_me:$LINENO: checking for cthreads.h" >&5
9509echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9510if test "${ac_cv_header_cthreads_h+set}" = set; then
9511 echo $ECHO_N "(cached) $ECHO_C" >&6
9512fi
9513echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9514echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009515else
Martin v. Löwis11437992002-04-12 09:54:03 +00009516 # Is the header compilable?
9517echo "$as_me:$LINENO: checking cthreads.h usability" >&5
9518echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
9519cat >conftest.$ac_ext <<_ACEOF
9520#line $LINENO "configure"
9521#include "confdefs.h"
9522$ac_includes_default
9523#include <cthreads.h>
9524_ACEOF
9525rm -f conftest.$ac_objext
9526if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9527 (eval $ac_compile) 2>&5
9528 ac_status=$?
9529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9530 (exit $ac_status); } &&
9531 { ac_try='test -s conftest.$ac_objext'
9532 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9533 (eval $ac_try) 2>&5
9534 ac_status=$?
9535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9536 (exit $ac_status); }; }; then
9537 ac_header_compiler=yes
9538else
9539 echo "$as_me: failed program was:" >&5
9540cat conftest.$ac_ext >&5
9541ac_header_compiler=no
9542fi
9543rm -f conftest.$ac_objext conftest.$ac_ext
9544echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9545echo "${ECHO_T}$ac_header_compiler" >&6
9546
9547# Is the header present?
9548echo "$as_me:$LINENO: checking cthreads.h presence" >&5
9549echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
9550cat >conftest.$ac_ext <<_ACEOF
9551#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009552#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009553#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009554_ACEOF
9555if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9556 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9557 ac_status=$?
9558 egrep -v '^ *\+' conftest.er1 >conftest.err
9559 rm -f conftest.er1
9560 cat conftest.err >&5
9561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9562 (exit $ac_status); } >/dev/null; then
9563 if test -s conftest.err; then
9564 ac_cpp_err=$ac_c_preproc_warn_flag
9565 else
9566 ac_cpp_err=
9567 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009568else
Martin v. Löwis11437992002-04-12 09:54:03 +00009569 ac_cpp_err=yes
9570fi
9571if test -z "$ac_cpp_err"; then
9572 ac_header_preproc=yes
9573else
9574 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00009575 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009576 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009577fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009578rm -f conftest.err conftest.$ac_ext
9579echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9580echo "${ECHO_T}$ac_header_preproc" >&6
9581
9582# So? What about this header?
9583case $ac_header_compiler:$ac_header_preproc in
9584 yes:no )
9585 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9586echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9587 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9588echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9589 no:yes )
9590 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
9591echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
9592 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
9593echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
9594 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9595echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9596esac
9597echo "$as_me:$LINENO: checking for cthreads.h" >&5
9598echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9599if test "${ac_cv_header_cthreads_h+set}" = set; then
9600 echo $ECHO_N "(cached) $ECHO_C" >&6
9601else
9602 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009603fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009604echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9605echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
9606
9607fi
9608if test $ac_cv_header_cthreads_h = yes; then
9609 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009610#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009611_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009612
Martin v. Löwis11437992002-04-12 09:54:03 +00009613 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009614#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009615_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009616
Martin v. Löwis11437992002-04-12 09:54:03 +00009617
9618cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009619#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009620_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009621
9622 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009623 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009624else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009625
Martin v. Löwis11437992002-04-12 09:54:03 +00009626 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9627 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9628echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9629if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9630 echo $ECHO_N "(cached) $ECHO_C" >&6
9631fi
9632echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9633echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009634else
Martin v. Löwis11437992002-04-12 09:54:03 +00009635 # Is the header compilable?
9636echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
9637echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
9638cat >conftest.$ac_ext <<_ACEOF
9639#line $LINENO "configure"
9640#include "confdefs.h"
9641$ac_includes_default
9642#include <mach/cthreads.h>
9643_ACEOF
9644rm -f conftest.$ac_objext
9645if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9646 (eval $ac_compile) 2>&5
9647 ac_status=$?
9648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9649 (exit $ac_status); } &&
9650 { ac_try='test -s conftest.$ac_objext'
9651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9652 (eval $ac_try) 2>&5
9653 ac_status=$?
9654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9655 (exit $ac_status); }; }; then
9656 ac_header_compiler=yes
9657else
9658 echo "$as_me: failed program was:" >&5
9659cat conftest.$ac_ext >&5
9660ac_header_compiler=no
9661fi
9662rm -f conftest.$ac_objext conftest.$ac_ext
9663echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9664echo "${ECHO_T}$ac_header_compiler" >&6
9665
9666# Is the header present?
9667echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
9668echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
9669cat >conftest.$ac_ext <<_ACEOF
9670#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009671#include "confdefs.h"
9672#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009673_ACEOF
9674if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9675 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9676 ac_status=$?
9677 egrep -v '^ *\+' conftest.er1 >conftest.err
9678 rm -f conftest.er1
9679 cat conftest.err >&5
9680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9681 (exit $ac_status); } >/dev/null; then
9682 if test -s conftest.err; then
9683 ac_cpp_err=$ac_c_preproc_warn_flag
9684 else
9685 ac_cpp_err=
9686 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009687else
Martin v. Löwis11437992002-04-12 09:54:03 +00009688 ac_cpp_err=yes
9689fi
9690if test -z "$ac_cpp_err"; then
9691 ac_header_preproc=yes
9692else
9693 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009694 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009695 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009696fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009697rm -f conftest.err conftest.$ac_ext
9698echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9699echo "${ECHO_T}$ac_header_preproc" >&6
9700
9701# So? What about this header?
9702case $ac_header_compiler:$ac_header_preproc in
9703 yes:no )
9704 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9705echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9706 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9707echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9708 no:yes )
9709 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
9710echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
9711 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
9712echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
9713 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9714echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9715esac
9716echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9717echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9718if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9719 echo $ECHO_N "(cached) $ECHO_C" >&6
9720else
9721 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009722fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009723echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9724echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
9725
9726fi
9727if test $ac_cv_header_mach_cthreads_h = yes; then
9728 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009729#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009730_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009731
Martin v. Löwis11437992002-04-12 09:54:03 +00009732 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009733#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009734_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009735
Martin v. Löwis11437992002-04-12 09:54:03 +00009736
9737cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009738#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009739_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009740
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009741 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009742else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009743
Martin v. Löwis11437992002-04-12 09:54:03 +00009744 echo "$as_me:$LINENO: checking for --with-pth" >&5
9745echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
9746
9747# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009748if test "${with_pth+set}" = set; then
9749 withval="$with_pth"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009750
Martin v. Löwis11437992002-04-12 09:54:03 +00009751 echo "$as_me:$LINENO: result: $withval" >&5
9752echo "${ECHO_T}$withval" >&6
9753 cat >>confdefs.h <<\_ACEOF
9754#define WITH_THREAD 1
9755_ACEOF
9756
9757
9758cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009759#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009760_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009761
Martin v. Löwis130fb172001-07-19 11:00:41 +00009762 LIBS="-lpth $LIBS"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009763 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009764else
Martin v. Löwis11437992002-04-12 09:54:03 +00009765
9766 echo "$as_me:$LINENO: result: no" >&5
9767echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009768
9769 # Just looking for pthread_create in libpthread is not enough:
9770 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9771 # So we really have to include pthread.h, and then link.
9772 _libs=$LIBS
9773 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009774 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
9775echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
9776 cat >conftest.$ac_ext <<_ACEOF
9777#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009778#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009779#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009780
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009781void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009782#ifdef F77_DUMMY_MAIN
9783# ifdef __cplusplus
9784 extern "C"
9785# endif
9786 int F77_DUMMY_MAIN() { return 1; }
9787#endif
9788int
9789main ()
9790{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009791
9792pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009793 ;
9794 return 0;
9795}
9796_ACEOF
9797rm -f conftest.$ac_objext conftest$ac_exeext
9798if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9799 (eval $ac_link) 2>&5
9800 ac_status=$?
9801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9802 (exit $ac_status); } &&
9803 { ac_try='test -s conftest$ac_exeext'
9804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9805 (eval $ac_try) 2>&5
9806 ac_status=$?
9807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9808 (exit $ac_status); }; }; then
9809
9810 echo "$as_me:$LINENO: result: yes" >&5
9811echo "${ECHO_T}yes" >&6
9812 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009813#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009814_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009815
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009816 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009817 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009818else
Martin v. Löwis11437992002-04-12 09:54:03 +00009819 echo "$as_me: failed program was:" >&5
9820cat conftest.$ac_ext >&5
9821
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009822 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +00009823 echo "$as_me:$LINENO: checking for pthread_detach" >&5
9824echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
9825if test "${ac_cv_func_pthread_detach+set}" = set; then
9826 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009827else
Martin v. Löwis11437992002-04-12 09:54:03 +00009828 cat >conftest.$ac_ext <<_ACEOF
9829#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009830#include "confdefs.h"
9831/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +00009832 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00009833#include <assert.h>
9834/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009835#ifdef __cplusplus
9836extern "C"
9837#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009838/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009839 builtin and then its argument prototype would still apply. */
9840char pthread_detach ();
9841char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +00009842
Martin v. Löwis11437992002-04-12 09:54:03 +00009843#ifdef F77_DUMMY_MAIN
9844# ifdef __cplusplus
9845 extern "C"
9846# endif
9847 int F77_DUMMY_MAIN() { return 1; }
9848#endif
9849int
9850main ()
9851{
Guido van Rossumad678af1998-10-02 14:42:15 +00009852/* The GNU C library defines this for functions which it implements
9853 to always fail with ENOSYS. Some functions are actually named
9854 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00009855#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00009856choke me
9857#else
Martin v. Löwis11437992002-04-12 09:54:03 +00009858f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +00009859#endif
9860
Martin v. Löwis11437992002-04-12 09:54:03 +00009861 ;
9862 return 0;
9863}
9864_ACEOF
9865rm -f conftest.$ac_objext conftest$ac_exeext
9866if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9867 (eval $ac_link) 2>&5
9868 ac_status=$?
9869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9870 (exit $ac_status); } &&
9871 { ac_try='test -s conftest$ac_exeext'
9872 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9873 (eval $ac_try) 2>&5
9874 ac_status=$?
9875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9876 (exit $ac_status); }; }; then
9877 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009878else
Martin v. Löwis11437992002-04-12 09:54:03 +00009879 echo "$as_me: failed program was:" >&5
9880cat conftest.$ac_ext >&5
9881ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009882fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009883rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +00009884fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009885echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
9886echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
9887if test $ac_cv_func_pthread_detach = yes; then
9888 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009889#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009890_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009891
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009892 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009893 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009894else
Guido van Rossumad678af1998-10-02 14:42:15 +00009895
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009896 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
9897 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
9898echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
9899if test "${ac_cv_header_atheos_threads_h+set}" = set; then
9900 echo $ECHO_N "(cached) $ECHO_C" >&6
9901fi
9902echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
9903echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
9904else
9905 # Is the header compilable?
9906echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
9907echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
9908cat >conftest.$ac_ext <<_ACEOF
9909#line $LINENO "configure"
9910#include "confdefs.h"
9911$ac_includes_default
9912#include <atheos/threads.h>
9913_ACEOF
9914rm -f conftest.$ac_objext
9915if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9916 (eval $ac_compile) 2>&5
9917 ac_status=$?
9918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9919 (exit $ac_status); } &&
9920 { ac_try='test -s conftest.$ac_objext'
9921 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9922 (eval $ac_try) 2>&5
9923 ac_status=$?
9924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9925 (exit $ac_status); }; }; then
9926 ac_header_compiler=yes
9927else
9928 echo "$as_me: failed program was:" >&5
9929cat conftest.$ac_ext >&5
9930ac_header_compiler=no
9931fi
9932rm -f conftest.$ac_objext conftest.$ac_ext
9933echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9934echo "${ECHO_T}$ac_header_compiler" >&6
9935
9936# Is the header present?
9937echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
9938echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
9939cat >conftest.$ac_ext <<_ACEOF
9940#line $LINENO "configure"
9941#include "confdefs.h"
9942#include <atheos/threads.h>
9943_ACEOF
9944if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9945 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9946 ac_status=$?
9947 egrep -v '^ *\+' conftest.er1 >conftest.err
9948 rm -f conftest.er1
9949 cat conftest.err >&5
9950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9951 (exit $ac_status); } >/dev/null; then
9952 if test -s conftest.err; then
9953 ac_cpp_err=$ac_c_preproc_warn_flag
9954 else
9955 ac_cpp_err=
9956 fi
9957else
9958 ac_cpp_err=yes
9959fi
9960if test -z "$ac_cpp_err"; then
9961 ac_header_preproc=yes
9962else
9963 echo "$as_me: failed program was:" >&5
9964 cat conftest.$ac_ext >&5
9965 ac_header_preproc=no
9966fi
9967rm -f conftest.err conftest.$ac_ext
9968echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9969echo "${ECHO_T}$ac_header_preproc" >&6
9970
9971# So? What about this header?
9972case $ac_header_compiler:$ac_header_preproc in
9973 yes:no )
9974 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9975echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9976 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
9977echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
9978 no:yes )
9979 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
9980echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
9981 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
9982echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
9983 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
9984echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
9985esac
9986echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
9987echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
9988if test "${ac_cv_header_atheos_threads_h+set}" = set; then
9989 echo $ECHO_N "(cached) $ECHO_C" >&6
9990else
9991 ac_cv_header_atheos_threads_h=$ac_header_preproc
9992fi
9993echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
9994echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
9995
9996fi
9997if test $ac_cv_header_atheos_threads_h = yes; then
9998 cat >>confdefs.h <<\_ACEOF
9999#define WITH_THREAD 1
10000_ACEOF
10001
10002
10003cat >>confdefs.h <<\_ACEOF
10004#define ATHEOS_THREADS 1
10005_ACEOF
10006
10007 THREADOBJ="Python/thread.o"
10008else
10009
Martin v. Löwis11437992002-04-12 09:54:03 +000010010 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10011 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10012echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10013if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10014 echo $ECHO_N "(cached) $ECHO_C" >&6
10015fi
10016echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10017echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010018else
Martin v. Löwis11437992002-04-12 09:54:03 +000010019 # Is the header compilable?
10020echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10021echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10022cat >conftest.$ac_ext <<_ACEOF
10023#line $LINENO "configure"
10024#include "confdefs.h"
10025$ac_includes_default
10026#include <kernel/OS.h>
10027_ACEOF
10028rm -f conftest.$ac_objext
10029if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10030 (eval $ac_compile) 2>&5
10031 ac_status=$?
10032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10033 (exit $ac_status); } &&
10034 { ac_try='test -s conftest.$ac_objext'
10035 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10036 (eval $ac_try) 2>&5
10037 ac_status=$?
10038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10039 (exit $ac_status); }; }; then
10040 ac_header_compiler=yes
10041else
10042 echo "$as_me: failed program was:" >&5
10043cat conftest.$ac_ext >&5
10044ac_header_compiler=no
10045fi
10046rm -f conftest.$ac_objext conftest.$ac_ext
10047echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10048echo "${ECHO_T}$ac_header_compiler" >&6
10049
10050# Is the header present?
10051echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10052echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10053cat >conftest.$ac_ext <<_ACEOF
10054#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010055#include "confdefs.h"
10056#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010057_ACEOF
10058if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10059 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10060 ac_status=$?
10061 egrep -v '^ *\+' conftest.er1 >conftest.err
10062 rm -f conftest.er1
10063 cat conftest.err >&5
10064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10065 (exit $ac_status); } >/dev/null; then
10066 if test -s conftest.err; then
10067 ac_cpp_err=$ac_c_preproc_warn_flag
10068 else
10069 ac_cpp_err=
10070 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010071else
Martin v. Löwis11437992002-04-12 09:54:03 +000010072 ac_cpp_err=yes
10073fi
10074if test -z "$ac_cpp_err"; then
10075 ac_header_preproc=yes
10076else
10077 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010078 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010079 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010080fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010081rm -f conftest.err conftest.$ac_ext
10082echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10083echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010084
Martin v. Löwis11437992002-04-12 09:54:03 +000010085# So? What about this header?
10086case $ac_header_compiler:$ac_header_preproc in
10087 yes:no )
10088 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10089echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10090 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10091echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10092 no:yes )
10093 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10094echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10095 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10096echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10097 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10098echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10099esac
10100echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10101echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10102if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10103 echo $ECHO_N "(cached) $ECHO_C" >&6
10104else
10105 ac_cv_header_kernel_OS_h=$ac_header_preproc
10106fi
10107echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10108echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
10109
10110fi
10111if test $ac_cv_header_kernel_OS_h = yes; then
10112 cat >>confdefs.h <<\_ACEOF
10113#define WITH_THREAD 1
10114_ACEOF
10115
10116
10117cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010118#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010119_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010120
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010121 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010122else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010123
Martin v. Löwis11437992002-04-12 09:54:03 +000010124 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
10125echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
10126if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
10127 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010128else
Martin v. Löwis11437992002-04-12 09:54:03 +000010129 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010130LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010131cat >conftest.$ac_ext <<_ACEOF
10132#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +000010133#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010134
Greg Steinadf63d62000-07-05 10:38:09 +000010135/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010136#ifdef __cplusplus
10137extern "C"
10138#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010139/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010140 builtin and then its argument prototype would still apply. */
10141char pthread_create ();
10142#ifdef F77_DUMMY_MAIN
10143# ifdef __cplusplus
10144 extern "C"
10145# endif
10146 int F77_DUMMY_MAIN() { return 1; }
10147#endif
10148int
10149main ()
10150{
10151pthread_create ();
10152 ;
10153 return 0;
10154}
10155_ACEOF
10156rm -f conftest.$ac_objext conftest$ac_exeext
10157if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10158 (eval $ac_link) 2>&5
10159 ac_status=$?
10160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10161 (exit $ac_status); } &&
10162 { ac_try='test -s conftest$ac_exeext'
10163 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10164 (eval $ac_try) 2>&5
10165 ac_status=$?
10166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10167 (exit $ac_status); }; }; then
10168 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010169else
Martin v. Löwis11437992002-04-12 09:54:03 +000010170 echo "$as_me: failed program was:" >&5
10171cat conftest.$ac_ext >&5
10172ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010173fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010174rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10175LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010176fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010177echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10178echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10179if test $ac_cv_lib_pthreads_pthread_create = yes; then
10180 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010181#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010182_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010183
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010184 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010185 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010186 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010187else
Greg Steinadf63d62000-07-05 10:38:09 +000010188
Martin v. Löwis11437992002-04-12 09:54:03 +000010189 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10190echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10191if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10192 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010193else
Martin v. Löwis11437992002-04-12 09:54:03 +000010194 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010195LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010196cat >conftest.$ac_ext <<_ACEOF
10197#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010198#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010199
Guido van Rossum49545951997-12-02 19:28:29 +000010200/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010201#ifdef __cplusplus
10202extern "C"
10203#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010204/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010205 builtin and then its argument prototype would still apply. */
10206char pthread_create ();
10207#ifdef F77_DUMMY_MAIN
10208# ifdef __cplusplus
10209 extern "C"
10210# endif
10211 int F77_DUMMY_MAIN() { return 1; }
10212#endif
10213int
10214main ()
10215{
10216pthread_create ();
10217 ;
10218 return 0;
10219}
10220_ACEOF
10221rm -f conftest.$ac_objext conftest$ac_exeext
10222if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10223 (eval $ac_link) 2>&5
10224 ac_status=$?
10225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10226 (exit $ac_status); } &&
10227 { ac_try='test -s conftest$ac_exeext'
10228 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10229 (eval $ac_try) 2>&5
10230 ac_status=$?
10231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10232 (exit $ac_status); }; }; then
10233 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010234else
Martin v. Löwis11437992002-04-12 09:54:03 +000010235 echo "$as_me: failed program was:" >&5
10236cat conftest.$ac_ext >&5
10237ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010238fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010239rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10240LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010241fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010242echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10243echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10244if test $ac_cv_lib_c_r_pthread_create = yes; then
10245 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010246#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010247_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010248
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010249 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010250 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010251 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010252else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010253
Martin v. Löwis11437992002-04-12 09:54:03 +000010254 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
10255echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
10256if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
10257 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010258else
Martin v. Löwis11437992002-04-12 09:54:03 +000010259 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010260LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010261cat >conftest.$ac_ext <<_ACEOF
10262#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010263#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010264
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010265/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010266#ifdef __cplusplus
10267extern "C"
10268#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010269/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010270 builtin and then its argument prototype would still apply. */
10271char __d6_pthread_create ();
10272#ifdef F77_DUMMY_MAIN
10273# ifdef __cplusplus
10274 extern "C"
10275# endif
10276 int F77_DUMMY_MAIN() { return 1; }
10277#endif
10278int
10279main ()
10280{
10281__d6_pthread_create ();
10282 ;
10283 return 0;
10284}
10285_ACEOF
10286rm -f conftest.$ac_objext conftest$ac_exeext
10287if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10288 (eval $ac_link) 2>&5
10289 ac_status=$?
10290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10291 (exit $ac_status); } &&
10292 { ac_try='test -s conftest$ac_exeext'
10293 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10294 (eval $ac_try) 2>&5
10295 ac_status=$?
10296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10297 (exit $ac_status); }; }; then
10298 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010299else
Martin v. Löwis11437992002-04-12 09:54:03 +000010300 echo "$as_me: failed program was:" >&5
10301cat conftest.$ac_ext >&5
10302ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010303fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010304rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10305LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010306fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010307echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
10308echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
10309if test $ac_cv_lib_thread___d6_pthread_create = yes; then
10310 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010311#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010312_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010313
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010314 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010315 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010316 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000010317else
Guido van Rossum49545951997-12-02 19:28:29 +000010318
Martin v. Löwis11437992002-04-12 09:54:03 +000010319 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
10320echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
10321if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
10322 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010323else
Martin v. Löwis11437992002-04-12 09:54:03 +000010324 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010325LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010326cat >conftest.$ac_ext <<_ACEOF
10327#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010328#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010329
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010330/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010331#ifdef __cplusplus
10332extern "C"
10333#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010334/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010335 builtin and then its argument prototype would still apply. */
10336char __pthread_create_system ();
10337#ifdef F77_DUMMY_MAIN
10338# ifdef __cplusplus
10339 extern "C"
10340# endif
10341 int F77_DUMMY_MAIN() { return 1; }
10342#endif
10343int
10344main ()
10345{
10346__pthread_create_system ();
10347 ;
10348 return 0;
10349}
10350_ACEOF
10351rm -f conftest.$ac_objext conftest$ac_exeext
10352if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10353 (eval $ac_link) 2>&5
10354 ac_status=$?
10355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10356 (exit $ac_status); } &&
10357 { ac_try='test -s conftest$ac_exeext'
10358 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10359 (eval $ac_try) 2>&5
10360 ac_status=$?
10361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10362 (exit $ac_status); }; }; then
10363 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010364else
Martin v. Löwis11437992002-04-12 09:54:03 +000010365 echo "$as_me: failed program was:" >&5
10366cat conftest.$ac_ext >&5
10367ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010368fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010369rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10370LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010371fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010372echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10373echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
10374if test $ac_cv_lib_pthread___pthread_create_system = yes; then
10375 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010376#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010377_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010378
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010379 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010380 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010381 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010382else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010383
Martin v. Löwis11437992002-04-12 09:54:03 +000010384 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
10385echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
10386if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
10387 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010388else
Martin v. Löwis11437992002-04-12 09:54:03 +000010389 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010390LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010391cat >conftest.$ac_ext <<_ACEOF
10392#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010393#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010394
Guido van Rossumb93a8621998-05-07 13:27:32 +000010395/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010396#ifdef __cplusplus
10397extern "C"
10398#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000010399/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010400 builtin and then its argument prototype would still apply. */
10401char pthread_create ();
10402#ifdef F77_DUMMY_MAIN
10403# ifdef __cplusplus
10404 extern "C"
10405# endif
10406 int F77_DUMMY_MAIN() { return 1; }
10407#endif
10408int
10409main ()
10410{
10411pthread_create ();
10412 ;
10413 return 0;
10414}
10415_ACEOF
10416rm -f conftest.$ac_objext conftest$ac_exeext
10417if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10418 (eval $ac_link) 2>&5
10419 ac_status=$?
10420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10421 (exit $ac_status); } &&
10422 { ac_try='test -s conftest$ac_exeext'
10423 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10424 (eval $ac_try) 2>&5
10425 ac_status=$?
10426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10427 (exit $ac_status); }; }; then
10428 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010429else
Martin v. Löwis11437992002-04-12 09:54:03 +000010430 echo "$as_me: failed program was:" >&5
10431cat conftest.$ac_ext >&5
10432ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010433fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010434rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10435LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010436fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010437echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
10438echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
10439if test $ac_cv_lib_cma_pthread_create = yes; then
10440 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010441#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010442_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010443
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010444 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010445 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010446 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010447else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010448
Martin v. Löwis130fb172001-07-19 11:00:41 +000010449 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010450fi
10451
Guido van Rossum627b2d71993-12-24 10:39:16 +000010452
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010453fi
10454
Guido van Rossum0be3e491997-05-22 20:33:33 +000010455fi
10456
Guido van Rossum49545951997-12-02 19:28:29 +000010457fi
10458
Guido van Rossumb93a8621998-05-07 13:27:32 +000010459fi
10460
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010461fi
10462
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010463
Michael W. Hudson54241132001-12-07 15:38:26 +000010464fi
10465
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010466
10467fi
10468
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010469fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010470rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10471fi;
10472fi
10473
10474
10475fi
10476
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010477
Michael W. Hudson54241132001-12-07 15:38:26 +000010478
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010479 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010480 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010481
10482cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010483#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010484_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010485
10486 fi
10487
Martin v. Löwis11437992002-04-12 09:54:03 +000010488 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10489echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
10490 if test "${ac_cv_pthread_system_supported+set}" = set; then
10491 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010492else
10493 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010494 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010495else
Martin v. Löwis11437992002-04-12 09:54:03 +000010496 cat >conftest.$ac_ext <<_ACEOF
10497#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010498#include "confdefs.h"
10499#include <pthread.h>
10500 void *foo(void *parm) {
10501 return NULL;
10502 }
10503 main() {
10504 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010505 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010506 if (pthread_attr_init(&attr)) exit(-1);
10507 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010508 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010509 exit(0);
10510 }
Martin v. Löwis11437992002-04-12 09:54:03 +000010511_ACEOF
10512rm -f conftest$ac_exeext
10513if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10514 (eval $ac_link) 2>&5
10515 ac_status=$?
10516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10517 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10518 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10519 (eval $ac_try) 2>&5
10520 ac_status=$?
10521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10522 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010523 ac_cv_pthread_system_supported=yes
10524else
Martin v. Löwis11437992002-04-12 09:54:03 +000010525 echo "$as_me: program exited with status $ac_status" >&5
10526echo "$as_me: failed program was:" >&5
10527cat conftest.$ac_ext >&5
10528( exit $ac_status )
10529ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010530fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010531rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010532fi
10533
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010534fi
10535
Martin v. Löwis11437992002-04-12 09:54:03 +000010536 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
10537echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010538 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010539
10540cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010541#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010542_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010543
10544 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010545
10546for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010547do
Martin v. Löwis11437992002-04-12 09:54:03 +000010548as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10549echo "$as_me:$LINENO: checking for $ac_func" >&5
10550echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10551if eval "test \"\${$as_ac_var+set}\" = set"; then
10552 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010553else
Martin v. Löwis11437992002-04-12 09:54:03 +000010554 cat >conftest.$ac_ext <<_ACEOF
10555#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010556#include "confdefs.h"
10557/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010558 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010559#include <assert.h>
10560/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010561#ifdef __cplusplus
10562extern "C"
10563#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010564/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010565 builtin and then its argument prototype would still apply. */
10566char $ac_func ();
10567char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010568
Martin v. Löwis11437992002-04-12 09:54:03 +000010569#ifdef F77_DUMMY_MAIN
10570# ifdef __cplusplus
10571 extern "C"
10572# endif
10573 int F77_DUMMY_MAIN() { return 1; }
10574#endif
10575int
10576main ()
10577{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010578/* The GNU C library defines this for functions which it implements
10579 to always fail with ENOSYS. Some functions are actually named
10580 something starting with __ and the normal name is an alias. */
10581#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10582choke me
10583#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010584f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010585#endif
10586
Martin v. Löwis11437992002-04-12 09:54:03 +000010587 ;
10588 return 0;
10589}
10590_ACEOF
10591rm -f conftest.$ac_objext conftest$ac_exeext
10592if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10593 (eval $ac_link) 2>&5
10594 ac_status=$?
10595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10596 (exit $ac_status); } &&
10597 { ac_try='test -s conftest$ac_exeext'
10598 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10599 (eval $ac_try) 2>&5
10600 ac_status=$?
10601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10602 (exit $ac_status); }; }; then
10603 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000010604else
Martin v. Löwis11437992002-04-12 09:54:03 +000010605 echo "$as_me: failed program was:" >&5
10606cat conftest.$ac_ext >&5
10607eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000010608fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010609rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010610fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010611echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10612echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10613if test `eval echo '${'$as_ac_var'}'` = yes; then
10614 cat >>confdefs.h <<_ACEOF
10615#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10616_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010617
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010618fi
10619done
10620
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010621 fi
10622
Martin v. Löwis11437992002-04-12 09:54:03 +000010623 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
10624echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
10625if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
10626 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010627else
Martin v. Löwis11437992002-04-12 09:54:03 +000010628 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010629LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010630cat >conftest.$ac_ext <<_ACEOF
10631#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010632#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010633
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010634/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010635#ifdef __cplusplus
10636extern "C"
10637#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010638/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010639 builtin and then its argument prototype would still apply. */
10640char usconfig ();
10641#ifdef F77_DUMMY_MAIN
10642# ifdef __cplusplus
10643 extern "C"
10644# endif
10645 int F77_DUMMY_MAIN() { return 1; }
10646#endif
10647int
10648main ()
10649{
10650usconfig ();
10651 ;
10652 return 0;
10653}
10654_ACEOF
10655rm -f conftest.$ac_objext conftest$ac_exeext
10656if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10657 (eval $ac_link) 2>&5
10658 ac_status=$?
10659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10660 (exit $ac_status); } &&
10661 { ac_try='test -s conftest$ac_exeext'
10662 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10663 (eval $ac_try) 2>&5
10664 ac_status=$?
10665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10666 (exit $ac_status); }; }; then
10667 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010668else
Martin v. Löwis11437992002-04-12 09:54:03 +000010669 echo "$as_me: failed program was:" >&5
10670cat conftest.$ac_ext >&5
10671ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010672fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010673rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10674LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010675fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010676echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
10677echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
10678if test $ac_cv_lib_mpc_usconfig = yes; then
10679 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010680#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010681_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010682
Martin v. Löwis130fb172001-07-19 11:00:41 +000010683 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010684 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010685 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010686fi
10687
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010688
Martin v. Löwis11437992002-04-12 09:54:03 +000010689 if test $posix_threads != "yes"; then
10690 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
10691echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
10692if test "${ac_cv_lib_thread_thr_create+set}" = set; then
10693 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010694else
Martin v. Löwis11437992002-04-12 09:54:03 +000010695 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010696LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010697cat >conftest.$ac_ext <<_ACEOF
10698#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010699#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010700
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010701/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010702#ifdef __cplusplus
10703extern "C"
10704#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010705/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010706 builtin and then its argument prototype would still apply. */
10707char thr_create ();
10708#ifdef F77_DUMMY_MAIN
10709# ifdef __cplusplus
10710 extern "C"
10711# endif
10712 int F77_DUMMY_MAIN() { return 1; }
10713#endif
10714int
10715main ()
10716{
10717thr_create ();
10718 ;
10719 return 0;
10720}
10721_ACEOF
10722rm -f conftest.$ac_objext conftest$ac_exeext
10723if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10724 (eval $ac_link) 2>&5
10725 ac_status=$?
10726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10727 (exit $ac_status); } &&
10728 { ac_try='test -s conftest$ac_exeext'
10729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10730 (eval $ac_try) 2>&5
10731 ac_status=$?
10732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10733 (exit $ac_status); }; }; then
10734 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010735else
Martin v. Löwis11437992002-04-12 09:54:03 +000010736 echo "$as_me: failed program was:" >&5
10737cat conftest.$ac_ext >&5
10738ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010739fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010740rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10741LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010742fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010743echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
10744echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
10745if test $ac_cv_lib_thread_thr_create = yes; then
10746 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010747#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010748_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010749
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010750 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010751 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010752 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010753fi
10754
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010755 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010756
Martin v. Löwis130fb172001-07-19 11:00:41 +000010757 if test "$USE_THREAD_MODULE" != "#"
10758 then
10759 # If the above checks didn't disable threads, (at least) OSF1
10760 # needs this '-threads' argument during linking.
10761 case $ac_sys_system in
10762 OSF1) LDLAST=-threads;;
10763 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000010764 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010765fi
10766
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010767# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010768
10769
10770echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
10771echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010772# Check whether --enable-ipv6 or --disable-ipv6 was given.
10773if test "${enable_ipv6+set}" = set; then
10774 enableval="$enable_ipv6"
10775 case "$enableval" in
10776 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000010777 echo "$as_me:$LINENO: result: no" >&5
10778echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010779 ipv6=no
10780 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010781 *) echo "$as_me:$LINENO: result: yes" >&5
10782echo "${ECHO_T}yes" >&6
10783 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010784#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010785_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010786
10787 ipv6=yes
10788 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010789 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010790else
Martin v. Löwis11437992002-04-12 09:54:03 +000010791
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010792 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010793 echo "$as_me:$LINENO: result: no" >&5
10794echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010795 ipv6=no
10796
10797else
Martin v. Löwis11437992002-04-12 09:54:03 +000010798 cat >conftest.$ac_ext <<_ACEOF
10799#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010800#include "confdefs.h"
10801 /* AF_INET6 available check */
10802#include <sys/types.h>
10803#include <sys/socket.h>
10804main()
10805{
10806 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
10807 exit(1);
10808 else
10809 exit(0);
10810}
10811
Martin v. Löwis11437992002-04-12 09:54:03 +000010812_ACEOF
10813rm -f conftest$ac_exeext
10814if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10815 (eval $ac_link) 2>&5
10816 ac_status=$?
10817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10818 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10819 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10820 (eval $ac_try) 2>&5
10821 ac_status=$?
10822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10823 (exit $ac_status); }; }; then
10824 echo "$as_me:$LINENO: result: yes" >&5
10825echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010826 ipv6=yes
10827else
Martin v. Löwis11437992002-04-12 09:54:03 +000010828 echo "$as_me: program exited with status $ac_status" >&5
10829echo "$as_me: failed program was:" >&5
10830cat conftest.$ac_ext >&5
10831( exit $ac_status )
10832echo "$as_me:$LINENO: result: no" >&5
10833echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010834 ipv6=no
10835fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010836rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010837fi
10838
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010839if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010840 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
10841echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
10842 cat >conftest.$ac_ext <<_ACEOF
10843#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010844#include "confdefs.h"
10845#include <sys/types.h>
10846#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010847#ifdef F77_DUMMY_MAIN
10848# ifdef __cplusplus
10849 extern "C"
10850# endif
10851 int F77_DUMMY_MAIN() { return 1; }
10852#endif
10853int
10854main ()
10855{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010856struct sockaddr_in6 x;
10857x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010858 ;
10859 return 0;
10860}
10861_ACEOF
10862rm -f conftest.$ac_objext
10863if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10864 (eval $ac_compile) 2>&5
10865 ac_status=$?
10866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10867 (exit $ac_status); } &&
10868 { ac_try='test -s conftest.$ac_objext'
10869 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10870 (eval $ac_try) 2>&5
10871 ac_status=$?
10872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10873 (exit $ac_status); }; }; then
10874 echo "$as_me:$LINENO: result: yes" >&5
10875echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010876 ipv6=yes
10877else
Martin v. Löwis11437992002-04-12 09:54:03 +000010878 echo "$as_me: failed program was:" >&5
10879cat conftest.$ac_ext >&5
10880echo "$as_me:$LINENO: result: no" >&5
10881echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010882 ipv6=no
10883fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010884rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010885fi
10886
10887if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010888 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010889#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010890_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010891
10892fi
10893
Martin v. Löwis11437992002-04-12 09:54:03 +000010894fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010895
10896ipv6type=unknown
10897ipv6lib=none
10898ipv6trylibc=no
10899
10900if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010901 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
10902echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000010903 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10904 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010905 case $i in
10906 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000010907 cat >conftest.$ac_ext <<_ACEOF
10908#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010909#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010910
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010911#include <netinet/in.h>
10912#ifdef IPV6_INRIA_VERSION
10913yes
10914#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010915_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010916if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10917 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010918 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010919fi
10920rm -f conftest*
10921
10922 ;;
10923 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000010924 cat >conftest.$ac_ext <<_ACEOF
10925#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010926#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010927
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010928#include <netinet/in.h>
10929#ifdef __KAME__
10930yes
10931#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010932_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010933if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10934 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010935 ipv6type=$i;
10936 ipv6lib=inet6
10937 ipv6libdir=/usr/local/v6/lib
10938 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010939fi
10940rm -f conftest*
10941
10942 ;;
10943 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000010944 cat >conftest.$ac_ext <<_ACEOF
10945#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010946#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010947
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010948#include <features.h>
10949#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10950yes
10951#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010952_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010953if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10954 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010955 ipv6type=$i;
10956 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010957fi
10958rm -f conftest*
10959
10960 ;;
10961 linux-inet6)
10962 if test -d /usr/inet6; then
10963 ipv6type=$i
10964 ipv6lib=inet6
10965 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010966 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010967 fi
10968 ;;
10969 solaris)
10970 if test -f /etc/netconfig; then
10971 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
10972 ipv6type=$i
10973 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010974 fi
10975 fi
10976 ;;
10977 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000010978 cat >conftest.$ac_ext <<_ACEOF
10979#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010980#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010981
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010982#include <sys/param.h>
10983#ifdef _TOSHIBA_INET6
10984yes
10985#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010986_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010987if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10988 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010989 ipv6type=$i;
10990 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010991 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010992fi
10993rm -f conftest*
10994
10995 ;;
10996 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000010997 cat >conftest.$ac_ext <<_ACEOF
10998#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010999#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011000
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011001#include </usr/local/v6/include/sys/v6config.h>
11002#ifdef __V6D__
11003yes
11004#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011005_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011006if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11007 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011008 ipv6type=$i;
11009 ipv6lib=v6;
11010 ipv6libdir=/usr/local/v6/lib;
11011 OPT="-I/usr/local/v6/include $OPT"
11012fi
11013rm -f conftest*
11014
11015 ;;
11016 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011017 cat >conftest.$ac_ext <<_ACEOF
11018#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011019#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011020
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011021#include <sys/param.h>
11022#ifdef _ZETA_MINAMI_INET6
11023yes
11024#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011025_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011026if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11027 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011028 ipv6type=$i;
11029 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011030 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011031fi
11032rm -f conftest*
11033
11034 ;;
11035 esac
11036 if test "$ipv6type" != "unknown"; then
11037 break
11038 fi
11039 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011040 echo "$as_me:$LINENO: result: $ipv6type" >&5
11041echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011042fi
11043
11044if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11045 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11046 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11047 echo "using lib$ipv6lib"
11048 else
11049 if test $ipv6trylibc = "yes"; then
11050 echo "using libc"
11051 else
11052 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11053 echo "You need to fetch lib$ipv6lib.a from appropriate"
11054 echo 'ipv6 kit and compile beforehand.'
11055 exit 1
11056 fi
11057 fi
11058fi
11059
Barry Warsawef82cd72000-06-30 16:21:01 +000011060# Check for GC support
Martin v. Löwis11437992002-04-12 09:54:03 +000011061echo "$as_me:$LINENO: checking for --with-cycle-gc" >&5
11062echo $ECHO_N "checking for --with-cycle-gc... $ECHO_C" >&6
11063
Barry Warsawef82cd72000-06-30 16:21:01 +000011064# Check whether --with-cycle-gc or --without-cycle-gc was given.
11065if test "${with_cycle_gc+set}" = set; then
11066 withval="$with_cycle_gc"
Barry Warsawef82cd72000-06-30 16:21:01 +000011067
Martin v. Löwis11437992002-04-12 09:54:03 +000011068fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011069
11070if test -z "$with_cycle_gc"
11071then with_cycle_gc="yes"
11072fi
Neil Schemenauercf229462001-08-29 23:58:47 +000011073if test "$with_cycle_gc" != "no"
Barry Warsawef82cd72000-06-30 16:21:01 +000011074then
Martin v. Löwis11437992002-04-12 09:54:03 +000011075
11076cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011077#define WITH_CYCLE_GC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011078_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011079
11080fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011081echo "$as_me:$LINENO: result: $with_cycle_gc" >&5
11082echo "${ECHO_T}$with_cycle_gc" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011083
Jack Jansen7b8c7542002-04-14 20:12:41 +000011084# Check for universal newline support
11085echo "$as_me:$LINENO: checking for --with-universal-newline" >&5
11086echo $ECHO_N "checking for --with-universal-newline... $ECHO_C" >&6
11087
11088# Check whether --with-universal-newlines or --without-universal-newlines was given.
11089if test "${with_universal_newlines+set}" = set; then
11090 withval="$with_universal_newlines"
11091
11092fi;
11093
11094if test -z "$with_universal_newlines"
11095then with_universal_newlines="yes"
11096fi
11097if test "$with_universal_newlines" != "no"
11098then
Martin v. Löwise8aea582002-04-16 05:51:02 +000011099
11100cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011101#define WITH_UNIVERSAL_NEWLINES 1
11102_ACEOF
11103
11104fi
11105echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11106echo "${ECHO_T}$with_universal_newlines" >&6
11107
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011108# Check for --with-doc-strings
11109echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11110echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11111
11112# Check whether --with-doc-strings or --without-doc-strings was given.
11113if test "${with_doc_strings+set}" = set; then
11114 withval="$with_doc_strings"
11115
11116fi;
11117
11118if test -z "$with_doc_strings"
11119then with_doc_strings="yes"
11120fi
11121if test "$with_doc_strings" != "no"
11122then
11123
11124cat >>confdefs.h <<\_ACEOF
11125#define WITH_DOC_STRINGS 1
11126_ACEOF
11127
11128fi
11129echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11130echo "${ECHO_T}$with_doc_strings" >&6
11131
Neil Schemenauera35c6882001-02-27 04:45:05 +000011132# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011133echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11134echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11135
Neil Schemenauera35c6882001-02-27 04:45:05 +000011136# Check whether --with-pymalloc or --without-pymalloc was given.
11137if test "${with_pymalloc+set}" = set; then
11138 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011139
Martin v. Löwis11437992002-04-12 09:54:03 +000011140fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011141
Neil Schemenauer16c22972002-03-22 15:34:49 +000011142if test -z "$with_pymalloc"
11143then with_pymalloc="yes"
11144fi
11145if test "$with_pymalloc" != "no"
11146then
Martin v. Löwis11437992002-04-12 09:54:03 +000011147
11148cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011149#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011150_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011151
11152fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011153echo "$as_me:$LINENO: result: $with_pymalloc" >&5
11154echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000011155
Barry Warsawef82cd72000-06-30 16:21:01 +000011156# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011157echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
11158echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
11159
Barry Warsawef82cd72000-06-30 16:21:01 +000011160# Check whether --with-wctype-functions or --without-wctype-functions was given.
11161if test "${with_wctype_functions+set}" = set; then
11162 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000011163
Barry Warsawef82cd72000-06-30 16:21:01 +000011164if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011165then
11166
11167cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011168#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011169_ACEOF
11170
11171 echo "$as_me:$LINENO: result: yes" >&5
11172echo "${ECHO_T}yes" >&6
11173else echo "$as_me:$LINENO: result: no" >&5
11174echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011175fi
11176else
Martin v. Löwis11437992002-04-12 09:54:03 +000011177 echo "$as_me:$LINENO: result: no" >&5
11178echo "${ECHO_T}no" >&6
11179fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011180
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011181# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011182
Guido van Rossum98935bf2001-09-05 19:13:16 +000011183DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011184
Martin v. Löwis11437992002-04-12 09:54:03 +000011185echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11186echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11187
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011188# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011189if test "${with_sgi_dl+set}" = set; then
11190 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011191
11192echo "$as_me:$LINENO: result: $withval" >&5
11193echo "${ECHO_T}$withval" >&6
11194
11195cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011196#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011197_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011198
Guido van Rossume97ee181999-12-20 21:27:22 +000011199DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011200dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011201if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011202then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011203else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11204echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11205 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011206fi
11207DLINCLDIR=${dldir}
11208LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011209else
Martin v. Löwis11437992002-04-12 09:54:03 +000011210 echo "$as_me:$LINENO: result: no" >&5
11211echo "${ECHO_T}no" >&6
11212fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011213
Martin v. Löwis11437992002-04-12 09:54:03 +000011214echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11215echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011216
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011217# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011218if test "${with_dl_dld+set}" = set; then
11219 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011220
11221echo "$as_me:$LINENO: result: $withval" >&5
11222echo "${ECHO_T}$withval" >&6
11223
11224cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011225#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011226_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011227
Guido van Rossume97ee181999-12-20 21:27:22 +000011228DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011229dldir=`echo "$withval" | sed 's/,.*//'`
11230dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011231if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011232then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011233else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&5
11234echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&2;}
11235 { (exit DLD_DIRECTORY); exit DLD_DIRECTORY; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011236fi
11237DLINCLDIR=${dldir}
11238LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011239else
Martin v. Löwis11437992002-04-12 09:54:03 +000011240 echo "$as_me:$LINENO: result: no" >&5
11241echo "${ECHO_T}no" >&6
11242fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011243
Guido van Rossume97ee181999-12-20 21:27:22 +000011244# the dlopen() function means we might want to use dynload_shlib.o. some
11245# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011246
Thomas Wouters3a584202000-08-05 23:28:51 +000011247for ac_func in dlopen
11248do
Martin v. Löwis11437992002-04-12 09:54:03 +000011249as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11250echo "$as_me:$LINENO: checking for $ac_func" >&5
11251echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11252if eval "test \"\${$as_ac_var+set}\" = set"; then
11253 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011254else
Martin v. Löwis11437992002-04-12 09:54:03 +000011255 cat >conftest.$ac_ext <<_ACEOF
11256#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000011257#include "confdefs.h"
11258/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011259 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000011260#include <assert.h>
11261/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011262#ifdef __cplusplus
11263extern "C"
11264#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000011265/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011266 builtin and then its argument prototype would still apply. */
11267char $ac_func ();
11268char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000011269
Martin v. Löwis11437992002-04-12 09:54:03 +000011270#ifdef F77_DUMMY_MAIN
11271# ifdef __cplusplus
11272 extern "C"
11273# endif
11274 int F77_DUMMY_MAIN() { return 1; }
11275#endif
11276int
11277main ()
11278{
Guido van Rossume97ee181999-12-20 21:27:22 +000011279/* The GNU C library defines this for functions which it implements
11280 to always fail with ENOSYS. Some functions are actually named
11281 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011282#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000011283choke me
11284#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011285f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000011286#endif
11287
Martin v. Löwis11437992002-04-12 09:54:03 +000011288 ;
11289 return 0;
11290}
11291_ACEOF
11292rm -f conftest.$ac_objext conftest$ac_exeext
11293if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11294 (eval $ac_link) 2>&5
11295 ac_status=$?
11296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11297 (exit $ac_status); } &&
11298 { ac_try='test -s conftest$ac_exeext'
11299 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11300 (eval $ac_try) 2>&5
11301 ac_status=$?
11302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11303 (exit $ac_status); }; }; then
11304 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011305else
Martin v. Löwis11437992002-04-12 09:54:03 +000011306 echo "$as_me: failed program was:" >&5
11307cat conftest.$ac_ext >&5
11308eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011309fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011310rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011311fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011312echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11313echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11314if test `eval echo '${'$as_ac_var'}'` = yes; then
11315 cat >>confdefs.h <<_ACEOF
11316#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11317_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011318
Guido van Rossume97ee181999-12-20 21:27:22 +000011319fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011320done
Guido van Rossume97ee181999-12-20 21:27:22 +000011321
Michael W. Hudson54241132001-12-07 15:38:26 +000011322
Guido van Rossume97ee181999-12-20 21:27:22 +000011323# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11324# loading of modules.
11325
Martin v. Löwis11437992002-04-12 09:54:03 +000011326echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
11327echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011328if test -z "$DYNLOADFILE"
11329then
11330 case $ac_sys_system/$ac_sys_release in
11331 AIX*) DYNLOADFILE="dynload_aix.o";;
11332 BeOS*) DYNLOADFILE="dynload_beos.o";;
11333 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000011334 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011335 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011336 *)
11337 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11338 # out any dynamic loading
11339 if test "$ac_cv_func_dlopen" = yes
11340 then DYNLOADFILE="dynload_shlib.o"
11341 else DYNLOADFILE="dynload_stub.o"
11342 fi
11343 ;;
11344 esac
11345fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011346echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
11347echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011348if test "$DYNLOADFILE" != "dynload_stub.o"
11349then
Martin v. Löwis11437992002-04-12 09:54:03 +000011350
11351cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011352#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011353_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011354
11355fi
11356
Neil Schemenauer4e425612001-06-19 15:44:15 +000011357# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11358
Michael W. Hudson54241132001-12-07 15:38:26 +000011359
Martin v. Löwis11437992002-04-12 09:54:03 +000011360echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
11361echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011362if test -z "$MACHDEP_OBJS"
11363then
Jack Jansene578a632001-08-15 01:27:14 +000011364 MACHDEP_OBJS=$extra_machdep_objs
11365else
11366 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011367fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011368echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
11369echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011370
Guido van Rossum627b2d71993-12-24 10:39:16 +000011371# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439
11440
11441
11442
11443
11444
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011445
Fred Drake6b3cc522002-04-15 19:20:27 +000011446
Martin v. Löwis244edc82001-10-04 22:44:26 +000011447for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
Fred Drake6b3cc522002-04-15 19:20:27 +000011448 fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwis606edc12002-06-13 21:09:11 +000011449 gai_strerror getgroups getlogin getpeername getpgid getpid getpwent getwd \
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011450 hstrerror inet_pton kill killpg link lstat mkfifo mknod mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +000011451 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +000011452 putenv readlink \
Martin v. Löwis61c5edf2001-10-18 04:06:00 +000011453 select setegid seteuid setgid setgroups \
Martin v. Löwis791bfda2001-07-24 06:33:08 +000011454 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Michael W. Hudson065c1a22002-06-06 13:03:44 +000011455 sigaction siginterrupt sigrelse strftime strptime symlink \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011456 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Guido van Rossumc524d952001-10-19 01:31:59 +000011457 truncate uname unsetenv waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +000011458do
Martin v. Löwis11437992002-04-12 09:54:03 +000011459as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11460echo "$as_me:$LINENO: checking for $ac_func" >&5
11461echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11462if eval "test \"\${$as_ac_var+set}\" = set"; then
11463 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011464else
Martin v. Löwis11437992002-04-12 09:54:03 +000011465 cat >conftest.$ac_ext <<_ACEOF
11466#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011467#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011468/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011469 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011470#include <assert.h>
11471/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011472#ifdef __cplusplus
11473extern "C"
11474#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011475/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011476 builtin and then its argument prototype would still apply. */
11477char $ac_func ();
11478char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011479
Martin v. Löwis11437992002-04-12 09:54:03 +000011480#ifdef F77_DUMMY_MAIN
11481# ifdef __cplusplus
11482 extern "C"
11483# endif
11484 int F77_DUMMY_MAIN() { return 1; }
11485#endif
11486int
11487main ()
11488{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011489/* The GNU C library defines this for functions which it implements
11490 to always fail with ENOSYS. Some functions are actually named
11491 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011492#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011493choke me
11494#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011495f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011496#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011497
Martin v. Löwis11437992002-04-12 09:54:03 +000011498 ;
11499 return 0;
11500}
11501_ACEOF
11502rm -f conftest.$ac_objext conftest$ac_exeext
11503if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11504 (eval $ac_link) 2>&5
11505 ac_status=$?
11506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11507 (exit $ac_status); } &&
11508 { ac_try='test -s conftest$ac_exeext'
11509 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11510 (eval $ac_try) 2>&5
11511 ac_status=$?
11512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11513 (exit $ac_status); }; }; then
11514 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011515else
Martin v. Löwis11437992002-04-12 09:54:03 +000011516 echo "$as_me: failed program was:" >&5
11517cat conftest.$ac_ext >&5
11518eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011519fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011520rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011521fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011522echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11523echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11524if test `eval echo '${'$as_ac_var'}'` = yes; then
11525 cat >>confdefs.h <<_ACEOF
11526#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11527_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011528
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011529fi
11530done
11531
Michael W. Hudson54241132001-12-07 15:38:26 +000011532
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011533# check for openpty and forkpty
11534
Martin v. Löwis11437992002-04-12 09:54:03 +000011535
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011536for ac_func in openpty
11537do
Martin v. Löwis11437992002-04-12 09:54:03 +000011538as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11539echo "$as_me:$LINENO: checking for $ac_func" >&5
11540echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11541if eval "test \"\${$as_ac_var+set}\" = set"; then
11542 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011543else
Martin v. Löwis11437992002-04-12 09:54:03 +000011544 cat >conftest.$ac_ext <<_ACEOF
11545#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011546#include "confdefs.h"
11547/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011548 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011549#include <assert.h>
11550/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011551#ifdef __cplusplus
11552extern "C"
11553#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011554/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011555 builtin and then its argument prototype would still apply. */
11556char $ac_func ();
11557char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011558
Martin v. Löwis11437992002-04-12 09:54:03 +000011559#ifdef F77_DUMMY_MAIN
11560# ifdef __cplusplus
11561 extern "C"
11562# endif
11563 int F77_DUMMY_MAIN() { return 1; }
11564#endif
11565int
11566main ()
11567{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011568/* The GNU C library defines this for functions which it implements
11569 to always fail with ENOSYS. Some functions are actually named
11570 something starting with __ and the normal name is an alias. */
11571#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11572choke me
11573#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011574f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011575#endif
11576
Martin v. Löwis11437992002-04-12 09:54:03 +000011577 ;
11578 return 0;
11579}
11580_ACEOF
11581rm -f conftest.$ac_objext conftest$ac_exeext
11582if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11583 (eval $ac_link) 2>&5
11584 ac_status=$?
11585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11586 (exit $ac_status); } &&
11587 { ac_try='test -s conftest$ac_exeext'
11588 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11589 (eval $ac_try) 2>&5
11590 ac_status=$?
11591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11592 (exit $ac_status); }; }; then
11593 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011594else
Martin v. Löwis11437992002-04-12 09:54:03 +000011595 echo "$as_me: failed program was:" >&5
11596cat conftest.$ac_ext >&5
11597eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011598fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011599rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011600fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011601echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11602echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11603if test `eval echo '${'$as_ac_var'}'` = yes; then
11604 cat >>confdefs.h <<_ACEOF
11605#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11606_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011607
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011608else
Martin v. Löwis11437992002-04-12 09:54:03 +000011609 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
11610echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
11611if test "${ac_cv_lib_util_openpty+set}" = set; then
11612 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011613else
Martin v. Löwis11437992002-04-12 09:54:03 +000011614 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011615LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011616cat >conftest.$ac_ext <<_ACEOF
11617#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011618#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011619
Fred Drake8cef4cf2000-06-28 16:40:38 +000011620/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011621#ifdef __cplusplus
11622extern "C"
11623#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011624/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011625 builtin and then its argument prototype would still apply. */
11626char openpty ();
11627#ifdef F77_DUMMY_MAIN
11628# ifdef __cplusplus
11629 extern "C"
11630# endif
11631 int F77_DUMMY_MAIN() { return 1; }
11632#endif
11633int
11634main ()
11635{
11636openpty ();
11637 ;
11638 return 0;
11639}
11640_ACEOF
11641rm -f conftest.$ac_objext conftest$ac_exeext
11642if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11643 (eval $ac_link) 2>&5
11644 ac_status=$?
11645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11646 (exit $ac_status); } &&
11647 { ac_try='test -s conftest$ac_exeext'
11648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11649 (eval $ac_try) 2>&5
11650 ac_status=$?
11651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11652 (exit $ac_status); }; }; then
11653 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011654else
Martin v. Löwis11437992002-04-12 09:54:03 +000011655 echo "$as_me: failed program was:" >&5
11656cat conftest.$ac_ext >&5
11657ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011658fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011659rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11660LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011661fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011662echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
11663echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
11664if test $ac_cv_lib_util_openpty = yes; then
11665 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011666#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011667_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011668 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011669fi
11670
11671fi
11672done
11673
Martin v. Löwis11437992002-04-12 09:54:03 +000011674
Fred Drake8cef4cf2000-06-28 16:40:38 +000011675for ac_func in forkpty
11676do
Martin v. Löwis11437992002-04-12 09:54:03 +000011677as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11678echo "$as_me:$LINENO: checking for $ac_func" >&5
11679echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11680if eval "test \"\${$as_ac_var+set}\" = set"; then
11681 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011682else
Martin v. Löwis11437992002-04-12 09:54:03 +000011683 cat >conftest.$ac_ext <<_ACEOF
11684#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011685#include "confdefs.h"
11686/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011687 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000011688#include <assert.h>
11689/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011690#ifdef __cplusplus
11691extern "C"
11692#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011693/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011694 builtin and then its argument prototype would still apply. */
11695char $ac_func ();
11696char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000011697
Martin v. Löwis11437992002-04-12 09:54:03 +000011698#ifdef F77_DUMMY_MAIN
11699# ifdef __cplusplus
11700 extern "C"
11701# endif
11702 int F77_DUMMY_MAIN() { return 1; }
11703#endif
11704int
11705main ()
11706{
Fred Drake8cef4cf2000-06-28 16:40:38 +000011707/* The GNU C library defines this for functions which it implements
11708 to always fail with ENOSYS. Some functions are actually named
11709 something starting with __ and the normal name is an alias. */
11710#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11711choke me
11712#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011713f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000011714#endif
11715
Martin v. Löwis11437992002-04-12 09:54:03 +000011716 ;
11717 return 0;
11718}
11719_ACEOF
11720rm -f conftest.$ac_objext conftest$ac_exeext
11721if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11722 (eval $ac_link) 2>&5
11723 ac_status=$?
11724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11725 (exit $ac_status); } &&
11726 { ac_try='test -s conftest$ac_exeext'
11727 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11728 (eval $ac_try) 2>&5
11729 ac_status=$?
11730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11731 (exit $ac_status); }; }; then
11732 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011733else
Martin v. Löwis11437992002-04-12 09:54:03 +000011734 echo "$as_me: failed program was:" >&5
11735cat conftest.$ac_ext >&5
11736eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011737fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011738rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011739fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011740echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11741echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11742if test `eval echo '${'$as_ac_var'}'` = yes; then
11743 cat >>confdefs.h <<_ACEOF
11744#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11745_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011746
Fred Drake8cef4cf2000-06-28 16:40:38 +000011747else
Martin v. Löwis11437992002-04-12 09:54:03 +000011748 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
11749echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
11750if test "${ac_cv_lib_util_forkpty+set}" = set; then
11751 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011752else
Martin v. Löwis11437992002-04-12 09:54:03 +000011753 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011754LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011755cat >conftest.$ac_ext <<_ACEOF
11756#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011757#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011758
Fred Drake8cef4cf2000-06-28 16:40:38 +000011759/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011760#ifdef __cplusplus
11761extern "C"
11762#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011763/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011764 builtin and then its argument prototype would still apply. */
11765char forkpty ();
11766#ifdef F77_DUMMY_MAIN
11767# ifdef __cplusplus
11768 extern "C"
11769# endif
11770 int F77_DUMMY_MAIN() { return 1; }
11771#endif
11772int
11773main ()
11774{
11775forkpty ();
11776 ;
11777 return 0;
11778}
11779_ACEOF
11780rm -f conftest.$ac_objext conftest$ac_exeext
11781if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11782 (eval $ac_link) 2>&5
11783 ac_status=$?
11784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11785 (exit $ac_status); } &&
11786 { ac_try='test -s conftest$ac_exeext'
11787 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11788 (eval $ac_try) 2>&5
11789 ac_status=$?
11790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11791 (exit $ac_status); }; }; then
11792 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011793else
Martin v. Löwis11437992002-04-12 09:54:03 +000011794 echo "$as_me: failed program was:" >&5
11795cat conftest.$ac_ext >&5
11796ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011797fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011798rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11799LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011800fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011801echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
11802echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
11803if test $ac_cv_lib_util_forkpty = yes; then
11804 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011805#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011806_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011807 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011808fi
11809
11810fi
11811done
11812
Jack Jansendd19cf82001-12-06 22:36:17 +000011813
Michael W. Hudson54241132001-12-07 15:38:26 +000011814# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011815
11816
11817
11818
11819
11820
Fred Drake8cef4cf2000-06-28 16:40:38 +000011821for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
11822do
Martin v. Löwis11437992002-04-12 09:54:03 +000011823as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11824echo "$as_me:$LINENO: checking for $ac_func" >&5
11825echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11826if eval "test \"\${$as_ac_var+set}\" = set"; then
11827 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011828else
Martin v. Löwis11437992002-04-12 09:54:03 +000011829 cat >conftest.$ac_ext <<_ACEOF
11830#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011831#include "confdefs.h"
11832/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011833 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011834#include <assert.h>
11835/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011836#ifdef __cplusplus
11837extern "C"
11838#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011839/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011840 builtin and then its argument prototype would still apply. */
11841char $ac_func ();
11842char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011843
Martin v. Löwis11437992002-04-12 09:54:03 +000011844#ifdef F77_DUMMY_MAIN
11845# ifdef __cplusplus
11846 extern "C"
11847# endif
11848 int F77_DUMMY_MAIN() { return 1; }
11849#endif
11850int
11851main ()
11852{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011853/* The GNU C library defines this for functions which it implements
11854 to always fail with ENOSYS. Some functions are actually named
11855 something starting with __ and the normal name is an alias. */
11856#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11857choke me
11858#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011859f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011860#endif
11861
Martin v. Löwis11437992002-04-12 09:54:03 +000011862 ;
11863 return 0;
11864}
11865_ACEOF
11866rm -f conftest.$ac_objext conftest$ac_exeext
11867if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11868 (eval $ac_link) 2>&5
11869 ac_status=$?
11870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11871 (exit $ac_status); } &&
11872 { ac_try='test -s conftest$ac_exeext'
11873 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11874 (eval $ac_try) 2>&5
11875 ac_status=$?
11876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11877 (exit $ac_status); }; }; then
11878 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011879else
Martin v. Löwis11437992002-04-12 09:54:03 +000011880 echo "$as_me: failed program was:" >&5
11881cat conftest.$ac_ext >&5
11882eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011883fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011884rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011885fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011886echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11887echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11888if test `eval echo '${'$as_ac_var'}'` = yes; then
11889 cat >>confdefs.h <<_ACEOF
11890#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11891_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011892
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011893fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011894done
11895
Michael W. Hudson54241132001-12-07 15:38:26 +000011896
Martin v. Löwis11437992002-04-12 09:54:03 +000011897
11898
11899
11900
11901
Martin v. Löwis1142de32002-03-29 16:28:31 +000011902for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000011903do
Martin v. Löwis11437992002-04-12 09:54:03 +000011904as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11905echo "$as_me:$LINENO: checking for $ac_func" >&5
11906echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11907if eval "test \"\${$as_ac_var+set}\" = set"; then
11908 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011909else
Martin v. Löwis11437992002-04-12 09:54:03 +000011910 cat >conftest.$ac_ext <<_ACEOF
11911#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011912#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011913/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011914 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011915#include <assert.h>
11916/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011917#ifdef __cplusplus
11918extern "C"
11919#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011920/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011921 builtin and then its argument prototype would still apply. */
11922char $ac_func ();
11923char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011924
Martin v. Löwis11437992002-04-12 09:54:03 +000011925#ifdef F77_DUMMY_MAIN
11926# ifdef __cplusplus
11927 extern "C"
11928# endif
11929 int F77_DUMMY_MAIN() { return 1; }
11930#endif
11931int
11932main ()
11933{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011934/* The GNU C library defines this for functions which it implements
11935 to always fail with ENOSYS. Some functions are actually named
11936 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011937#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011938choke me
11939#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011940f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011941#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011942
Martin v. Löwis11437992002-04-12 09:54:03 +000011943 ;
11944 return 0;
11945}
11946_ACEOF
11947rm -f conftest.$ac_objext conftest$ac_exeext
11948if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11949 (eval $ac_link) 2>&5
11950 ac_status=$?
11951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11952 (exit $ac_status); } &&
11953 { ac_try='test -s conftest$ac_exeext'
11954 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11955 (eval $ac_try) 2>&5
11956 ac_status=$?
11957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11958 (exit $ac_status); }; }; then
11959 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011960else
Martin v. Löwis11437992002-04-12 09:54:03 +000011961 echo "$as_me: failed program was:" >&5
11962cat conftest.$ac_ext >&5
11963eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011964fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011965rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000011966fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011967echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11968echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11969if test `eval echo '${'$as_ac_var'}'` = yes; then
11970 cat >>confdefs.h <<_ACEOF
11971#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11972_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000011973
Martin v. Löwis1142de32002-03-29 16:28:31 +000011974else
Martin v. Löwis11437992002-04-12 09:54:03 +000011975 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011976fi
11977done
11978
11979
Martin v. Löwis11437992002-04-12 09:54:03 +000011980
Martin v. Löwis1142de32002-03-29 16:28:31 +000011981for ac_func in getpgrp
11982do
Martin v. Löwis11437992002-04-12 09:54:03 +000011983as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11984echo "$as_me:$LINENO: checking for $ac_func" >&5
11985echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11986if eval "test \"\${$as_ac_var+set}\" = set"; then
11987 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000011988else
Martin v. Löwis11437992002-04-12 09:54:03 +000011989 cat >conftest.$ac_ext <<_ACEOF
11990#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011991#include "confdefs.h"
11992/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011993 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000011994#include <assert.h>
11995/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011996#ifdef __cplusplus
11997extern "C"
11998#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000011999/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012000 builtin and then its argument prototype would still apply. */
12001char $ac_func ();
12002char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000012003
Martin v. Löwis11437992002-04-12 09:54:03 +000012004#ifdef F77_DUMMY_MAIN
12005# ifdef __cplusplus
12006 extern "C"
12007# endif
12008 int F77_DUMMY_MAIN() { return 1; }
12009#endif
12010int
12011main ()
12012{
Martin v. Löwis1142de32002-03-29 16:28:31 +000012013/* The GNU C library defines this for functions which it implements
12014 to always fail with ENOSYS. Some functions are actually named
12015 something starting with __ and the normal name is an alias. */
12016#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12017choke me
12018#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012019f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000012020#endif
12021
Martin v. Löwis11437992002-04-12 09:54:03 +000012022 ;
12023 return 0;
12024}
12025_ACEOF
12026rm -f conftest.$ac_objext conftest$ac_exeext
12027if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12028 (eval $ac_link) 2>&5
12029 ac_status=$?
12030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12031 (exit $ac_status); } &&
12032 { ac_try='test -s conftest$ac_exeext'
12033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12034 (eval $ac_try) 2>&5
12035 ac_status=$?
12036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12037 (exit $ac_status); }; }; then
12038 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012039else
Martin v. Löwis11437992002-04-12 09:54:03 +000012040 echo "$as_me: failed program was:" >&5
12041cat conftest.$ac_ext >&5
12042eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012043fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012044rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012045fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012046echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12047echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12048if test `eval echo '${'$as_ac_var'}'` = yes; then
12049 cat >>confdefs.h <<_ACEOF
12050#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12051_ACEOF
12052 cat >conftest.$ac_ext <<_ACEOF
12053#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012054#include "confdefs.h"
12055#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012056#ifdef F77_DUMMY_MAIN
12057# ifdef __cplusplus
12058 extern "C"
12059# endif
12060 int F77_DUMMY_MAIN() { return 1; }
12061#endif
12062int
12063main ()
12064{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012065getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012066 ;
12067 return 0;
12068}
12069_ACEOF
12070rm -f conftest.$ac_objext
12071if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12072 (eval $ac_compile) 2>&5
12073 ac_status=$?
12074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12075 (exit $ac_status); } &&
12076 { ac_try='test -s conftest.$ac_objext'
12077 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12078 (eval $ac_try) 2>&5
12079 ac_status=$?
12080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12081 (exit $ac_status); }; }; then
12082
12083cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012084#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012085_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012086
Martin v. Löwis11437992002-04-12 09:54:03 +000012087
Guido van Rossumf78abae1997-01-21 22:02:36 +000012088else
Martin v. Löwis11437992002-04-12 09:54:03 +000012089 echo "$as_me: failed program was:" >&5
12090cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000012091fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012092rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012093
Guido van Rossum627b2d71993-12-24 10:39:16 +000012094fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012095done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012096
Martin v. Löwis11437992002-04-12 09:54:03 +000012097
Thomas Wouters3a584202000-08-05 23:28:51 +000012098for ac_func in setpgrp
12099do
Martin v. Löwis11437992002-04-12 09:54:03 +000012100as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12101echo "$as_me:$LINENO: checking for $ac_func" >&5
12102echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12103if eval "test \"\${$as_ac_var+set}\" = set"; then
12104 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012105else
Martin v. Löwis11437992002-04-12 09:54:03 +000012106 cat >conftest.$ac_ext <<_ACEOF
12107#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012108#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012109/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012110 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012111#include <assert.h>
12112/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012113#ifdef __cplusplus
12114extern "C"
12115#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012116/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012117 builtin and then its argument prototype would still apply. */
12118char $ac_func ();
12119char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012120
Martin v. Löwis11437992002-04-12 09:54:03 +000012121#ifdef F77_DUMMY_MAIN
12122# ifdef __cplusplus
12123 extern "C"
12124# endif
12125 int F77_DUMMY_MAIN() { return 1; }
12126#endif
12127int
12128main ()
12129{
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012130/* The GNU C library defines this for functions which it implements
12131 to always fail with ENOSYS. Some functions are actually named
12132 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012133#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012134choke me
12135#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012136f = $ac_func;
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012137#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012138
Martin v. Löwis11437992002-04-12 09:54:03 +000012139 ;
12140 return 0;
12141}
12142_ACEOF
12143rm -f conftest.$ac_objext conftest$ac_exeext
12144if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12145 (eval $ac_link) 2>&5
12146 ac_status=$?
12147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12148 (exit $ac_status); } &&
12149 { ac_try='test -s conftest$ac_exeext'
12150 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12151 (eval $ac_try) 2>&5
12152 ac_status=$?
12153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12154 (exit $ac_status); }; }; then
12155 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012156else
Martin v. Löwis11437992002-04-12 09:54:03 +000012157 echo "$as_me: failed program was:" >&5
12158cat conftest.$ac_ext >&5
12159eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012160fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012161rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012162fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012163echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12164echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12165if test `eval echo '${'$as_ac_var'}'` = yes; then
12166 cat >>confdefs.h <<_ACEOF
12167#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12168_ACEOF
12169 cat >conftest.$ac_ext <<_ACEOF
12170#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012171#include "confdefs.h"
12172#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012173#ifdef F77_DUMMY_MAIN
12174# ifdef __cplusplus
12175 extern "C"
12176# endif
12177 int F77_DUMMY_MAIN() { return 1; }
12178#endif
12179int
12180main ()
12181{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012182setpgrp(0,0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012183 ;
12184 return 0;
12185}
12186_ACEOF
12187rm -f conftest.$ac_objext
12188if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12189 (eval $ac_compile) 2>&5
12190 ac_status=$?
12191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12192 (exit $ac_status); } &&
12193 { ac_try='test -s conftest.$ac_objext'
12194 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12195 (eval $ac_try) 2>&5
12196 ac_status=$?
12197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12198 (exit $ac_status); }; }; then
12199
12200cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012201#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012202_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012203
Martin v. Löwis11437992002-04-12 09:54:03 +000012204
Guido van Rossumf78abae1997-01-21 22:02:36 +000012205else
Martin v. Löwis11437992002-04-12 09:54:03 +000012206 echo "$as_me: failed program was:" >&5
12207cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012208fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012209rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012210
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012211fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012212done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012213
Martin v. Löwis11437992002-04-12 09:54:03 +000012214
Thomas Wouters3a584202000-08-05 23:28:51 +000012215for ac_func in gettimeofday
12216do
Martin v. Löwis11437992002-04-12 09:54:03 +000012217as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12218echo "$as_me:$LINENO: checking for $ac_func" >&5
12219echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12220if eval "test \"\${$as_ac_var+set}\" = set"; then
12221 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012222else
Martin v. Löwis11437992002-04-12 09:54:03 +000012223 cat >conftest.$ac_ext <<_ACEOF
12224#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012225#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012226/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012227 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012228#include <assert.h>
12229/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012230#ifdef __cplusplus
12231extern "C"
12232#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012233/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012234 builtin and then its argument prototype would still apply. */
12235char $ac_func ();
12236char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012237
Martin v. Löwis11437992002-04-12 09:54:03 +000012238#ifdef F77_DUMMY_MAIN
12239# ifdef __cplusplus
12240 extern "C"
12241# endif
12242 int F77_DUMMY_MAIN() { return 1; }
12243#endif
12244int
12245main ()
12246{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012247/* The GNU C library defines this for functions which it implements
12248 to always fail with ENOSYS. Some functions are actually named
12249 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012250#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012251choke me
12252#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012253f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012254#endif
12255
Martin v. Löwis11437992002-04-12 09:54:03 +000012256 ;
12257 return 0;
12258}
12259_ACEOF
12260rm -f conftest.$ac_objext conftest$ac_exeext
12261if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12262 (eval $ac_link) 2>&5
12263 ac_status=$?
12264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12265 (exit $ac_status); } &&
12266 { ac_try='test -s conftest$ac_exeext'
12267 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12268 (eval $ac_try) 2>&5
12269 ac_status=$?
12270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12271 (exit $ac_status); }; }; then
12272 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012273else
Martin v. Löwis11437992002-04-12 09:54:03 +000012274 echo "$as_me: failed program was:" >&5
12275cat conftest.$ac_ext >&5
12276eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012277fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012278rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012279fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012280echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12281echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12282if test `eval echo '${'$as_ac_var'}'` = yes; then
12283 cat >>confdefs.h <<_ACEOF
12284#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12285_ACEOF
12286 cat >conftest.$ac_ext <<_ACEOF
12287#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012288#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012289#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012290#ifdef F77_DUMMY_MAIN
12291# ifdef __cplusplus
12292 extern "C"
12293# endif
12294 int F77_DUMMY_MAIN() { return 1; }
12295#endif
12296int
12297main ()
12298{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012299gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012300 ;
12301 return 0;
12302}
12303_ACEOF
12304rm -f conftest.$ac_objext
12305if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12306 (eval $ac_compile) 2>&5
12307 ac_status=$?
12308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12309 (exit $ac_status); } &&
12310 { ac_try='test -s conftest.$ac_objext'
12311 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12312 (eval $ac_try) 2>&5
12313 ac_status=$?
12314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12315 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000012316 :
12317else
Martin v. Löwis11437992002-04-12 09:54:03 +000012318 echo "$as_me: failed program was:" >&5
12319cat conftest.$ac_ext >&5
12320
12321cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012322#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012323_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012324
Martin v. Löwis11437992002-04-12 09:54:03 +000012325
Guido van Rossum627b2d71993-12-24 10:39:16 +000012326fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012327rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012328
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012329fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012330done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012331
Michael W. Hudson54241132001-12-07 15:38:26 +000012332
12333
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012334# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012335# for [no]getaddrinfo in netdb.h.
12336echo "$as_me:$LINENO: checking for getaddrinfo" >&5
12337echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
12338cat >conftest.$ac_ext <<_ACEOF
12339#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012340#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012341
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012342#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012343#include <sys/socket.h>
12344#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012345#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012346
Martin v. Löwis11437992002-04-12 09:54:03 +000012347#ifdef F77_DUMMY_MAIN
12348# ifdef __cplusplus
12349 extern "C"
12350# endif
12351 int F77_DUMMY_MAIN() { return 1; }
12352#endif
12353int
12354main ()
12355{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012356
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012357getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012358
Martin v. Löwis11437992002-04-12 09:54:03 +000012359 ;
12360 return 0;
12361}
12362_ACEOF
12363rm -f conftest.$ac_objext conftest$ac_exeext
12364if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12365 (eval $ac_link) 2>&5
12366 ac_status=$?
12367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12368 (exit $ac_status); } &&
12369 { ac_try='test -s conftest$ac_exeext'
12370 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12371 (eval $ac_try) 2>&5
12372 ac_status=$?
12373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12374 (exit $ac_status); }; }; then
12375
12376echo "$as_me:$LINENO: result: yes" >&5
12377echo "${ECHO_T}yes" >&6
12378echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
12379echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012380if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012381 echo "$as_me:$LINENO: result: buggy" >&5
12382echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012383buggygetaddrinfo=yes
12384else
Martin v. Löwis11437992002-04-12 09:54:03 +000012385 cat >conftest.$ac_ext <<_ACEOF
12386#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012387#include "confdefs.h"
12388
12389#include <sys/types.h>
12390#include <netdb.h>
12391#include <string.h>
12392#include <sys/socket.h>
12393#include <netinet/in.h>
12394
12395main()
12396{
12397 int passive, gaierr, inet4 = 0, inet6 = 0;
12398 struct addrinfo hints, *ai, *aitop;
12399 char straddr[INET6_ADDRSTRLEN], strport[16];
12400
12401 for (passive = 0; passive <= 1; passive++) {
12402 memset(&hints, 0, sizeof(hints));
12403 hints.ai_family = AF_UNSPEC;
12404 hints.ai_flags = passive ? AI_PASSIVE : 0;
12405 hints.ai_socktype = SOCK_STREAM;
12406 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12407 (void)gai_strerror(gaierr);
12408 goto bad;
12409 }
12410 for (ai = aitop; ai; ai = ai->ai_next) {
12411 if (ai->ai_addr == NULL ||
12412 ai->ai_addrlen == 0 ||
12413 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12414 straddr, sizeof(straddr), strport, sizeof(strport),
12415 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12416 goto bad;
12417 }
12418 switch (ai->ai_family) {
12419 case AF_INET:
12420 if (strcmp(strport, "54321") != 0) {
12421 goto bad;
12422 }
12423 if (passive) {
12424 if (strcmp(straddr, "0.0.0.0") != 0) {
12425 goto bad;
12426 }
12427 } else {
12428 if (strcmp(straddr, "127.0.0.1") != 0) {
12429 goto bad;
12430 }
12431 }
12432 inet4++;
12433 break;
12434 case AF_INET6:
12435 if (strcmp(strport, "54321") != 0) {
12436 goto bad;
12437 }
12438 if (passive) {
12439 if (strcmp(straddr, "::") != 0) {
12440 goto bad;
12441 }
12442 } else {
12443 if (strcmp(straddr, "::1") != 0) {
12444 goto bad;
12445 }
12446 }
12447 inet6++;
12448 break;
12449 case AF_UNSPEC:
12450 goto bad;
12451 break;
12452 default:
12453 /* another family support? */
12454 break;
12455 }
12456 }
12457 }
12458
12459 if (!(inet4 == 0 || inet4 == 2))
12460 goto bad;
12461 if (!(inet6 == 0 || inet6 == 2))
12462 goto bad;
12463
12464 if (aitop)
12465 freeaddrinfo(aitop);
12466 exit(0);
12467
12468 bad:
12469 if (aitop)
12470 freeaddrinfo(aitop);
12471 exit(1);
12472}
12473
Martin v. Löwis11437992002-04-12 09:54:03 +000012474_ACEOF
12475rm -f conftest$ac_exeext
12476if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12477 (eval $ac_link) 2>&5
12478 ac_status=$?
12479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12480 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12481 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12482 (eval $ac_try) 2>&5
12483 ac_status=$?
12484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12485 (exit $ac_status); }; }; then
12486 echo "$as_me:$LINENO: result: good" >&5
12487echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012488buggygetaddrinfo=no
12489else
Martin v. Löwis11437992002-04-12 09:54:03 +000012490 echo "$as_me: program exited with status $ac_status" >&5
12491echo "$as_me: failed program was:" >&5
12492cat conftest.$ac_ext >&5
12493( exit $ac_status )
12494echo "$as_me:$LINENO: result: buggy" >&5
12495echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012496buggygetaddrinfo=yes
12497fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012498rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012499fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012500else
Martin v. Löwis11437992002-04-12 09:54:03 +000012501 echo "$as_me: failed program was:" >&5
12502cat conftest.$ac_ext >&5
12503
12504echo "$as_me:$LINENO: result: no" >&5
12505echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012506buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012507
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012508fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012509rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012510
12511if test "$buggygetaddrinfo" = "yes"; then
12512 if test "$ipv6" = "yes"; then
12513 echo 'Fatal: You must get working getaddrinfo() function.'
12514 echo ' or you can specify "--disable-ipv6"'.
12515 exit 1
12516 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012517else
Martin v. Löwis11437992002-04-12 09:54:03 +000012518
12519cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012520#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012521_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012522
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012523fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012524
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012525for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012526do
Martin v. Löwis11437992002-04-12 09:54:03 +000012527as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12528echo "$as_me:$LINENO: checking for $ac_func" >&5
12529echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12530if eval "test \"\${$as_ac_var+set}\" = set"; then
12531 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012532else
Martin v. Löwis11437992002-04-12 09:54:03 +000012533 cat >conftest.$ac_ext <<_ACEOF
12534#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012535#include "confdefs.h"
12536/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012537 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012538#include <assert.h>
12539/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012540#ifdef __cplusplus
12541extern "C"
12542#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012543/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012544 builtin and then its argument prototype would still apply. */
12545char $ac_func ();
12546char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012547
Martin v. Löwis11437992002-04-12 09:54:03 +000012548#ifdef F77_DUMMY_MAIN
12549# ifdef __cplusplus
12550 extern "C"
12551# endif
12552 int F77_DUMMY_MAIN() { return 1; }
12553#endif
12554int
12555main ()
12556{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012557/* The GNU C library defines this for functions which it implements
12558 to always fail with ENOSYS. Some functions are actually named
12559 something starting with __ and the normal name is an alias. */
12560#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12561choke me
12562#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012563f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012564#endif
12565
Martin v. Löwis11437992002-04-12 09:54:03 +000012566 ;
12567 return 0;
12568}
12569_ACEOF
12570rm -f conftest.$ac_objext conftest$ac_exeext
12571if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12572 (eval $ac_link) 2>&5
12573 ac_status=$?
12574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12575 (exit $ac_status); } &&
12576 { ac_try='test -s conftest$ac_exeext'
12577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12578 (eval $ac_try) 2>&5
12579 ac_status=$?
12580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12581 (exit $ac_status); }; }; then
12582 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012583else
Martin v. Löwis11437992002-04-12 09:54:03 +000012584 echo "$as_me: failed program was:" >&5
12585cat conftest.$ac_ext >&5
12586eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012587fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012588rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012589fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012590echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12591echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12592if test `eval echo '${'$as_ac_var'}'` = yes; then
12593 cat >>confdefs.h <<_ACEOF
12594#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12595_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012596
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012597fi
12598done
12599
Michael W. Hudson54241132001-12-07 15:38:26 +000012600
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012601# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000012602echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
12603echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12604if test "${ac_cv_header_time+set}" = set; then
12605 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012606else
Martin v. Löwis11437992002-04-12 09:54:03 +000012607 cat >conftest.$ac_ext <<_ACEOF
12608#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012609#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012610#include <sys/types.h>
12611#include <sys/time.h>
12612#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012613
12614#ifdef F77_DUMMY_MAIN
12615# ifdef __cplusplus
12616 extern "C"
12617# endif
12618 int F77_DUMMY_MAIN() { return 1; }
12619#endif
12620int
12621main ()
12622{
12623if ((struct tm *) 0)
12624return 0;
12625 ;
12626 return 0;
12627}
12628_ACEOF
12629rm -f conftest.$ac_objext
12630if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12631 (eval $ac_compile) 2>&5
12632 ac_status=$?
12633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12634 (exit $ac_status); } &&
12635 { ac_try='test -s conftest.$ac_objext'
12636 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12637 (eval $ac_try) 2>&5
12638 ac_status=$?
12639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12640 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012641 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012642else
Martin v. Löwis11437992002-04-12 09:54:03 +000012643 echo "$as_me: failed program was:" >&5
12644cat conftest.$ac_ext >&5
12645ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012646fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012647rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012648fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012649echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
12650echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012651if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012652
12653cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012654#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012655_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012656
12657fi
12658
Martin v. Löwis11437992002-04-12 09:54:03 +000012659echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
12660echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
12661if test "${ac_cv_struct_tm+set}" = set; then
12662 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012663else
Martin v. Löwis11437992002-04-12 09:54:03 +000012664 cat >conftest.$ac_ext <<_ACEOF
12665#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012666#include "confdefs.h"
12667#include <sys/types.h>
12668#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012669
12670#ifdef F77_DUMMY_MAIN
12671# ifdef __cplusplus
12672 extern "C"
12673# endif
12674 int F77_DUMMY_MAIN() { return 1; }
12675#endif
12676int
12677main ()
12678{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012679struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000012680 ;
12681 return 0;
12682}
12683_ACEOF
12684rm -f conftest.$ac_objext
12685if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12686 (eval $ac_compile) 2>&5
12687 ac_status=$?
12688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12689 (exit $ac_status); } &&
12690 { ac_try='test -s conftest.$ac_objext'
12691 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12692 (eval $ac_try) 2>&5
12693 ac_status=$?
12694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12695 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012696 ac_cv_struct_tm=time.h
12697else
Martin v. Löwis11437992002-04-12 09:54:03 +000012698 echo "$as_me: failed program was:" >&5
12699cat conftest.$ac_ext >&5
12700ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012701fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012702rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012703fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012704echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
12705echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012706if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012707
12708cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012709#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012710_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012711
12712fi
12713
Martin v. Löwis11437992002-04-12 09:54:03 +000012714echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
12715echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
12716if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
12717 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012718else
Martin v. Löwis11437992002-04-12 09:54:03 +000012719 cat >conftest.$ac_ext <<_ACEOF
12720#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012721#include "confdefs.h"
12722#include <sys/types.h>
12723#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012724
12725
12726#ifdef F77_DUMMY_MAIN
12727# ifdef __cplusplus
12728 extern "C"
12729# endif
12730 int F77_DUMMY_MAIN() { return 1; }
12731#endif
12732int
12733main ()
12734{
12735static struct tm ac_aggr;
12736if (ac_aggr.tm_zone)
12737return 0;
12738 ;
12739 return 0;
12740}
12741_ACEOF
12742rm -f conftest.$ac_objext
12743if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12744 (eval $ac_compile) 2>&5
12745 ac_status=$?
12746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12747 (exit $ac_status); } &&
12748 { ac_try='test -s conftest.$ac_objext'
12749 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12750 (eval $ac_try) 2>&5
12751 ac_status=$?
12752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12753 (exit $ac_status); }; }; then
12754 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012755else
Martin v. Löwis11437992002-04-12 09:54:03 +000012756 echo "$as_me: failed program was:" >&5
12757cat conftest.$ac_ext >&5
12758ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012759fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012760rm -f conftest.$ac_objext conftest.$ac_ext
12761fi
12762echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
12763echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
12764if test $ac_cv_member_struct_tm_tm_zone = yes; then
12765
12766cat >>confdefs.h <<_ACEOF
12767#define HAVE_STRUCT_TM_TM_ZONE 1
12768_ACEOF
12769
12770
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012771fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012772
Martin v. Löwis11437992002-04-12 09:54:03 +000012773if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12774
12775cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012776#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012777_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012778
12779else
Martin v. Löwis11437992002-04-12 09:54:03 +000012780 echo "$as_me:$LINENO: checking for tzname" >&5
12781echo $ECHO_N "checking for tzname... $ECHO_C" >&6
12782if test "${ac_cv_var_tzname+set}" = set; then
12783 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012784else
Martin v. Löwis11437992002-04-12 09:54:03 +000012785 cat >conftest.$ac_ext <<_ACEOF
12786#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012787#include "confdefs.h"
12788#include <time.h>
12789#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012790extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012791#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012792
12793#ifdef F77_DUMMY_MAIN
12794# ifdef __cplusplus
12795 extern "C"
12796# endif
12797 int F77_DUMMY_MAIN() { return 1; }
12798#endif
12799int
12800main ()
12801{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012802atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000012803 ;
12804 return 0;
12805}
12806_ACEOF
12807rm -f conftest.$ac_objext conftest$ac_exeext
12808if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12809 (eval $ac_link) 2>&5
12810 ac_status=$?
12811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12812 (exit $ac_status); } &&
12813 { ac_try='test -s conftest$ac_exeext'
12814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12815 (eval $ac_try) 2>&5
12816 ac_status=$?
12817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12818 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012819 ac_cv_var_tzname=yes
12820else
Martin v. Löwis11437992002-04-12 09:54:03 +000012821 echo "$as_me: failed program was:" >&5
12822cat conftest.$ac_ext >&5
12823ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012824fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012825rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012826fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012827echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
12828echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012829 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012830
12831cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012832#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012833_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012834
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012835 fi
12836fi
12837
Jack Jansendd19cf82001-12-06 22:36:17 +000012838
Martin v. Löwis11437992002-04-12 09:54:03 +000012839echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
12840echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
12841if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
12842 echo $ECHO_N "(cached) $ECHO_C" >&6
12843else
12844 cat >conftest.$ac_ext <<_ACEOF
12845#line $LINENO "configure"
12846#include "confdefs.h"
12847$ac_includes_default
12848#ifdef F77_DUMMY_MAIN
12849# ifdef __cplusplus
12850 extern "C"
12851# endif
12852 int F77_DUMMY_MAIN() { return 1; }
12853#endif
12854int
12855main ()
12856{
12857static struct stat ac_aggr;
12858if (ac_aggr.st_rdev)
12859return 0;
12860 ;
12861 return 0;
12862}
12863_ACEOF
12864rm -f conftest.$ac_objext
12865if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12866 (eval $ac_compile) 2>&5
12867 ac_status=$?
12868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12869 (exit $ac_status); } &&
12870 { ac_try='test -s conftest.$ac_objext'
12871 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12872 (eval $ac_try) 2>&5
12873 ac_status=$?
12874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12875 (exit $ac_status); }; }; then
12876 ac_cv_member_struct_stat_st_rdev=yes
12877else
12878 echo "$as_me: failed program was:" >&5
12879cat conftest.$ac_ext >&5
12880ac_cv_member_struct_stat_st_rdev=no
12881fi
12882rm -f conftest.$ac_objext conftest.$ac_ext
12883fi
12884echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
12885echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
12886if test $ac_cv_member_struct_stat_st_rdev = yes; then
12887
12888cat >>confdefs.h <<_ACEOF
12889#define HAVE_STRUCT_STAT_ST_RDEV 1
12890_ACEOF
12891
12892
12893cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012894#define HAVE_ST_RDEV 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012895_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012896
12897fi
12898
Martin v. Löwis11437992002-04-12 09:54:03 +000012899
12900
12901echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
12902echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
12903if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
12904 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012905else
Martin v. Löwis11437992002-04-12 09:54:03 +000012906 cat >conftest.$ac_ext <<_ACEOF
12907#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012908#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012909$ac_includes_default
12910#ifdef F77_DUMMY_MAIN
12911# ifdef __cplusplus
12912 extern "C"
12913# endif
12914 int F77_DUMMY_MAIN() { return 1; }
12915#endif
12916int
12917main ()
12918{
12919static struct stat ac_aggr;
12920if (ac_aggr.st_blksize)
12921return 0;
12922 ;
12923 return 0;
12924}
12925_ACEOF
12926rm -f conftest.$ac_objext
12927if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12928 (eval $ac_compile) 2>&5
12929 ac_status=$?
12930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12931 (exit $ac_status); } &&
12932 { ac_try='test -s conftest.$ac_objext'
12933 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12934 (eval $ac_try) 2>&5
12935 ac_status=$?
12936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12937 (exit $ac_status); }; }; then
12938 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012939else
Martin v. Löwis11437992002-04-12 09:54:03 +000012940 echo "$as_me: failed program was:" >&5
12941cat conftest.$ac_ext >&5
12942ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012943fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012944rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012945fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012946echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
12947echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
12948if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000012949
Martin v. Löwis11437992002-04-12 09:54:03 +000012950cat >>confdefs.h <<_ACEOF
12951#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12952_ACEOF
12953
12954
12955cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012956#define HAVE_ST_BLKSIZE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012957_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012958
12959fi
12960
Martin v. Löwis11437992002-04-12 09:54:03 +000012961
12962echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
12963echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
12964if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
12965 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012966else
Martin v. Löwis11437992002-04-12 09:54:03 +000012967 cat >conftest.$ac_ext <<_ACEOF
12968#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012969#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012970$ac_includes_default
12971#ifdef F77_DUMMY_MAIN
12972# ifdef __cplusplus
12973 extern "C"
12974# endif
12975 int F77_DUMMY_MAIN() { return 1; }
12976#endif
12977int
12978main ()
12979{
12980static struct stat ac_aggr;
12981if (ac_aggr.st_blocks)
12982return 0;
12983 ;
12984 return 0;
12985}
12986_ACEOF
12987rm -f conftest.$ac_objext
12988if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12989 (eval $ac_compile) 2>&5
12990 ac_status=$?
12991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12992 (exit $ac_status); } &&
12993 { ac_try='test -s conftest.$ac_objext'
12994 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12995 (eval $ac_try) 2>&5
12996 ac_status=$?
12997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12998 (exit $ac_status); }; }; then
12999 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013000else
Martin v. Löwis11437992002-04-12 09:54:03 +000013001 echo "$as_me: failed program was:" >&5
13002cat conftest.$ac_ext >&5
13003ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013004fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013005rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013006fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013007echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
13008echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
13009if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000013010
Martin v. Löwis11437992002-04-12 09:54:03 +000013011cat >>confdefs.h <<_ACEOF
13012#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13013_ACEOF
13014
13015
13016cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013017#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013018_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013019
13020else
Martin v. Löwis11437992002-04-12 09:54:03 +000013021 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013022fi
13023
Michael W. Hudson54241132001-12-07 15:38:26 +000013024
Martin v. Löwis11437992002-04-12 09:54:03 +000013025
13026echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
13027echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
13028if test "${ac_cv_header_time_altzone+set}" = set; then
13029 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013030else
Martin v. Löwis11437992002-04-12 09:54:03 +000013031 cat >conftest.$ac_ext <<_ACEOF
13032#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013033#include "confdefs.h"
13034#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013035#ifdef F77_DUMMY_MAIN
13036# ifdef __cplusplus
13037 extern "C"
13038# endif
13039 int F77_DUMMY_MAIN() { return 1; }
13040#endif
13041int
13042main ()
13043{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013044return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013045 ;
13046 return 0;
13047}
13048_ACEOF
13049rm -f conftest.$ac_objext
13050if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13051 (eval $ac_compile) 2>&5
13052 ac_status=$?
13053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13054 (exit $ac_status); } &&
13055 { ac_try='test -s conftest.$ac_objext'
13056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13057 (eval $ac_try) 2>&5
13058 ac_status=$?
13059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13060 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013061 ac_cv_header_time_altzone=yes
13062else
Martin v. Löwis11437992002-04-12 09:54:03 +000013063 echo "$as_me: failed program was:" >&5
13064cat conftest.$ac_ext >&5
13065ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013066fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013067rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013068fi
13069
Martin v. Löwis11437992002-04-12 09:54:03 +000013070echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
13071echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013072if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013073
13074cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013075#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013076_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013077
13078fi
13079
Guido van Rossumda88dad1995-01-26 00:46:29 +000013080was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013081echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
13082echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
13083cat >conftest.$ac_ext <<_ACEOF
13084#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013085#include "confdefs.h"
13086
13087#include <sys/types.h>
13088#include <sys/select.h>
13089#include <sys/time.h>
13090
Martin v. Löwis11437992002-04-12 09:54:03 +000013091#ifdef F77_DUMMY_MAIN
13092# ifdef __cplusplus
13093 extern "C"
13094# endif
13095 int F77_DUMMY_MAIN() { return 1; }
13096#endif
13097int
13098main ()
13099{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013100;
Martin v. Löwis11437992002-04-12 09:54:03 +000013101 ;
13102 return 0;
13103}
13104_ACEOF
13105rm -f conftest.$ac_objext
13106if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13107 (eval $ac_compile) 2>&5
13108 ac_status=$?
13109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13110 (exit $ac_status); } &&
13111 { ac_try='test -s conftest.$ac_objext'
13112 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13113 (eval $ac_try) 2>&5
13114 ac_status=$?
13115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13116 (exit $ac_status); }; }; then
13117
13118
13119cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013120#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013121_ACEOF
13122
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013123 was_it_defined=yes
13124
Guido van Rossumf78abae1997-01-21 22:02:36 +000013125else
Martin v. Löwis11437992002-04-12 09:54:03 +000013126 echo "$as_me: failed program was:" >&5
13127cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013128fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013129rm -f conftest.$ac_objext conftest.$ac_ext
13130echo "$as_me:$LINENO: result: $was_it_defined" >&5
13131echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013132
Martin v. Löwis11437992002-04-12 09:54:03 +000013133echo "$as_me:$LINENO: checking for addrinfo" >&5
13134echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
13135if test "${ac_cv_struct_addrinfo+set}" = set; then
13136 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013137else
Martin v. Löwis11437992002-04-12 09:54:03 +000013138 cat >conftest.$ac_ext <<_ACEOF
13139#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013140#include "confdefs.h"
13141
13142# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013143#ifdef F77_DUMMY_MAIN
13144# ifdef __cplusplus
13145 extern "C"
13146# endif
13147 int F77_DUMMY_MAIN() { return 1; }
13148#endif
13149int
13150main ()
13151{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013152struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013153 ;
13154 return 0;
13155}
13156_ACEOF
13157rm -f conftest.$ac_objext
13158if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13159 (eval $ac_compile) 2>&5
13160 ac_status=$?
13161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13162 (exit $ac_status); } &&
13163 { ac_try='test -s conftest.$ac_objext'
13164 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13165 (eval $ac_try) 2>&5
13166 ac_status=$?
13167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13168 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013169 ac_cv_struct_addrinfo=yes
13170else
Martin v. Löwis11437992002-04-12 09:54:03 +000013171 echo "$as_me: failed program was:" >&5
13172cat conftest.$ac_ext >&5
13173ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013174fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013175rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013176fi
13177
Martin v. Löwis11437992002-04-12 09:54:03 +000013178echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
13179echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013180if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013181
13182cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013183#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013184_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013185
13186fi
13187
Martin v. Löwis11437992002-04-12 09:54:03 +000013188echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
13189echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
13190if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
13191 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013192else
Martin v. Löwis11437992002-04-12 09:54:03 +000013193 cat >conftest.$ac_ext <<_ACEOF
13194#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013195#include "confdefs.h"
13196
13197# include <sys/types.h>
13198# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013199#ifdef F77_DUMMY_MAIN
13200# ifdef __cplusplus
13201 extern "C"
13202# endif
13203 int F77_DUMMY_MAIN() { return 1; }
13204#endif
13205int
13206main ()
13207{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013208struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013209 ;
13210 return 0;
13211}
13212_ACEOF
13213rm -f conftest.$ac_objext
13214if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13215 (eval $ac_compile) 2>&5
13216 ac_status=$?
13217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13218 (exit $ac_status); } &&
13219 { ac_try='test -s conftest.$ac_objext'
13220 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13221 (eval $ac_try) 2>&5
13222 ac_status=$?
13223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13224 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013225 ac_cv_struct_sockaddr_storage=yes
13226else
Martin v. Löwis11437992002-04-12 09:54:03 +000013227 echo "$as_me: failed program was:" >&5
13228cat conftest.$ac_ext >&5
13229ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013230fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013231rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013232fi
13233
Martin v. Löwis11437992002-04-12 09:54:03 +000013234echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
13235echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013236if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013237
13238cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013239#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013240_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013241
13242fi
13243
Guido van Rossum627b2d71993-12-24 10:39:16 +000013244# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013245
Michael W. Hudson54241132001-12-07 15:38:26 +000013246
Martin v. Löwis11437992002-04-12 09:54:03 +000013247echo "$as_me:$LINENO: checking whether char is unsigned" >&5
13248echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
13249if test "${ac_cv_c_char_unsigned+set}" = set; then
13250 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013251else
Martin v. Löwis11437992002-04-12 09:54:03 +000013252 cat >conftest.$ac_ext <<_ACEOF
13253#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000013254#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013255$ac_includes_default
13256#ifdef F77_DUMMY_MAIN
13257# ifdef __cplusplus
13258 extern "C"
13259# endif
13260 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013261#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013262int
13263main ()
13264{
13265static int test_array [1 - 2 * !(((char) -1) < 0)];
13266test_array [0] = 0
13267
13268 ;
13269 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013270}
Martin v. Löwis11437992002-04-12 09:54:03 +000013271_ACEOF
13272rm -f conftest.$ac_objext
13273if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13274 (eval $ac_compile) 2>&5
13275 ac_status=$?
13276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13277 (exit $ac_status); } &&
13278 { ac_try='test -s conftest.$ac_objext'
13279 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13280 (eval $ac_try) 2>&5
13281 ac_status=$?
13282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13283 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000013284 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013285else
13286 echo "$as_me: failed program was:" >&5
13287cat conftest.$ac_ext >&5
13288ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013289fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013290rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013291fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013292echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
13293echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013294if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013295 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013296#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013297_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013298
13299fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013300
Martin v. Löwis11437992002-04-12 09:54:03 +000013301echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
13302echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13303if test "${ac_cv_prog_cc_stdc+set}" = set; then
13304 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013305else
Martin v. Löwis11437992002-04-12 09:54:03 +000013306 ac_cv_prog_cc_stdc=no
13307ac_save_CC=$CC
13308cat >conftest.$ac_ext <<_ACEOF
13309#line $LINENO "configure"
13310#include "confdefs.h"
13311#include <stdarg.h>
13312#include <stdio.h>
13313#include <sys/types.h>
13314#include <sys/stat.h>
13315/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
13316struct buf { int x; };
13317FILE * (*rcsopen) (struct buf *, struct stat *, int);
13318static char *e (p, i)
13319 char **p;
13320 int i;
13321{
13322 return p[i];
13323}
13324static char *f (char * (*g) (char **, int), char **p, ...)
13325{
13326 char *s;
13327 va_list v;
13328 va_start (v,p);
13329 s = g (p, va_arg (v,int));
13330 va_end (v);
13331 return s;
13332}
13333int test (int i, double x);
13334struct s1 {int (*f) (int a);};
13335struct s2 {int (*f) (double a);};
13336int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13337int argc;
13338char **argv;
13339#ifdef F77_DUMMY_MAIN
13340# ifdef __cplusplus
13341 extern "C"
13342# endif
13343 int F77_DUMMY_MAIN() { return 1; }
13344#endif
13345int
13346main ()
13347{
13348return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
13349 ;
13350 return 0;
13351}
13352_ACEOF
13353# Don't try gcc -ansi; that turns off useful extensions and
13354# breaks some systems' header files.
13355# AIX -qlanglvl=ansi
13356# Ultrix and OSF/1 -std1
13357# HP-UX 10.20 and later -Ae
13358# HP-UX older versions -Aa -D_HPUX_SOURCE
13359# SVR4 -Xc -D__EXTENSIONS__
13360for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13361do
13362 CC="$ac_save_CC $ac_arg"
13363 rm -f conftest.$ac_objext
13364if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13365 (eval $ac_compile) 2>&5
13366 ac_status=$?
13367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13368 (exit $ac_status); } &&
13369 { ac_try='test -s conftest.$ac_objext'
13370 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13371 (eval $ac_try) 2>&5
13372 ac_status=$?
13373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13374 (exit $ac_status); }; }; then
13375 ac_cv_prog_cc_stdc=$ac_arg
13376break
13377else
13378 echo "$as_me: failed program was:" >&5
13379cat conftest.$ac_ext >&5
13380fi
13381rm -f conftest.$ac_objext
13382done
13383rm -f conftest.$ac_ext conftest.$ac_objext
13384CC=$ac_save_CC
13385
13386fi
13387
13388case "x$ac_cv_prog_cc_stdc" in
13389 x|xno)
13390 echo "$as_me:$LINENO: result: none needed" >&5
13391echo "${ECHO_T}none needed" >&6 ;;
13392 *)
13393 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
13394echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13395 CC="$CC $ac_cv_prog_cc_stdc" ;;
13396esac
13397
13398echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
13399echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13400if test "${ac_cv_c_const+set}" = set; then
13401 echo $ECHO_N "(cached) $ECHO_C" >&6
13402else
13403 cat >conftest.$ac_ext <<_ACEOF
13404#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013405#include "confdefs.h"
13406
Martin v. Löwis11437992002-04-12 09:54:03 +000013407#ifdef F77_DUMMY_MAIN
13408# ifdef __cplusplus
13409 extern "C"
13410# endif
13411 int F77_DUMMY_MAIN() { return 1; }
13412#endif
13413int
13414main ()
13415{
13416/* FIXME: Include the comments suggested by Paul. */
13417#ifndef __cplusplus
13418 /* Ultrix mips cc rejects this. */
13419 typedef int charset[2];
13420 const charset x;
13421 /* SunOS 4.1.1 cc rejects this. */
13422 char const *const *ccp;
13423 char **p;
13424 /* NEC SVR4.0.2 mips cc rejects this. */
13425 struct point {int x, y;};
13426 static struct point const zero = {0,0};
13427 /* AIX XL C 1.02.0.0 rejects this.
13428 It does not let you subtract one const X* pointer from another in
13429 an arm of an if-expression whose if-part is not a constant
13430 expression */
13431 const char *g = "string";
13432 ccp = &g + (g ? g-g : 0);
13433 /* HPUX 7.0 cc rejects these. */
13434 ++ccp;
13435 p = (char**) ccp;
13436 ccp = (char const *const *) p;
13437 { /* SCO 3.2v4 cc rejects this. */
13438 char *t;
13439 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013440
Martin v. Löwis11437992002-04-12 09:54:03 +000013441 *t++ = 0;
13442 }
13443 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13444 int x[] = {25, 17};
13445 const int *foo = &x[0];
13446 ++foo;
13447 }
13448 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13449 typedef const int *iptr;
13450 iptr p = 0;
13451 ++p;
13452 }
13453 { /* AIX XL C 1.02.0.0 rejects this saying
13454 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13455 struct s { int j; const int *ap[3]; };
13456 struct s *b; b->j = 5;
13457 }
13458 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13459 const int foo = 10;
13460 }
13461#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013462
Martin v. Löwis11437992002-04-12 09:54:03 +000013463 ;
13464 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013465}
Martin v. Löwis11437992002-04-12 09:54:03 +000013466_ACEOF
13467rm -f conftest.$ac_objext
13468if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13469 (eval $ac_compile) 2>&5
13470 ac_status=$?
13471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13472 (exit $ac_status); } &&
13473 { ac_try='test -s conftest.$ac_objext'
13474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13475 (eval $ac_try) 2>&5
13476 ac_status=$?
13477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13478 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013479 ac_cv_c_const=yes
13480else
Martin v. Löwis11437992002-04-12 09:54:03 +000013481 echo "$as_me: failed program was:" >&5
13482cat conftest.$ac_ext >&5
13483ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013484fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013485rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013486fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013487echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
13488echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013489if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013490
13491cat >>confdefs.h <<\_ACEOF
13492#define const
13493_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013494
13495fi
13496
Michael W. Hudson54241132001-12-07 15:38:26 +000013497
Guido van Rossumda88dad1995-01-26 00:46:29 +000013498works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013499echo "$as_me:$LINENO: checking for working volatile" >&5
13500echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
13501cat >conftest.$ac_ext <<_ACEOF
13502#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013503#include "confdefs.h"
13504
Martin v. Löwis11437992002-04-12 09:54:03 +000013505#ifdef F77_DUMMY_MAIN
13506# ifdef __cplusplus
13507 extern "C"
13508# endif
13509 int F77_DUMMY_MAIN() { return 1; }
13510#endif
13511int
13512main ()
13513{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013514volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013515 ;
13516 return 0;
13517}
13518_ACEOF
13519rm -f conftest.$ac_objext
13520if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13521 (eval $ac_compile) 2>&5
13522 ac_status=$?
13523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13524 (exit $ac_status); } &&
13525 { ac_try='test -s conftest.$ac_objext'
13526 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13527 (eval $ac_try) 2>&5
13528 ac_status=$?
13529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13530 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013531 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013532else
Martin v. Löwis11437992002-04-12 09:54:03 +000013533 echo "$as_me: failed program was:" >&5
13534cat conftest.$ac_ext >&5
13535
13536cat >>confdefs.h <<\_ACEOF
13537#define volatile
13538_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013539
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013540
Guido van Rossum627b2d71993-12-24 10:39:16 +000013541fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013542rm -f conftest.$ac_objext conftest.$ac_ext
13543echo "$as_me:$LINENO: result: $works" >&5
13544echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013545
Guido van Rossumda88dad1995-01-26 00:46:29 +000013546works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013547echo "$as_me:$LINENO: checking for working signed char" >&5
13548echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
13549cat >conftest.$ac_ext <<_ACEOF
13550#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013551#include "confdefs.h"
13552
Martin v. Löwis11437992002-04-12 09:54:03 +000013553#ifdef F77_DUMMY_MAIN
13554# ifdef __cplusplus
13555 extern "C"
13556# endif
13557 int F77_DUMMY_MAIN() { return 1; }
13558#endif
13559int
13560main ()
13561{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013562signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013563 ;
13564 return 0;
13565}
13566_ACEOF
13567rm -f conftest.$ac_objext
13568if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13569 (eval $ac_compile) 2>&5
13570 ac_status=$?
13571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13572 (exit $ac_status); } &&
13573 { ac_try='test -s conftest.$ac_objext'
13574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13575 (eval $ac_try) 2>&5
13576 ac_status=$?
13577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13578 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013579 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013580else
Martin v. Löwis11437992002-04-12 09:54:03 +000013581 echo "$as_me: failed program was:" >&5
13582cat conftest.$ac_ext >&5
13583
13584cat >>confdefs.h <<\_ACEOF
13585#define signed
13586_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000013587
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013588
Guido van Rossum7f43da71994-08-01 12:15:30 +000013589fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013590rm -f conftest.$ac_objext conftest.$ac_ext
13591echo "$as_me:$LINENO: result: $works" >&5
13592echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013593
Guido van Rossumda88dad1995-01-26 00:46:29 +000013594have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013595echo "$as_me:$LINENO: checking for prototypes" >&5
13596echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
13597cat >conftest.$ac_ext <<_ACEOF
13598#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013599#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013600int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013601#ifdef F77_DUMMY_MAIN
13602# ifdef __cplusplus
13603 extern "C"
13604# endif
13605 int F77_DUMMY_MAIN() { return 1; }
13606#endif
13607int
13608main ()
13609{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013610return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013611 ;
13612 return 0;
13613}
13614_ACEOF
13615rm -f conftest.$ac_objext
13616if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13617 (eval $ac_compile) 2>&5
13618 ac_status=$?
13619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13620 (exit $ac_status); } &&
13621 { ac_try='test -s conftest.$ac_objext'
13622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13623 (eval $ac_try) 2>&5
13624 ac_status=$?
13625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13626 (exit $ac_status); }; }; then
13627
13628
13629cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013630#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013631_ACEOF
13632
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013633 have_prototypes=yes
13634
Guido van Rossumf78abae1997-01-21 22:02:36 +000013635else
Martin v. Löwis11437992002-04-12 09:54:03 +000013636 echo "$as_me: failed program was:" >&5
13637cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013638fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013639rm -f conftest.$ac_objext conftest.$ac_ext
13640echo "$as_me:$LINENO: result: $have_prototypes" >&5
13641echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013642
Guido van Rossumda88dad1995-01-26 00:46:29 +000013643works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013644echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
13645echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
13646cat >conftest.$ac_ext <<_ACEOF
13647#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013648#include "confdefs.h"
13649
13650#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013651int foo(int x, ...) {
13652 va_list va;
13653 va_start(va, x);
13654 va_arg(va, int);
13655 va_arg(va, char *);
13656 va_arg(va, double);
13657 return 0;
13658}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013659
Martin v. Löwis11437992002-04-12 09:54:03 +000013660#ifdef F77_DUMMY_MAIN
13661# ifdef __cplusplus
13662 extern "C"
13663# endif
13664 int F77_DUMMY_MAIN() { return 1; }
13665#endif
13666int
13667main ()
13668{
Guido van Rossum90eea071996-08-30 20:58:57 +000013669return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013670 ;
13671 return 0;
13672}
13673_ACEOF
13674rm -f conftest.$ac_objext
13675if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13676 (eval $ac_compile) 2>&5
13677 ac_status=$?
13678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13679 (exit $ac_status); } &&
13680 { ac_try='test -s conftest.$ac_objext'
13681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13682 (eval $ac_try) 2>&5
13683 ac_status=$?
13684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13685 (exit $ac_status); }; }; then
13686
13687
13688cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013689#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013690_ACEOF
13691
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013692 works=yes
13693
Guido van Rossumf78abae1997-01-21 22:02:36 +000013694else
Martin v. Löwis11437992002-04-12 09:54:03 +000013695 echo "$as_me: failed program was:" >&5
13696cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000013697fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013698rm -f conftest.$ac_objext conftest.$ac_ext
13699echo "$as_me:$LINENO: result: $works" >&5
13700echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013701
Guido van Rossumda88dad1995-01-26 00:46:29 +000013702if test "$have_prototypes" = yes; then
13703bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013704echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
13705echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
13706cat >conftest.$ac_ext <<_ACEOF
13707#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013708#include "confdefs.h"
13709#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013710#ifdef F77_DUMMY_MAIN
13711# ifdef __cplusplus
13712 extern "C"
13713# endif
13714 int F77_DUMMY_MAIN() { return 1; }
13715#endif
13716int
13717main ()
13718{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013719char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000013720 ;
13721 return 0;
13722}
13723_ACEOF
13724rm -f conftest.$ac_objext
13725if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13726 (eval $ac_compile) 2>&5
13727 ac_status=$?
13728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13729 (exit $ac_status); } &&
13730 { ac_try='test -s conftest.$ac_objext'
13731 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13732 (eval $ac_try) 2>&5
13733 ac_status=$?
13734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13735 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000013736 :
13737else
Martin v. Löwis11437992002-04-12 09:54:03 +000013738 echo "$as_me: failed program was:" >&5
13739cat conftest.$ac_ext >&5
13740
13741cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013742#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013743_ACEOF
13744
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013745 bad_prototypes=yes
13746
Guido van Rossum627b2d71993-12-24 10:39:16 +000013747fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013748rm -f conftest.$ac_objext conftest.$ac_ext
13749echo "$as_me:$LINENO: result: $bad_prototypes" >&5
13750echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013751fi
13752
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013753# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000013754echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
13755echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
13756cat >conftest.$ac_ext <<_ACEOF
13757#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013758#include "confdefs.h"
13759#include <sys/types.h>
13760#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013761#ifdef F77_DUMMY_MAIN
13762# ifdef __cplusplus
13763 extern "C"
13764# endif
13765 int F77_DUMMY_MAIN() { return 1; }
13766#endif
13767int
13768main ()
13769{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013770struct sockaddr x;
13771x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013772 ;
13773 return 0;
13774}
13775_ACEOF
13776rm -f conftest.$ac_objext
13777if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13778 (eval $ac_compile) 2>&5
13779 ac_status=$?
13780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13781 (exit $ac_status); } &&
13782 { ac_try='test -s conftest.$ac_objext'
13783 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13784 (eval $ac_try) 2>&5
13785 ac_status=$?
13786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13787 (exit $ac_status); }; }; then
13788 echo "$as_me:$LINENO: result: yes" >&5
13789echo "${ECHO_T}yes" >&6
13790
13791cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013792#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013793_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013794
13795else
Martin v. Löwis11437992002-04-12 09:54:03 +000013796 echo "$as_me: failed program was:" >&5
13797cat conftest.$ac_ext >&5
13798echo "$as_me:$LINENO: result: no" >&5
13799echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013800fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013801rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013802
Martin v. Löwis11437992002-04-12 09:54:03 +000013803echo "$as_me:$LINENO: checking for bad static forward" >&5
13804echo $ECHO_N "checking for bad static forward... $ECHO_C" >&6
13805if test "${ac_cv_bad_static_forward+set}" = set; then
13806 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013807else
13808 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013809 ac_cv_bad_static_forward=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013810else
Martin v. Löwis11437992002-04-12 09:54:03 +000013811 cat >conftest.$ac_ext <<_ACEOF
13812#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013813#include "confdefs.h"
13814
13815struct s { int a; int b; };
13816static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013817int foobar() {
13818 static int random;
13819 random = (int) &foo;
13820 return random;
13821}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013822static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013823main() {
13824 exit(!((int)&foo == foobar()));
13825}
Martin v. Löwis11437992002-04-12 09:54:03 +000013826_ACEOF
13827rm -f conftest$ac_exeext
13828if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13829 (eval $ac_link) 2>&5
13830 ac_status=$?
13831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13832 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13834 (eval $ac_try) 2>&5
13835 ac_status=$?
13836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13837 (exit $ac_status); }; }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013838 ac_cv_bad_static_forward=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013839else
Martin v. Löwis11437992002-04-12 09:54:03 +000013840 echo "$as_me: program exited with status $ac_status" >&5
13841echo "$as_me: failed program was:" >&5
13842cat conftest.$ac_ext >&5
13843( exit $ac_status )
13844ac_cv_bad_static_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013845fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013846rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13847fi
Guido van Rossumf78abae1997-01-21 22:02:36 +000013848fi
13849
Martin v. Löwis11437992002-04-12 09:54:03 +000013850echo "$as_me:$LINENO: result: $ac_cv_bad_static_forward" >&5
13851echo "${ECHO_T}$ac_cv_bad_static_forward" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013852if test "$ac_cv_bad_static_forward" = yes
13853then
Martin v. Löwis11437992002-04-12 09:54:03 +000013854
13855cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013856#define BAD_STATIC_FORWARD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013857_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013858
13859fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013860
Guido van Rossumda88dad1995-01-26 00:46:29 +000013861va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013862echo "$as_me:$LINENO: checking whether va_list is an array" >&5
13863echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
13864cat >conftest.$ac_ext <<_ACEOF
13865#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013866#include "confdefs.h"
13867
13868#ifdef HAVE_STDARG_PROTOTYPES
13869#include <stdarg.h>
13870#else
13871#include <varargs.h>
13872#endif
13873
Martin v. Löwis11437992002-04-12 09:54:03 +000013874#ifdef F77_DUMMY_MAIN
13875# ifdef __cplusplus
13876 extern "C"
13877# endif
13878 int F77_DUMMY_MAIN() { return 1; }
13879#endif
13880int
13881main ()
13882{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013883va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013884 ;
13885 return 0;
13886}
13887_ACEOF
13888rm -f conftest.$ac_objext
13889if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13890 (eval $ac_compile) 2>&5
13891 ac_status=$?
13892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13893 (exit $ac_status); } &&
13894 { ac_try='test -s conftest.$ac_objext'
13895 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13896 (eval $ac_try) 2>&5
13897 ac_status=$?
13898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13899 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013900 :
13901else
Martin v. Löwis11437992002-04-12 09:54:03 +000013902 echo "$as_me: failed program was:" >&5
13903cat conftest.$ac_ext >&5
13904
13905
13906cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013907#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013908_ACEOF
13909
Guido van Rossumda88dad1995-01-26 00:46:29 +000013910 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013911
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013912fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013913rm -f conftest.$ac_objext conftest.$ac_ext
13914echo "$as_me:$LINENO: result: $va_list_is_array" >&5
13915echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013916
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013917# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013918
13919
13920
13921echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
13922echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
13923if test "${ac_cv_func_gethostbyname_r+set}" = set; then
13924 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013925else
Martin v. Löwis11437992002-04-12 09:54:03 +000013926 cat >conftest.$ac_ext <<_ACEOF
13927#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013928#include "confdefs.h"
13929/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013930 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013931#include <assert.h>
13932/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013933#ifdef __cplusplus
13934extern "C"
13935#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013936/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013937 builtin and then its argument prototype would still apply. */
13938char gethostbyname_r ();
13939char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013940
Martin v. Löwis11437992002-04-12 09:54:03 +000013941#ifdef F77_DUMMY_MAIN
13942# ifdef __cplusplus
13943 extern "C"
13944# endif
13945 int F77_DUMMY_MAIN() { return 1; }
13946#endif
13947int
13948main ()
13949{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013950/* The GNU C library defines this for functions which it implements
13951 to always fail with ENOSYS. Some functions are actually named
13952 something starting with __ and the normal name is an alias. */
13953#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
13954choke me
13955#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013956f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013957#endif
13958
Martin v. Löwis11437992002-04-12 09:54:03 +000013959 ;
13960 return 0;
13961}
13962_ACEOF
13963rm -f conftest.$ac_objext conftest$ac_exeext
13964if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13965 (eval $ac_link) 2>&5
13966 ac_status=$?
13967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13968 (exit $ac_status); } &&
13969 { ac_try='test -s conftest$ac_exeext'
13970 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13971 (eval $ac_try) 2>&5
13972 ac_status=$?
13973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13974 (exit $ac_status); }; }; then
13975 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013976else
Martin v. Löwis11437992002-04-12 09:54:03 +000013977 echo "$as_me: failed program was:" >&5
13978cat conftest.$ac_ext >&5
13979ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013980fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013981rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013982fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013983echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
13984echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
13985if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013986
Martin v. Löwis11437992002-04-12 09:54:03 +000013987 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013988#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013989_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013990
Martin v. Löwis11437992002-04-12 09:54:03 +000013991 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
13992echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013993 OLD_CFLAGS=$CFLAGS
13994 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013995 cat >conftest.$ac_ext <<_ACEOF
13996#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013997#include "confdefs.h"
13998
13999# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014000
14001#ifdef F77_DUMMY_MAIN
14002# ifdef __cplusplus
14003 extern "C"
14004# endif
14005 int F77_DUMMY_MAIN() { return 1; }
14006#endif
14007int
14008main ()
14009{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014010
14011 char *name;
14012 struct hostent *he, *res;
14013 char buffer[2048];
14014 int buflen = 2048;
14015 int h_errnop;
14016
14017 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014018
14019 ;
14020 return 0;
14021}
14022_ACEOF
14023rm -f conftest.$ac_objext
14024if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14025 (eval $ac_compile) 2>&5
14026 ac_status=$?
14027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14028 (exit $ac_status); } &&
14029 { ac_try='test -s conftest.$ac_objext'
14030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14031 (eval $ac_try) 2>&5
14032 ac_status=$?
14033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14034 (exit $ac_status); }; }; then
14035
14036 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014037#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014038_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014039
Martin v. Löwis11437992002-04-12 09:54:03 +000014040
14041cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014042#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014043_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014044
Martin v. Löwis11437992002-04-12 09:54:03 +000014045 echo "$as_me:$LINENO: result: yes" >&5
14046echo "${ECHO_T}yes" >&6
14047
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014048else
Martin v. Löwis11437992002-04-12 09:54:03 +000014049 echo "$as_me: failed program was:" >&5
14050cat conftest.$ac_ext >&5
14051
14052 echo "$as_me:$LINENO: result: no" >&5
14053echo "${ECHO_T}no" >&6
14054 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
14055echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
14056 cat >conftest.$ac_ext <<_ACEOF
14057#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014058#include "confdefs.h"
14059
14060# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014061
14062#ifdef F77_DUMMY_MAIN
14063# ifdef __cplusplus
14064 extern "C"
14065# endif
14066 int F77_DUMMY_MAIN() { return 1; }
14067#endif
14068int
14069main ()
14070{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014071
14072 char *name;
14073 struct hostent *he;
14074 char buffer[2048];
14075 int buflen = 2048;
14076 int h_errnop;
14077
14078 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014079
14080 ;
14081 return 0;
14082}
14083_ACEOF
14084rm -f conftest.$ac_objext
14085if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14086 (eval $ac_compile) 2>&5
14087 ac_status=$?
14088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14089 (exit $ac_status); } &&
14090 { ac_try='test -s conftest.$ac_objext'
14091 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14092 (eval $ac_try) 2>&5
14093 ac_status=$?
14094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14095 (exit $ac_status); }; }; then
14096
14097 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014098#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014099_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014100
Martin v. Löwis11437992002-04-12 09:54:03 +000014101
14102cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014103#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014104_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014105
Martin v. Löwis11437992002-04-12 09:54:03 +000014106 echo "$as_me:$LINENO: result: yes" >&5
14107echo "${ECHO_T}yes" >&6
14108
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014109else
Martin v. Löwis11437992002-04-12 09:54:03 +000014110 echo "$as_me: failed program was:" >&5
14111cat conftest.$ac_ext >&5
14112
14113 echo "$as_me:$LINENO: result: no" >&5
14114echo "${ECHO_T}no" >&6
14115 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
14116echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
14117 cat >conftest.$ac_ext <<_ACEOF
14118#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014119#include "confdefs.h"
14120
14121# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014122
14123#ifdef F77_DUMMY_MAIN
14124# ifdef __cplusplus
14125 extern "C"
14126# endif
14127 int F77_DUMMY_MAIN() { return 1; }
14128#endif
14129int
14130main ()
14131{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014132
14133 char *name;
14134 struct hostent *he;
14135 struct hostent_data data;
14136
14137 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000014138
14139 ;
14140 return 0;
14141}
14142_ACEOF
14143rm -f conftest.$ac_objext
14144if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14145 (eval $ac_compile) 2>&5
14146 ac_status=$?
14147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14148 (exit $ac_status); } &&
14149 { ac_try='test -s conftest.$ac_objext'
14150 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14151 (eval $ac_try) 2>&5
14152 ac_status=$?
14153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14154 (exit $ac_status); }; }; then
14155
14156 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014157#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014158_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014159
Martin v. Löwis11437992002-04-12 09:54:03 +000014160
14161cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014162#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014163_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014164
Martin v. Löwis11437992002-04-12 09:54:03 +000014165 echo "$as_me:$LINENO: result: yes" >&5
14166echo "${ECHO_T}yes" >&6
14167
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014168else
Martin v. Löwis11437992002-04-12 09:54:03 +000014169 echo "$as_me: failed program was:" >&5
14170cat conftest.$ac_ext >&5
14171
14172 echo "$as_me:$LINENO: result: no" >&5
14173echo "${ECHO_T}no" >&6
14174
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014175fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014176rm -f conftest.$ac_objext conftest.$ac_ext
14177
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014178fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014179rm -f conftest.$ac_objext conftest.$ac_ext
14180
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014181fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014182rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014183 CFLAGS=$OLD_CFLAGS
14184
14185else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014186
Martin v. Löwis11437992002-04-12 09:54:03 +000014187
14188for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000014189do
Martin v. Löwis11437992002-04-12 09:54:03 +000014190as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14191echo "$as_me:$LINENO: checking for $ac_func" >&5
14192echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14193if eval "test \"\${$as_ac_var+set}\" = set"; then
14194 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014195else
Martin v. Löwis11437992002-04-12 09:54:03 +000014196 cat >conftest.$ac_ext <<_ACEOF
14197#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014198#include "confdefs.h"
14199/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014200 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014201#include <assert.h>
14202/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014203#ifdef __cplusplus
14204extern "C"
14205#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014206/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014207 builtin and then its argument prototype would still apply. */
14208char $ac_func ();
14209char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014210
Martin v. Löwis11437992002-04-12 09:54:03 +000014211#ifdef F77_DUMMY_MAIN
14212# ifdef __cplusplus
14213 extern "C"
14214# endif
14215 int F77_DUMMY_MAIN() { return 1; }
14216#endif
14217int
14218main ()
14219{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014220/* The GNU C library defines this for functions which it implements
14221 to always fail with ENOSYS. Some functions are actually named
14222 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014223#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014224choke me
14225#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014226f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014227#endif
14228
Martin v. Löwis11437992002-04-12 09:54:03 +000014229 ;
14230 return 0;
14231}
14232_ACEOF
14233rm -f conftest.$ac_objext conftest$ac_exeext
14234if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14235 (eval $ac_link) 2>&5
14236 ac_status=$?
14237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14238 (exit $ac_status); } &&
14239 { ac_try='test -s conftest$ac_exeext'
14240 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14241 (eval $ac_try) 2>&5
14242 ac_status=$?
14243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14244 (exit $ac_status); }; }; then
14245 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014246else
Martin v. Löwis11437992002-04-12 09:54:03 +000014247 echo "$as_me: failed program was:" >&5
14248cat conftest.$ac_ext >&5
14249eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014250fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014251rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014252fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014253echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14254echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14255if test `eval echo '${'$as_ac_var'}'` = yes; then
14256 cat >>confdefs.h <<_ACEOF
14257#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14258_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014259
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014260fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014261done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014262
Michael W. Hudson54241132001-12-07 15:38:26 +000014263
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014264fi
14265
Michael W. Hudson54241132001-12-07 15:38:26 +000014266
14267
14268
14269
14270
14271
Guido van Rossum627b2d71993-12-24 10:39:16 +000014272# checks for system services
14273# (none yet)
14274
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014275# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000014276echo "$as_me:$LINENO: checking for __fpu_control" >&5
14277echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
14278if test "${ac_cv_func___fpu_control+set}" = set; then
14279 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014280else
Martin v. Löwis11437992002-04-12 09:54:03 +000014281 cat >conftest.$ac_ext <<_ACEOF
14282#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014283#include "confdefs.h"
14284/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014285 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014286#include <assert.h>
14287/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014288#ifdef __cplusplus
14289extern "C"
14290#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014291/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014292 builtin and then its argument prototype would still apply. */
14293char __fpu_control ();
14294char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014295
Martin v. Löwis11437992002-04-12 09:54:03 +000014296#ifdef F77_DUMMY_MAIN
14297# ifdef __cplusplus
14298 extern "C"
14299# endif
14300 int F77_DUMMY_MAIN() { return 1; }
14301#endif
14302int
14303main ()
14304{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014305/* The GNU C library defines this for functions which it implements
14306 to always fail with ENOSYS. Some functions are actually named
14307 something starting with __ and the normal name is an alias. */
14308#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
14309choke me
14310#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014311f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014312#endif
14313
Martin v. Löwis11437992002-04-12 09:54:03 +000014314 ;
14315 return 0;
14316}
14317_ACEOF
14318rm -f conftest.$ac_objext conftest$ac_exeext
14319if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14320 (eval $ac_link) 2>&5
14321 ac_status=$?
14322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14323 (exit $ac_status); } &&
14324 { ac_try='test -s conftest$ac_exeext'
14325 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14326 (eval $ac_try) 2>&5
14327 ac_status=$?
14328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14329 (exit $ac_status); }; }; then
14330 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014331else
Martin v. Löwis11437992002-04-12 09:54:03 +000014332 echo "$as_me: failed program was:" >&5
14333cat conftest.$ac_ext >&5
14334ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014335fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014336rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014337fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014338echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
14339echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
14340if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014341 :
14342else
Martin v. Löwis11437992002-04-12 09:54:03 +000014343
14344echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
14345echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
14346if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
14347 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014348else
Martin v. Löwis11437992002-04-12 09:54:03 +000014349 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014350LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014351cat >conftest.$ac_ext <<_ACEOF
14352#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014353#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014354
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014355/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014356#ifdef __cplusplus
14357extern "C"
14358#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014359/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014360 builtin and then its argument prototype would still apply. */
14361char __fpu_control ();
14362#ifdef F77_DUMMY_MAIN
14363# ifdef __cplusplus
14364 extern "C"
14365# endif
14366 int F77_DUMMY_MAIN() { return 1; }
14367#endif
14368int
14369main ()
14370{
14371__fpu_control ();
14372 ;
14373 return 0;
14374}
14375_ACEOF
14376rm -f conftest.$ac_objext conftest$ac_exeext
14377if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14378 (eval $ac_link) 2>&5
14379 ac_status=$?
14380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14381 (exit $ac_status); } &&
14382 { ac_try='test -s conftest$ac_exeext'
14383 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14384 (eval $ac_try) 2>&5
14385 ac_status=$?
14386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14387 (exit $ac_status); }; }; then
14388 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014389else
Martin v. Löwis11437992002-04-12 09:54:03 +000014390 echo "$as_me: failed program was:" >&5
14391cat conftest.$ac_ext >&5
14392ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014393fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014394rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14395LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014396fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014397echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
14398echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
14399if test $ac_cv_lib_ieee___fpu_control = yes; then
14400 cat >>confdefs.h <<_ACEOF
14401#define HAVE_LIBIEEE 1
14402_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014403
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014404 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014405
Guido van Rossum627b2d71993-12-24 10:39:16 +000014406fi
14407
Michael W. Hudson54241132001-12-07 15:38:26 +000014408
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014409fi
14410
Michael W. Hudson54241132001-12-07 15:38:26 +000014411
Guido van Rossum7f253911997-05-09 02:42:48 +000014412# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000014413echo "$as_me:$LINENO: checking for --with-fpectl" >&5
14414echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
14415
Guido van Rossum7f253911997-05-09 02:42:48 +000014416# Check whether --with-fpectl or --without-fpectl was given.
14417if test "${with_fpectl+set}" = set; then
14418 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000014419
Guido van Rossum7f253911997-05-09 02:42:48 +000014420if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000014421then
14422
14423cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000014424#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014425_ACEOF
14426
14427 echo "$as_me:$LINENO: result: yes" >&5
14428echo "${ECHO_T}yes" >&6
14429else echo "$as_me:$LINENO: result: no" >&5
14430echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014431fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014432else
Martin v. Löwis11437992002-04-12 09:54:03 +000014433 echo "$as_me:$LINENO: result: no" >&5
14434echo "${ECHO_T}no" >&6
14435fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000014436
Guido van Rossum7f43da71994-08-01 12:15:30 +000014437# check for --with-libm=...
14438
Guido van Rossum563e7081996-09-10 18:20:48 +000014439case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014440Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014441BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014442*) LIBM=-lm
14443esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014444echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
14445echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
14446
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014447# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014448if test "${with_libm+set}" = set; then
14449 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000014450
Guido van Rossum7f253911997-05-09 02:42:48 +000014451if test "$withval" = no
14452then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000014453 echo "$as_me:$LINENO: result: force LIBM empty" >&5
14454echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014455elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014456then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014457 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
14458echo "${ECHO_T}set LIBM=\"$withval\"" >&6
14459else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
14460echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
14461 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014462fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014463else
Martin v. Löwis11437992002-04-12 09:54:03 +000014464 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
14465echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
14466fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014467
14468# check for --with-libc=...
14469
Martin v. Löwis11437992002-04-12 09:54:03 +000014470echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
14471echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
14472
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014473# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014474if test "${with_libc+set}" = set; then
14475 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000014476
Guido van Rossum7f253911997-05-09 02:42:48 +000014477if test "$withval" = no
14478then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000014479 echo "$as_me:$LINENO: result: force LIBC empty" >&5
14480echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014481elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014482then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014483 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
14484echo "${ECHO_T}set LIBC=\"$withval\"" >&6
14485else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
14486echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
14487 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014488fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014489else
Martin v. Löwis11437992002-04-12 09:54:03 +000014490 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
14491echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
14492fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014493
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014494# check for hypot() in math library
14495LIBS_SAVE=$LIBS
14496LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000014497
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014498for ac_func in hypot
14499do
Martin v. Löwis11437992002-04-12 09:54:03 +000014500as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14501echo "$as_me:$LINENO: checking for $ac_func" >&5
14502echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14503if eval "test \"\${$as_ac_var+set}\" = set"; then
14504 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014505else
Martin v. Löwis11437992002-04-12 09:54:03 +000014506 cat >conftest.$ac_ext <<_ACEOF
14507#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014508#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014509/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014510 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014511#include <assert.h>
14512/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014513#ifdef __cplusplus
14514extern "C"
14515#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014516/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014517 builtin and then its argument prototype would still apply. */
14518char $ac_func ();
14519char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014520
Martin v. Löwis11437992002-04-12 09:54:03 +000014521#ifdef F77_DUMMY_MAIN
14522# ifdef __cplusplus
14523 extern "C"
14524# endif
14525 int F77_DUMMY_MAIN() { return 1; }
14526#endif
14527int
14528main ()
14529{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014530/* The GNU C library defines this for functions which it implements
14531 to always fail with ENOSYS. Some functions are actually named
14532 something starting with __ and the normal name is an alias. */
14533#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14534choke me
14535#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014536f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014537#endif
14538
Martin v. Löwis11437992002-04-12 09:54:03 +000014539 ;
14540 return 0;
14541}
14542_ACEOF
14543rm -f conftest.$ac_objext conftest$ac_exeext
14544if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14545 (eval $ac_link) 2>&5
14546 ac_status=$?
14547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14548 (exit $ac_status); } &&
14549 { ac_try='test -s conftest$ac_exeext'
14550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14551 (eval $ac_try) 2>&5
14552 ac_status=$?
14553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14554 (exit $ac_status); }; }; then
14555 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014556else
Martin v. Löwis11437992002-04-12 09:54:03 +000014557 echo "$as_me: failed program was:" >&5
14558cat conftest.$ac_ext >&5
14559eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014560fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014561rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014562fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014563echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14564echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14565if test `eval echo '${'$as_ac_var'}'` = yes; then
14566 cat >>confdefs.h <<_ACEOF
14567#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14568_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000014569
Michael W. Hudson54241132001-12-07 15:38:26 +000014570else
Martin v. Löwis11437992002-04-12 09:54:03 +000014571 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014572fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014573done
14574
Michael W. Hudson54241132001-12-07 15:38:26 +000014575
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014576LIBS=$LIBS_SAVE
14577
Guido van Rossumad713701997-07-10 22:42:38 +000014578# check whether malloc(0) returns NULL or not
Martin v. Löwis11437992002-04-12 09:54:03 +000014579echo "$as_me:$LINENO: checking what malloc(0) returns" >&5
14580echo $ECHO_N "checking what malloc(0) returns... $ECHO_C" >&6
14581if test "${ac_cv_malloc_zero+set}" = set; then
14582 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014583else
14584 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000014585 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +000014586else
Martin v. Löwis11437992002-04-12 09:54:03 +000014587 cat >conftest.$ac_ext <<_ACEOF
14588#line $LINENO "configure"
Guido van Rossumad713701997-07-10 22:42:38 +000014589#include "confdefs.h"
14590#include <stdio.h>
14591#ifdef HAVE_STDLIB
14592#include <stdlib.h>
14593#else
14594char *malloc(), *realloc();
14595int *free();
14596#endif
14597main() {
14598 char *p;
14599 p = malloc(0);
14600 if (p == NULL) exit(1);
14601 p = realloc(p, 0);
14602 if (p == NULL) exit(1);
14603 free(p);
14604 exit(0);
14605}
Martin v. Löwis11437992002-04-12 09:54:03 +000014606_ACEOF
14607rm -f conftest$ac_exeext
14608if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14609 (eval $ac_link) 2>&5
14610 ac_status=$?
14611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14612 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14614 (eval $ac_try) 2>&5
14615 ac_status=$?
14616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14617 (exit $ac_status); }; }; then
Guido van Rossumad713701997-07-10 22:42:38 +000014618 ac_cv_malloc_zero=nonnull
14619else
Martin v. Löwis11437992002-04-12 09:54:03 +000014620 echo "$as_me: program exited with status $ac_status" >&5
14621echo "$as_me: failed program was:" >&5
14622cat conftest.$ac_ext >&5
14623( exit $ac_status )
14624ac_cv_malloc_zero=null
Guido van Rossumad713701997-07-10 22:42:38 +000014625fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014626rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumad713701997-07-10 22:42:38 +000014627fi
Guido van Rossumad713701997-07-10 22:42:38 +000014628fi
Guido van Rossum3065c942001-09-17 04:03:14 +000014629 # XXX arm cross-compile?
Martin v. Löwis11437992002-04-12 09:54:03 +000014630echo "$as_me:$LINENO: result: $ac_cv_malloc_zero" >&5
14631echo "${ECHO_T}$ac_cv_malloc_zero" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014632if test "$ac_cv_malloc_zero" = null
14633then
Martin v. Löwis11437992002-04-12 09:54:03 +000014634
14635cat >>confdefs.h <<\_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014636#define MALLOC_ZERO_RETURNS_NULL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014637_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014638
14639fi
14640
Guido van Rossumef2255b2000-03-10 22:30:29 +000014641# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014642if test "${ac_cv_header_wchar_h+set}" = set; then
14643 echo "$as_me:$LINENO: checking for wchar.h" >&5
14644echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14645if test "${ac_cv_header_wchar_h+set}" = set; then
14646 echo $ECHO_N "(cached) $ECHO_C" >&6
14647fi
14648echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14649echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014650else
Martin v. Löwis11437992002-04-12 09:54:03 +000014651 # Is the header compilable?
14652echo "$as_me:$LINENO: checking wchar.h usability" >&5
14653echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
14654cat >conftest.$ac_ext <<_ACEOF
14655#line $LINENO "configure"
14656#include "confdefs.h"
14657$ac_includes_default
14658#include <wchar.h>
14659_ACEOF
14660rm -f conftest.$ac_objext
14661if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14662 (eval $ac_compile) 2>&5
14663 ac_status=$?
14664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14665 (exit $ac_status); } &&
14666 { ac_try='test -s conftest.$ac_objext'
14667 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14668 (eval $ac_try) 2>&5
14669 ac_status=$?
14670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14671 (exit $ac_status); }; }; then
14672 ac_header_compiler=yes
14673else
14674 echo "$as_me: failed program was:" >&5
14675cat conftest.$ac_ext >&5
14676ac_header_compiler=no
14677fi
14678rm -f conftest.$ac_objext conftest.$ac_ext
14679echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14680echo "${ECHO_T}$ac_header_compiler" >&6
14681
14682# Is the header present?
14683echo "$as_me:$LINENO: checking wchar.h presence" >&5
14684echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
14685cat >conftest.$ac_ext <<_ACEOF
14686#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014687#include "confdefs.h"
14688#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014689_ACEOF
14690if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14691 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14692 ac_status=$?
14693 egrep -v '^ *\+' conftest.er1 >conftest.err
14694 rm -f conftest.er1
14695 cat conftest.err >&5
14696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14697 (exit $ac_status); } >/dev/null; then
14698 if test -s conftest.err; then
14699 ac_cpp_err=$ac_c_preproc_warn_flag
14700 else
14701 ac_cpp_err=
14702 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014703else
Martin v. Löwis11437992002-04-12 09:54:03 +000014704 ac_cpp_err=yes
14705fi
14706if test -z "$ac_cpp_err"; then
14707 ac_header_preproc=yes
14708else
14709 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000014710 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014711 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014712fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014713rm -f conftest.err conftest.$ac_ext
14714echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14715echo "${ECHO_T}$ac_header_preproc" >&6
14716
14717# So? What about this header?
14718case $ac_header_compiler:$ac_header_preproc in
14719 yes:no )
14720 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
14721echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14722 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14723echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14724 no:yes )
14725 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
14726echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
14727 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
14728echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
14729 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14730echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14731esac
14732echo "$as_me:$LINENO: checking for wchar.h" >&5
14733echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14734if test "${ac_cv_header_wchar_h+set}" = set; then
14735 echo $ECHO_N "(cached) $ECHO_C" >&6
14736else
14737 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000014738fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014739echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14740echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
14741
14742fi
14743if test $ac_cv_header_wchar_h = yes; then
14744
14745
14746cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000014747#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014748_ACEOF
14749
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014750 wchar_h="yes"
14751
Guido van Rossumef2255b2000-03-10 22:30:29 +000014752else
Martin v. Löwis11437992002-04-12 09:54:03 +000014753 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014754
14755fi
14756
Michael W. Hudson54241132001-12-07 15:38:26 +000014757
Martin v. Löwis11437992002-04-12 09:54:03 +000014758
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014759# determine wchar_t size
14760if test "$wchar_h" = yes
14761then
Martin v. Löwis11437992002-04-12 09:54:03 +000014762 echo "$as_me:$LINENO: checking for wchar_t" >&5
14763echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
14764if test "${ac_cv_type_wchar_t+set}" = set; then
14765 echo $ECHO_N "(cached) $ECHO_C" >&6
14766else
14767 cat >conftest.$ac_ext <<_ACEOF
14768#line $LINENO "configure"
14769#include "confdefs.h"
14770#include <wchar.h>
14771
14772#ifdef F77_DUMMY_MAIN
14773# ifdef __cplusplus
14774 extern "C"
14775# endif
14776 int F77_DUMMY_MAIN() { return 1; }
14777#endif
14778int
14779main ()
14780{
14781if ((wchar_t *) 0)
14782 return 0;
14783if (sizeof (wchar_t))
14784 return 0;
14785 ;
14786 return 0;
14787}
14788_ACEOF
14789rm -f conftest.$ac_objext
14790if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14791 (eval $ac_compile) 2>&5
14792 ac_status=$?
14793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14794 (exit $ac_status); } &&
14795 { ac_try='test -s conftest.$ac_objext'
14796 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14797 (eval $ac_try) 2>&5
14798 ac_status=$?
14799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14800 (exit $ac_status); }; }; then
14801 ac_cv_type_wchar_t=yes
14802else
14803 echo "$as_me: failed program was:" >&5
14804cat conftest.$ac_ext >&5
14805ac_cv_type_wchar_t=no
14806fi
14807rm -f conftest.$ac_objext conftest.$ac_ext
14808fi
14809echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
14810echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
14811
14812echo "$as_me:$LINENO: checking size of wchar_t" >&5
14813echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
14814if test "${ac_cv_sizeof_wchar_t+set}" = set; then
14815 echo $ECHO_N "(cached) $ECHO_C" >&6
14816else
14817 if test "$ac_cv_type_wchar_t" = yes; then
14818 # The cast to unsigned long works around a bug in the HP C Compiler
14819 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14820 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14821 # This bug is HP SR number 8606223364.
14822 if test "$cross_compiling" = yes; then
14823 # Depending upon the size, compute the lo and hi bounds.
14824cat >conftest.$ac_ext <<_ACEOF
14825#line $LINENO "configure"
14826#include "confdefs.h"
14827#include <wchar.h>
14828
14829#ifdef F77_DUMMY_MAIN
14830# ifdef __cplusplus
14831 extern "C"
14832# endif
14833 int F77_DUMMY_MAIN() { return 1; }
14834#endif
14835int
14836main ()
14837{
14838static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
14839test_array [0] = 0
14840
14841 ;
14842 return 0;
14843}
14844_ACEOF
14845rm -f conftest.$ac_objext
14846if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14847 (eval $ac_compile) 2>&5
14848 ac_status=$?
14849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14850 (exit $ac_status); } &&
14851 { ac_try='test -s conftest.$ac_objext'
14852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14853 (eval $ac_try) 2>&5
14854 ac_status=$?
14855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14856 (exit $ac_status); }; }; then
14857 ac_lo=0 ac_mid=0
14858 while :; do
14859 cat >conftest.$ac_ext <<_ACEOF
14860#line $LINENO "configure"
14861#include "confdefs.h"
14862#include <wchar.h>
14863
14864#ifdef F77_DUMMY_MAIN
14865# ifdef __cplusplus
14866 extern "C"
14867# endif
14868 int F77_DUMMY_MAIN() { return 1; }
14869#endif
14870int
14871main ()
14872{
14873static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
14874test_array [0] = 0
14875
14876 ;
14877 return 0;
14878}
14879_ACEOF
14880rm -f conftest.$ac_objext
14881if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14882 (eval $ac_compile) 2>&5
14883 ac_status=$?
14884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14885 (exit $ac_status); } &&
14886 { ac_try='test -s conftest.$ac_objext'
14887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14888 (eval $ac_try) 2>&5
14889 ac_status=$?
14890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14891 (exit $ac_status); }; }; then
14892 ac_hi=$ac_mid; break
14893else
14894 echo "$as_me: failed program was:" >&5
14895cat conftest.$ac_ext >&5
14896ac_lo=`expr $ac_mid + 1`
14897 if test $ac_lo -le $ac_mid; then
14898 ac_lo= ac_hi=
14899 break
14900 fi
14901 ac_mid=`expr 2 '*' $ac_mid + 1`
14902fi
14903rm -f conftest.$ac_objext conftest.$ac_ext
14904 done
14905else
14906 echo "$as_me: failed program was:" >&5
14907cat conftest.$ac_ext >&5
14908cat >conftest.$ac_ext <<_ACEOF
14909#line $LINENO "configure"
14910#include "confdefs.h"
14911#include <wchar.h>
14912
14913#ifdef F77_DUMMY_MAIN
14914# ifdef __cplusplus
14915 extern "C"
14916# endif
14917 int F77_DUMMY_MAIN() { return 1; }
14918#endif
14919int
14920main ()
14921{
14922static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
14923test_array [0] = 0
14924
14925 ;
14926 return 0;
14927}
14928_ACEOF
14929rm -f conftest.$ac_objext
14930if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14931 (eval $ac_compile) 2>&5
14932 ac_status=$?
14933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14934 (exit $ac_status); } &&
14935 { ac_try='test -s conftest.$ac_objext'
14936 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14937 (eval $ac_try) 2>&5
14938 ac_status=$?
14939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14940 (exit $ac_status); }; }; then
14941 ac_hi=-1 ac_mid=-1
14942 while :; do
14943 cat >conftest.$ac_ext <<_ACEOF
14944#line $LINENO "configure"
14945#include "confdefs.h"
14946#include <wchar.h>
14947
14948#ifdef F77_DUMMY_MAIN
14949# ifdef __cplusplus
14950 extern "C"
14951# endif
14952 int F77_DUMMY_MAIN() { return 1; }
14953#endif
14954int
14955main ()
14956{
14957static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
14958test_array [0] = 0
14959
14960 ;
14961 return 0;
14962}
14963_ACEOF
14964rm -f conftest.$ac_objext
14965if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14966 (eval $ac_compile) 2>&5
14967 ac_status=$?
14968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14969 (exit $ac_status); } &&
14970 { ac_try='test -s conftest.$ac_objext'
14971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14972 (eval $ac_try) 2>&5
14973 ac_status=$?
14974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14975 (exit $ac_status); }; }; then
14976 ac_lo=$ac_mid; break
14977else
14978 echo "$as_me: failed program was:" >&5
14979cat conftest.$ac_ext >&5
14980ac_hi=`expr '(' $ac_mid ')' - 1`
14981 if test $ac_mid -le $ac_hi; then
14982 ac_lo= ac_hi=
14983 break
14984 fi
14985 ac_mid=`expr 2 '*' $ac_mid`
14986fi
14987rm -f conftest.$ac_objext conftest.$ac_ext
14988 done
14989else
14990 echo "$as_me: failed program was:" >&5
14991cat conftest.$ac_ext >&5
14992ac_lo= ac_hi=
14993fi
14994rm -f conftest.$ac_objext conftest.$ac_ext
14995fi
14996rm -f conftest.$ac_objext conftest.$ac_ext
14997# Binary search between lo and hi bounds.
14998while test "x$ac_lo" != "x$ac_hi"; do
14999 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
15000 cat >conftest.$ac_ext <<_ACEOF
15001#line $LINENO "configure"
15002#include "confdefs.h"
15003#include <wchar.h>
15004
15005#ifdef F77_DUMMY_MAIN
15006# ifdef __cplusplus
15007 extern "C"
15008# endif
15009 int F77_DUMMY_MAIN() { return 1; }
15010#endif
15011int
15012main ()
15013{
15014static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
15015test_array [0] = 0
15016
15017 ;
15018 return 0;
15019}
15020_ACEOF
15021rm -f conftest.$ac_objext
15022if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15023 (eval $ac_compile) 2>&5
15024 ac_status=$?
15025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15026 (exit $ac_status); } &&
15027 { ac_try='test -s conftest.$ac_objext'
15028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15029 (eval $ac_try) 2>&5
15030 ac_status=$?
15031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15032 (exit $ac_status); }; }; then
15033 ac_hi=$ac_mid
15034else
15035 echo "$as_me: failed program was:" >&5
15036cat conftest.$ac_ext >&5
15037ac_lo=`expr '(' $ac_mid ')' + 1`
15038fi
15039rm -f conftest.$ac_objext conftest.$ac_ext
15040done
15041case $ac_lo in
15042?*) ac_cv_sizeof_wchar_t=$ac_lo;;
15043'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15044echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15045 { (exit 1); exit 1; }; } ;;
15046esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015047else
15048 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015049 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
15050echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15051 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000015052else
Martin v. Löwis11437992002-04-12 09:54:03 +000015053 cat >conftest.$ac_ext <<_ACEOF
15054#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015055#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015056#include <wchar.h>
15057
15058long longval () { return (long) (sizeof (wchar_t)); }
15059unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000015060#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015061#include <stdlib.h>
15062#ifdef F77_DUMMY_MAIN
15063# ifdef __cplusplus
15064 extern "C"
15065# endif
15066 int F77_DUMMY_MAIN() { return 1; }
15067#endif
15068int
15069main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015070{
Martin v. Löwis11437992002-04-12 09:54:03 +000015071
15072 FILE *f = fopen ("conftest.val", "w");
15073 if (! f)
15074 exit (1);
15075 if (((long) (sizeof (wchar_t))) < 0)
15076 {
15077 long i = longval ();
15078 if (i != ((long) (sizeof (wchar_t))))
15079 exit (1);
15080 fprintf (f, "%ld\n", i);
15081 }
15082 else
15083 {
15084 unsigned long i = ulongval ();
15085 if (i != ((long) (sizeof (wchar_t))))
15086 exit (1);
15087 fprintf (f, "%lu\n", i);
15088 }
15089 exit (ferror (f) || fclose (f) != 0);
15090
15091 ;
15092 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015093}
Martin v. Löwis11437992002-04-12 09:54:03 +000015094_ACEOF
15095rm -f conftest$ac_exeext
15096if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15097 (eval $ac_link) 2>&5
15098 ac_status=$?
15099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15100 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15101 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15102 (eval $ac_try) 2>&5
15103 ac_status=$?
15104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15105 (exit $ac_status); }; }; then
15106 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000015107else
Martin v. Löwis11437992002-04-12 09:54:03 +000015108 echo "$as_me: program exited with status $ac_status" >&5
15109echo "$as_me: failed program was:" >&5
15110cat conftest.$ac_ext >&5
15111( exit $ac_status )
15112{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15113echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15114 { (exit 1); exit 1; }; }
15115fi
15116rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15117fi
15118fi
15119rm -f conftest.val
15120else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015121 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000015122fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015123fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015124echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
15125echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
15126cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015127#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015128_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015129
Michael W. Hudson54241132001-12-07 15:38:26 +000015130
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015131fi
15132
Martin v. Löwis11437992002-04-12 09:54:03 +000015133echo "$as_me:$LINENO: checking what type to use for unicode" >&5
15134echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015135# Check whether --enable-unicode or --disable-unicode was given.
15136if test "${enable_unicode+set}" = set; then
15137 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000015138
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015139else
15140 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015141fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015142
15143if test $enable_unicode = yes
15144then
Martin v. Löwisfd917792001-06-27 20:22:04 +000015145 # Without any arguments, Py_UNICODE defaults to two-byte mode
15146 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015147fi
15148
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015149
15150
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015151case "$enable_unicode" in
15152ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000015153 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015154#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000015155_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015156
15157 ;;
15158ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000015159 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015160#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000015161_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015162
15163 ;;
15164esac
15165
Michael W. Hudson54241132001-12-07 15:38:26 +000015166
Martin v. Löwis11437992002-04-12 09:54:03 +000015167
15168
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015169
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015170if test "$enable_unicode" = "no"
15171then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015172 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000015173 echo "$as_me:$LINENO: result: not used" >&5
15174echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015175else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015176 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000015177
15178cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015179#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015180_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015181
15182 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
15183 then
15184 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015185
Martin v. Löwis11437992002-04-12 09:54:03 +000015186cat >>confdefs.h <<\_ACEOF
15187#define HAVE_USABLE_WCHAR_T 1
15188_ACEOF
15189
15190 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015191#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015192_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015193
15194 elif test "$ac_cv_sizeof_short" = "$unicode_size"
15195 then
15196 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000015197 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015198#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000015199_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015200
15201 elif test "$ac_cv_sizeof_long" = "$unicode_size"
15202 then
15203 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000015204 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015205#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000015206_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015207
15208 else
15209 PY_UNICODE_TYPE="no type found"
15210 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015211 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
15212echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015213fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015214
15215# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000015216echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
15217echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
15218if test "${ac_cv_c_bigendian+set}" = set; then
15219 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015220else
Martin v. Löwis11437992002-04-12 09:54:03 +000015221 # See if sys/param.h defines the BYTE_ORDER macro.
15222cat >conftest.$ac_ext <<_ACEOF
15223#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015224#include "confdefs.h"
15225#include <sys/types.h>
15226#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015227
Martin v. Löwis11437992002-04-12 09:54:03 +000015228#ifdef F77_DUMMY_MAIN
15229# ifdef __cplusplus
15230 extern "C"
15231# endif
15232 int F77_DUMMY_MAIN() { return 1; }
15233#endif
15234int
15235main ()
15236{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015237#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15238 bogus endian macros
15239#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015240
15241 ;
15242 return 0;
15243}
15244_ACEOF
15245rm -f conftest.$ac_objext
15246if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15247 (eval $ac_compile) 2>&5
15248 ac_status=$?
15249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15250 (exit $ac_status); } &&
15251 { ac_try='test -s conftest.$ac_objext'
15252 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15253 (eval $ac_try) 2>&5
15254 ac_status=$?
15255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15256 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015257 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000015258cat >conftest.$ac_ext <<_ACEOF
15259#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015260#include "confdefs.h"
15261#include <sys/types.h>
15262#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015263
Martin v. Löwis11437992002-04-12 09:54:03 +000015264#ifdef F77_DUMMY_MAIN
15265# ifdef __cplusplus
15266 extern "C"
15267# endif
15268 int F77_DUMMY_MAIN() { return 1; }
15269#endif
15270int
15271main ()
15272{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015273#if BYTE_ORDER != BIG_ENDIAN
15274 not big endian
15275#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015276
15277 ;
15278 return 0;
15279}
15280_ACEOF
15281rm -f conftest.$ac_objext
15282if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15283 (eval $ac_compile) 2>&5
15284 ac_status=$?
15285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15286 (exit $ac_status); } &&
15287 { ac_try='test -s conftest.$ac_objext'
15288 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15289 (eval $ac_try) 2>&5
15290 ac_status=$?
15291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15292 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015293 ac_cv_c_bigendian=yes
15294else
Martin v. Löwis11437992002-04-12 09:54:03 +000015295 echo "$as_me: failed program was:" >&5
15296cat conftest.$ac_ext >&5
15297ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015298fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015299rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015300else
Martin v. Löwis11437992002-04-12 09:54:03 +000015301 echo "$as_me: failed program was:" >&5
15302cat conftest.$ac_ext >&5
15303# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000015304if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015305 # try to guess the endianess by grep'ing values into an object file
15306 ac_cv_c_bigendian=unknown
15307 cat >conftest.$ac_ext <<_ACEOF
15308#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015309#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015310short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15311short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15312void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
15313short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15314short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15315void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
15316#ifdef F77_DUMMY_MAIN
15317# ifdef __cplusplus
15318 extern "C"
15319# endif
15320 int F77_DUMMY_MAIN() { return 1; }
15321#endif
15322int
15323main ()
15324{
15325 _ascii (); _ebcdic ();
15326 ;
15327 return 0;
15328}
15329_ACEOF
15330rm -f conftest.$ac_objext
15331if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15332 (eval $ac_compile) 2>&5
15333 ac_status=$?
15334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15335 (exit $ac_status); } &&
15336 { ac_try='test -s conftest.$ac_objext'
15337 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15338 (eval $ac_try) 2>&5
15339 ac_status=$?
15340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15341 (exit $ac_status); }; }; then
15342 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
15343 ac_cv_c_bigendian=yes
15344fi
15345if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15346 if test "$ac_cv_c_bigendian" = unknown; then
15347 ac_cv_c_bigendian=no
15348 else
15349 # finding both strings is unlikely to happen, but who knows?
15350 ac_cv_c_bigendian=unknown
15351 fi
15352fi
15353else
15354 echo "$as_me: failed program was:" >&5
15355cat conftest.$ac_ext >&5
15356fi
15357rm -f conftest.$ac_objext conftest.$ac_ext
15358else
15359 cat >conftest.$ac_ext <<_ACEOF
15360#line $LINENO "configure"
15361#include "confdefs.h"
15362int
15363main ()
15364{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015365 /* Are we little or big endian? From Harbison&Steele. */
15366 union
15367 {
15368 long l;
15369 char c[sizeof (long)];
15370 } u;
15371 u.l = 1;
15372 exit (u.c[sizeof (long) - 1] == 1);
15373}
Martin v. Löwis11437992002-04-12 09:54:03 +000015374_ACEOF
15375rm -f conftest$ac_exeext
15376if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15377 (eval $ac_link) 2>&5
15378 ac_status=$?
15379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15380 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15381 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15382 (eval $ac_try) 2>&5
15383 ac_status=$?
15384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15385 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015386 ac_cv_c_bigendian=no
15387else
Martin v. Löwis11437992002-04-12 09:54:03 +000015388 echo "$as_me: program exited with status $ac_status" >&5
15389echo "$as_me: failed program was:" >&5
15390cat conftest.$ac_ext >&5
15391( exit $ac_status )
15392ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015393fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015394rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015395fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015396fi
15397rm -f conftest.$ac_objext conftest.$ac_ext
15398fi
15399echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
15400echo "${ECHO_T}$ac_cv_c_bigendian" >&6
15401case $ac_cv_c_bigendian in
15402 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000015403
Martin v. Löwis11437992002-04-12 09:54:03 +000015404cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015405#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015406_ACEOF
15407 ;;
15408 no)
15409 ;;
15410 *)
15411 { { echo "$as_me:$LINENO: error: unknown endianess
15412presetting ac_cv_c_bigendian=no (or yes) will help" >&5
15413echo "$as_me: error: unknown endianess
15414presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
15415 { (exit 1); exit 1; }; } ;;
15416esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015417
Michael W. Hudson54241132001-12-07 15:38:26 +000015418
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015419# Check whether right shifting a negative integer extends the sign bit
15420# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000015421echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
15422echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
15423if test "${ac_cv_rshift_extends_sign+set}" = set; then
15424 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015425else
Martin v. Löwis11437992002-04-12 09:54:03 +000015426
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015427if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015428 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015429else
Martin v. Löwis11437992002-04-12 09:54:03 +000015430 cat >conftest.$ac_ext <<_ACEOF
15431#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015432#include "confdefs.h"
15433
15434int main()
15435{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015436 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015437}
15438
Martin v. Löwis11437992002-04-12 09:54:03 +000015439_ACEOF
15440rm -f conftest$ac_exeext
15441if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15442 (eval $ac_link) 2>&5
15443 ac_status=$?
15444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15445 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15446 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15447 (eval $ac_try) 2>&5
15448 ac_status=$?
15449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15450 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000015451 ac_cv_rshift_extends_sign=yes
15452else
Martin v. Löwis11437992002-04-12 09:54:03 +000015453 echo "$as_me: program exited with status $ac_status" >&5
15454echo "$as_me: failed program was:" >&5
15455cat conftest.$ac_ext >&5
15456( exit $ac_status )
15457ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015458fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015459rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15460fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000015461fi
15462
Martin v. Löwis11437992002-04-12 09:54:03 +000015463echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
15464echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015465if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015466then
Martin v. Löwis11437992002-04-12 09:54:03 +000015467
15468cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015469#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015470_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015471
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015472fi
15473
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015474# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015475echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
15476echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
15477if test "${ac_cv_have_getc_unlocked+set}" = set; then
15478 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015479else
Martin v. Löwis11437992002-04-12 09:54:03 +000015480
15481cat >conftest.$ac_ext <<_ACEOF
15482#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015483#include "confdefs.h"
15484#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015485#ifdef F77_DUMMY_MAIN
15486# ifdef __cplusplus
15487 extern "C"
15488# endif
15489 int F77_DUMMY_MAIN() { return 1; }
15490#endif
15491int
15492main ()
15493{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015494
15495 FILE *f = fopen("/dev/null", "r");
15496 flockfile(f);
15497 getc_unlocked(f);
15498 funlockfile(f);
15499
Martin v. Löwis11437992002-04-12 09:54:03 +000015500 ;
15501 return 0;
15502}
15503_ACEOF
15504rm -f conftest.$ac_objext conftest$ac_exeext
15505if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15506 (eval $ac_link) 2>&5
15507 ac_status=$?
15508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15509 (exit $ac_status); } &&
15510 { ac_try='test -s conftest$ac_exeext'
15511 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15512 (eval $ac_try) 2>&5
15513 ac_status=$?
15514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15515 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015516 ac_cv_have_getc_unlocked=yes
15517else
Martin v. Löwis11437992002-04-12 09:54:03 +000015518 echo "$as_me: failed program was:" >&5
15519cat conftest.$ac_ext >&5
15520ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015521fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015522rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015523fi
15524
Martin v. Löwis11437992002-04-12 09:54:03 +000015525echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
15526echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015527if test "$ac_cv_have_getc_unlocked" = yes
15528then
Martin v. Löwis11437992002-04-12 09:54:03 +000015529
15530cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015531#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015532_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015533
15534fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015535
Martin v. Löwis0daad592001-09-30 21:09:59 +000015536# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000015537echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
15538echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
15539if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
15540 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015541else
Martin v. Löwis11437992002-04-12 09:54:03 +000015542 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000015543LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015544cat >conftest.$ac_ext <<_ACEOF
15545#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000015546#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015547
Guido van Rossum353ae582001-07-10 16:45:32 +000015548/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015549#ifdef __cplusplus
15550extern "C"
15551#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000015552/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015553 builtin and then its argument prototype would still apply. */
15554char rl_pre_input_hook ();
15555#ifdef F77_DUMMY_MAIN
15556# ifdef __cplusplus
15557 extern "C"
15558# endif
15559 int F77_DUMMY_MAIN() { return 1; }
15560#endif
15561int
15562main ()
15563{
15564rl_pre_input_hook ();
15565 ;
15566 return 0;
15567}
15568_ACEOF
15569rm -f conftest.$ac_objext conftest$ac_exeext
15570if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15571 (eval $ac_link) 2>&5
15572 ac_status=$?
15573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15574 (exit $ac_status); } &&
15575 { ac_try='test -s conftest$ac_exeext'
15576 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15577 (eval $ac_try) 2>&5
15578 ac_status=$?
15579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15580 (exit $ac_status); }; }; then
15581 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015582else
Martin v. Löwis11437992002-04-12 09:54:03 +000015583 echo "$as_me: failed program was:" >&5
15584cat conftest.$ac_ext >&5
15585ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015586fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015587rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15588LIBS=$ac_check_lib_save_LIBS
15589fi
15590echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15591echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
15592if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015593
Martin v. Löwis11437992002-04-12 09:54:03 +000015594cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015595#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015596_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015597
Martin v. Löwis0daad592001-09-30 21:09:59 +000015598fi
15599
Michael W. Hudson54241132001-12-07 15:38:26 +000015600
Martin v. Löwis0daad592001-09-30 21:09:59 +000015601# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000015602echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
15603echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
15604if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
15605 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015606else
Martin v. Löwis11437992002-04-12 09:54:03 +000015607 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000015608LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015609cat >conftest.$ac_ext <<_ACEOF
15610#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000015611#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015612
Martin v. Löwis0daad592001-09-30 21:09:59 +000015613/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015614#ifdef __cplusplus
15615extern "C"
15616#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000015617/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015618 builtin and then its argument prototype would still apply. */
15619char rl_completion_matches ();
15620#ifdef F77_DUMMY_MAIN
15621# ifdef __cplusplus
15622 extern "C"
15623# endif
15624 int F77_DUMMY_MAIN() { return 1; }
15625#endif
15626int
15627main ()
15628{
15629rl_completion_matches ();
15630 ;
15631 return 0;
15632}
15633_ACEOF
15634rm -f conftest.$ac_objext conftest$ac_exeext
15635if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15636 (eval $ac_link) 2>&5
15637 ac_status=$?
15638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15639 (exit $ac_status); } &&
15640 { ac_try='test -s conftest$ac_exeext'
15641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15642 (eval $ac_try) 2>&5
15643 ac_status=$?
15644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15645 (exit $ac_status); }; }; then
15646 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015647else
Martin v. Löwis11437992002-04-12 09:54:03 +000015648 echo "$as_me: failed program was:" >&5
15649cat conftest.$ac_ext >&5
15650ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015651fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015652rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15653LIBS=$ac_check_lib_save_LIBS
15654fi
15655echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15656echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
15657if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015658
Martin v. Löwis11437992002-04-12 09:54:03 +000015659cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015660#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015661_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015662
Guido van Rossum353ae582001-07-10 16:45:32 +000015663fi
15664
Jack Jansendd19cf82001-12-06 22:36:17 +000015665
Martin v. Löwis11437992002-04-12 09:54:03 +000015666echo "$as_me:$LINENO: checking for broken nice()" >&5
15667echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
15668if test "${ac_cv_broken_nice+set}" = set; then
15669 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015670else
Martin v. Löwis11437992002-04-12 09:54:03 +000015671
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015672if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015673 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015674else
Martin v. Löwis11437992002-04-12 09:54:03 +000015675 cat >conftest.$ac_ext <<_ACEOF
15676#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015677#include "confdefs.h"
15678
15679int main()
15680{
15681 int val1 = nice(1);
15682 if (val1 != -1 && val1 == nice(2))
15683 exit(0);
15684 exit(1);
15685}
15686
Martin v. Löwis11437992002-04-12 09:54:03 +000015687_ACEOF
15688rm -f conftest$ac_exeext
15689if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15690 (eval $ac_link) 2>&5
15691 ac_status=$?
15692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15693 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15694 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15695 (eval $ac_try) 2>&5
15696 ac_status=$?
15697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15698 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015699 ac_cv_broken_nice=yes
15700else
Martin v. Löwis11437992002-04-12 09:54:03 +000015701 echo "$as_me: program exited with status $ac_status" >&5
15702echo "$as_me: failed program was:" >&5
15703cat conftest.$ac_ext >&5
15704( exit $ac_status )
15705ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015706fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015707rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15708fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015709fi
15710
Martin v. Löwis11437992002-04-12 09:54:03 +000015711echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
15712echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015713if test "$ac_cv_broken_nice" = yes
15714then
Martin v. Löwis11437992002-04-12 09:54:03 +000015715
15716cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015717#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015718_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015719
15720fi
15721
Jack Jansen666b1e72001-10-31 12:11:48 +000015722# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000015723echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
15724echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
15725if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
15726 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015727else
Martin v. Löwis11437992002-04-12 09:54:03 +000015728 cat >conftest.$ac_ext <<_ACEOF
15729#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015730#include "confdefs.h"
15731#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015732#ifdef F77_DUMMY_MAIN
15733# ifdef __cplusplus
15734 extern "C"
15735# endif
15736 int F77_DUMMY_MAIN() { return 1; }
15737#endif
15738int
15739main ()
15740{
Jack Jansen666b1e72001-10-31 12:11:48 +000015741
15742 int rtn;
15743 rtn = mvwdelch(0,0,0);
15744
Martin v. Löwis11437992002-04-12 09:54:03 +000015745 ;
15746 return 0;
15747}
15748_ACEOF
15749rm -f conftest.$ac_objext
15750if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15751 (eval $ac_compile) 2>&5
15752 ac_status=$?
15753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15754 (exit $ac_status); } &&
15755 { ac_try='test -s conftest.$ac_objext'
15756 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15757 (eval $ac_try) 2>&5
15758 ac_status=$?
15759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15760 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015761 ac_cv_mvwdelch_is_expression=yes
15762else
Martin v. Löwis11437992002-04-12 09:54:03 +000015763 echo "$as_me: failed program was:" >&5
15764cat conftest.$ac_ext >&5
15765ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015766fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015767rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015768fi
15769
Martin v. Löwis11437992002-04-12 09:54:03 +000015770echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
15771echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015772
15773if test "$ac_cv_mvwdelch_is_expression" = yes
15774then
Martin v. Löwis11437992002-04-12 09:54:03 +000015775
15776cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015777#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015778_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015779
15780fi
15781
Martin v. Löwis11437992002-04-12 09:54:03 +000015782echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
15783echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
15784if test "${ac_cv_window_has_flags+set}" = set; then
15785 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015786else
Martin v. Löwis11437992002-04-12 09:54:03 +000015787 cat >conftest.$ac_ext <<_ACEOF
15788#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015789#include "confdefs.h"
15790#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015791#ifdef F77_DUMMY_MAIN
15792# ifdef __cplusplus
15793 extern "C"
15794# endif
15795 int F77_DUMMY_MAIN() { return 1; }
15796#endif
15797int
15798main ()
15799{
Jack Jansen666b1e72001-10-31 12:11:48 +000015800
15801 WINDOW *w;
15802 w->_flags = 0;
15803
Martin v. Löwis11437992002-04-12 09:54:03 +000015804 ;
15805 return 0;
15806}
15807_ACEOF
15808rm -f conftest.$ac_objext
15809if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15810 (eval $ac_compile) 2>&5
15811 ac_status=$?
15812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15813 (exit $ac_status); } &&
15814 { ac_try='test -s conftest.$ac_objext'
15815 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15816 (eval $ac_try) 2>&5
15817 ac_status=$?
15818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15819 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015820 ac_cv_window_has_flags=yes
15821else
Martin v. Löwis11437992002-04-12 09:54:03 +000015822 echo "$as_me: failed program was:" >&5
15823cat conftest.$ac_ext >&5
15824ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015825fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015826rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015827fi
15828
Martin v. Löwis11437992002-04-12 09:54:03 +000015829echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
15830echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015831
Jack Jansen666b1e72001-10-31 12:11:48 +000015832
15833if test "$ac_cv_window_has_flags" = yes
15834then
Martin v. Löwis11437992002-04-12 09:54:03 +000015835
15836cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015837#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015838_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015839
15840fi
15841
Guido van Rossum95713eb2000-05-18 20:53:31 +000015842# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
15843# Add sys/socket.h to confdefs.h
15844cat >> confdefs.h <<\EOF
15845#ifdef HAVE_SYS_SOCKET_H
15846#include <sys/socket.h>
15847#endif
15848EOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015849echo "$as_me:$LINENO: checking for socklen_t" >&5
15850echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
15851if test "${ac_cv_type_socklen_t+set}" = set; then
15852 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000015853else
Martin v. Löwis11437992002-04-12 09:54:03 +000015854 cat >conftest.$ac_ext <<_ACEOF
15855#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000015856#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015857$ac_includes_default
15858#ifdef F77_DUMMY_MAIN
15859# ifdef __cplusplus
15860 extern "C"
15861# endif
15862 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015863#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015864int
15865main ()
15866{
15867if ((socklen_t *) 0)
15868 return 0;
15869if (sizeof (socklen_t))
15870 return 0;
15871 ;
15872 return 0;
15873}
15874_ACEOF
15875rm -f conftest.$ac_objext
15876if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15877 (eval $ac_compile) 2>&5
15878 ac_status=$?
15879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15880 (exit $ac_status); } &&
15881 { ac_try='test -s conftest.$ac_objext'
15882 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15883 (eval $ac_try) 2>&5
15884 ac_status=$?
15885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15886 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015887 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000015888else
Martin v. Löwis11437992002-04-12 09:54:03 +000015889 echo "$as_me: failed program was:" >&5
15890cat conftest.$ac_ext >&5
15891ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000015892fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015893rm -f conftest.$ac_objext conftest.$ac_ext
15894fi
15895echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
15896echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
15897if test $ac_cv_type_socklen_t = yes; then
15898 :
15899else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015900
Martin v. Löwis11437992002-04-12 09:54:03 +000015901cat >>confdefs.h <<_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015902#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000015903_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015904
15905fi
15906
Michael W. Hudson54241132001-12-07 15:38:26 +000015907
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015908#AC_MSG_CHECKING(for Modules/Setup)
15909#if test ! -f Modules/Setup ; then
15910# if test ! -d Modules ; then
15911# mkdir Modules
15912# fi
15913# cp "$srcdir/Modules/Setup.dist" Modules/Setup
15914# AC_MSG_RESULT(creating)
15915#else
15916# AC_MSG_RESULT(already exists)
15917#fi
15918
Michael W. Hudson54241132001-12-07 15:38:26 +000015919
15920
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015921for h in `(cd $srcdir;echo Python/thread_*.h)`
15922do
15923 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15924done
15925
Michael W. Hudson54241132001-12-07 15:38:26 +000015926
Neil Schemenaueracbf9ef2001-02-27 02:15:14 +000015927SRCDIRS="Parser Grammar Objects Python Modules"
Martin v. Löwis11437992002-04-12 09:54:03 +000015928echo "$as_me:$LINENO: checking for build directories" >&5
15929echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015930for dir in $SRCDIRS; do
15931 if test ! -d $dir; then
15932 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015933 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015934done
Martin v. Löwis11437992002-04-12 09:54:03 +000015935echo "$as_me:$LINENO: result: done" >&5
15936echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000015937
Guido van Rossum627b2d71993-12-24 10:39:16 +000015938# generate output files
Martin v. Löwis11437992002-04-12 09:54:03 +000015939ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
15940cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015941# This file is a shell script that caches the results of configure
15942# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015943# scripts and configure runs, see configure's option --config-cache.
15944# It is not useful on other systems. If it contains results you don't
15945# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015946#
Martin v. Löwis11437992002-04-12 09:54:03 +000015947# config.status only pays attention to the cache file if you give it
15948# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015949#
Martin v. Löwis11437992002-04-12 09:54:03 +000015950# `ac_cv_env_foo' variables (set or unset) will be overriden when
15951# loading this file, other *unset* `ac_cv_foo' will be assigned the
15952# following values.
15953
15954_ACEOF
15955
Guido van Rossumf78abae1997-01-21 22:02:36 +000015956# The following way of writing the cache mishandles newlines in values,
15957# but we know of no workaround that is simple, portable, and efficient.
15958# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015959# Ultrix sh set writes to stderr and can't be redirected directly,
15960# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000015961{
15962 (set) 2>&1 |
15963 case `(ac_space=' '; set | grep ac_space) 2>&1` in
15964 *ac_space=\ *)
15965 # `set' does not quote correctly, so add quotes (double-quote
15966 # substitution turns \\\\ into \\, and sed turns \\ into \).
15967 sed -n \
15968 "s/'/'\\\\''/g;
15969 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15970 ;;
15971 *)
15972 # `set' quotes correctly as required by POSIX, so do not add quotes.
15973 sed -n \
15974 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15975 ;;
15976 esac;
15977} |
15978 sed '
15979 t clear
15980 : clear
15981 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15982 t end
15983 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15984 : end' >>confcache
15985if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015986 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015987 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15988 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015989 else
15990 echo "not updating unwritable cache $cache_file"
15991 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015992fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015993rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015994
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015995test "x$prefix" = xNONE && prefix=$ac_default_prefix
15996# Let make expand exec_prefix.
15997test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015998
Martin v. Löwis11437992002-04-12 09:54:03 +000015999# VPATH may cause trouble with some makes, so we remove $(srcdir),
16000# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16001# trailing colons and then remove the whole line if VPATH becomes empty
16002# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000016003if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016004 ac_vpsub='/^[ ]*VPATH[ ]*=/{
16005s/:*\$(srcdir):*/:/;
16006s/:*\${srcdir}:*/:/;
16007s/:*@srcdir@:*/:/;
16008s/^\([^=]*=[ ]*\):*/\1/;
16009s/:*$//;
16010s/^[^=]*=[ ]*$//;
16011}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016012fi
16013
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016014DEFS=-DHAVE_CONFIG_H
16015
Martin v. Löwis11437992002-04-12 09:54:03 +000016016
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016017: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000016018ac_clean_files_save=$ac_clean_files
16019ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16020{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
16021echo "$as_me: creating $CONFIG_STATUS" >&6;}
16022cat >$CONFIG_STATUS <<_ACEOF
16023#! $SHELL
16024# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016025# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016026# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016027# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016028
Martin v. Löwis11437992002-04-12 09:54:03 +000016029debug=false
16030SHELL=\${CONFIG_SHELL-$SHELL}
16031_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016032
Martin v. Löwis11437992002-04-12 09:54:03 +000016033cat >>$CONFIG_STATUS <<\_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016034
Martin v. Löwis11437992002-04-12 09:54:03 +000016035## --------------------- ##
16036## M4sh Initialization. ##
16037## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016038
Martin v. Löwis11437992002-04-12 09:54:03 +000016039# Be Bourne compatible
16040if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16041 emulate sh
16042 NULLCMD=:
16043elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16044 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000016045fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016046
Martin v. Löwis11437992002-04-12 09:54:03 +000016047# NLS nuisances.
16048# Support unset when possible.
16049if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16050 as_unset=unset
16051else
16052 as_unset=false
16053fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016054
Martin v. Löwis11437992002-04-12 09:54:03 +000016055(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
16056 { $as_unset LANG || test "${LANG+set}" != set; } ||
16057 { LANG=C; export LANG; }
16058(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
16059 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
16060 { LC_ALL=C; export LC_ALL; }
16061(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
16062 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
16063 { LC_TIME=C; export LC_TIME; }
16064(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
16065 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
16066 { LC_CTYPE=C; export LC_CTYPE; }
16067(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
16068 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
16069 { LANGUAGE=C; export LANGUAGE; }
16070(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
16071 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
16072 { LC_COLLATE=C; export LC_COLLATE; }
16073(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
16074 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
16075 { LC_NUMERIC=C; export LC_NUMERIC; }
16076(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
16077 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
16078 { LC_MESSAGES=C; export LC_MESSAGES; }
16079
16080
16081# Name of the executable.
16082as_me=`(basename "$0") 2>/dev/null ||
16083$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16084 X"$0" : 'X\(//\)$' \| \
16085 X"$0" : 'X\(/\)$' \| \
16086 . : '\(.\)' 2>/dev/null ||
16087echo X/"$0" |
16088 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
16089 /^X\/\(\/\/\)$/{ s//\1/; q; }
16090 /^X\/\(\/\).*/{ s//\1/; q; }
16091 s/.*/./; q'`
16092
16093# PATH needs CR, and LINENO needs CR and PATH.
16094# Avoid depending upon Character Ranges.
16095as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16096as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16097as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16098as_cr_digits='0123456789'
16099as_cr_alnum=$as_cr_Letters$as_cr_digits
16100
16101# The user is always right.
16102if test "${PATH_SEPARATOR+set}" != set; then
16103 echo "#! /bin/sh" >conftest.sh
16104 echo "exit 0" >>conftest.sh
16105 chmod +x conftest.sh
16106 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
16107 PATH_SEPARATOR=';'
16108 else
16109 PATH_SEPARATOR=:
16110 fi
16111 rm -f conftest.sh
16112fi
16113
16114
16115 as_lineno_1=$LINENO
16116 as_lineno_2=$LINENO
16117 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16118 test "x$as_lineno_1" != "x$as_lineno_2" &&
16119 test "x$as_lineno_3" = "x$as_lineno_2" || {
16120 # Find who we are. Look in the path if we contain no path at all
16121 # relative or not.
16122 case $0 in
16123 *[\\/]* ) as_myself=$0 ;;
16124 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16125for as_dir in $PATH
16126do
16127 IFS=$as_save_IFS
16128 test -z "$as_dir" && as_dir=.
16129 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16130done
16131
16132 ;;
16133 esac
16134 # We did not find ourselves, most probably we were run as `sh COMMAND'
16135 # in which case we are not to be found in the path.
16136 if test "x$as_myself" = x; then
16137 as_myself=$0
16138 fi
16139 if test ! -f "$as_myself"; then
16140 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
16141echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
16142 { (exit 1); exit 1; }; }
16143 fi
16144 case $CONFIG_SHELL in
16145 '')
16146 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16147for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
16148do
16149 IFS=$as_save_IFS
16150 test -z "$as_dir" && as_dir=.
16151 for as_base in sh bash ksh sh5; do
16152 case $as_dir in
16153 /*)
16154 if ("$as_dir/$as_base" -c '
16155 as_lineno_1=$LINENO
16156 as_lineno_2=$LINENO
16157 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16158 test "x$as_lineno_1" != "x$as_lineno_2" &&
16159 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
16160 CONFIG_SHELL=$as_dir/$as_base
16161 export CONFIG_SHELL
16162 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
16163 fi;;
16164 esac
16165 done
16166done
16167;;
Jack Jansendd19cf82001-12-06 22:36:17 +000016168 esac
16169
Martin v. Löwis11437992002-04-12 09:54:03 +000016170 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
16171 # uniformly replaced by the line number. The first 'sed' inserts a
16172 # line-number line before each line; the second 'sed' does the real
16173 # work. The second script uses 'N' to pair each line-number line
16174 # with the numbered line, and appends trailing '-' during
16175 # substitution so that $LINENO is not a special case at line end.
16176 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
16177 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
16178 sed '=' <$as_myself |
16179 sed '
16180 N
16181 s,$,-,
16182 : loop
16183 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
16184 t loop
16185 s,-$,,
16186 s,^['$as_cr_digits']*\n,,
16187 ' >$as_me.lineno &&
16188 chmod +x $as_me.lineno ||
16189 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16190echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
16191 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016192
Martin v. Löwis11437992002-04-12 09:54:03 +000016193 # Don't try to exec as it changes $[0], causing all sort of problems
16194 # (the dirname of $[0] is not the place where we might find the
16195 # original and so on. Autoconf is especially sensible to this).
16196 . ./$as_me.lineno
16197 # Exit status is that of the last command.
16198 exit
16199}
16200
16201
16202case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16203 *c*,-n*) ECHO_N= ECHO_C='
16204' ECHO_T=' ' ;;
16205 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16206 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
16207esac
16208
16209if expr a : '\(a\)' >/dev/null 2>&1; then
16210 as_expr=expr
16211else
16212 as_expr=false
16213fi
16214
16215rm -f conf$$ conf$$.exe conf$$.file
16216echo >conf$$.file
16217if ln -s conf$$.file conf$$ 2>/dev/null; then
16218 # We could just check for DJGPP; but this test a) works b) is more generic
16219 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16220 if test -f conf$$.exe; then
16221 # Don't use ln at all; we don't have any links
16222 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016223 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016224 as_ln_s='ln -s'
16225 fi
16226elif ln conf$$.file conf$$ 2>/dev/null; then
16227 as_ln_s=ln
16228else
16229 as_ln_s='cp -p'
16230fi
16231rm -f conf$$ conf$$.exe conf$$.file
16232
16233as_executable_p="test -f"
16234
16235# Sed expression to map a string onto a valid CPP name.
16236as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
16237
16238# Sed expression to map a string onto a valid variable name.
16239as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
16240
16241
16242# IFS
16243# We need space, tab and new line, in precisely that order.
16244as_nl='
16245'
16246IFS=" $as_nl"
16247
16248# CDPATH.
16249$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
16250
16251exec 6>&1
16252
16253# Open the log real soon, to keep \$[0] and so on meaningful, and to
16254# report actual input values of CONFIG_FILES etc. instead of their
16255# values after options handling. Logging --version etc. is OK.
16256exec 5>>config.log
16257{
16258 echo
16259 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16260## Running $as_me. ##
16261_ASBOX
16262} >&5
16263cat >&5 <<_CSEOF
16264
16265This file was extended by $as_me, which was
16266generated by GNU Autoconf 2.53. Invocation command line was
16267
16268 CONFIG_FILES = $CONFIG_FILES
16269 CONFIG_HEADERS = $CONFIG_HEADERS
16270 CONFIG_LINKS = $CONFIG_LINKS
16271 CONFIG_COMMANDS = $CONFIG_COMMANDS
16272 $ $0 $@
16273
16274_CSEOF
16275echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
16276echo >&5
16277_ACEOF
16278
16279# Files that config.status was made for.
16280if test -n "$ac_config_files"; then
16281 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16282fi
16283
16284if test -n "$ac_config_headers"; then
16285 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16286fi
16287
16288if test -n "$ac_config_links"; then
16289 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16290fi
16291
16292if test -n "$ac_config_commands"; then
16293 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16294fi
16295
16296cat >>$CONFIG_STATUS <<\_ACEOF
16297
16298ac_cs_usage="\
16299\`$as_me' instantiates files from templates according to the
16300current configuration.
16301
16302Usage: $0 [OPTIONS] [FILE]...
16303
16304 -h, --help print this help, then exit
16305 -V, --version print version number, then exit
16306 -d, --debug don't remove temporary files
16307 --recheck update $as_me by reconfiguring in the same conditions
16308 --file=FILE[:TEMPLATE]
16309 instantiate the configuration file FILE
16310 --header=FILE[:TEMPLATE]
16311 instantiate the configuration header FILE
16312
16313Configuration files:
16314$config_files
16315
16316Configuration headers:
16317$config_headers
16318
16319Report bugs to <bug-autoconf@gnu.org>."
16320_ACEOF
16321
16322cat >>$CONFIG_STATUS <<_ACEOF
16323ac_cs_version="\\
16324config.status
16325configured by $0, generated by GNU Autoconf 2.53,
16326 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16327
16328Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16329Free Software Foundation, Inc.
16330This config.status script is free software; the Free Software Foundation
16331gives unlimited permission to copy, distribute and modify it."
16332srcdir=$srcdir
16333INSTALL="$INSTALL"
16334_ACEOF
16335
16336cat >>$CONFIG_STATUS <<\_ACEOF
16337# If no file are specified by the user, then we need to provide default
16338# value. By we need to know if files were specified by the user.
16339ac_need_defaults=:
16340while test $# != 0
16341do
16342 case $1 in
16343 --*=*)
16344 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16345 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16346 shift
16347 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16348 shift
16349 ;;
16350 -*);;
16351 *) # This is not an option, so the user has probably given explicit
16352 # arguments.
16353 ac_need_defaults=false;;
16354 esac
16355
16356 case $1 in
16357 # Handling of the options.
16358_ACEOF
16359cat >>$CONFIG_STATUS <<_ACEOF
16360 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16361 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16362 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16363_ACEOF
16364cat >>$CONFIG_STATUS <<\_ACEOF
16365 --version | --vers* | -V )
16366 echo "$ac_cs_version"; exit 0 ;;
16367 --he | --h)
16368 # Conflict between --help and --header
16369 { { echo "$as_me:$LINENO: error: ambiguous option: $1
16370Try \`$0 --help' for more information." >&5
16371echo "$as_me: error: ambiguous option: $1
16372Try \`$0 --help' for more information." >&2;}
16373 { (exit 1); exit 1; }; };;
16374 --help | --hel | -h )
16375 echo "$ac_cs_usage"; exit 0 ;;
16376 --debug | --d* | -d )
16377 debug=: ;;
16378 --file | --fil | --fi | --f )
16379 shift
16380 CONFIG_FILES="$CONFIG_FILES $1"
16381 ac_need_defaults=false;;
16382 --header | --heade | --head | --hea )
16383 shift
16384 CONFIG_HEADERS="$CONFIG_HEADERS $1"
16385 ac_need_defaults=false;;
16386
16387 # This is an error.
16388 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
16389Try \`$0 --help' for more information." >&5
16390echo "$as_me: error: unrecognized option: $1
16391Try \`$0 --help' for more information." >&2;}
16392 { (exit 1); exit 1; }; } ;;
16393
16394 *) ac_config_targets="$ac_config_targets $1" ;;
16395
16396 esac
16397 shift
16398done
16399
16400_ACEOF
16401
16402
16403
16404
16405
16406cat >>$CONFIG_STATUS <<\_ACEOF
16407for ac_config_target in $ac_config_targets
16408do
16409 case "$ac_config_target" in
16410 # Handling of arguments.
16411 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16412 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
16413 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16414 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
16415echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16416 { (exit 1); exit 1; }; };;
16417 esac
16418done
16419
16420# If the user did not use the arguments to specify the items to instantiate,
16421# then the envvar interface is used. Set only those that are not.
16422# We use the long form for the default assignment because of an extremely
16423# bizarre bug on SunOS 4.1.3.
16424if $ac_need_defaults; then
16425 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16426 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16427fi
16428
16429# Create a temporary directory, and hook for its removal unless debugging.
16430$debug ||
16431{
16432 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16433 trap '{ (exit 1); exit 1; }' 1 2 13 15
16434}
16435
16436# Create a (secure) tmp directory for tmp files.
16437: ${TMPDIR=/tmp}
16438{
16439 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16440 test -n "$tmp" && test -d "$tmp"
16441} ||
16442{
16443 tmp=$TMPDIR/cs$$-$RANDOM
16444 (umask 077 && mkdir $tmp)
16445} ||
16446{
16447 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16448 { (exit 1); exit 1; }
16449}
16450
16451_ACEOF
16452
16453cat >>$CONFIG_STATUS <<_ACEOF
16454
16455#
16456# CONFIG_FILES section.
16457#
16458
16459# No need to generate the scripts if there are no CONFIG_FILES.
16460# This happens for instance when ./config.status config.h
16461if test -n "\$CONFIG_FILES"; then
16462 # Protect against being on the right side of a sed subst in config.status.
16463 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16464 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16465s,@SHELL@,$SHELL,;t t
16466s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16467s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16468s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16469s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16470s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16471s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16472s,@exec_prefix@,$exec_prefix,;t t
16473s,@prefix@,$prefix,;t t
16474s,@program_transform_name@,$program_transform_name,;t t
16475s,@bindir@,$bindir,;t t
16476s,@sbindir@,$sbindir,;t t
16477s,@libexecdir@,$libexecdir,;t t
16478s,@datadir@,$datadir,;t t
16479s,@sysconfdir@,$sysconfdir,;t t
16480s,@sharedstatedir@,$sharedstatedir,;t t
16481s,@localstatedir@,$localstatedir,;t t
16482s,@libdir@,$libdir,;t t
16483s,@includedir@,$includedir,;t t
16484s,@oldincludedir@,$oldincludedir,;t t
16485s,@infodir@,$infodir,;t t
16486s,@mandir@,$mandir,;t t
16487s,@build_alias@,$build_alias,;t t
16488s,@host_alias@,$host_alias,;t t
16489s,@target_alias@,$target_alias,;t t
16490s,@DEFS@,$DEFS,;t t
16491s,@ECHO_C@,$ECHO_C,;t t
16492s,@ECHO_N@,$ECHO_N,;t t
16493s,@ECHO_T@,$ECHO_T,;t t
16494s,@LIBS@,$LIBS,;t t
16495s,@VERSION@,$VERSION,;t t
16496s,@SOVERSION@,$SOVERSION,;t t
16497s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
16498s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
16499s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
16500s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
16501s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
16502s,@MACHDEP@,$MACHDEP,;t t
16503s,@SGI_ABI@,$SGI_ABI,;t t
16504s,@CXX@,$CXX,;t t
16505s,@MAINOBJ@,$MAINOBJ,;t t
16506s,@EXEEXT@,$EXEEXT,;t t
16507s,@CC@,$CC,;t t
16508s,@CFLAGS@,$CFLAGS,;t t
16509s,@LDFLAGS@,$LDFLAGS,;t t
16510s,@CPPFLAGS@,$CPPFLAGS,;t t
16511s,@ac_ct_CC@,$ac_ct_CC,;t t
16512s,@OBJEXT@,$OBJEXT,;t t
16513s,@CPP@,$CPP,;t t
16514s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
16515s,@LIBRARY@,$LIBRARY,;t t
16516s,@LDLIBRARY@,$LDLIBRARY,;t t
16517s,@DLLLIBRARY@,$DLLLIBRARY,;t t
16518s,@BLDLIBRARY@,$BLDLIBRARY,;t t
16519s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
16520s,@INSTSONAME@,$INSTSONAME,;t t
16521s,@RUNSHARED@,$RUNSHARED,;t t
16522s,@LINKCC@,$LINKCC,;t t
16523s,@RANLIB@,$RANLIB,;t t
16524s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16525s,@AR@,$AR,;t t
16526s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16527s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16528s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16529s,@LN@,$LN,;t t
16530s,@OPT@,$OPT,;t t
16531s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
16532s,@SO@,$SO,;t t
16533s,@LDSHARED@,$LDSHARED,;t t
16534s,@BLDSHARED@,$BLDSHARED,;t t
16535s,@CCSHARED@,$CCSHARED,;t t
16536s,@LINKFORSHARED@,$LINKFORSHARED,;t t
16537s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016538s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000016539s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
16540s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
16541s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
16542s,@LDLAST@,$LDLAST,;t t
16543s,@THREADOBJ@,$THREADOBJ,;t t
16544s,@DLINCLDIR@,$DLINCLDIR,;t t
16545s,@DYNLOADFILE@,$DYNLOADFILE,;t t
16546s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
16547s,@LIBOBJS@,$LIBOBJS,;t t
16548s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
16549s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
16550s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
16551s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
16552s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
16553s,@LIBM@,$LIBM,;t t
16554s,@LIBC@,$LIBC,;t t
16555s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
16556s,@THREADHEADERS@,$THREADHEADERS,;t t
16557s,@SRCDIRS@,$SRCDIRS,;t t
16558CEOF
16559
16560_ACEOF
16561
16562 cat >>$CONFIG_STATUS <<\_ACEOF
16563 # Split the substitutions into bite-sized pieces for seds with
16564 # small command number limits, like on Digital OSF/1 and HP-UX.
16565 ac_max_sed_lines=48
16566 ac_sed_frag=1 # Number of current file.
16567 ac_beg=1 # First line for current file.
16568 ac_end=$ac_max_sed_lines # Line after last line for current file.
16569 ac_more_lines=:
16570 ac_sed_cmds=
16571 while $ac_more_lines; do
16572 if test $ac_beg -gt 1; then
16573 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16574 else
16575 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16576 fi
16577 if test ! -s $tmp/subs.frag; then
16578 ac_more_lines=false
16579 else
16580 # The purpose of the label and of the branching condition is to
16581 # speed up the sed processing (if there are no `@' at all, there
16582 # is no need to browse any of the substitutions).
16583 # These are the two extra sed commands mentioned above.
16584 (echo ':t
16585 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16586 if test -z "$ac_sed_cmds"; then
16587 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16588 else
16589 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16590 fi
16591 ac_sed_frag=`expr $ac_sed_frag + 1`
16592 ac_beg=$ac_end
16593 ac_end=`expr $ac_end + $ac_max_sed_lines`
16594 fi
16595 done
16596 if test -z "$ac_sed_cmds"; then
16597 ac_sed_cmds=cat
16598 fi
16599fi # test -n "$CONFIG_FILES"
16600
16601_ACEOF
16602cat >>$CONFIG_STATUS <<\_ACEOF
16603for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16604 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16605 case $ac_file in
16606 - | *:- | *:-:* ) # input from stdin
16607 cat >$tmp/stdin
16608 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16609 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16610 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16611 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16612 * ) ac_file_in=$ac_file.in ;;
16613 esac
16614
16615 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16616 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16617$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16618 X"$ac_file" : 'X\(//\)[^/]' \| \
16619 X"$ac_file" : 'X\(//\)$' \| \
16620 X"$ac_file" : 'X\(/\)' \| \
16621 . : '\(.\)' 2>/dev/null ||
16622echo X"$ac_file" |
16623 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16624 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16625 /^X\(\/\/\)$/{ s//\1/; q; }
16626 /^X\(\/\).*/{ s//\1/; q; }
16627 s/.*/./; q'`
16628 { case "$ac_dir" in
16629 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16630 *) as_incr_dir=.;;
16631esac
16632as_dummy="$ac_dir"
16633for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16634 case $as_mkdir_dir in
16635 # Skip DOS drivespec
16636 ?:) as_incr_dir=$as_mkdir_dir ;;
16637 *)
16638 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16639 test -d "$as_incr_dir" ||
16640 mkdir "$as_incr_dir" ||
16641 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16642echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16643 { (exit 1); exit 1; }; }
16644 ;;
16645 esac
16646done; }
16647
16648 ac_builddir=.
16649
16650if test "$ac_dir" != .; then
16651 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
16652 # A "../" for each directory in $ac_dir_suffix.
16653 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
16654else
16655 ac_dir_suffix= ac_top_builddir=
16656fi
16657
16658case $srcdir in
16659 .) # No --srcdir option. We are building in place.
16660 ac_srcdir=.
16661 if test -z "$ac_top_builddir"; then
16662 ac_top_srcdir=.
16663 else
16664 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
16665 fi ;;
16666 [\\/]* | ?:[\\/]* ) # Absolute path.
16667 ac_srcdir=$srcdir$ac_dir_suffix;
16668 ac_top_srcdir=$srcdir ;;
16669 *) # Relative path.
16670 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
16671 ac_top_srcdir=$ac_top_builddir$srcdir ;;
16672esac
16673# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
16674# absolute.
16675ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
16676ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
16677ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
16678ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
16679
16680
16681 case $INSTALL in
16682 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16683 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
16684 esac
16685
16686 if test x"$ac_file" != x-; then
16687 { echo "$as_me:$LINENO: creating $ac_file" >&5
16688echo "$as_me: creating $ac_file" >&6;}
16689 rm -f "$ac_file"
16690 fi
16691 # Let's still pretend it is `configure' which instantiates (i.e., don't
16692 # use $as_me), people would be surprised to read:
16693 # /* config.h. Generated by config.status. */
16694 if test x"$ac_file" = x-; then
16695 configure_input=
16696 else
16697 configure_input="$ac_file. "
16698 fi
16699 configure_input=$configure_input"Generated from `echo $ac_file_in |
16700 sed 's,.*/,,'` by configure."
16701
16702 # First look for the input files in the build tree, otherwise in the
16703 # src tree.
16704 ac_file_inputs=`IFS=:
16705 for f in $ac_file_in; do
16706 case $f in
16707 -) echo $tmp/stdin ;;
16708 [\\/$]*)
16709 # Absolute (can't be DOS-style, as IFS=:)
16710 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16711echo "$as_me: error: cannot find input file: $f" >&2;}
16712 { (exit 1); exit 1; }; }
16713 echo $f;;
16714 *) # Relative
16715 if test -f "$f"; then
16716 # Build tree
16717 echo $f
16718 elif test -f "$srcdir/$f"; then
16719 # Source tree
16720 echo $srcdir/$f
16721 else
16722 # /dev/null tree
16723 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16724echo "$as_me: error: cannot find input file: $f" >&2;}
16725 { (exit 1); exit 1; }; }
16726 fi;;
16727 esac
16728 done` || { (exit 1); exit 1; }
16729_ACEOF
16730cat >>$CONFIG_STATUS <<_ACEOF
16731 sed "$ac_vpsub
16732$extrasub
16733_ACEOF
16734cat >>$CONFIG_STATUS <<\_ACEOF
16735:t
16736/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16737s,@configure_input@,$configure_input,;t t
16738s,@srcdir@,$ac_srcdir,;t t
16739s,@abs_srcdir@,$ac_abs_srcdir,;t t
16740s,@top_srcdir@,$ac_top_srcdir,;t t
16741s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
16742s,@builddir@,$ac_builddir,;t t
16743s,@abs_builddir@,$ac_abs_builddir,;t t
16744s,@top_builddir@,$ac_top_builddir,;t t
16745s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
16746s,@INSTALL@,$ac_INSTALL,;t t
16747" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16748 rm -f $tmp/stdin
16749 if test x"$ac_file" != x-; then
16750 mv $tmp/out $ac_file
16751 else
16752 cat $tmp/out
16753 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016754 fi
16755
Martin v. Löwis11437992002-04-12 09:54:03 +000016756done
16757_ACEOF
16758cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016759
Martin v. Löwis11437992002-04-12 09:54:03 +000016760#
16761# CONFIG_HEADER section.
16762#
Guido van Rossum627b2d71993-12-24 10:39:16 +000016763
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016764# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16765# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016766#
16767# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000016768ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
16769ac_dB='[ ].*$,\1#\2'
16770ac_dC=' '
16771ac_dD=',;t'
16772# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16773ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
16774ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016775ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000016776ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016777
Martin v. Löwis11437992002-04-12 09:54:03 +000016778for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000016779 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000016780 case $ac_file in
16781 - | *:- | *:-:* ) # input from stdin
16782 cat >$tmp/stdin
16783 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16784 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16785 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16786 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16787 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016788 esac
16789
Martin v. Löwis11437992002-04-12 09:54:03 +000016790 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
16791echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000016792
Martin v. Löwis11437992002-04-12 09:54:03 +000016793 # First look for the input files in the build tree, otherwise in the
16794 # src tree.
16795 ac_file_inputs=`IFS=:
16796 for f in $ac_file_in; do
16797 case $f in
16798 -) echo $tmp/stdin ;;
16799 [\\/$]*)
16800 # Absolute (can't be DOS-style, as IFS=:)
16801 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16802echo "$as_me: error: cannot find input file: $f" >&2;}
16803 { (exit 1); exit 1; }; }
16804 echo $f;;
16805 *) # Relative
16806 if test -f "$f"; then
16807 # Build tree
16808 echo $f
16809 elif test -f "$srcdir/$f"; then
16810 # Source tree
16811 echo $srcdir/$f
16812 else
16813 # /dev/null tree
16814 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16815echo "$as_me: error: cannot find input file: $f" >&2;}
16816 { (exit 1); exit 1; }; }
16817 fi;;
16818 esac
16819 done` || { (exit 1); exit 1; }
16820 # Remove the trailing spaces.
16821 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016822
Martin v. Löwis11437992002-04-12 09:54:03 +000016823_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016824
Martin v. Löwis11437992002-04-12 09:54:03 +000016825# Transform confdefs.h into two sed scripts, `conftest.defines' and
16826# `conftest.undefs', that substitutes the proper values into
16827# config.h.in to produce config.h. The first handles `#define'
16828# templates, and the second `#undef' templates.
16829# And first: Protect against being on the right side of a sed subst in
16830# config.status. Protect against being in an unquoted here document
16831# in config.status.
16832rm -f conftest.defines conftest.undefs
16833# Using a here document instead of a string reduces the quoting nightmare.
16834# Putting comments in sed scripts is not portable.
16835#
16836# `end' is used to avoid that the second main sed command (meant for
16837# 0-ary CPP macros) applies to n-ary macro definitions.
16838# See the Autoconf documentation for `clear'.
16839cat >confdef2sed.sed <<\_ACEOF
16840s/[\\&,]/\\&/g
16841s,[\\$`],\\&,g
16842t clear
16843: clear
16844s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
16845t end
16846s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
16847: end
16848_ACEOF
16849# If some macros were called several times there might be several times
16850# the same #defines, which is useless. Nevertheless, we may not want to
16851# sort them, since we want the *last* AC-DEFINE to be honored.
16852uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
16853sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
16854rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016855
16856# This sed command replaces #undef with comments. This is necessary, for
16857# example, in the case of _POSIX_SOURCE, which is predefined and required
16858# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016859cat >>conftest.undefs <<\_ACEOF
16860s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
16861_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016862
Martin v. Löwis11437992002-04-12 09:54:03 +000016863# Break up conftest.defines because some shells have a limit on the size
16864# of here documents, and old seds have small limits too (100 cmds).
16865echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
16866echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
16867echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
16868echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016869rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000016870while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000016871do
Martin v. Löwis11437992002-04-12 09:54:03 +000016872 # Write a limited-size here document to $tmp/defines.sed.
16873 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
16874 # Speed up: don't consider the non `#define' lines.
16875 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
16876 # Work around the forget-to-reset-the-flag bug.
16877 echo 't clr' >>$CONFIG_STATUS
16878 echo ': clr' >>$CONFIG_STATUS
16879 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016880 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016881 sed -f $tmp/defines.sed $tmp/in >$tmp/out
16882 rm -f $tmp/in
16883 mv $tmp/out $tmp/in
16884' >>$CONFIG_STATUS
16885 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
16886 rm -f conftest.defines
16887 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000016888done
Martin v. Löwis11437992002-04-12 09:54:03 +000016889rm -f conftest.defines
16890echo ' fi # egrep' >>$CONFIG_STATUS
16891echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016892
Martin v. Löwis11437992002-04-12 09:54:03 +000016893# Break up conftest.undefs because some shells have a limit on the size
16894# of here documents, and old seds have small limits too (100 cmds).
16895echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
16896rm -f conftest.tail
16897while grep . conftest.undefs >/dev/null
16898do
16899 # Write a limited-size here document to $tmp/undefs.sed.
16900 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
16901 # Speed up: don't consider the non `#undef'
16902 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
16903 # Work around the forget-to-reset-the-flag bug.
16904 echo 't clr' >>$CONFIG_STATUS
16905 echo ': clr' >>$CONFIG_STATUS
16906 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
16907 echo 'CEOF
16908 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
16909 rm -f $tmp/in
16910 mv $tmp/out $tmp/in
16911' >>$CONFIG_STATUS
16912 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
16913 rm -f conftest.undefs
16914 mv conftest.tail conftest.undefs
16915done
16916rm -f conftest.undefs
16917
16918cat >>$CONFIG_STATUS <<\_ACEOF
16919 # Let's still pretend it is `configure' which instantiates (i.e., don't
16920 # use $as_me), people would be surprised to read:
16921 # /* config.h. Generated by config.status. */
16922 if test x"$ac_file" = x-; then
16923 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000016924 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016925 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000016926 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016927 cat $tmp/in >>$tmp/config.h
16928 rm -f $tmp/in
16929 if test x"$ac_file" != x-; then
16930 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16931 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
16932echo "$as_me: $ac_file is unchanged" >&6;}
16933 else
16934 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16935$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16936 X"$ac_file" : 'X\(//\)[^/]' \| \
16937 X"$ac_file" : 'X\(//\)$' \| \
16938 X"$ac_file" : 'X\(/\)' \| \
16939 . : '\(.\)' 2>/dev/null ||
16940echo X"$ac_file" |
16941 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16942 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16943 /^X\(\/\/\)$/{ s//\1/; q; }
16944 /^X\(\/\).*/{ s//\1/; q; }
16945 s/.*/./; q'`
16946 { case "$ac_dir" in
16947 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16948 *) as_incr_dir=.;;
16949esac
16950as_dummy="$ac_dir"
16951for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16952 case $as_mkdir_dir in
16953 # Skip DOS drivespec
16954 ?:) as_incr_dir=$as_mkdir_dir ;;
16955 *)
16956 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16957 test -d "$as_incr_dir" ||
16958 mkdir "$as_incr_dir" ||
16959 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16960echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16961 { (exit 1); exit 1; }; }
16962 ;;
16963 esac
16964done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016965
Martin v. Löwis11437992002-04-12 09:54:03 +000016966 rm -f $ac_file
16967 mv $tmp/config.h $ac_file
16968 fi
16969 else
16970 cat $tmp/config.h
16971 rm -f $tmp/config.h
16972 fi
16973done
16974_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000016975
Martin v. Löwis11437992002-04-12 09:54:03 +000016976cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016977
Martin v. Löwis11437992002-04-12 09:54:03 +000016978{ (exit 0); exit 0; }
16979_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016980chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000016981ac_clean_files=$ac_clean_files_save
16982
16983
16984# configure is writing to config.log, and then calls config.status.
16985# config.status does its own redirection, appending to config.log.
16986# Unfortunately, on DOS this fails, as config.log is still kept open
16987# by configure, so config.status won't be able to write to it; its
16988# output is simply discarded. So we exec the FD to /dev/null,
16989# effectively closing config.log, so it can be properly (re)opened and
16990# appended to by config.status. When coming back to configure, we
16991# need to make the FD available again.
16992if test "$no_create" != yes; then
16993 ac_cs_success=:
16994 exec 5>/dev/null
16995 $SHELL $CONFIG_STATUS || ac_cs_success=false
16996 exec 5>>config.log
16997 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16998 # would make configure fail if this is the last instruction.
16999 $ac_cs_success || { (exit 1); exit 1; }
17000fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017001
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017002
17003echo "creating Setup"
17004if test ! -f Modules/Setup
17005then
17006 cp $srcdir/Modules/Setup.dist Modules/Setup
17007fi
17008
17009echo "creating Setup.local"
17010if test ! -f Modules/Setup.local
17011then
17012 echo "# Edit this file for local setup changes" >Modules/Setup.local
17013fi
17014
17015echo "creating Makefile"
17016$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17017 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017018 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017019mv config.c Modules