blob: 2696de10859feda3a25b6a7dfd53f437403725e9 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +00002# From configure.in Revision: 1.329 .
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
Jack Jansen7b8c7542002-04-14 20:12:41 +0000846 --with(out)-universal-newlines disable/enable foreign newlines
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +0000847 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwis11437992002-04-12 09:54:03 +0000848 --with(out)-pymalloc disable/enable specialized mallocs
849 --with-wctype-functions use wctype.h functions
850 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking
851 --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking
852 --with-fpectl enable SIGFPE catching
853 --with-libm=STRING math library
854 --with-libc=STRING C library
855
856Some influential environment variables:
857 CC C compiler command
858 CFLAGS C compiler flags
859 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
860 nonstandard directory <lib dir>
861 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
862 headers in a nonstandard directory <include dir>
863 CPP C preprocessor
864
865Use these variables to override the choices made by `configure' or to help
866it to find libraries and programs with nonstandard names/locations.
867
868_ACEOF
869fi
870
871if test "$ac_init_help" = "recursive"; then
872 # If there are subdirs, report their specific --help.
873 ac_popdir=`pwd`
874 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
875 test -d $ac_dir || continue
876 ac_builddir=.
877
878if test "$ac_dir" != .; then
879 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
880 # A "../" for each directory in $ac_dir_suffix.
881 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
882else
883 ac_dir_suffix= ac_top_builddir=
884fi
885
886case $srcdir in
887 .) # No --srcdir option. We are building in place.
888 ac_srcdir=.
889 if test -z "$ac_top_builddir"; then
890 ac_top_srcdir=.
891 else
892 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
893 fi ;;
894 [\\/]* | ?:[\\/]* ) # Absolute path.
895 ac_srcdir=$srcdir$ac_dir_suffix;
896 ac_top_srcdir=$srcdir ;;
897 *) # Relative path.
898 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
899 ac_top_srcdir=$ac_top_builddir$srcdir ;;
900esac
901# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
902# absolute.
903ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
904ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
905ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
906ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
907
908 cd $ac_dir
909 # Check for guested configure; otherwise get Cygnus style configure.
910 if test -f $ac_srcdir/configure.gnu; then
911 echo
912 $SHELL $ac_srcdir/configure.gnu --help=recursive
913 elif test -f $ac_srcdir/configure; then
914 echo
915 $SHELL $ac_srcdir/configure --help=recursive
916 elif test -f $ac_srcdir/configure.ac ||
917 test -f $ac_srcdir/configure.in; then
918 echo
919 $ac_configure --help
920 else
921 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
922 fi
923 cd $ac_popdir
924 done
925fi
926
927test -n "$ac_init_help" && exit 0
928if $ac_init_version; then
929 cat <<\_ACEOF
930
931Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
932Free Software Foundation, Inc.
933This configure script is free software; the Free Software Foundation
934gives unlimited permission to copy, distribute and modify it.
935_ACEOF
936 exit 0
937fi
938exec 5>config.log
939cat >&5 <<_ACEOF
940This file contains any messages produced by compilers while
941running configure, to aid debugging if configure makes a mistake.
942
943It was created by $as_me, which was
944generated by GNU Autoconf 2.53. Invocation command line was
945
946 $ $0 $@
947
948_ACEOF
949{
950cat <<_ASUNAME
951## --------- ##
952## Platform. ##
953## --------- ##
954
955hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
956uname -m = `(uname -m) 2>/dev/null || echo unknown`
957uname -r = `(uname -r) 2>/dev/null || echo unknown`
958uname -s = `(uname -s) 2>/dev/null || echo unknown`
959uname -v = `(uname -v) 2>/dev/null || echo unknown`
960
961/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
962/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
963
964/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
965/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
966/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
967hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
968/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
969/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
970/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
971
972_ASUNAME
973
974as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
975for as_dir in $PATH
976do
977 IFS=$as_save_IFS
978 test -z "$as_dir" && as_dir=.
979 echo "PATH: $as_dir"
980done
981
982} >&5
983
984cat >&5 <<_ACEOF
985
986
987## ----------- ##
988## Core tests. ##
989## ----------- ##
990
991_ACEOF
992
993
994# Keep a trace of the command line.
995# Strip out --no-create and --no-recursion so they do not pile up.
996# Also quote any args containing shell meta-characters.
997ac_configure_args=
998ac_sep=
999for ac_arg
1000do
1001 case $ac_arg in
1002 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1003 | --no-cr | --no-c | -n ) continue ;;
1004 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1005 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1006 continue ;;
1007 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1008 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1009 esac
1010 case " $ac_configure_args " in
1011 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1012 *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1013 ac_sep=" " ;;
1014 esac
1015 # Get rid of the leading space.
1016done
1017
1018# When interrupted or exit'd, cleanup temporary files, and complete
1019# config.log. We remove comments because anyway the quotes in there
1020# would cause problems or look ugly.
1021# WARNING: Be sure not to use single quotes in there, as some shells,
1022# such as our DU 5.0 friend, will then `close' the trap.
1023trap 'exit_status=$?
1024 # Save into config.log some information that might help in debugging.
1025 {
1026 echo
1027 cat <<\_ASBOX
1028## ---------------- ##
1029## Cache variables. ##
1030## ---------------- ##
1031_ASBOX
1032 echo
1033 # The following way of writing the cache mishandles newlines in values,
1034{
1035 (set) 2>&1 |
1036 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1037 *ac_space=\ *)
1038 sed -n \
1039 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1040 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1041 ;;
1042 *)
1043 sed -n \
1044 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1045 ;;
1046 esac;
1047}
1048 echo
1049 if test -s confdefs.h; then
1050 cat <<\_ASBOX
1051## ----------- ##
1052## confdefs.h. ##
1053## ----------- ##
1054_ASBOX
1055 echo
1056 sed "/^$/d" confdefs.h
1057 echo
1058 fi
1059 test "$ac_signal" != 0 &&
1060 echo "$as_me: caught signal $ac_signal"
1061 echo "$as_me: exit $exit_status"
1062 } >&5
1063 rm -f core core.* *.core &&
1064 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1065 exit $exit_status
1066 ' 0
1067for ac_signal in 1 2 13 15; do
1068 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1069done
1070ac_signal=0
1071
1072# confdefs.h avoids OS command line length limits that DEFS can exceed.
1073rm -rf conftest* confdefs.h
1074# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1075echo >confdefs.h
1076
1077# Predefined preprocessor variables.
1078
1079cat >>confdefs.h <<_ACEOF
1080#define PACKAGE_NAME "$PACKAGE_NAME"
1081_ACEOF
1082
1083
1084cat >>confdefs.h <<_ACEOF
1085#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1086_ACEOF
1087
1088
1089cat >>confdefs.h <<_ACEOF
1090#define PACKAGE_VERSION "$PACKAGE_VERSION"
1091_ACEOF
1092
1093
1094cat >>confdefs.h <<_ACEOF
1095#define PACKAGE_STRING "$PACKAGE_STRING"
1096_ACEOF
1097
1098
1099cat >>confdefs.h <<_ACEOF
1100#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1101_ACEOF
1102
1103
1104# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001105# Prefer explicitly selected file to automatically selected ones.
1106if test -z "$CONFIG_SITE"; then
1107 if test "x$prefix" != xNONE; then
1108 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1109 else
1110 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1111 fi
1112fi
1113for ac_site_file in $CONFIG_SITE; do
1114 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1116echo "$as_me: loading site script $ac_site_file" >&6;}
1117 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001118 . "$ac_site_file"
1119 fi
1120done
1121
1122if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 # Some versions of bash will fail to source /dev/null (special
1124 # files actually), so we avoid doing that.
1125 if test -f "$cache_file"; then
1126 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1127echo "$as_me: loading cache $cache_file" >&6;}
1128 case $cache_file in
1129 [\\/]* | ?:[\\/]* ) . $cache_file;;
1130 *) . ./$cache_file;;
1131 esac
1132 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001133else
Martin v. Löwis11437992002-04-12 09:54:03 +00001134 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1135echo "$as_me: creating cache $cache_file" >&6;}
1136 >$cache_file
1137fi
1138
1139# Check that the precious variables saved in the cache have kept the same
1140# value.
1141ac_cache_corrupted=false
1142for ac_var in `(set) 2>&1 |
1143 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1144 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1145 eval ac_new_set=\$ac_env_${ac_var}_set
1146 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1147 eval ac_new_val="\$ac_env_${ac_var}_value"
1148 case $ac_old_set,$ac_new_set in
1149 set,)
1150 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1151echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1152 ac_cache_corrupted=: ;;
1153 ,set)
1154 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1155echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1156 ac_cache_corrupted=: ;;
1157 ,);;
1158 *)
1159 if test "x$ac_old_val" != "x$ac_new_val"; then
1160 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1161echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1162 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1163echo "$as_me: former value: $ac_old_val" >&2;}
1164 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1165echo "$as_me: current value: $ac_new_val" >&2;}
1166 ac_cache_corrupted=:
1167 fi;;
1168 esac
1169 # Pass precious variables to config.status.
1170 if test "$ac_new_set" = set; then
1171 case $ac_new_val in
1172 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1173 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1174 *) ac_arg=$ac_var=$ac_new_val ;;
1175 esac
1176 case " $ac_configure_args " in
1177 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1178 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1179 esac
1180 fi
1181done
1182if $ac_cache_corrupted; then
1183 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1184echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1185 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1186echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1187 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001188fi
1189
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001191ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001192ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1193ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1194ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001195
Guido van Rossum627b2d71993-12-24 10:39:16 +00001196
Michael W. Hudson54241132001-12-07 15:38:26 +00001197
1198
Guido van Rossum627b2d71993-12-24 10:39:16 +00001199
Martin v. Löwis11437992002-04-12 09:54:03 +00001200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213ac_config_headers="$ac_config_headers pyconfig.h"
1214
1215
1216# This is for stuff that absolutely must end up in pyconfig.h.
1217# Please use pyport.h instead, if possible.
1218
1219
1220
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001221# Set VERSION so we only need to edit in one place (i.e., here)
1222
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00001223VERSION=2.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001224
Martin v. Löwis1142de32002-03-29 16:28:31 +00001225
1226SOVERSION=1.0
1227
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001228# Arguments passed to configure.
1229
1230CONFIG_ARGS="$ac_configure_args"
1231
Michael W. Hudson54241132001-12-07 15:38:26 +00001232
Jack Jansene578a632001-08-15 01:27:14 +00001233# Check whether --enable-framework or --disable-framework was given.
1234if test "${enable_framework+set}" = set; then
1235 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001236
Jack Jansene578a632001-08-15 01:27:14 +00001237 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001238 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001239 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001240 esac
1241 case $enableval in
1242 no)
1243 PYTHONFRAMEWORK=
1244 PYTHONFRAMEWORKDIR=no-framework
1245 PYTHONFRAMEWORKPREFIX=
1246 PYTHONFRAMEWORKINSTALLDIR=
1247 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001248 ;;
1249 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001250 PYTHONFRAMEWORK=Python
1251 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001252 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001253 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1254 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001255 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001256
Guido van Rossum563e7081996-09-10 18:20:48 +00001257else
Martin v. Löwis11437992002-04-12 09:54:03 +00001258
Jack Jansene578a632001-08-15 01:27:14 +00001259 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001260 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001261 PYTHONFRAMEWORKPREFIX=
1262 PYTHONFRAMEWORKINSTALLDIR=
1263 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001264
Martin v. Löwis11437992002-04-12 09:54:03 +00001265fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001266
1267
1268
1269
Jack Jansene578a632001-08-15 01:27:14 +00001270
1271##AC_ARG_WITH(dyld,
1272##[ --with-dyld Use (OpenStep|Rhapsody) dynamic linker],,)
1273##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001274# Set name for machine-dependent library files
1275
Martin v. Löwis11437992002-04-12 09:54:03 +00001276echo "$as_me:$LINENO: checking MACHDEP" >&5
1277echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001278if test -z "$MACHDEP"
1279then
Guido van Rossum563e7081996-09-10 18:20:48 +00001280 ac_sys_system=`uname -s`
Martin v. Löwis130fb172001-07-19 11:00:41 +00001281 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001282 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001283 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001284 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001285 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001286 ac_md_system=`echo $ac_sys_system |
1287 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1288 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001289 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001290 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001291
Guido van Rossum07397971997-04-29 21:49:50 +00001292 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001293 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001294 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001295 atheos*) MACHDEP="atheos";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001296 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001297 esac
1298fi
Guido van Rossum91922671997-10-09 20:24:13 +00001299
1300#
1301# SGI compilers allow the specification of the both the ABI and the
1302# ISA on the command line. Depending on the values of these switches,
1303# different and often incompatable code will be generated.
1304#
1305# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1306# thus supply support for various ABI/ISA combinations. The MACHDEP
1307# variable is also adjusted.
1308#
1309
1310if test ! -z "$SGI_ABI"
1311then
1312 CC="cc $SGI_ABI"
1313 LDFLAGS="$SGI_ABI $LDFLAGS"
1314 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1315fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001316echo "$as_me:$LINENO: result: $MACHDEP" >&5
1317echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001318
Guido van Rossum627b2d71993-12-24 10:39:16 +00001319# checks for alternative programs
Martin v. Löwis11437992002-04-12 09:54:03 +00001320echo "$as_me:$LINENO: checking for --without-gcc" >&5
1321echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1322
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001323# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001324if test "${with_gcc+set}" = set; then
1325 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001326
Guido van Rossum7f43da71994-08-01 12:15:30 +00001327 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001328 no) CC=cc
1329 without_gcc=yes;;
1330 yes) CC=gcc
1331 without_gcc=no;;
1332 *) CC=$withval
1333 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001334 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001335else
Martin v. Löwis11437992002-04-12 09:54:03 +00001336
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001337 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001338 AIX*) CC=cc_r
1339 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001340 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001341 case $BE_HOST_CPU in
1342 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001343 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001344 without_gcc=yes
Fred Drake5790be12000-10-09 17:06:13 +00001345 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 +00001346 CCSHARED="-UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001347 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001348 ;;
1349 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001350 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001351 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +00001352 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001353 ;;
1354 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001355 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1356echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1357 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001358 ;;
1359 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001360 AR="\$(srcdir)/Modules/ar_beos"
1361 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001362 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001363 Monterey*)
1364 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001365 without_gcc=;;
1366 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001367 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001368fi;
1369echo "$as_me:$LINENO: result: $without_gcc" >&5
1370echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001371
1372
Guido van Rossum95012191999-12-16 17:50:52 +00001373
Fred Drakea1a84e72001-03-06 05:52:16 +00001374MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001375echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1376echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1377
Guido van Rossum95012191999-12-16 17:50:52 +00001378# Check whether --with-cxx or --without-cxx was given.
1379if test "${with_cxx+set}" = set; then
1380 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001381
Martin v. Löwis22352952000-12-13 17:37:02 +00001382 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001383 case $withval in
1384 no) CXX=
1385 with_cxx=no;;
1386 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001387 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001388 with_cxx=$withval;;
1389 esac
1390else
Martin v. Löwis11437992002-04-12 09:54:03 +00001391
Guido van Rossum95012191999-12-16 17:50:52 +00001392 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001393 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001394
Martin v. Löwis11437992002-04-12 09:54:03 +00001395fi;
1396echo "$as_me:$LINENO: result: $with_cxx" >&5
1397echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001398
1399if test "$with_cxx" = "yes"
1400then
Martin v. Löwis11437992002-04-12 09:54:03 +00001401 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1402echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1403 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001404fi
1405
1406
1407
1408
Martin v. Löwis11437992002-04-12 09:54:03 +00001409if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001410then
1411 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1412do
Martin v. Löwis11437992002-04-12 09:54:03 +00001413 # 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 +00001414set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001415echo "$as_me:$LINENO: checking for $ac_word" >&5
1416echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1417if test "${ac_cv_prog_CXX+set}" = set; then
1418 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001419else
1420 if test -n "$CXX"; then
1421 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1422else
Martin v. Löwis11437992002-04-12 09:54:03 +00001423as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1424for as_dir in $PATH
1425do
1426 IFS=$as_save_IFS
1427 test -z "$as_dir" && as_dir=.
1428 for ac_exec_ext in '' $ac_executable_extensions; do
1429 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1430 ac_cv_prog_CXX="$ac_prog"
1431 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1432 break 2
1433 fi
1434done
1435done
1436
Martin v. Löwis22352952000-12-13 17:37:02 +00001437fi
1438fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001439CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001440if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001441 echo "$as_me:$LINENO: result: $CXX" >&5
1442echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001443else
Martin v. Löwis11437992002-04-12 09:54:03 +00001444 echo "$as_me:$LINENO: result: no" >&5
1445echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001446fi
1447
Martin v. Löwis11437992002-04-12 09:54:03 +00001448 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001449done
1450test -n "$CXX" || CXX="notfound"
1451
1452 if test "$CXX" = "notfound"
1453 then
1454 CXX=
1455 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001456 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001457ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001458ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1459ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1460ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1461 cat >conftest.$ac_ext <<_ACEOF
1462#line $LINENO "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +00001463#include "confdefs.h"
1464
Martin v. Löwis11437992002-04-12 09:54:03 +00001465#ifdef F77_DUMMY_MAIN
1466# ifdef __cplusplus
1467 extern "C"
1468# endif
1469 int F77_DUMMY_MAIN() { return 1; }
1470#endif
1471int
1472main ()
1473{
Michael W. Hudson54241132001-12-07 15:38:26 +00001474
Martin v. Löwis11437992002-04-12 09:54:03 +00001475 ;
1476 return 0;
1477}
1478_ACEOF
1479ac_clean_files_save=$ac_clean_files
1480ac_clean_files="$ac_clean_files a.out a.exe"
1481# Try to create an executable without -o first, disregard a.out.
1482# It will help us diagnose broken compilers, and finding out an intuition
1483# of exeext.
1484echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1485echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1486ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1487if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1488 (eval $ac_link_default) 2>&5
1489 ac_status=$?
1490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1491 (exit $ac_status); }; then
1492 # Find the output, starting from the most likely. This scheme is
1493# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1494# resort.
1495
1496# Be careful to initialize this variable, since it used to be cached.
1497# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1498ac_cv_exeext=
1499for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1500 ls a.out conftest 2>/dev/null;
1501 ls a.* conftest.* 2>/dev/null`; do
1502 case $ac_file in
1503 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1504 a.out ) # We found the default executable, but exeext='' is most
1505 # certainly right.
1506 break;;
1507 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1508 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1509 export ac_cv_exeext
1510 break;;
1511 * ) break;;
1512 esac
1513done
1514else
1515 echo "$as_me: failed program was:" >&5
1516cat conftest.$ac_ext >&5
1517{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables" >&5
1518echo "$as_me: error: C++ compiler cannot create executables" >&2;}
1519 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001520fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001521
1522ac_exeext=$ac_cv_exeext
1523echo "$as_me:$LINENO: result: $ac_file" >&5
1524echo "${ECHO_T}$ac_file" >&6
1525
1526# Check the compiler produces executables we can run. If not, either
1527# the compiler is broken, or we cross compile.
1528echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1529echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1530# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1531# If not cross compiling, check that we can run a simple program.
1532if test "$cross_compiling" != yes; then
1533 if { ac_try='./$ac_file'
1534 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1535 (eval $ac_try) 2>&5
1536 ac_status=$?
1537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1538 (exit $ac_status); }; }; then
1539 cross_compiling=no
1540 else
1541 if test "$cross_compiling" = maybe; then
1542 cross_compiling=yes
1543 else
1544 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1545If you meant to cross compile, use \`--host'." >&5
1546echo "$as_me: error: cannot run C++ compiled programs.
1547If you meant to cross compile, use \`--host'." >&2;}
1548 { (exit 1); exit 1; }; }
1549 fi
1550 fi
1551fi
1552echo "$as_me:$LINENO: result: yes" >&5
1553echo "${ECHO_T}yes" >&6
1554
1555rm -f a.out a.exe conftest$ac_cv_exeext
1556ac_clean_files=$ac_clean_files_save
1557# Check the compiler produces executables we can run. If not, either
1558# the compiler is broken, or we cross compile.
1559echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1560echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1561echo "$as_me:$LINENO: result: $cross_compiling" >&5
1562echo "${ECHO_T}$cross_compiling" >&6
1563
1564echo "$as_me:$LINENO: checking for suffix of executables" >&5
1565echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1566if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1567 (eval $ac_link) 2>&5
1568 ac_status=$?
1569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1570 (exit $ac_status); }; then
1571 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1572# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1573# work properly (i.e., refer to `conftest.exe'), while it won't with
1574# `rm'.
1575for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1576 case $ac_file in
1577 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1578 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1579 export ac_cv_exeext
1580 break;;
1581 * ) break;;
1582 esac
1583done
1584else
1585 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1586echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1587 { (exit 1); exit 1; }; }
1588fi
1589
1590rm -f conftest$ac_cv_exeext
1591echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1592echo "${ECHO_T}$ac_cv_exeext" >&6
1593
1594rm -f conftest.$ac_ext
1595EXEEXT=$ac_cv_exeext
1596ac_exeext=$EXEEXT
1597
1598 ac_ext=c
1599ac_cpp='$CPP $CPPFLAGS'
1600ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1601ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1602ac_compiler_gnu=$ac_cv_c_compiler_gnu
1603
1604
Martin v. Löwis22352952000-12-13 17:37:02 +00001605
1606 fi
1607fi
1608
Guido van Rossum8b131c51995-03-09 14:10:13 +00001609# If the user switches compilers, we can't believe the cache
1610if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1611then
Martin v. Löwis11437992002-04-12 09:54:03 +00001612 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1613(it is also a good idea to do 'make clean' before compiling)" >&5
1614echo "$as_me: error: cached CC is different -- throw away $cache_file
1615(it is also a good idea to do 'make clean' before compiling)" >&2;}
1616 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001617fi
1618
Martin v. Löwis11437992002-04-12 09:54:03 +00001619ac_ext=c
1620ac_cpp='$CPP $CPPFLAGS'
1621ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1622ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1623ac_compiler_gnu=$ac_cv_c_compiler_gnu
1624if test -n "$ac_tool_prefix"; then
1625 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1626set dummy ${ac_tool_prefix}gcc; ac_word=$2
1627echo "$as_me:$LINENO: checking for $ac_word" >&5
1628echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1629if test "${ac_cv_prog_CC+set}" = set; then
1630 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001631else
1632 if test -n "$CC"; then
1633 ac_cv_prog_CC="$CC" # Let the user override the test.
1634else
Martin v. Löwis11437992002-04-12 09:54:03 +00001635as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1636for as_dir in $PATH
1637do
1638 IFS=$as_save_IFS
1639 test -z "$as_dir" && as_dir=.
1640 for ac_exec_ext in '' $ac_executable_extensions; do
1641 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1642 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1643 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1644 break 2
1645 fi
1646done
1647done
1648
Jack Jansendd19cf82001-12-06 22:36:17 +00001649fi
1650fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001651CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001652if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001653 echo "$as_me:$LINENO: result: $CC" >&5
1654echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001655else
Martin v. Löwis11437992002-04-12 09:54:03 +00001656 echo "$as_me:$LINENO: result: no" >&5
1657echo "${ECHO_T}no" >&6
1658fi
1659
1660fi
1661if test -z "$ac_cv_prog_CC"; then
1662 ac_ct_CC=$CC
1663 # Extract the first word of "gcc", so it can be a program name with args.
1664set dummy gcc; ac_word=$2
1665echo "$as_me:$LINENO: checking for $ac_word" >&5
1666echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1667if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1668 echo $ECHO_N "(cached) $ECHO_C" >&6
1669else
1670 if test -n "$ac_ct_CC"; then
1671 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1672else
1673as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1674for as_dir in $PATH
1675do
1676 IFS=$as_save_IFS
1677 test -z "$as_dir" && as_dir=.
1678 for ac_exec_ext in '' $ac_executable_extensions; do
1679 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1680 ac_cv_prog_ac_ct_CC="gcc"
1681 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1682 break 2
1683 fi
1684done
1685done
1686
1687fi
1688fi
1689ac_ct_CC=$ac_cv_prog_ac_ct_CC
1690if test -n "$ac_ct_CC"; then
1691 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1692echo "${ECHO_T}$ac_ct_CC" >&6
1693else
1694 echo "$as_me:$LINENO: result: no" >&5
1695echo "${ECHO_T}no" >&6
1696fi
1697
1698 CC=$ac_ct_CC
1699else
1700 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001701fi
1702
Jack Jansendd19cf82001-12-06 22:36:17 +00001703if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001704 if test -n "$ac_tool_prefix"; then
1705 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1706set dummy ${ac_tool_prefix}cc; ac_word=$2
1707echo "$as_me:$LINENO: checking for $ac_word" >&5
1708echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1709if test "${ac_cv_prog_CC+set}" = set; then
1710 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001711else
1712 if test -n "$CC"; then
1713 ac_cv_prog_CC="$CC" # Let the user override the test.
1714else
Martin v. Löwis11437992002-04-12 09:54:03 +00001715as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1716for as_dir in $PATH
1717do
1718 IFS=$as_save_IFS
1719 test -z "$as_dir" && as_dir=.
1720 for ac_exec_ext in '' $ac_executable_extensions; do
1721 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1722 ac_cv_prog_CC="${ac_tool_prefix}cc"
1723 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1724 break 2
1725 fi
1726done
1727done
1728
1729fi
1730fi
1731CC=$ac_cv_prog_CC
1732if test -n "$CC"; then
1733 echo "$as_me:$LINENO: result: $CC" >&5
1734echo "${ECHO_T}$CC" >&6
1735else
1736 echo "$as_me:$LINENO: result: no" >&5
1737echo "${ECHO_T}no" >&6
1738fi
1739
1740fi
1741if test -z "$ac_cv_prog_CC"; then
1742 ac_ct_CC=$CC
1743 # Extract the first word of "cc", so it can be a program name with args.
1744set dummy cc; ac_word=$2
1745echo "$as_me:$LINENO: checking for $ac_word" >&5
1746echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1747if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1748 echo $ECHO_N "(cached) $ECHO_C" >&6
1749else
1750 if test -n "$ac_ct_CC"; then
1751 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1752else
1753as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1754for as_dir in $PATH
1755do
1756 IFS=$as_save_IFS
1757 test -z "$as_dir" && as_dir=.
1758 for ac_exec_ext in '' $ac_executable_extensions; do
1759 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1760 ac_cv_prog_ac_ct_CC="cc"
1761 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1762 break 2
1763 fi
1764done
1765done
1766
1767fi
1768fi
1769ac_ct_CC=$ac_cv_prog_ac_ct_CC
1770if test -n "$ac_ct_CC"; then
1771 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1772echo "${ECHO_T}$ac_ct_CC" >&6
1773else
1774 echo "$as_me:$LINENO: result: no" >&5
1775echo "${ECHO_T}no" >&6
1776fi
1777
1778 CC=$ac_ct_CC
1779else
1780 CC="$ac_cv_prog_CC"
1781fi
1782
1783fi
1784if test -z "$CC"; then
1785 # Extract the first word of "cc", so it can be a program name with args.
1786set dummy cc; ac_word=$2
1787echo "$as_me:$LINENO: checking for $ac_word" >&5
1788echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1789if test "${ac_cv_prog_CC+set}" = set; then
1790 echo $ECHO_N "(cached) $ECHO_C" >&6
1791else
1792 if test -n "$CC"; then
1793 ac_cv_prog_CC="$CC" # Let the user override the test.
1794else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001795 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001796as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1797for as_dir in $PATH
1798do
1799 IFS=$as_save_IFS
1800 test -z "$as_dir" && as_dir=.
1801 for ac_exec_ext in '' $ac_executable_extensions; do
1802 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1803 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1804 ac_prog_rejected=yes
1805 continue
1806 fi
1807 ac_cv_prog_CC="cc"
1808 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1809 break 2
1810 fi
1811done
1812done
1813
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001814if test $ac_prog_rejected = yes; then
1815 # We found a bogon in the path, so make sure we never use it.
1816 set dummy $ac_cv_prog_CC
1817 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001818 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001819 # We chose a different compiler from the bogus one.
1820 # However, it has the same basename, so the bogon will be chosen
1821 # first if we set CC to just the basename; use the full file name.
1822 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001823 set dummy "$as_dir/$ac_word" ${1+"$@"}
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001824 shift
1825 ac_cv_prog_CC="$@"
1826 fi
1827fi
1828fi
1829fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001830CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001831if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001832 echo "$as_me:$LINENO: result: $CC" >&5
1833echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001834else
Martin v. Löwis11437992002-04-12 09:54:03 +00001835 echo "$as_me:$LINENO: result: no" >&5
1836echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001837fi
1838
Martin v. Löwis11437992002-04-12 09:54:03 +00001839fi
1840if test -z "$CC"; then
1841 if test -n "$ac_tool_prefix"; then
1842 for ac_prog in cl
1843 do
1844 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1845set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1846echo "$as_me:$LINENO: checking for $ac_word" >&5
1847echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1848if test "${ac_cv_prog_CC+set}" = set; then
1849 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001850else
1851 if test -n "$CC"; then
1852 ac_cv_prog_CC="$CC" # Let the user override the test.
1853else
Martin v. Löwis11437992002-04-12 09:54:03 +00001854as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1855for as_dir in $PATH
1856do
1857 IFS=$as_save_IFS
1858 test -z "$as_dir" && as_dir=.
1859 for ac_exec_ext in '' $ac_executable_extensions; do
1860 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1861 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1862 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1863 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00001864 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001865done
1866done
1867
1868fi
1869fi
1870CC=$ac_cv_prog_CC
1871if test -n "$CC"; then
1872 echo "$as_me:$LINENO: result: $CC" >&5
1873echo "${ECHO_T}$CC" >&6
1874else
1875 echo "$as_me:$LINENO: result: no" >&5
1876echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001877fi
1878
Martin v. Löwis11437992002-04-12 09:54:03 +00001879 test -n "$CC" && break
1880 done
1881fi
1882if test -z "$CC"; then
1883 ac_ct_CC=$CC
1884 for ac_prog in cl
1885do
1886 # Extract the first word of "$ac_prog", so it can be a program name with args.
1887set dummy $ac_prog; ac_word=$2
1888echo "$as_me:$LINENO: checking for $ac_word" >&5
1889echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1890if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1891 echo $ECHO_N "(cached) $ECHO_C" >&6
1892else
1893 if test -n "$ac_ct_CC"; then
1894 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1895else
1896as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1897for as_dir in $PATH
1898do
1899 IFS=$as_save_IFS
1900 test -z "$as_dir" && as_dir=.
1901 for ac_exec_ext in '' $ac_executable_extensions; do
1902 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1903 ac_cv_prog_ac_ct_CC="$ac_prog"
1904 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1905 break 2
1906 fi
1907done
1908done
Jack Jansendd19cf82001-12-06 22:36:17 +00001909
Martin v. Löwis11437992002-04-12 09:54:03 +00001910fi
1911fi
1912ac_ct_CC=$ac_cv_prog_ac_ct_CC
1913if test -n "$ac_ct_CC"; then
1914 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1915echo "${ECHO_T}$ac_ct_CC" >&6
1916else
1917 echo "$as_me:$LINENO: result: no" >&5
1918echo "${ECHO_T}no" >&6
1919fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001920
Martin v. Löwis11437992002-04-12 09:54:03 +00001921 test -n "$ac_ct_CC" && break
1922done
Michael W. Hudson54241132001-12-07 15:38:26 +00001923
Martin v. Löwis11437992002-04-12 09:54:03 +00001924 CC=$ac_ct_CC
1925fi
1926
1927fi
1928
1929
1930test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
1931echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
1932 { (exit 1); exit 1; }; }
1933
1934# Provide some information about the compiler.
1935echo "$as_me:$LINENO:" \
1936 "checking for C compiler version" >&5
1937ac_compiler=`set X $ac_compile; echo $2`
1938{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1939 (eval $ac_compiler --version </dev/null >&5) 2>&5
1940 ac_status=$?
1941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1942 (exit $ac_status); }
1943{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1944 (eval $ac_compiler -v </dev/null >&5) 2>&5
1945 ac_status=$?
1946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1947 (exit $ac_status); }
1948{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1949 (eval $ac_compiler -V </dev/null >&5) 2>&5
1950 ac_status=$?
1951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1952 (exit $ac_status); }
1953
1954cat >conftest.$ac_ext <<_ACEOF
1955#line $LINENO "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00001956#include "confdefs.h"
1957
Martin v. Löwis11437992002-04-12 09:54:03 +00001958#ifdef F77_DUMMY_MAIN
1959# ifdef __cplusplus
1960 extern "C"
1961# endif
1962 int F77_DUMMY_MAIN() { return 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001963#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00001964int
1965main ()
1966{
1967
1968 ;
1969 return 0;
1970}
1971_ACEOF
1972ac_clean_files_save=$ac_clean_files
1973ac_clean_files="$ac_clean_files a.out a.exe"
1974# Try to create an executable without -o first, disregard a.out.
1975# It will help us diagnose broken compilers, and finding out an intuition
1976# of exeext.
1977echo "$as_me:$LINENO: checking for C compiler default output" >&5
1978echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1979ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1980if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1981 (eval $ac_link_default) 2>&5
1982 ac_status=$?
1983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1984 (exit $ac_status); }; then
1985 # Find the output, starting from the most likely. This scheme is
1986# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1987# resort.
1988
1989# Be careful to initialize this variable, since it used to be cached.
1990# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1991ac_cv_exeext=
1992for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1993 ls a.out conftest 2>/dev/null;
1994 ls a.* conftest.* 2>/dev/null`; do
1995 case $ac_file in
1996 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1997 a.out ) # We found the default executable, but exeext='' is most
1998 # certainly right.
1999 break;;
2000 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2001 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2002 export ac_cv_exeext
2003 break;;
2004 * ) break;;
2005 esac
2006done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002007else
Martin v. Löwis11437992002-04-12 09:54:03 +00002008 echo "$as_me: failed program was:" >&5
2009cat conftest.$ac_ext >&5
2010{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2011echo "$as_me: error: C compiler cannot create executables" >&2;}
2012 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002013fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002014
Martin v. Löwis11437992002-04-12 09:54:03 +00002015ac_exeext=$ac_cv_exeext
2016echo "$as_me:$LINENO: result: $ac_file" >&5
2017echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002018
Martin v. Löwis11437992002-04-12 09:54:03 +00002019# Check the compiler produces executables we can run. If not, either
2020# the compiler is broken, or we cross compile.
2021echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2022echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2023# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2024# If not cross compiling, check that we can run a simple program.
2025if test "$cross_compiling" != yes; then
2026 if { ac_try='./$ac_file'
2027 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2028 (eval $ac_try) 2>&5
2029 ac_status=$?
2030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2031 (exit $ac_status); }; }; then
2032 cross_compiling=no
2033 else
2034 if test "$cross_compiling" = maybe; then
2035 cross_compiling=yes
2036 else
2037 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2038If you meant to cross compile, use \`--host'." >&5
2039echo "$as_me: error: cannot run C compiled programs.
2040If you meant to cross compile, use \`--host'." >&2;}
2041 { (exit 1); exit 1; }; }
2042 fi
2043 fi
2044fi
2045echo "$as_me:$LINENO: result: yes" >&5
2046echo "${ECHO_T}yes" >&6
2047
2048rm -f a.out a.exe conftest$ac_cv_exeext
2049ac_clean_files=$ac_clean_files_save
2050# Check the compiler produces executables we can run. If not, either
2051# the compiler is broken, or we cross compile.
2052echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2053echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2054echo "$as_me:$LINENO: result: $cross_compiling" >&5
2055echo "${ECHO_T}$cross_compiling" >&6
2056
2057echo "$as_me:$LINENO: checking for suffix of executables" >&5
2058echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2059if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2060 (eval $ac_link) 2>&5
2061 ac_status=$?
2062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2063 (exit $ac_status); }; then
2064 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2065# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2066# work properly (i.e., refer to `conftest.exe'), while it won't with
2067# `rm'.
2068for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2069 case $ac_file in
2070 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2071 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2072 export ac_cv_exeext
2073 break;;
2074 * ) break;;
2075 esac
2076done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002077else
Martin v. Löwis11437992002-04-12 09:54:03 +00002078 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2079echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2080 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002081fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002082
Martin v. Löwis11437992002-04-12 09:54:03 +00002083rm -f conftest$ac_cv_exeext
2084echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2085echo "${ECHO_T}$ac_cv_exeext" >&6
2086
2087rm -f conftest.$ac_ext
2088EXEEXT=$ac_cv_exeext
2089ac_exeext=$EXEEXT
2090echo "$as_me:$LINENO: checking for suffix of object files" >&5
2091echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2092if test "${ac_cv_objext+set}" = set; then
2093 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002094else
Martin v. Löwis11437992002-04-12 09:54:03 +00002095 cat >conftest.$ac_ext <<_ACEOF
2096#line $LINENO "configure"
2097#include "confdefs.h"
2098
2099#ifdef F77_DUMMY_MAIN
2100# ifdef __cplusplus
2101 extern "C"
2102# endif
2103 int F77_DUMMY_MAIN() { return 1; }
2104#endif
2105int
2106main ()
2107{
2108
2109 ;
2110 return 0;
2111}
2112_ACEOF
2113rm -f conftest.o conftest.obj
2114if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2115 (eval $ac_compile) 2>&5
2116 ac_status=$?
2117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2118 (exit $ac_status); }; then
2119 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2120 case $ac_file in
2121 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2122 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2123 break;;
2124 esac
2125done
2126else
2127 echo "$as_me: failed program was:" >&5
2128cat conftest.$ac_ext >&5
2129{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2130echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2131 { (exit 1); exit 1; }; }
2132fi
2133
2134rm -f conftest.$ac_cv_objext conftest.$ac_ext
2135fi
2136echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2137echo "${ECHO_T}$ac_cv_objext" >&6
2138OBJEXT=$ac_cv_objext
2139ac_objext=$OBJEXT
2140echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2141echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2142if test "${ac_cv_c_compiler_gnu+set}" = set; then
2143 echo $ECHO_N "(cached) $ECHO_C" >&6
2144else
2145 cat >conftest.$ac_ext <<_ACEOF
2146#line $LINENO "configure"
2147#include "confdefs.h"
2148
2149#ifdef F77_DUMMY_MAIN
2150# ifdef __cplusplus
2151 extern "C"
2152# endif
2153 int F77_DUMMY_MAIN() { return 1; }
2154#endif
2155int
2156main ()
2157{
2158#ifndef __GNUC__
2159 choke me
2160#endif
2161
2162 ;
2163 return 0;
2164}
2165_ACEOF
2166rm -f conftest.$ac_objext
2167if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2168 (eval $ac_compile) 2>&5
2169 ac_status=$?
2170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2171 (exit $ac_status); } &&
2172 { ac_try='test -s conftest.$ac_objext'
2173 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2174 (eval $ac_try) 2>&5
2175 ac_status=$?
2176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2177 (exit $ac_status); }; }; then
2178 ac_compiler_gnu=yes
2179else
2180 echo "$as_me: failed program was:" >&5
2181cat conftest.$ac_ext >&5
2182ac_compiler_gnu=no
2183fi
2184rm -f conftest.$ac_objext conftest.$ac_ext
2185ac_cv_c_compiler_gnu=$ac_compiler_gnu
2186
2187fi
2188echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2189echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2190GCC=`test $ac_compiler_gnu = yes && echo yes`
2191ac_test_CFLAGS=${CFLAGS+set}
2192ac_save_CFLAGS=$CFLAGS
2193CFLAGS="-g"
2194echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2195echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2196if test "${ac_cv_prog_cc_g+set}" = set; then
2197 echo $ECHO_N "(cached) $ECHO_C" >&6
2198else
2199 cat >conftest.$ac_ext <<_ACEOF
2200#line $LINENO "configure"
2201#include "confdefs.h"
2202
2203#ifdef F77_DUMMY_MAIN
2204# ifdef __cplusplus
2205 extern "C"
2206# endif
2207 int F77_DUMMY_MAIN() { return 1; }
2208#endif
2209int
2210main ()
2211{
2212
2213 ;
2214 return 0;
2215}
2216_ACEOF
2217rm -f conftest.$ac_objext
2218if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2219 (eval $ac_compile) 2>&5
2220 ac_status=$?
2221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2222 (exit $ac_status); } &&
2223 { ac_try='test -s conftest.$ac_objext'
2224 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2225 (eval $ac_try) 2>&5
2226 ac_status=$?
2227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2228 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002229 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002230else
Martin v. Löwis11437992002-04-12 09:54:03 +00002231 echo "$as_me: failed program was:" >&5
2232cat conftest.$ac_ext >&5
2233ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002234fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002235rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002236fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002237echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2238echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002239if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002240 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002241elif test $ac_cv_prog_cc_g = yes; then
2242 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002243 CFLAGS="-g -O2"
2244 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002245 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002246 fi
2247else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002248 if test "$GCC" = yes; then
2249 CFLAGS="-O2"
2250 else
2251 CFLAGS=
2252 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002253fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002254# Some people use a C++ compiler to compile C. Since we use `exit',
2255# in C++ we need to declare it. In case someone uses the same compiler
2256# for both compiling C and C++ we need to have the C++ compiler decide
2257# the declaration of exit, since it's the most demanding environment.
2258cat >conftest.$ac_ext <<_ACEOF
2259#ifndef __cplusplus
2260 choke me
2261#endif
2262_ACEOF
2263rm -f conftest.$ac_objext
2264if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2265 (eval $ac_compile) 2>&5
2266 ac_status=$?
2267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2268 (exit $ac_status); } &&
2269 { ac_try='test -s conftest.$ac_objext'
2270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2271 (eval $ac_try) 2>&5
2272 ac_status=$?
2273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2274 (exit $ac_status); }; }; then
2275 for ac_declaration in \
2276 ''\
2277 '#include <stdlib.h>' \
2278 'extern "C" void std::exit (int) throw (); using std::exit;' \
2279 'extern "C" void std::exit (int); using std::exit;' \
2280 'extern "C" void exit (int) throw ();' \
2281 'extern "C" void exit (int);' \
2282 'void exit (int);'
2283do
2284 cat >conftest.$ac_ext <<_ACEOF
2285#line $LINENO "configure"
2286#include "confdefs.h"
2287#include <stdlib.h>
2288$ac_declaration
2289#ifdef F77_DUMMY_MAIN
2290# ifdef __cplusplus
2291 extern "C"
2292# endif
2293 int F77_DUMMY_MAIN() { return 1; }
2294#endif
2295int
2296main ()
2297{
2298exit (42);
2299 ;
2300 return 0;
2301}
2302_ACEOF
2303rm -f conftest.$ac_objext
2304if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2305 (eval $ac_compile) 2>&5
2306 ac_status=$?
2307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2308 (exit $ac_status); } &&
2309 { ac_try='test -s conftest.$ac_objext'
2310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2311 (eval $ac_try) 2>&5
2312 ac_status=$?
2313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2314 (exit $ac_status); }; }; then
2315 :
2316else
2317 echo "$as_me: failed program was:" >&5
2318cat conftest.$ac_ext >&5
2319continue
2320fi
2321rm -f conftest.$ac_objext conftest.$ac_ext
2322 cat >conftest.$ac_ext <<_ACEOF
2323#line $LINENO "configure"
2324#include "confdefs.h"
2325$ac_declaration
2326#ifdef F77_DUMMY_MAIN
2327# ifdef __cplusplus
2328 extern "C"
2329# endif
2330 int F77_DUMMY_MAIN() { return 1; }
2331#endif
2332int
2333main ()
2334{
2335exit (42);
2336 ;
2337 return 0;
2338}
2339_ACEOF
2340rm -f conftest.$ac_objext
2341if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2342 (eval $ac_compile) 2>&5
2343 ac_status=$?
2344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2345 (exit $ac_status); } &&
2346 { ac_try='test -s conftest.$ac_objext'
2347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2348 (eval $ac_try) 2>&5
2349 ac_status=$?
2350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2351 (exit $ac_status); }; }; then
2352 break
2353else
2354 echo "$as_me: failed program was:" >&5
2355cat conftest.$ac_ext >&5
2356fi
2357rm -f conftest.$ac_objext conftest.$ac_ext
2358done
2359rm -f conftest*
2360if test -n "$ac_declaration"; then
2361 echo '#ifdef __cplusplus' >>confdefs.h
2362 echo $ac_declaration >>confdefs.h
2363 echo '#endif' >>confdefs.h
2364fi
2365
2366else
2367 echo "$as_me: failed program was:" >&5
2368cat conftest.$ac_ext >&5
2369fi
2370rm -f conftest.$ac_objext conftest.$ac_ext
2371ac_ext=c
2372ac_cpp='$CPP $CPPFLAGS'
2373ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2374ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2375ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002376
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002377
2378# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002379
2380ac_ext=c
2381ac_cpp='$CPP $CPPFLAGS'
2382ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2383ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2384ac_compiler_gnu=$ac_cv_c_compiler_gnu
2385echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2386echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002387# On Suns, sometimes $CPP names a directory.
2388if test -n "$CPP" && test -d "$CPP"; then
2389 CPP=
2390fi
2391if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002392 if test "${ac_cv_prog_CPP+set}" = set; then
2393 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002394else
Martin v. Löwis11437992002-04-12 09:54:03 +00002395 # Double quotes because CPP needs to be expanded
2396 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2397 do
2398 ac_preproc_ok=false
2399for ac_c_preproc_warn_flag in '' yes
2400do
2401 # Use a header file that comes with gcc, so configuring glibc
2402 # with a fresh cross-compiler works.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002403 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002404 # not just through cpp. "Syntax error" is here to catch this case.
2405 cat >conftest.$ac_ext <<_ACEOF
2406#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002407#include "confdefs.h"
2408#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002409 Syntax error
2410_ACEOF
2411if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2412 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2413 ac_status=$?
2414 egrep -v '^ *\+' conftest.er1 >conftest.err
2415 rm -f conftest.er1
2416 cat conftest.err >&5
2417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2418 (exit $ac_status); } >/dev/null; then
2419 if test -s conftest.err; then
2420 ac_cpp_err=$ac_c_preproc_warn_flag
2421 else
2422 ac_cpp_err=
2423 fi
2424else
2425 ac_cpp_err=yes
2426fi
2427if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002428 :
2429else
Martin v. Löwis11437992002-04-12 09:54:03 +00002430 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002431 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002432 # Broken: fails on valid input.
2433continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002434fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002435rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002436
Martin v. Löwis11437992002-04-12 09:54:03 +00002437 # OK, works on sane cases. Now check whether non-existent headers
2438 # can be detected and how.
2439 cat >conftest.$ac_ext <<_ACEOF
2440#line $LINENO "configure"
2441#include "confdefs.h"
2442#include <ac_nonexistent.h>
2443_ACEOF
2444if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2445 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2446 ac_status=$?
2447 egrep -v '^ *\+' conftest.er1 >conftest.err
2448 rm -f conftest.er1
2449 cat conftest.err >&5
2450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2451 (exit $ac_status); } >/dev/null; then
2452 if test -s conftest.err; then
2453 ac_cpp_err=$ac_c_preproc_warn_flag
2454 else
2455 ac_cpp_err=
2456 fi
2457else
2458 ac_cpp_err=yes
2459fi
2460if test -z "$ac_cpp_err"; then
2461 # Broken: success on invalid input.
2462continue
2463else
2464 echo "$as_me: failed program was:" >&5
2465 cat conftest.$ac_ext >&5
2466 # Passes both tests.
2467ac_preproc_ok=:
2468break
2469fi
2470rm -f conftest.err conftest.$ac_ext
2471
2472done
2473# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2474rm -f conftest.err conftest.$ac_ext
2475if $ac_preproc_ok; then
2476 break
2477fi
2478
2479 done
2480 ac_cv_prog_CPP=$CPP
2481
2482fi
2483 CPP=$ac_cv_prog_CPP
2484else
2485 ac_cv_prog_CPP=$CPP
2486fi
2487echo "$as_me:$LINENO: result: $CPP" >&5
2488echo "${ECHO_T}$CPP" >&6
2489ac_preproc_ok=false
2490for ac_c_preproc_warn_flag in '' yes
2491do
2492 # Use a header file that comes with gcc, so configuring glibc
2493 # with a fresh cross-compiler works.
2494 # On the NeXT, cc -E runs the code through the compiler's parser,
2495 # not just through cpp. "Syntax error" is here to catch this case.
2496 cat >conftest.$ac_ext <<_ACEOF
2497#line $LINENO "configure"
2498#include "confdefs.h"
2499#include <assert.h>
2500 Syntax error
2501_ACEOF
2502if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2503 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2504 ac_status=$?
2505 egrep -v '^ *\+' conftest.er1 >conftest.err
2506 rm -f conftest.er1
2507 cat conftest.err >&5
2508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2509 (exit $ac_status); } >/dev/null; then
2510 if test -s conftest.err; then
2511 ac_cpp_err=$ac_c_preproc_warn_flag
2512 else
2513 ac_cpp_err=
2514 fi
2515else
2516 ac_cpp_err=yes
2517fi
2518if test -z "$ac_cpp_err"; then
2519 :
2520else
2521 echo "$as_me: failed program was:" >&5
2522 cat conftest.$ac_ext >&5
2523 # Broken: fails on valid input.
2524continue
2525fi
2526rm -f conftest.err conftest.$ac_ext
2527
2528 # OK, works on sane cases. Now check whether non-existent headers
2529 # can be detected and how.
2530 cat >conftest.$ac_ext <<_ACEOF
2531#line $LINENO "configure"
2532#include "confdefs.h"
2533#include <ac_nonexistent.h>
2534_ACEOF
2535if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2536 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2537 ac_status=$?
2538 egrep -v '^ *\+' conftest.er1 >conftest.err
2539 rm -f conftest.er1
2540 cat conftest.err >&5
2541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2542 (exit $ac_status); } >/dev/null; then
2543 if test -s conftest.err; then
2544 ac_cpp_err=$ac_c_preproc_warn_flag
2545 else
2546 ac_cpp_err=
2547 fi
2548else
2549 ac_cpp_err=yes
2550fi
2551if test -z "$ac_cpp_err"; then
2552 # Broken: success on invalid input.
2553continue
2554else
2555 echo "$as_me: failed program was:" >&5
2556 cat conftest.$ac_ext >&5
2557 # Passes both tests.
2558ac_preproc_ok=:
2559break
2560fi
2561rm -f conftest.err conftest.$ac_ext
2562
2563done
2564# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2565rm -f conftest.err conftest.$ac_ext
2566if $ac_preproc_ok; then
2567 :
2568else
2569 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2570echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2571 { (exit 1); exit 1; }; }
2572fi
2573
2574ac_ext=c
2575ac_cpp='$CPP $CPPFLAGS'
2576ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2577ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2578ac_compiler_gnu=$ac_cv_c_compiler_gnu
2579
2580
2581
2582echo "$as_me:$LINENO: checking for AIX" >&5
2583echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2584cat >conftest.$ac_ext <<_ACEOF
2585#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002586#include "confdefs.h"
2587#ifdef _AIX
2588 yes
2589#endif
2590
Martin v. Löwis11437992002-04-12 09:54:03 +00002591_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002592if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2593 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002594 echo "$as_me:$LINENO: result: yes" >&5
2595echo "${ECHO_T}yes" >&6
2596cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002597#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002598_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002599
2600else
Martin v. Löwis11437992002-04-12 09:54:03 +00002601 echo "$as_me:$LINENO: result: no" >&5
2602echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002603fi
2604rm -f conftest*
2605
Michael W. Hudson54241132001-12-07 15:38:26 +00002606
Martin v. Löwis11437992002-04-12 09:54:03 +00002607echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2608echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2609if test "${ac_cv_header_stdc+set}" = set; then
2610 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002611else
Martin v. Löwis11437992002-04-12 09:54:03 +00002612 cat >conftest.$ac_ext <<_ACEOF
2613#line $LINENO "configure"
2614#include "confdefs.h"
2615#include <stdlib.h>
2616#include <stdarg.h>
2617#include <string.h>
2618#include <float.h>
2619
2620_ACEOF
2621if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2622 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2623 ac_status=$?
2624 egrep -v '^ *\+' conftest.er1 >conftest.err
2625 rm -f conftest.er1
2626 cat conftest.err >&5
2627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2628 (exit $ac_status); } >/dev/null; then
2629 if test -s conftest.err; then
2630 ac_cpp_err=$ac_c_preproc_warn_flag
2631 else
2632 ac_cpp_err=
2633 fi
2634else
2635 ac_cpp_err=yes
2636fi
2637if test -z "$ac_cpp_err"; then
2638 ac_cv_header_stdc=yes
2639else
2640 echo "$as_me: failed program was:" >&5
2641 cat conftest.$ac_ext >&5
2642 ac_cv_header_stdc=no
2643fi
2644rm -f conftest.err conftest.$ac_ext
2645
2646if test $ac_cv_header_stdc = yes; then
2647 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2648 cat >conftest.$ac_ext <<_ACEOF
2649#line $LINENO "configure"
2650#include "confdefs.h"
2651#include <string.h>
2652
2653_ACEOF
2654if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2655 egrep "memchr" >/dev/null 2>&1; then
2656 :
2657else
2658 ac_cv_header_stdc=no
2659fi
2660rm -f conftest*
2661
2662fi
2663
2664if test $ac_cv_header_stdc = yes; then
2665 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2666 cat >conftest.$ac_ext <<_ACEOF
2667#line $LINENO "configure"
2668#include "confdefs.h"
2669#include <stdlib.h>
2670
2671_ACEOF
2672if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2673 egrep "free" >/dev/null 2>&1; then
2674 :
2675else
2676 ac_cv_header_stdc=no
2677fi
2678rm -f conftest*
2679
2680fi
2681
2682if test $ac_cv_header_stdc = yes; then
2683 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2684 if test "$cross_compiling" = yes; then
2685 :
2686else
2687 cat >conftest.$ac_ext <<_ACEOF
2688#line $LINENO "configure"
2689#include "confdefs.h"
2690#include <ctype.h>
2691#if ((' ' & 0x0FF) == 0x020)
2692# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2693# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2694#else
2695# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
2696 || ('j' <= (c) && (c) <= 'r') \
2697 || ('s' <= (c) && (c) <= 'z'))
2698# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2699#endif
2700
2701#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2702int
2703main ()
2704{
2705 int i;
2706 for (i = 0; i < 256; i++)
2707 if (XOR (islower (i), ISLOWER (i))
2708 || toupper (i) != TOUPPER (i))
2709 exit(2);
2710 exit (0);
2711}
2712_ACEOF
2713rm -f conftest$ac_exeext
2714if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2715 (eval $ac_link) 2>&5
2716 ac_status=$?
2717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2718 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2719 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2720 (eval $ac_try) 2>&5
2721 ac_status=$?
2722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2723 (exit $ac_status); }; }; then
2724 :
2725else
2726 echo "$as_me: program exited with status $ac_status" >&5
2727echo "$as_me: failed program was:" >&5
2728cat conftest.$ac_ext >&5
2729( exit $ac_status )
2730ac_cv_header_stdc=no
2731fi
2732rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2733fi
2734fi
2735fi
2736echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2737echo "${ECHO_T}$ac_cv_header_stdc" >&6
2738if test $ac_cv_header_stdc = yes; then
2739
2740cat >>confdefs.h <<\_ACEOF
2741#define STDC_HEADERS 1
2742_ACEOF
2743
2744fi
2745
2746# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2757 inttypes.h stdint.h unistd.h
2758do
2759as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2760echo "$as_me:$LINENO: checking for $ac_header" >&5
2761echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2762if eval "test \"\${$as_ac_Header+set}\" = set"; then
2763 echo $ECHO_N "(cached) $ECHO_C" >&6
2764else
2765 cat >conftest.$ac_ext <<_ACEOF
2766#line $LINENO "configure"
2767#include "confdefs.h"
2768$ac_includes_default
2769
2770#include <$ac_header>
2771_ACEOF
2772rm -f conftest.$ac_objext
2773if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2774 (eval $ac_compile) 2>&5
2775 ac_status=$?
2776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2777 (exit $ac_status); } &&
2778 { ac_try='test -s conftest.$ac_objext'
2779 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2780 (eval $ac_try) 2>&5
2781 ac_status=$?
2782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2783 (exit $ac_status); }; }; then
2784 eval "$as_ac_Header=yes"
2785else
2786 echo "$as_me: failed program was:" >&5
2787cat conftest.$ac_ext >&5
2788eval "$as_ac_Header=no"
2789fi
2790rm -f conftest.$ac_objext conftest.$ac_ext
2791fi
2792echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2793echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2794if test `eval echo '${'$as_ac_Header'}'` = yes; then
2795 cat >>confdefs.h <<_ACEOF
2796#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2797_ACEOF
2798
2799fi
2800
2801done
2802
2803
2804if test "${ac_cv_header_minix_config_h+set}" = set; then
2805 echo "$as_me:$LINENO: checking for minix/config.h" >&5
2806echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2807if test "${ac_cv_header_minix_config_h+set}" = set; then
2808 echo $ECHO_N "(cached) $ECHO_C" >&6
2809fi
2810echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2811echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2812else
2813 # Is the header compilable?
2814echo "$as_me:$LINENO: checking minix/config.h usability" >&5
2815echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
2816cat >conftest.$ac_ext <<_ACEOF
2817#line $LINENO "configure"
2818#include "confdefs.h"
2819$ac_includes_default
2820#include <minix/config.h>
2821_ACEOF
2822rm -f conftest.$ac_objext
2823if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2824 (eval $ac_compile) 2>&5
2825 ac_status=$?
2826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2827 (exit $ac_status); } &&
2828 { ac_try='test -s conftest.$ac_objext'
2829 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2830 (eval $ac_try) 2>&5
2831 ac_status=$?
2832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2833 (exit $ac_status); }; }; then
2834 ac_header_compiler=yes
2835else
2836 echo "$as_me: failed program was:" >&5
2837cat conftest.$ac_ext >&5
2838ac_header_compiler=no
2839fi
2840rm -f conftest.$ac_objext conftest.$ac_ext
2841echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2842echo "${ECHO_T}$ac_header_compiler" >&6
2843
2844# Is the header present?
2845echo "$as_me:$LINENO: checking minix/config.h presence" >&5
2846echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
2847cat >conftest.$ac_ext <<_ACEOF
2848#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002849#include "confdefs.h"
2850#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002851_ACEOF
2852if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2853 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2854 ac_status=$?
2855 egrep -v '^ *\+' conftest.er1 >conftest.err
2856 rm -f conftest.er1
2857 cat conftest.err >&5
2858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2859 (exit $ac_status); } >/dev/null; then
2860 if test -s conftest.err; then
2861 ac_cpp_err=$ac_c_preproc_warn_flag
2862 else
2863 ac_cpp_err=
2864 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002865else
Martin v. Löwis11437992002-04-12 09:54:03 +00002866 ac_cpp_err=yes
2867fi
2868if test -z "$ac_cpp_err"; then
2869 ac_header_preproc=yes
2870else
2871 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002872 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002873 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002874fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002875rm -f conftest.err conftest.$ac_ext
2876echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
2877echo "${ECHO_T}$ac_header_preproc" >&6
2878
2879# So? What about this header?
2880case $ac_header_compiler:$ac_header_preproc in
2881 yes:no )
2882 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
2883echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
2884 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2885echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2886 no:yes )
2887 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
2888echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
2889 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
2890echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
2891 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2892echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2893esac
2894echo "$as_me:$LINENO: checking for minix/config.h" >&5
2895echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2896if test "${ac_cv_header_minix_config_h+set}" = set; then
2897 echo $ECHO_N "(cached) $ECHO_C" >&6
2898else
2899 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002900fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002901echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2902echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2903
2904fi
2905if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002906 MINIX=yes
2907else
Martin v. Löwis11437992002-04-12 09:54:03 +00002908 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002909fi
2910
Martin v. Löwis11437992002-04-12 09:54:03 +00002911
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002912if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002913
2914cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002915#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002916_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002917
Martin v. Löwis11437992002-04-12 09:54:03 +00002918
2919cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002920#define _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002921_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002922
Martin v. Löwis11437992002-04-12 09:54:03 +00002923
2924cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002925#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002926_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002927
2928fi
2929
2930
Michael W. Hudson54241132001-12-07 15:38:26 +00002931
Martin v. Löwis11437992002-04-12 09:54:03 +00002932echo "$as_me:$LINENO: checking for --with-suffix" >&5
2933echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002934
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00002935# Check whether --with-suffix or --without-suffix was given.
2936if test "${with_suffix+set}" = set; then
2937 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00002938
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00002939 case $withval in
2940 no) EXEEXT=;;
2941 yes) EXEEXT=.exe;;
2942 *) EXEEXT=$withval;;
2943 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002944fi;
2945echo "$as_me:$LINENO: result: $EXEEXT" >&5
2946echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002947
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002948# Test whether we're running on a non-case-sensitive system, in which
2949# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00002950
Martin v. Löwis11437992002-04-12 09:54:03 +00002951echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
2952echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen0b06be72002-06-21 14:48:38 +00002953if test -d "${srcdir}/python"
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002954then
Martin v. Löwis11437992002-04-12 09:54:03 +00002955 echo "$as_me:$LINENO: result: yes" >&5
2956echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002957 BUILDEXEEXT=.exe
2958else
Martin v. Löwis11437992002-04-12 09:54:03 +00002959 echo "$as_me:$LINENO: result: no" >&5
2960echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002961 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002962fi
Guido van Rossumff555e32000-09-22 15:38:21 +00002963
Guido van Rossumdd997f71998-10-07 19:58:26 +00002964case $MACHDEP in
2965bsdos*)
2966 case $CC in
2967 gcc) CC="$CC -D_HAVE_BSDI";;
2968 esac;;
2969esac
2970
Guido van Rossum24b1e751997-08-21 02:29:16 +00002971case $ac_sys_system in
2972hp*|HP*)
2973 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00002974 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00002975 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002976Monterey*)
2977 case $CC in
2978 cc) CC="$CC -Wl,-Bexport";;
2979 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00002980SunOS*)
2981 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00002982
2983cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00002984#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002985_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00002986
2987 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00002988esac
2989
Michael W. Hudson54241132001-12-07 15:38:26 +00002990
2991
Martin v. Löwis11437992002-04-12 09:54:03 +00002992echo "$as_me:$LINENO: checking LIBRARY" >&5
2993echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00002994if test -z "$LIBRARY"
2995then
2996 LIBRARY='libpython$(VERSION).a'
2997fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002998echo "$as_me:$LINENO: result: $LIBRARY" >&5
2999echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003000
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003001# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003002# name of the library into which to insert object files). BLDLIBRARY is also
3003# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3004# is blank as the main program is not linked directly against LDLIBRARY.
3005# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3006# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3007# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3008# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003009#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003010# RUNSHARED is used to run shared python without installed libraries
3011#
3012# INSTSONAME is the name of the shared library that will be use to install
3013# on the system - some systems like version suffix, others don't
3014
3015
Michael W. Hudson54241132001-12-07 15:38:26 +00003016
3017
3018
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003019
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003020LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003021BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003022INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003023DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003024LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003025RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003026
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003027# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003028# If CXX is set, and if it is needed to link a main function that was
3029# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3030# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003031# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003032# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003033
Martin v. Löwis11437992002-04-12 09:54:03 +00003034echo "$as_me:$LINENO: checking LINKCC" >&5
3035echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003036if test -z "$LINKCC"
3037then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003038 if test -z "$CXX"; then
3039 LINKCC="\$(PURIFY) \$(CC)"
3040 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003041 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003042 $CXX -c conftest.$ac_ext 2>&5
3043 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3044 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3045 then
3046 LINKCC="\$(PURIFY) \$(CC)"
3047 else
3048 LINKCC="\$(PURIFY) \$(CXX)"
3049 fi
3050 rm -fr conftest*
3051 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003052 case $ac_sys_system in
3053 AIX*)
Jack Jansen524a0982002-03-12 15:25:52 +00003054 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003055 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003056 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003057 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003058 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003059 esac
3060fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003061echo "$as_me:$LINENO: result: $LINKCC" >&5
3062echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003063
Martin v. Löwis11437992002-04-12 09:54:03 +00003064echo "$as_me:$LINENO: checking for --enable-shared" >&5
3065echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003066# Check whether --enable-shared or --disable-shared was given.
3067if test "${enable_shared+set}" = set; then
3068 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003069
Martin v. Löwis11437992002-04-12 09:54:03 +00003070fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003071
3072if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003073then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003074 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003075 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003076 enable_shared="yes";;
3077 *)
3078 enable_shared="no";;
3079 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003080fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003081echo "$as_me:$LINENO: result: $enable_shared" >&5
3082echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003083
3084
Martin v. Löwis11437992002-04-12 09:54:03 +00003085echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3086echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003087
Guido van Rossumb8552162001-09-05 14:58:11 +00003088# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3089# library that we build, but we do not want to link against it (we
3090# will find it with a -framework option). For this reason there is an
3091# extra variable BLDLIBRARY against which Python and the extension
3092# modules are linked, BLDLIBRARY. This is normally the same as
3093# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003094if test "$enable_framework"
3095then
3096 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
3097 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
3098 BLDLIBRARY=''
3099else
3100 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003101fi
Jack Jansene578a632001-08-15 01:27:14 +00003102
Martin v. Löwis1142de32002-03-29 16:28:31 +00003103# Other platforms follow
3104if test $enable_shared = "yes"; then
3105 case $ac_sys_system in
3106 BeOS*)
3107 LDLIBRARY='libpython$(VERSION).so'
3108 ;;
3109 CYGWIN*)
3110 LDLIBRARY='libpython$(VERSION).dll.a'
3111 DLLLIBRARY='libpython$(VERSION).dll'
3112 ;;
3113 SunOS*)
3114 LDLIBRARY='libpython$(VERSION).so'
3115 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
3116 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3117 ;;
3118 Linux*)
3119 LDLIBRARY='libpython$(VERSION).so'
3120 BLDLIBRARY='-L. -lpython$(VERSION)'
3121 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3122 INSTSONAME="$LDLIBRARY".$SOVERSION
3123 ;;
3124 hp*|HP*)
3125 LDLIBRARY='libpython$(VERSION).sl'
3126 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3127 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3128 ;;
3129 OSF*)
3130 LDLIBRARY='libpython$(VERSION).so'
3131 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3132 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3133 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003134 atheos*)
3135 LDLIBRARY='libpython$(VERSION).so'
3136 BLDLIBRARY='-L. -lpython$(VERSION)'
3137 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3138 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003139 esac
3140 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3141 case $MACHDEP in
3142 dguxR4)
3143 LDLIBRARY='libpython$(VERSION).so'
3144 OPT="$OPT -pic"
3145 ;;
3146 esac
3147fi
3148
Martin v. Löwis11437992002-04-12 09:54:03 +00003149echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3150echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003151
Martin v. Löwis11437992002-04-12 09:54:03 +00003152if test -n "$ac_tool_prefix"; then
3153 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3154set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3155echo "$as_me:$LINENO: checking for $ac_word" >&5
3156echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3157if test "${ac_cv_prog_RANLIB+set}" = set; then
3158 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003159else
3160 if test -n "$RANLIB"; then
3161 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3162else
Martin v. Löwis11437992002-04-12 09:54:03 +00003163as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3164for as_dir in $PATH
3165do
3166 IFS=$as_save_IFS
3167 test -z "$as_dir" && as_dir=.
3168 for ac_exec_ext in '' $ac_executable_extensions; do
3169 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3170 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3171 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3172 break 2
3173 fi
3174done
3175done
3176
Guido van Rossum627b2d71993-12-24 10:39:16 +00003177fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003178fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003179RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003180if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003181 echo "$as_me:$LINENO: result: $RANLIB" >&5
3182echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003183else
Martin v. Löwis11437992002-04-12 09:54:03 +00003184 echo "$as_me:$LINENO: result: no" >&5
3185echo "${ECHO_T}no" >&6
3186fi
3187
3188fi
3189if test -z "$ac_cv_prog_RANLIB"; then
3190 ac_ct_RANLIB=$RANLIB
3191 # Extract the first word of "ranlib", so it can be a program name with args.
3192set dummy ranlib; ac_word=$2
3193echo "$as_me:$LINENO: checking for $ac_word" >&5
3194echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3195if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3196 echo $ECHO_N "(cached) $ECHO_C" >&6
3197else
3198 if test -n "$ac_ct_RANLIB"; then
3199 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3200else
3201as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3202for as_dir in $PATH
3203do
3204 IFS=$as_save_IFS
3205 test -z "$as_dir" && as_dir=.
3206 for ac_exec_ext in '' $ac_executable_extensions; do
3207 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3208 ac_cv_prog_ac_ct_RANLIB="ranlib"
3209 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3210 break 2
3211 fi
3212done
3213done
3214
3215 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3216fi
3217fi
3218ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3219if test -n "$ac_ct_RANLIB"; then
3220 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3221echo "${ECHO_T}$ac_ct_RANLIB" >&6
3222else
3223 echo "$as_me:$LINENO: result: no" >&5
3224echo "${ECHO_T}no" >&6
3225fi
3226
3227 RANLIB=$ac_ct_RANLIB
3228else
3229 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003230fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003231
3232
Guido van Rossum7f43da71994-08-01 12:15:30 +00003233for ac_prog in ar aal
3234do
Martin v. Löwis11437992002-04-12 09:54:03 +00003235 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003236set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003237echo "$as_me:$LINENO: checking for $ac_word" >&5
3238echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3239if test "${ac_cv_prog_AR+set}" = set; then
3240 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003241else
3242 if test -n "$AR"; then
3243 ac_cv_prog_AR="$AR" # Let the user override the test.
3244else
Martin v. Löwis11437992002-04-12 09:54:03 +00003245as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3246for as_dir in $PATH
3247do
3248 IFS=$as_save_IFS
3249 test -z "$as_dir" && as_dir=.
3250 for ac_exec_ext in '' $ac_executable_extensions; do
3251 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3252 ac_cv_prog_AR="$ac_prog"
3253 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3254 break 2
3255 fi
3256done
3257done
3258
Guido van Rossum7f43da71994-08-01 12:15:30 +00003259fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003260fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003261AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003262if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003263 echo "$as_me:$LINENO: result: $AR" >&5
3264echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003265else
Martin v. Löwis11437992002-04-12 09:54:03 +00003266 echo "$as_me:$LINENO: result: no" >&5
3267echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003268fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003269
Martin v. Löwis11437992002-04-12 09:54:03 +00003270 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003271done
3272test -n "$AR" || AR="ar"
3273
Michael W. Hudson54241132001-12-07 15:38:26 +00003274
Neil Schemenauera42c8272001-03-31 00:01:55 +00003275case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003276bsdos*|hp*|HP*)
3277 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003278 if test -z "$INSTALL"
3279 then
3280 INSTALL="${srcdir}/install-sh -c"
3281 fi
3282esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003283ac_aux_dir=
3284for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3285 if test -f $ac_dir/install-sh; then
3286 ac_aux_dir=$ac_dir
3287 ac_install_sh="$ac_aux_dir/install-sh -c"
3288 break
3289 elif test -f $ac_dir/install.sh; then
3290 ac_aux_dir=$ac_dir
3291 ac_install_sh="$ac_aux_dir/install.sh -c"
3292 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003293 elif test -f $ac_dir/shtool; then
3294 ac_aux_dir=$ac_dir
3295 ac_install_sh="$ac_aux_dir/shtool install -c"
3296 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003297 fi
3298done
3299if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003300 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3301echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3302 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003303fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003304ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3305ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3306ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003307
3308# Find a good install program. We prefer a C program (faster),
3309# so one script is as good as another. But avoid the broken or
3310# incompatible versions:
3311# SysV /etc/install, /usr/sbin/install
3312# SunOS /usr/etc/install
3313# IRIX /sbin/install
3314# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003315# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003316# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3317# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3318# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3319# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003320echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3321echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003322if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003323if test "${ac_cv_path_install+set}" = set; then
3324 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003325else
Martin v. Löwis11437992002-04-12 09:54:03 +00003326 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3327for as_dir in $PATH
3328do
3329 IFS=$as_save_IFS
3330 test -z "$as_dir" && as_dir=.
3331 # Account for people who put trailing slashes in PATH elements.
3332case $as_dir/ in
3333 ./ | .// | /cC/* | \
3334 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3335 /usr/ucb/* ) ;;
3336 *)
3337 # OSF1 and SCO ODT 3.0 have their own names for install.
3338 # Don't use installbsd from OSF since it installs stuff as root
3339 # by default.
3340 for ac_prog in ginstall scoinst install; do
3341 for ac_exec_ext in '' $ac_executable_extensions; do
3342 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3343 if test $ac_prog = install &&
3344 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3345 # AIX install. It has an incompatible calling convention.
3346 :
3347 elif test $ac_prog = install &&
3348 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3349 # program-specific install script used by HP pwplus--don't use.
3350 :
3351 else
3352 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3353 break 3
3354 fi
3355 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003356 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003357 done
3358 ;;
3359esac
3360done
3361
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003362
3363fi
3364 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003365 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003366 else
3367 # As a last resort, use the slow shell script. We don't cache a
3368 # path for INSTALL within a source directory, because that will
3369 # break other packages using the cache if that directory is
3370 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003371 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003372 fi
3373fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003374echo "$as_me:$LINENO: result: $INSTALL" >&5
3375echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003376
3377# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3378# It thinks the first close brace ends the variable substitution.
3379test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3380
Martin v. Löwis11437992002-04-12 09:54:03 +00003381test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003382
3383test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3384
Michael W. Hudson54241132001-12-07 15:38:26 +00003385
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003386# Not every filesystem supports hard links
3387
3388if test -z "$LN" ; then
3389 case $ac_sys_system in
3390 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003391 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003392 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003393 *) LN=ln;;
3394 esac
3395fi
3396
Fred Drake109d9862001-07-11 06:27:56 +00003397# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003398echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3399echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3400
Fred Drake109d9862001-07-11 06:27:56 +00003401# Check whether --with-pydebug or --without-pydebug was given.
3402if test "${with_pydebug+set}" = set; then
3403 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003404
Fred Drake109d9862001-07-11 06:27:56 +00003405if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003406then
3407
3408cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003409#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003410_ACEOF
3411
3412 echo "$as_me:$LINENO: result: yes" >&5
3413echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003414 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003415else echo "$as_me:$LINENO: result: no" >&5
3416echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003417fi
3418else
Martin v. Löwis11437992002-04-12 09:54:03 +00003419 echo "$as_me:$LINENO: result: no" >&5
3420echo "${ECHO_T}no" >&6
3421fi;
Fred Drake109d9862001-07-11 06:27:56 +00003422
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003423# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003424
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003425if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003426then
Guido van Rossumedca74a1997-07-18 23:29:40 +00003427 case $GCC in
3428 yes)
3429 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003430 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003431 if test "$Py_DEBUG" = 'true' ; then
3432 # Optimization messes up debuggers, so turn it off for
3433 # debug builds.
3434 OPT="-g -Wall -Wstrict-prototypes"
3435 else
3436 OPT="-g -O3 -Wall -Wstrict-prototypes"
3437 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003438 *)
Fred Drake109d9862001-07-11 06:27:56 +00003439 OPT="-O3 -Wall -Wstrict-prototypes";;
3440 esac
3441 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003442 *)
3443 case $ac_sys_system in
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003444 OpenUNIX*|UnixWare*)
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003445 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
3446 *)
3447 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003448 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003449 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00003450 case $ac_sys_system in
3451 Darwin*)
Jack Jansen524a0982002-03-12 15:25:52 +00003452 OPT="$OPT -Wno-long-double -no-cpp-precomp";;
Jack Jansenca06bc62001-08-03 15:32:23 +00003453 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003454fi
3455
Fred Drakee1ceaa02001-12-04 20:55:47 +00003456if test "$Py_DEBUG" = 'true'; then
3457 :
3458else
3459 OPT="-DNDEBUG $OPT"
3460fi
3461
Trent Mick635f6fb2000-08-23 21:33:05 +00003462# The current (beta) Monterey compiler dies with optimizations
3463case $ac_sys_system in
3464Monterey*) OPT="";;
3465esac
3466
Guido van Rossum563e7081996-09-10 18:20:48 +00003467if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003468then
3469 OPT="$OPT $ac_arch_flags"
3470fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003471
Martin v. Löwis11437992002-04-12 09:54:03 +00003472echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3473echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3474if test "${ac_cv_opt_olimit_ok+set}" = set; then
3475 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003476else
3477 ac_save_cc="$CC"
3478CC="$CC -OPT:Olimit=0"
3479if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003480 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003481else
Martin v. Löwis11437992002-04-12 09:54:03 +00003482 cat >conftest.$ac_ext <<_ACEOF
3483#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003484#include "confdefs.h"
3485int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003486_ACEOF
3487rm -f conftest$ac_exeext
3488if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3489 (eval $ac_link) 2>&5
3490 ac_status=$?
3491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3492 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3493 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3494 (eval $ac_try) 2>&5
3495 ac_status=$?
3496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3497 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003498 ac_cv_opt_olimit_ok=yes
3499else
Martin v. Löwis11437992002-04-12 09:54:03 +00003500 echo "$as_me: program exited with status $ac_status" >&5
3501echo "$as_me: failed program was:" >&5
3502cat conftest.$ac_ext >&5
3503( exit $ac_status )
3504ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003505fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003506rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003507fi
Guido van Rossum91922671997-10-09 20:24:13 +00003508CC="$ac_save_cc"
3509fi
3510
Martin v. Löwis11437992002-04-12 09:54:03 +00003511echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3512echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003513if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003514 case $ac_sys_system in
3515 Darwin*) OPT="$OPT" ;;
3516 *) OPT="$OPT -OPT:Olimit=0";;
3517 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003518else
Martin v. Löwis11437992002-04-12 09:54:03 +00003519 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3520echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3521 if test "${ac_cv_olimit_ok+set}" = set; then
3522 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003523else
3524 ac_save_cc="$CC"
3525 CC="$CC -Olimit 1500"
3526 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003527 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003528else
Martin v. Löwis11437992002-04-12 09:54:03 +00003529 cat >conftest.$ac_ext <<_ACEOF
3530#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003531#include "confdefs.h"
3532int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003533_ACEOF
3534rm -f conftest$ac_exeext
3535if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3536 (eval $ac_link) 2>&5
3537 ac_status=$?
3538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3539 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3540 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3541 (eval $ac_try) 2>&5
3542 ac_status=$?
3543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3544 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003545 ac_cv_olimit_ok=yes
3546else
Martin v. Löwis11437992002-04-12 09:54:03 +00003547 echo "$as_me: program exited with status $ac_status" >&5
3548echo "$as_me: failed program was:" >&5
3549cat conftest.$ac_ext >&5
3550( exit $ac_status )
3551ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003552fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003553rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003554fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003555 CC="$ac_save_cc"
3556fi
3557
Martin v. Löwis11437992002-04-12 09:54:03 +00003558 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3559echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003560 if test $ac_cv_olimit_ok = yes; then
3561 OPT="$OPT -Olimit 1500"
3562 fi
3563fi
3564
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003565# On some compilers, pthreads are available without further options
3566# (e.g. MacOS X). On some of these systems, the compiler will not
3567# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3568# So we have to see first whether pthreads are available without
3569# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003570echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3571echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3572if test "${ac_cv_pthread_is_default+set}" = set; then
3573 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003574else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003575 if test "$cross_compiling" = yes; then
3576 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003577else
Martin v. Löwis11437992002-04-12 09:54:03 +00003578 cat >conftest.$ac_ext <<_ACEOF
3579#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003580#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003581
Martin v. Löwis130fb172001-07-19 11:00:41 +00003582#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003583
3584void* routine(void* p){return NULL;}
3585
3586int main(){
3587 pthread_t p;
3588 if(pthread_create(&p,NULL,routine,NULL)!=0)
3589 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003590 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003591 return 0;
3592}
3593
Martin v. Löwis11437992002-04-12 09:54:03 +00003594_ACEOF
3595rm -f conftest$ac_exeext
3596if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3597 (eval $ac_link) 2>&5
3598 ac_status=$?
3599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3600 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3601 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3602 (eval $ac_try) 2>&5
3603 ac_status=$?
3604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3605 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003606 ac_cv_pthread_is_default=yes
3607else
Martin v. Löwis11437992002-04-12 09:54:03 +00003608 echo "$as_me: program exited with status $ac_status" >&5
3609echo "$as_me: failed program was:" >&5
3610cat conftest.$ac_ext >&5
3611( exit $ac_status )
3612ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003613fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003614rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003615fi
3616
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003617fi
3618
Martin v. Löwis11437992002-04-12 09:54:03 +00003619echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3620echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003621
Michael W. Hudson54241132001-12-07 15:38:26 +00003622
Martin v. Löwis11437992002-04-12 09:54:03 +00003623if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003624then
3625 ac_cv_kpthread=no
3626else
3627# -Kpthread, if available, provides the right #defines
3628# and linker options to make pthread_create available
3629# Some compilers won't report that they do not support -Kpthread,
3630# so we need to run a program to see whether it really made the
3631# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003632echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3633echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3634if test "${ac_cv_kpthread+set}" = set; then
3635 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003636else
3637 ac_save_cc="$CC"
3638CC="$CC -Kpthread"
3639if test "$cross_compiling" = yes; then
3640 ac_cv_kpthread=no
3641else
Martin v. Löwis11437992002-04-12 09:54:03 +00003642 cat >conftest.$ac_ext <<_ACEOF
3643#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003644#include "confdefs.h"
3645
3646#include <pthread.h>
3647
3648void* routine(void* p){return NULL;}
3649
3650int main(){
3651 pthread_t p;
3652 if(pthread_create(&p,NULL,routine,NULL)!=0)
3653 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003654 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003655 return 0;
3656}
3657
Martin v. Löwis11437992002-04-12 09:54:03 +00003658_ACEOF
3659rm -f conftest$ac_exeext
3660if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3661 (eval $ac_link) 2>&5
3662 ac_status=$?
3663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3664 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3665 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3666 (eval $ac_try) 2>&5
3667 ac_status=$?
3668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3669 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003670 ac_cv_kpthread=yes
3671else
Martin v. Löwis11437992002-04-12 09:54:03 +00003672 echo "$as_me: program exited with status $ac_status" >&5
3673echo "$as_me: failed program was:" >&5
3674cat conftest.$ac_ext >&5
3675( exit $ac_status )
3676ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003677fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003678rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003679fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003680CC="$ac_save_cc"
3681fi
3682
Martin v. Löwis11437992002-04-12 09:54:03 +00003683echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3684echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003685fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003686
Michael W. Hudson54241132001-12-07 15:38:26 +00003687
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003688# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00003689echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3690echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3691if test "${ac_cv_header_stdc+set}" = set; then
3692 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003693else
Martin v. Löwis11437992002-04-12 09:54:03 +00003694 cat >conftest.$ac_ext <<_ACEOF
3695#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003696#include "confdefs.h"
3697#include <stdlib.h>
3698#include <stdarg.h>
3699#include <string.h>
3700#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003701
3702_ACEOF
3703if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3704 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3705 ac_status=$?
3706 egrep -v '^ *\+' conftest.er1 >conftest.err
3707 rm -f conftest.er1
3708 cat conftest.err >&5
3709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3710 (exit $ac_status); } >/dev/null; then
3711 if test -s conftest.err; then
3712 ac_cpp_err=$ac_c_preproc_warn_flag
3713 else
3714 ac_cpp_err=
3715 fi
3716else
3717 ac_cpp_err=yes
3718fi
3719if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003720 ac_cv_header_stdc=yes
3721else
Martin v. Löwis11437992002-04-12 09:54:03 +00003722 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003723 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003724 ac_cv_header_stdc=no
3725fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003726rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003727
3728if test $ac_cv_header_stdc = yes; then
3729 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003730 cat >conftest.$ac_ext <<_ACEOF
3731#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003732#include "confdefs.h"
3733#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003734
3735_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003736if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3737 egrep "memchr" >/dev/null 2>&1; then
3738 :
3739else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003740 ac_cv_header_stdc=no
3741fi
3742rm -f conftest*
3743
3744fi
3745
3746if test $ac_cv_header_stdc = yes; then
3747 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003748 cat >conftest.$ac_ext <<_ACEOF
3749#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003750#include "confdefs.h"
3751#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003752
3753_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003754if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3755 egrep "free" >/dev/null 2>&1; then
3756 :
3757else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003758 ac_cv_header_stdc=no
3759fi
3760rm -f conftest*
3761
3762fi
3763
3764if test $ac_cv_header_stdc = yes; then
3765 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00003766 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003767 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003768else
Martin v. Löwis11437992002-04-12 09:54:03 +00003769 cat >conftest.$ac_ext <<_ACEOF
3770#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003771#include "confdefs.h"
3772#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003773#if ((' ' & 0x0FF) == 0x020)
3774# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3775# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3776#else
3777# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3778 || ('j' <= (c) && (c) <= 'r') \
3779 || ('s' <= (c) && (c) <= 'z'))
3780# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3781#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00003782
Martin v. Löwis11437992002-04-12 09:54:03 +00003783#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3784int
3785main ()
3786{
3787 int i;
3788 for (i = 0; i < 256; i++)
3789 if (XOR (islower (i), ISLOWER (i))
3790 || toupper (i) != TOUPPER (i))
3791 exit(2);
3792 exit (0);
3793}
3794_ACEOF
3795rm -f conftest$ac_exeext
3796if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3797 (eval $ac_link) 2>&5
3798 ac_status=$?
3799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3800 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3801 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3802 (eval $ac_try) 2>&5
3803 ac_status=$?
3804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3805 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003806 :
3807else
Martin v. Löwis11437992002-04-12 09:54:03 +00003808 echo "$as_me: program exited with status $ac_status" >&5
3809echo "$as_me: failed program was:" >&5
3810cat conftest.$ac_ext >&5
3811( exit $ac_status )
3812ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003813fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003814rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00003815fi
3816fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003817fi
3818echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3819echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003820if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003821
3822cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003823#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003824_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003825
3826fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003827
Martin v. Löwis11437992002-04-12 09:54:03 +00003828
3829
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
Martin v. Löwis11437992002-04-12 09:54:03 +00003865for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003866libintl.h locale.h ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00003867signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Skip Montanaro57454e52002-06-14 20:30:31 +00003868sys/audioio.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003869sys/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 +00003870sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Skip Montanaro8345f712002-06-25 05:53:48 +00003871sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00003872do
Martin v. Löwis11437992002-04-12 09:54:03 +00003873as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3874if eval "test \"\${$as_ac_Header+set}\" = set"; then
3875 echo "$as_me:$LINENO: checking for $ac_header" >&5
3876echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3877if eval "test \"\${$as_ac_Header+set}\" = set"; then
3878 echo $ECHO_N "(cached) $ECHO_C" >&6
3879fi
3880echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3881echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003882else
Martin v. Löwis11437992002-04-12 09:54:03 +00003883 # Is the header compilable?
3884echo "$as_me:$LINENO: checking $ac_header usability" >&5
3885echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3886cat >conftest.$ac_ext <<_ACEOF
3887#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003888#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00003889$ac_includes_default
3890#include <$ac_header>
3891_ACEOF
3892rm -f conftest.$ac_objext
3893if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3894 (eval $ac_compile) 2>&5
3895 ac_status=$?
3896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3897 (exit $ac_status); } &&
3898 { ac_try='test -s conftest.$ac_objext'
3899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3900 (eval $ac_try) 2>&5
3901 ac_status=$?
3902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3903 (exit $ac_status); }; }; then
3904 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00003905else
Martin v. Löwis11437992002-04-12 09:54:03 +00003906 echo "$as_me: failed program was:" >&5
3907cat conftest.$ac_ext >&5
3908ac_header_compiler=no
3909fi
3910rm -f conftest.$ac_objext conftest.$ac_ext
3911echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3912echo "${ECHO_T}$ac_header_compiler" >&6
3913
3914# Is the header present?
3915echo "$as_me:$LINENO: checking $ac_header presence" >&5
3916echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3917cat >conftest.$ac_ext <<_ACEOF
3918#line $LINENO "configure"
3919#include "confdefs.h"
3920#include <$ac_header>
3921_ACEOF
3922if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3923 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3924 ac_status=$?
3925 egrep -v '^ *\+' conftest.er1 >conftest.err
3926 rm -f conftest.er1
3927 cat conftest.err >&5
3928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3929 (exit $ac_status); } >/dev/null; then
3930 if test -s conftest.err; then
3931 ac_cpp_err=$ac_c_preproc_warn_flag
3932 else
3933 ac_cpp_err=
3934 fi
3935else
3936 ac_cpp_err=yes
3937fi
3938if test -z "$ac_cpp_err"; then
3939 ac_header_preproc=yes
3940else
3941 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003942 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003943 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00003944fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003945rm -f conftest.err conftest.$ac_ext
3946echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3947echo "${ECHO_T}$ac_header_preproc" >&6
3948
3949# So? What about this header?
3950case $ac_header_compiler:$ac_header_preproc in
3951 yes:no )
3952 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3953echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3954 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3955echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3956 no:yes )
3957 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3958echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3959 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3960echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3961 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3962echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3963esac
3964echo "$as_me:$LINENO: checking for $ac_header" >&5
3965echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3966if eval "test \"\${$as_ac_Header+set}\" = set"; then
3967 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003968else
Martin v. Löwis11437992002-04-12 09:54:03 +00003969 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003970fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003971echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3972echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3973
3974fi
3975if test `eval echo '${'$as_ac_Header'}'` = yes; then
3976 cat >>confdefs.h <<_ACEOF
3977#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3978_ACEOF
3979
3980fi
3981
Guido van Rossum627b2d71993-12-24 10:39:16 +00003982done
3983
Martin v. Löwis11437992002-04-12 09:54:03 +00003984
3985
3986
3987
3988
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003989ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003990for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
3991 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
3992echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
3993echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
3994if eval "test \"\${$as_ac_Header+set}\" = set"; then
3995 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003996else
Martin v. Löwis11437992002-04-12 09:54:03 +00003997 cat >conftest.$ac_ext <<_ACEOF
3998#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003999#include "confdefs.h"
4000#include <sys/types.h>
4001#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004002
4003#ifdef F77_DUMMY_MAIN
4004# ifdef __cplusplus
4005 extern "C"
4006# endif
4007 int F77_DUMMY_MAIN() { return 1; }
4008#endif
4009int
4010main ()
4011{
4012if ((DIR *) 0)
4013return 0;
4014 ;
4015 return 0;
4016}
4017_ACEOF
4018rm -f conftest.$ac_objext
4019if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4020 (eval $ac_compile) 2>&5
4021 ac_status=$?
4022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4023 (exit $ac_status); } &&
4024 { ac_try='test -s conftest.$ac_objext'
4025 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4026 (eval $ac_try) 2>&5
4027 ac_status=$?
4028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4029 (exit $ac_status); }; }; then
4030 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004031else
Martin v. Löwis11437992002-04-12 09:54:03 +00004032 echo "$as_me: failed program was:" >&5
4033cat conftest.$ac_ext >&5
4034eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004035fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004036rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004037fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004038echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4039echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4040if test `eval echo '${'$as_ac_Header'}'` = yes; then
4041 cat >>confdefs.h <<_ACEOF
4042#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4043_ACEOF
4044
4045ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004046fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004047
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004048done
4049# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4050if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004051 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4052echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4053if test "${ac_cv_search_opendir+set}" = set; then
4054 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004055else
Martin v. Löwis11437992002-04-12 09:54:03 +00004056 ac_func_search_save_LIBS=$LIBS
4057ac_cv_search_opendir=no
4058cat >conftest.$ac_ext <<_ACEOF
4059#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004060#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004061
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004062/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004063#ifdef __cplusplus
4064extern "C"
4065#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004066/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004067 builtin and then its argument prototype would still apply. */
4068char opendir ();
4069#ifdef F77_DUMMY_MAIN
4070# ifdef __cplusplus
4071 extern "C"
4072# endif
4073 int F77_DUMMY_MAIN() { return 1; }
4074#endif
4075int
4076main ()
4077{
4078opendir ();
4079 ;
4080 return 0;
4081}
4082_ACEOF
4083rm -f conftest.$ac_objext conftest$ac_exeext
4084if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4085 (eval $ac_link) 2>&5
4086 ac_status=$?
4087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4088 (exit $ac_status); } &&
4089 { ac_try='test -s conftest$ac_exeext'
4090 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4091 (eval $ac_try) 2>&5
4092 ac_status=$?
4093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4094 (exit $ac_status); }; }; then
4095 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004096else
Martin v. Löwis11437992002-04-12 09:54:03 +00004097 echo "$as_me: failed program was:" >&5
4098cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004099fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004100rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4101if test "$ac_cv_search_opendir" = no; then
4102 for ac_lib in dir; do
4103 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4104 cat >conftest.$ac_ext <<_ACEOF
4105#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004106#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004107
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004108/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004109#ifdef __cplusplus
4110extern "C"
4111#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004112/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004113 builtin and then its argument prototype would still apply. */
4114char opendir ();
4115#ifdef F77_DUMMY_MAIN
4116# ifdef __cplusplus
4117 extern "C"
4118# endif
4119 int F77_DUMMY_MAIN() { return 1; }
4120#endif
4121int
4122main ()
4123{
4124opendir ();
4125 ;
4126 return 0;
4127}
4128_ACEOF
4129rm -f conftest.$ac_objext conftest$ac_exeext
4130if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4131 (eval $ac_link) 2>&5
4132 ac_status=$?
4133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4134 (exit $ac_status); } &&
4135 { ac_try='test -s conftest$ac_exeext'
4136 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4137 (eval $ac_try) 2>&5
4138 ac_status=$?
4139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4140 (exit $ac_status); }; }; then
4141 ac_cv_search_opendir="-l$ac_lib"
4142break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004143else
Martin v. Löwis11437992002-04-12 09:54:03 +00004144 echo "$as_me: failed program was:" >&5
4145cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004146fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004147rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4148 done
4149fi
4150LIBS=$ac_func_search_save_LIBS
4151fi
4152echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4153echo "${ECHO_T}$ac_cv_search_opendir" >&6
4154if test "$ac_cv_search_opendir" != no; then
4155 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004156
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004157fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004158
Michael W. Hudson54241132001-12-07 15:38:26 +00004159else
Martin v. Löwis11437992002-04-12 09:54:03 +00004160 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4161echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4162if test "${ac_cv_search_opendir+set}" = set; then
4163 echo $ECHO_N "(cached) $ECHO_C" >&6
4164else
4165 ac_func_search_save_LIBS=$LIBS
4166ac_cv_search_opendir=no
4167cat >conftest.$ac_ext <<_ACEOF
4168#line $LINENO "configure"
4169#include "confdefs.h"
4170
4171/* Override any gcc2 internal prototype to avoid an error. */
4172#ifdef __cplusplus
4173extern "C"
4174#endif
4175/* We use char because int might match the return type of a gcc2
4176 builtin and then its argument prototype would still apply. */
4177char opendir ();
4178#ifdef F77_DUMMY_MAIN
4179# ifdef __cplusplus
4180 extern "C"
4181# endif
4182 int F77_DUMMY_MAIN() { return 1; }
4183#endif
4184int
4185main ()
4186{
4187opendir ();
4188 ;
4189 return 0;
4190}
4191_ACEOF
4192rm -f conftest.$ac_objext conftest$ac_exeext
4193if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4194 (eval $ac_link) 2>&5
4195 ac_status=$?
4196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4197 (exit $ac_status); } &&
4198 { ac_try='test -s conftest$ac_exeext'
4199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4200 (eval $ac_try) 2>&5
4201 ac_status=$?
4202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4203 (exit $ac_status); }; }; then
4204 ac_cv_search_opendir="none required"
4205else
4206 echo "$as_me: failed program was:" >&5
4207cat conftest.$ac_ext >&5
4208fi
4209rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4210if test "$ac_cv_search_opendir" = no; then
4211 for ac_lib in x; do
4212 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4213 cat >conftest.$ac_ext <<_ACEOF
4214#line $LINENO "configure"
4215#include "confdefs.h"
4216
4217/* Override any gcc2 internal prototype to avoid an error. */
4218#ifdef __cplusplus
4219extern "C"
4220#endif
4221/* We use char because int might match the return type of a gcc2
4222 builtin and then its argument prototype would still apply. */
4223char opendir ();
4224#ifdef F77_DUMMY_MAIN
4225# ifdef __cplusplus
4226 extern "C"
4227# endif
4228 int F77_DUMMY_MAIN() { return 1; }
4229#endif
4230int
4231main ()
4232{
4233opendir ();
4234 ;
4235 return 0;
4236}
4237_ACEOF
4238rm -f conftest.$ac_objext conftest$ac_exeext
4239if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4240 (eval $ac_link) 2>&5
4241 ac_status=$?
4242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4243 (exit $ac_status); } &&
4244 { ac_try='test -s conftest$ac_exeext'
4245 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4246 (eval $ac_try) 2>&5
4247 ac_status=$?
4248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4249 (exit $ac_status); }; }; then
4250 ac_cv_search_opendir="-l$ac_lib"
4251break
4252else
4253 echo "$as_me: failed program was:" >&5
4254cat conftest.$ac_ext >&5
4255fi
4256rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4257 done
4258fi
4259LIBS=$ac_func_search_save_LIBS
4260fi
4261echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4262echo "${ECHO_T}$ac_cv_search_opendir" >&6
4263if test "$ac_cv_search_opendir" != no; then
4264 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4265
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004266fi
4267
4268fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004269
Michael W. Hudson54241132001-12-07 15:38:26 +00004270
Guido van Rossum627b2d71993-12-24 10:39:16 +00004271# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004272was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004273echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4274echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4275cat >conftest.$ac_ext <<_ACEOF
4276#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004277#include "confdefs.h"
4278#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004279
4280_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004281if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4282 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004283 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004284else
Martin v. Löwis11437992002-04-12 09:54:03 +00004285
4286
4287cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004288#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004289_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004290
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004291
Guido van Rossum627b2d71993-12-24 10:39:16 +00004292fi
4293rm -f conftest*
4294
Martin v. Löwis11437992002-04-12 09:54:03 +00004295echo "$as_me:$LINENO: result: $was_it_defined" >&5
4296echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004297
Guido van Rossum810cc512001-09-09 23:51:39 +00004298# Two defines needed to enable largefile support on various platforms
4299# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00004300
Martin v. Löwis11437992002-04-12 09:54:03 +00004301cat >>confdefs.h <<\_ACEOF
4302#define _LARGEFILE_SOURCE 1
4303_ACEOF
4304
4305
4306cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004307#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00004308_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004309
Michael W. Hudson54241132001-12-07 15:38:26 +00004310
Guido van Rossum84e7b241996-08-19 21:59:00 +00004311# Add some code to confdefs.h so that the test for off_t works on SCO
4312cat >> confdefs.h <<\EOF
4313#if defined(SCO_DS)
4314#undef _OFF_T
4315#endif
4316EOF
4317
Guido van Rossumef2255b2000-03-10 22:30:29 +00004318# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00004319echo "$as_me:$LINENO: checking for mode_t" >&5
4320echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
4321if test "${ac_cv_type_mode_t+set}" = set; then
4322 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004323else
Martin v. Löwis11437992002-04-12 09:54:03 +00004324 cat >conftest.$ac_ext <<_ACEOF
4325#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004326#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004327$ac_includes_default
4328#ifdef F77_DUMMY_MAIN
4329# ifdef __cplusplus
4330 extern "C"
4331# endif
4332 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004333#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004334int
4335main ()
4336{
4337if ((mode_t *) 0)
4338 return 0;
4339if (sizeof (mode_t))
4340 return 0;
4341 ;
4342 return 0;
4343}
4344_ACEOF
4345rm -f conftest.$ac_objext
4346if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4347 (eval $ac_compile) 2>&5
4348 ac_status=$?
4349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4350 (exit $ac_status); } &&
4351 { ac_try='test -s conftest.$ac_objext'
4352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4353 (eval $ac_try) 2>&5
4354 ac_status=$?
4355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4356 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00004357 ac_cv_type_mode_t=yes
4358else
Martin v. Löwis11437992002-04-12 09:54:03 +00004359 echo "$as_me: failed program was:" >&5
4360cat conftest.$ac_ext >&5
4361ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00004362fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004363rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004364fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004365echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4366echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4367if test $ac_cv_type_mode_t = yes; then
4368 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004369else
Martin v. Löwis11437992002-04-12 09:54:03 +00004370
4371cat >>confdefs.h <<_ACEOF
4372#define mode_t int
4373_ACEOF
4374
4375fi
4376
4377echo "$as_me:$LINENO: checking for off_t" >&5
4378echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4379if test "${ac_cv_type_off_t+set}" = set; then
4380 echo $ECHO_N "(cached) $ECHO_C" >&6
4381else
4382 cat >conftest.$ac_ext <<_ACEOF
4383#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004384#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004385$ac_includes_default
4386#ifdef F77_DUMMY_MAIN
4387# ifdef __cplusplus
4388 extern "C"
4389# endif
4390 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004391#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004392int
4393main ()
4394{
4395if ((off_t *) 0)
4396 return 0;
4397if (sizeof (off_t))
4398 return 0;
4399 ;
4400 return 0;
4401}
4402_ACEOF
4403rm -f conftest.$ac_objext
4404if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4405 (eval $ac_compile) 2>&5
4406 ac_status=$?
4407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4408 (exit $ac_status); } &&
4409 { ac_try='test -s conftest.$ac_objext'
4410 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4411 (eval $ac_try) 2>&5
4412 ac_status=$?
4413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4414 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004415 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004416else
Martin v. Löwis11437992002-04-12 09:54:03 +00004417 echo "$as_me: failed program was:" >&5
4418cat conftest.$ac_ext >&5
4419ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004420fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004421rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004422fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004423echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
4424echo "${ECHO_T}$ac_cv_type_off_t" >&6
4425if test $ac_cv_type_off_t = yes; then
4426 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004427else
Martin v. Löwis11437992002-04-12 09:54:03 +00004428
4429cat >>confdefs.h <<_ACEOF
4430#define off_t long
4431_ACEOF
4432
4433fi
4434
4435echo "$as_me:$LINENO: checking for pid_t" >&5
4436echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4437if test "${ac_cv_type_pid_t+set}" = set; then
4438 echo $ECHO_N "(cached) $ECHO_C" >&6
4439else
4440 cat >conftest.$ac_ext <<_ACEOF
4441#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004442#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004443$ac_includes_default
4444#ifdef F77_DUMMY_MAIN
4445# ifdef __cplusplus
4446 extern "C"
4447# endif
4448 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004449#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004450int
4451main ()
4452{
4453if ((pid_t *) 0)
4454 return 0;
4455if (sizeof (pid_t))
4456 return 0;
4457 ;
4458 return 0;
4459}
4460_ACEOF
4461rm -f conftest.$ac_objext
4462if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4463 (eval $ac_compile) 2>&5
4464 ac_status=$?
4465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4466 (exit $ac_status); } &&
4467 { ac_try='test -s conftest.$ac_objext'
4468 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4469 (eval $ac_try) 2>&5
4470 ac_status=$?
4471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4472 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004473 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004474else
Martin v. Löwis11437992002-04-12 09:54:03 +00004475 echo "$as_me: failed program was:" >&5
4476cat conftest.$ac_ext >&5
4477ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004478fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004479rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004480fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004481echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
4482echo "${ECHO_T}$ac_cv_type_pid_t" >&6
4483if test $ac_cv_type_pid_t = yes; then
4484 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004485else
Martin v. Löwis11437992002-04-12 09:54:03 +00004486
4487cat >>confdefs.h <<_ACEOF
4488#define pid_t int
4489_ACEOF
4490
4491fi
4492
4493echo "$as_me:$LINENO: checking return type of signal handlers" >&5
4494echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
4495if test "${ac_cv_type_signal+set}" = set; then
4496 echo $ECHO_N "(cached) $ECHO_C" >&6
4497else
4498 cat >conftest.$ac_ext <<_ACEOF
4499#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004500#include "confdefs.h"
4501#include <sys/types.h>
4502#include <signal.h>
4503#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004504# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00004505#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004506#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004507extern "C" void (*signal (int, void (*)(int)))(int);
4508#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004509void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004510#endif
4511
Martin v. Löwis11437992002-04-12 09:54:03 +00004512#ifdef F77_DUMMY_MAIN
4513# ifdef __cplusplus
4514 extern "C"
4515# endif
4516 int F77_DUMMY_MAIN() { return 1; }
4517#endif
4518int
4519main ()
4520{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004521int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00004522 ;
4523 return 0;
4524}
4525_ACEOF
4526rm -f conftest.$ac_objext
4527if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4528 (eval $ac_compile) 2>&5
4529 ac_status=$?
4530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4531 (exit $ac_status); } &&
4532 { ac_try='test -s conftest.$ac_objext'
4533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4534 (eval $ac_try) 2>&5
4535 ac_status=$?
4536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4537 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004538 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00004539else
Martin v. Löwis11437992002-04-12 09:54:03 +00004540 echo "$as_me: failed program was:" >&5
4541cat conftest.$ac_ext >&5
4542ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00004543fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004544rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004545fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004546echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
4547echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004548
Martin v. Löwis11437992002-04-12 09:54:03 +00004549cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004550#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004551_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004552
Michael W. Hudson54241132001-12-07 15:38:26 +00004553
Martin v. Löwis11437992002-04-12 09:54:03 +00004554echo "$as_me:$LINENO: checking for size_t" >&5
4555echo $ECHO_N "checking for size_t... $ECHO_C" >&6
4556if test "${ac_cv_type_size_t+set}" = set; then
4557 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004558else
Martin v. Löwis11437992002-04-12 09:54:03 +00004559 cat >conftest.$ac_ext <<_ACEOF
4560#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004561#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004562$ac_includes_default
4563#ifdef F77_DUMMY_MAIN
4564# ifdef __cplusplus
4565 extern "C"
4566# endif
4567 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004568#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004569int
4570main ()
4571{
4572if ((size_t *) 0)
4573 return 0;
4574if (sizeof (size_t))
4575 return 0;
4576 ;
4577 return 0;
4578}
4579_ACEOF
4580rm -f conftest.$ac_objext
4581if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4582 (eval $ac_compile) 2>&5
4583 ac_status=$?
4584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4585 (exit $ac_status); } &&
4586 { ac_try='test -s conftest.$ac_objext'
4587 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4588 (eval $ac_try) 2>&5
4589 ac_status=$?
4590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4591 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004592 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004593else
Martin v. Löwis11437992002-04-12 09:54:03 +00004594 echo "$as_me: failed program was:" >&5
4595cat conftest.$ac_ext >&5
4596ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004597fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004598rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004599fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004600echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
4601echo "${ECHO_T}$ac_cv_type_size_t" >&6
4602if test $ac_cv_type_size_t = yes; then
4603 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004604else
Martin v. Löwis11437992002-04-12 09:54:03 +00004605
4606cat >>confdefs.h <<_ACEOF
4607#define size_t unsigned
4608_ACEOF
4609
4610fi
4611
4612echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
4613echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
4614if test "${ac_cv_type_uid_t+set}" = set; then
4615 echo $ECHO_N "(cached) $ECHO_C" >&6
4616else
4617 cat >conftest.$ac_ext <<_ACEOF
4618#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004619#include "confdefs.h"
4620#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004621
4622_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004623if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4624 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004625 ac_cv_type_uid_t=yes
4626else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004627 ac_cv_type_uid_t=no
4628fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004629rm -f conftest*
4630
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004631fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004632echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
4633echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004634if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004635
Martin v. Löwis11437992002-04-12 09:54:03 +00004636cat >>confdefs.h <<\_ACEOF
4637#define uid_t int
4638_ACEOF
4639
4640
4641cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004642#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00004643_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004644
4645fi
4646
Jack Jansendd19cf82001-12-06 22:36:17 +00004647
Michael W. Hudson54241132001-12-07 15:38:26 +00004648# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00004649echo "$as_me:$LINENO: checking for int" >&5
4650echo $ECHO_N "checking for int... $ECHO_C" >&6
4651if test "${ac_cv_type_int+set}" = set; then
4652 echo $ECHO_N "(cached) $ECHO_C" >&6
4653else
4654 cat >conftest.$ac_ext <<_ACEOF
4655#line $LINENO "configure"
4656#include "confdefs.h"
4657$ac_includes_default
4658#ifdef F77_DUMMY_MAIN
4659# ifdef __cplusplus
4660 extern "C"
4661# endif
4662 int F77_DUMMY_MAIN() { return 1; }
4663#endif
4664int
4665main ()
4666{
4667if ((int *) 0)
4668 return 0;
4669if (sizeof (int))
4670 return 0;
4671 ;
4672 return 0;
4673}
4674_ACEOF
4675rm -f conftest.$ac_objext
4676if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4677 (eval $ac_compile) 2>&5
4678 ac_status=$?
4679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4680 (exit $ac_status); } &&
4681 { ac_try='test -s conftest.$ac_objext'
4682 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4683 (eval $ac_try) 2>&5
4684 ac_status=$?
4685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4686 (exit $ac_status); }; }; then
4687 ac_cv_type_int=yes
4688else
4689 echo "$as_me: failed program was:" >&5
4690cat conftest.$ac_ext >&5
4691ac_cv_type_int=no
4692fi
4693rm -f conftest.$ac_objext conftest.$ac_ext
4694fi
4695echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
4696echo "${ECHO_T}$ac_cv_type_int" >&6
4697
4698echo "$as_me:$LINENO: checking size of int" >&5
4699echo $ECHO_N "checking size of int... $ECHO_C" >&6
4700if test "${ac_cv_sizeof_int+set}" = set; then
4701 echo $ECHO_N "(cached) $ECHO_C" >&6
4702else
4703 if test "$ac_cv_type_int" = yes; then
4704 # The cast to unsigned long works around a bug in the HP C Compiler
4705 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4706 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4707 # This bug is HP SR number 8606223364.
4708 if test "$cross_compiling" = yes; then
4709 # Depending upon the size, compute the lo and hi bounds.
4710cat >conftest.$ac_ext <<_ACEOF
4711#line $LINENO "configure"
4712#include "confdefs.h"
4713$ac_includes_default
4714#ifdef F77_DUMMY_MAIN
4715# ifdef __cplusplus
4716 extern "C"
4717# endif
4718 int F77_DUMMY_MAIN() { return 1; }
4719#endif
4720int
4721main ()
4722{
4723static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
4724test_array [0] = 0
4725
4726 ;
4727 return 0;
4728}
4729_ACEOF
4730rm -f conftest.$ac_objext
4731if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4732 (eval $ac_compile) 2>&5
4733 ac_status=$?
4734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4735 (exit $ac_status); } &&
4736 { ac_try='test -s conftest.$ac_objext'
4737 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4738 (eval $ac_try) 2>&5
4739 ac_status=$?
4740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4741 (exit $ac_status); }; }; then
4742 ac_lo=0 ac_mid=0
4743 while :; do
4744 cat >conftest.$ac_ext <<_ACEOF
4745#line $LINENO "configure"
4746#include "confdefs.h"
4747$ac_includes_default
4748#ifdef F77_DUMMY_MAIN
4749# ifdef __cplusplus
4750 extern "C"
4751# endif
4752 int F77_DUMMY_MAIN() { return 1; }
4753#endif
4754int
4755main ()
4756{
4757static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4758test_array [0] = 0
4759
4760 ;
4761 return 0;
4762}
4763_ACEOF
4764rm -f conftest.$ac_objext
4765if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4766 (eval $ac_compile) 2>&5
4767 ac_status=$?
4768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4769 (exit $ac_status); } &&
4770 { ac_try='test -s conftest.$ac_objext'
4771 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4772 (eval $ac_try) 2>&5
4773 ac_status=$?
4774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4775 (exit $ac_status); }; }; then
4776 ac_hi=$ac_mid; break
4777else
4778 echo "$as_me: failed program was:" >&5
4779cat conftest.$ac_ext >&5
4780ac_lo=`expr $ac_mid + 1`
4781 if test $ac_lo -le $ac_mid; then
4782 ac_lo= ac_hi=
4783 break
4784 fi
4785 ac_mid=`expr 2 '*' $ac_mid + 1`
4786fi
4787rm -f conftest.$ac_objext conftest.$ac_ext
4788 done
4789else
4790 echo "$as_me: failed program was:" >&5
4791cat conftest.$ac_ext >&5
4792cat >conftest.$ac_ext <<_ACEOF
4793#line $LINENO "configure"
4794#include "confdefs.h"
4795$ac_includes_default
4796#ifdef F77_DUMMY_MAIN
4797# ifdef __cplusplus
4798 extern "C"
4799# endif
4800 int F77_DUMMY_MAIN() { return 1; }
4801#endif
4802int
4803main ()
4804{
4805static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
4806test_array [0] = 0
4807
4808 ;
4809 return 0;
4810}
4811_ACEOF
4812rm -f conftest.$ac_objext
4813if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4814 (eval $ac_compile) 2>&5
4815 ac_status=$?
4816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4817 (exit $ac_status); } &&
4818 { ac_try='test -s conftest.$ac_objext'
4819 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4820 (eval $ac_try) 2>&5
4821 ac_status=$?
4822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4823 (exit $ac_status); }; }; then
4824 ac_hi=-1 ac_mid=-1
4825 while :; do
4826 cat >conftest.$ac_ext <<_ACEOF
4827#line $LINENO "configure"
4828#include "confdefs.h"
4829$ac_includes_default
4830#ifdef F77_DUMMY_MAIN
4831# ifdef __cplusplus
4832 extern "C"
4833# endif
4834 int F77_DUMMY_MAIN() { return 1; }
4835#endif
4836int
4837main ()
4838{
4839static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
4840test_array [0] = 0
4841
4842 ;
4843 return 0;
4844}
4845_ACEOF
4846rm -f conftest.$ac_objext
4847if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4848 (eval $ac_compile) 2>&5
4849 ac_status=$?
4850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4851 (exit $ac_status); } &&
4852 { ac_try='test -s conftest.$ac_objext'
4853 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4854 (eval $ac_try) 2>&5
4855 ac_status=$?
4856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4857 (exit $ac_status); }; }; then
4858 ac_lo=$ac_mid; break
4859else
4860 echo "$as_me: failed program was:" >&5
4861cat conftest.$ac_ext >&5
4862ac_hi=`expr '(' $ac_mid ')' - 1`
4863 if test $ac_mid -le $ac_hi; then
4864 ac_lo= ac_hi=
4865 break
4866 fi
4867 ac_mid=`expr 2 '*' $ac_mid`
4868fi
4869rm -f conftest.$ac_objext conftest.$ac_ext
4870 done
4871else
4872 echo "$as_me: failed program was:" >&5
4873cat conftest.$ac_ext >&5
4874ac_lo= ac_hi=
4875fi
4876rm -f conftest.$ac_objext conftest.$ac_ext
4877fi
4878rm -f conftest.$ac_objext conftest.$ac_ext
4879# Binary search between lo and hi bounds.
4880while test "x$ac_lo" != "x$ac_hi"; do
4881 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4882 cat >conftest.$ac_ext <<_ACEOF
4883#line $LINENO "configure"
4884#include "confdefs.h"
4885$ac_includes_default
4886#ifdef F77_DUMMY_MAIN
4887# ifdef __cplusplus
4888 extern "C"
4889# endif
4890 int F77_DUMMY_MAIN() { return 1; }
4891#endif
4892int
4893main ()
4894{
4895static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4896test_array [0] = 0
4897
4898 ;
4899 return 0;
4900}
4901_ACEOF
4902rm -f conftest.$ac_objext
4903if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4904 (eval $ac_compile) 2>&5
4905 ac_status=$?
4906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4907 (exit $ac_status); } &&
4908 { ac_try='test -s conftest.$ac_objext'
4909 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4910 (eval $ac_try) 2>&5
4911 ac_status=$?
4912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4913 (exit $ac_status); }; }; then
4914 ac_hi=$ac_mid
4915else
4916 echo "$as_me: failed program was:" >&5
4917cat conftest.$ac_ext >&5
4918ac_lo=`expr '(' $ac_mid ')' + 1`
4919fi
4920rm -f conftest.$ac_objext conftest.$ac_ext
4921done
4922case $ac_lo in
4923?*) ac_cv_sizeof_int=$ac_lo;;
4924'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
4925echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
4926 { (exit 1); exit 1; }; } ;;
4927esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004928else
4929 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004930 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
4931echo "$as_me: error: cannot run test program while cross compiling" >&2;}
4932 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004933else
Martin v. Löwis11437992002-04-12 09:54:03 +00004934 cat >conftest.$ac_ext <<_ACEOF
4935#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004936#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004937$ac_includes_default
4938long longval () { return (long) (sizeof (int)); }
4939unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00004940#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004941#include <stdlib.h>
4942#ifdef F77_DUMMY_MAIN
4943# ifdef __cplusplus
4944 extern "C"
4945# endif
4946 int F77_DUMMY_MAIN() { return 1; }
4947#endif
4948int
4949main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004950{
Martin v. Löwis11437992002-04-12 09:54:03 +00004951
4952 FILE *f = fopen ("conftest.val", "w");
4953 if (! f)
4954 exit (1);
4955 if (((long) (sizeof (int))) < 0)
4956 {
4957 long i = longval ();
4958 if (i != ((long) (sizeof (int))))
4959 exit (1);
4960 fprintf (f, "%ld\n", i);
4961 }
4962 else
4963 {
4964 unsigned long i = ulongval ();
4965 if (i != ((long) (sizeof (int))))
4966 exit (1);
4967 fprintf (f, "%lu\n", i);
4968 }
4969 exit (ferror (f) || fclose (f) != 0);
4970
4971 ;
4972 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004973}
Martin v. Löwis11437992002-04-12 09:54:03 +00004974_ACEOF
4975rm -f conftest$ac_exeext
4976if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4977 (eval $ac_link) 2>&5
4978 ac_status=$?
4979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4980 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4981 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4982 (eval $ac_try) 2>&5
4983 ac_status=$?
4984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4985 (exit $ac_status); }; }; then
4986 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004987else
Martin v. Löwis11437992002-04-12 09:54:03 +00004988 echo "$as_me: program exited with status $ac_status" >&5
4989echo "$as_me: failed program was:" >&5
4990cat conftest.$ac_ext >&5
4991( exit $ac_status )
4992{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
4993echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
4994 { (exit 1); exit 1; }; }
4995fi
4996rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4997fi
4998fi
4999rm -f conftest.val
5000else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005001 ac_cv_sizeof_int=0
5002fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005003fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005004echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5005echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5006cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005007#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005008_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005009
5010
Martin v. Löwis11437992002-04-12 09:54:03 +00005011echo "$as_me:$LINENO: checking for long" >&5
5012echo $ECHO_N "checking for long... $ECHO_C" >&6
5013if test "${ac_cv_type_long+set}" = set; then
5014 echo $ECHO_N "(cached) $ECHO_C" >&6
5015else
5016 cat >conftest.$ac_ext <<_ACEOF
5017#line $LINENO "configure"
5018#include "confdefs.h"
5019$ac_includes_default
5020#ifdef F77_DUMMY_MAIN
5021# ifdef __cplusplus
5022 extern "C"
5023# endif
5024 int F77_DUMMY_MAIN() { return 1; }
5025#endif
5026int
5027main ()
5028{
5029if ((long *) 0)
5030 return 0;
5031if (sizeof (long))
5032 return 0;
5033 ;
5034 return 0;
5035}
5036_ACEOF
5037rm -f conftest.$ac_objext
5038if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5039 (eval $ac_compile) 2>&5
5040 ac_status=$?
5041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5042 (exit $ac_status); } &&
5043 { ac_try='test -s conftest.$ac_objext'
5044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5045 (eval $ac_try) 2>&5
5046 ac_status=$?
5047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5048 (exit $ac_status); }; }; then
5049 ac_cv_type_long=yes
5050else
5051 echo "$as_me: failed program was:" >&5
5052cat conftest.$ac_ext >&5
5053ac_cv_type_long=no
5054fi
5055rm -f conftest.$ac_objext conftest.$ac_ext
5056fi
5057echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5058echo "${ECHO_T}$ac_cv_type_long" >&6
5059
5060echo "$as_me:$LINENO: checking size of long" >&5
5061echo $ECHO_N "checking size of long... $ECHO_C" >&6
5062if test "${ac_cv_sizeof_long+set}" = set; then
5063 echo $ECHO_N "(cached) $ECHO_C" >&6
5064else
5065 if test "$ac_cv_type_long" = yes; then
5066 # The cast to unsigned long works around a bug in the HP C Compiler
5067 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5068 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5069 # This bug is HP SR number 8606223364.
5070 if test "$cross_compiling" = yes; then
5071 # Depending upon the size, compute the lo and hi bounds.
5072cat >conftest.$ac_ext <<_ACEOF
5073#line $LINENO "configure"
5074#include "confdefs.h"
5075$ac_includes_default
5076#ifdef F77_DUMMY_MAIN
5077# ifdef __cplusplus
5078 extern "C"
5079# endif
5080 int F77_DUMMY_MAIN() { return 1; }
5081#endif
5082int
5083main ()
5084{
5085static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5086test_array [0] = 0
5087
5088 ;
5089 return 0;
5090}
5091_ACEOF
5092rm -f conftest.$ac_objext
5093if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5094 (eval $ac_compile) 2>&5
5095 ac_status=$?
5096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5097 (exit $ac_status); } &&
5098 { ac_try='test -s conftest.$ac_objext'
5099 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5100 (eval $ac_try) 2>&5
5101 ac_status=$?
5102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5103 (exit $ac_status); }; }; then
5104 ac_lo=0 ac_mid=0
5105 while :; do
5106 cat >conftest.$ac_ext <<_ACEOF
5107#line $LINENO "configure"
5108#include "confdefs.h"
5109$ac_includes_default
5110#ifdef F77_DUMMY_MAIN
5111# ifdef __cplusplus
5112 extern "C"
5113# endif
5114 int F77_DUMMY_MAIN() { return 1; }
5115#endif
5116int
5117main ()
5118{
5119static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5120test_array [0] = 0
5121
5122 ;
5123 return 0;
5124}
5125_ACEOF
5126rm -f conftest.$ac_objext
5127if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5128 (eval $ac_compile) 2>&5
5129 ac_status=$?
5130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5131 (exit $ac_status); } &&
5132 { ac_try='test -s conftest.$ac_objext'
5133 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5134 (eval $ac_try) 2>&5
5135 ac_status=$?
5136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5137 (exit $ac_status); }; }; then
5138 ac_hi=$ac_mid; break
5139else
5140 echo "$as_me: failed program was:" >&5
5141cat conftest.$ac_ext >&5
5142ac_lo=`expr $ac_mid + 1`
5143 if test $ac_lo -le $ac_mid; then
5144 ac_lo= ac_hi=
5145 break
5146 fi
5147 ac_mid=`expr 2 '*' $ac_mid + 1`
5148fi
5149rm -f conftest.$ac_objext conftest.$ac_ext
5150 done
5151else
5152 echo "$as_me: failed program was:" >&5
5153cat conftest.$ac_ext >&5
5154cat >conftest.$ac_ext <<_ACEOF
5155#line $LINENO "configure"
5156#include "confdefs.h"
5157$ac_includes_default
5158#ifdef F77_DUMMY_MAIN
5159# ifdef __cplusplus
5160 extern "C"
5161# endif
5162 int F77_DUMMY_MAIN() { return 1; }
5163#endif
5164int
5165main ()
5166{
5167static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5168test_array [0] = 0
5169
5170 ;
5171 return 0;
5172}
5173_ACEOF
5174rm -f conftest.$ac_objext
5175if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5176 (eval $ac_compile) 2>&5
5177 ac_status=$?
5178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5179 (exit $ac_status); } &&
5180 { ac_try='test -s conftest.$ac_objext'
5181 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5182 (eval $ac_try) 2>&5
5183 ac_status=$?
5184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5185 (exit $ac_status); }; }; then
5186 ac_hi=-1 ac_mid=-1
5187 while :; do
5188 cat >conftest.$ac_ext <<_ACEOF
5189#line $LINENO "configure"
5190#include "confdefs.h"
5191$ac_includes_default
5192#ifdef F77_DUMMY_MAIN
5193# ifdef __cplusplus
5194 extern "C"
5195# endif
5196 int F77_DUMMY_MAIN() { return 1; }
5197#endif
5198int
5199main ()
5200{
5201static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5202test_array [0] = 0
5203
5204 ;
5205 return 0;
5206}
5207_ACEOF
5208rm -f conftest.$ac_objext
5209if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5210 (eval $ac_compile) 2>&5
5211 ac_status=$?
5212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5213 (exit $ac_status); } &&
5214 { ac_try='test -s conftest.$ac_objext'
5215 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5216 (eval $ac_try) 2>&5
5217 ac_status=$?
5218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5219 (exit $ac_status); }; }; then
5220 ac_lo=$ac_mid; break
5221else
5222 echo "$as_me: failed program was:" >&5
5223cat conftest.$ac_ext >&5
5224ac_hi=`expr '(' $ac_mid ')' - 1`
5225 if test $ac_mid -le $ac_hi; then
5226 ac_lo= ac_hi=
5227 break
5228 fi
5229 ac_mid=`expr 2 '*' $ac_mid`
5230fi
5231rm -f conftest.$ac_objext conftest.$ac_ext
5232 done
5233else
5234 echo "$as_me: failed program was:" >&5
5235cat conftest.$ac_ext >&5
5236ac_lo= ac_hi=
5237fi
5238rm -f conftest.$ac_objext conftest.$ac_ext
5239fi
5240rm -f conftest.$ac_objext conftest.$ac_ext
5241# Binary search between lo and hi bounds.
5242while test "x$ac_lo" != "x$ac_hi"; do
5243 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5244 cat >conftest.$ac_ext <<_ACEOF
5245#line $LINENO "configure"
5246#include "confdefs.h"
5247$ac_includes_default
5248#ifdef F77_DUMMY_MAIN
5249# ifdef __cplusplus
5250 extern "C"
5251# endif
5252 int F77_DUMMY_MAIN() { return 1; }
5253#endif
5254int
5255main ()
5256{
5257static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5258test_array [0] = 0
5259
5260 ;
5261 return 0;
5262}
5263_ACEOF
5264rm -f conftest.$ac_objext
5265if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5266 (eval $ac_compile) 2>&5
5267 ac_status=$?
5268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5269 (exit $ac_status); } &&
5270 { ac_try='test -s conftest.$ac_objext'
5271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5272 (eval $ac_try) 2>&5
5273 ac_status=$?
5274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5275 (exit $ac_status); }; }; then
5276 ac_hi=$ac_mid
5277else
5278 echo "$as_me: failed program was:" >&5
5279cat conftest.$ac_ext >&5
5280ac_lo=`expr '(' $ac_mid ')' + 1`
5281fi
5282rm -f conftest.$ac_objext conftest.$ac_ext
5283done
5284case $ac_lo in
5285?*) ac_cv_sizeof_long=$ac_lo;;
5286'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5287echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5288 { (exit 1); exit 1; }; } ;;
5289esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005290else
5291 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005292 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5293echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5294 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005295else
Martin v. Löwis11437992002-04-12 09:54:03 +00005296 cat >conftest.$ac_ext <<_ACEOF
5297#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005298#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005299$ac_includes_default
5300long longval () { return (long) (sizeof (long)); }
5301unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005302#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005303#include <stdlib.h>
5304#ifdef F77_DUMMY_MAIN
5305# ifdef __cplusplus
5306 extern "C"
5307# endif
5308 int F77_DUMMY_MAIN() { return 1; }
5309#endif
5310int
5311main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005312{
Martin v. Löwis11437992002-04-12 09:54:03 +00005313
5314 FILE *f = fopen ("conftest.val", "w");
5315 if (! f)
5316 exit (1);
5317 if (((long) (sizeof (long))) < 0)
5318 {
5319 long i = longval ();
5320 if (i != ((long) (sizeof (long))))
5321 exit (1);
5322 fprintf (f, "%ld\n", i);
5323 }
5324 else
5325 {
5326 unsigned long i = ulongval ();
5327 if (i != ((long) (sizeof (long))))
5328 exit (1);
5329 fprintf (f, "%lu\n", i);
5330 }
5331 exit (ferror (f) || fclose (f) != 0);
5332
5333 ;
5334 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005335}
Martin v. Löwis11437992002-04-12 09:54:03 +00005336_ACEOF
5337rm -f conftest$ac_exeext
5338if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5339 (eval $ac_link) 2>&5
5340 ac_status=$?
5341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5342 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5344 (eval $ac_try) 2>&5
5345 ac_status=$?
5346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5347 (exit $ac_status); }; }; then
5348 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005349else
Martin v. Löwis11437992002-04-12 09:54:03 +00005350 echo "$as_me: program exited with status $ac_status" >&5
5351echo "$as_me: failed program was:" >&5
5352cat conftest.$ac_ext >&5
5353( exit $ac_status )
5354{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5355echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5356 { (exit 1); exit 1; }; }
5357fi
5358rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5359fi
5360fi
5361rm -f conftest.val
5362else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005363 ac_cv_sizeof_long=0
5364fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005365fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005366echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5367echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5368cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005369#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00005370_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005371
5372
Martin v. Löwis11437992002-04-12 09:54:03 +00005373echo "$as_me:$LINENO: checking for void *" >&5
5374echo $ECHO_N "checking for void *... $ECHO_C" >&6
5375if test "${ac_cv_type_void_p+set}" = set; then
5376 echo $ECHO_N "(cached) $ECHO_C" >&6
5377else
5378 cat >conftest.$ac_ext <<_ACEOF
5379#line $LINENO "configure"
5380#include "confdefs.h"
5381$ac_includes_default
5382#ifdef F77_DUMMY_MAIN
5383# ifdef __cplusplus
5384 extern "C"
5385# endif
5386 int F77_DUMMY_MAIN() { return 1; }
5387#endif
5388int
5389main ()
5390{
5391if ((void * *) 0)
5392 return 0;
5393if (sizeof (void *))
5394 return 0;
5395 ;
5396 return 0;
5397}
5398_ACEOF
5399rm -f conftest.$ac_objext
5400if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5401 (eval $ac_compile) 2>&5
5402 ac_status=$?
5403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5404 (exit $ac_status); } &&
5405 { ac_try='test -s conftest.$ac_objext'
5406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5407 (eval $ac_try) 2>&5
5408 ac_status=$?
5409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5410 (exit $ac_status); }; }; then
5411 ac_cv_type_void_p=yes
5412else
5413 echo "$as_me: failed program was:" >&5
5414cat conftest.$ac_ext >&5
5415ac_cv_type_void_p=no
5416fi
5417rm -f conftest.$ac_objext conftest.$ac_ext
5418fi
5419echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
5420echo "${ECHO_T}$ac_cv_type_void_p" >&6
5421
5422echo "$as_me:$LINENO: checking size of void *" >&5
5423echo $ECHO_N "checking size of void *... $ECHO_C" >&6
5424if test "${ac_cv_sizeof_void_p+set}" = set; then
5425 echo $ECHO_N "(cached) $ECHO_C" >&6
5426else
5427 if test "$ac_cv_type_void_p" = yes; then
5428 # The cast to unsigned long works around a bug in the HP C Compiler
5429 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5430 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5431 # This bug is HP SR number 8606223364.
5432 if test "$cross_compiling" = yes; then
5433 # Depending upon the size, compute the lo and hi bounds.
5434cat >conftest.$ac_ext <<_ACEOF
5435#line $LINENO "configure"
5436#include "confdefs.h"
5437$ac_includes_default
5438#ifdef F77_DUMMY_MAIN
5439# ifdef __cplusplus
5440 extern "C"
5441# endif
5442 int F77_DUMMY_MAIN() { return 1; }
5443#endif
5444int
5445main ()
5446{
5447static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
5448test_array [0] = 0
5449
5450 ;
5451 return 0;
5452}
5453_ACEOF
5454rm -f conftest.$ac_objext
5455if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5456 (eval $ac_compile) 2>&5
5457 ac_status=$?
5458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5459 (exit $ac_status); } &&
5460 { ac_try='test -s conftest.$ac_objext'
5461 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5462 (eval $ac_try) 2>&5
5463 ac_status=$?
5464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5465 (exit $ac_status); }; }; then
5466 ac_lo=0 ac_mid=0
5467 while :; do
5468 cat >conftest.$ac_ext <<_ACEOF
5469#line $LINENO "configure"
5470#include "confdefs.h"
5471$ac_includes_default
5472#ifdef F77_DUMMY_MAIN
5473# ifdef __cplusplus
5474 extern "C"
5475# endif
5476 int F77_DUMMY_MAIN() { return 1; }
5477#endif
5478int
5479main ()
5480{
5481static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5482test_array [0] = 0
5483
5484 ;
5485 return 0;
5486}
5487_ACEOF
5488rm -f conftest.$ac_objext
5489if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5490 (eval $ac_compile) 2>&5
5491 ac_status=$?
5492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5493 (exit $ac_status); } &&
5494 { ac_try='test -s conftest.$ac_objext'
5495 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5496 (eval $ac_try) 2>&5
5497 ac_status=$?
5498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5499 (exit $ac_status); }; }; then
5500 ac_hi=$ac_mid; break
5501else
5502 echo "$as_me: failed program was:" >&5
5503cat conftest.$ac_ext >&5
5504ac_lo=`expr $ac_mid + 1`
5505 if test $ac_lo -le $ac_mid; then
5506 ac_lo= ac_hi=
5507 break
5508 fi
5509 ac_mid=`expr 2 '*' $ac_mid + 1`
5510fi
5511rm -f conftest.$ac_objext conftest.$ac_ext
5512 done
5513else
5514 echo "$as_me: failed program was:" >&5
5515cat conftest.$ac_ext >&5
5516cat >conftest.$ac_ext <<_ACEOF
5517#line $LINENO "configure"
5518#include "confdefs.h"
5519$ac_includes_default
5520#ifdef F77_DUMMY_MAIN
5521# ifdef __cplusplus
5522 extern "C"
5523# endif
5524 int F77_DUMMY_MAIN() { return 1; }
5525#endif
5526int
5527main ()
5528{
5529static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
5530test_array [0] = 0
5531
5532 ;
5533 return 0;
5534}
5535_ACEOF
5536rm -f conftest.$ac_objext
5537if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5538 (eval $ac_compile) 2>&5
5539 ac_status=$?
5540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5541 (exit $ac_status); } &&
5542 { ac_try='test -s conftest.$ac_objext'
5543 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5544 (eval $ac_try) 2>&5
5545 ac_status=$?
5546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5547 (exit $ac_status); }; }; then
5548 ac_hi=-1 ac_mid=-1
5549 while :; do
5550 cat >conftest.$ac_ext <<_ACEOF
5551#line $LINENO "configure"
5552#include "confdefs.h"
5553$ac_includes_default
5554#ifdef F77_DUMMY_MAIN
5555# ifdef __cplusplus
5556 extern "C"
5557# endif
5558 int F77_DUMMY_MAIN() { return 1; }
5559#endif
5560int
5561main ()
5562{
5563static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
5564test_array [0] = 0
5565
5566 ;
5567 return 0;
5568}
5569_ACEOF
5570rm -f conftest.$ac_objext
5571if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5572 (eval $ac_compile) 2>&5
5573 ac_status=$?
5574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5575 (exit $ac_status); } &&
5576 { ac_try='test -s conftest.$ac_objext'
5577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5578 (eval $ac_try) 2>&5
5579 ac_status=$?
5580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5581 (exit $ac_status); }; }; then
5582 ac_lo=$ac_mid; break
5583else
5584 echo "$as_me: failed program was:" >&5
5585cat conftest.$ac_ext >&5
5586ac_hi=`expr '(' $ac_mid ')' - 1`
5587 if test $ac_mid -le $ac_hi; then
5588 ac_lo= ac_hi=
5589 break
5590 fi
5591 ac_mid=`expr 2 '*' $ac_mid`
5592fi
5593rm -f conftest.$ac_objext conftest.$ac_ext
5594 done
5595else
5596 echo "$as_me: failed program was:" >&5
5597cat conftest.$ac_ext >&5
5598ac_lo= ac_hi=
5599fi
5600rm -f conftest.$ac_objext conftest.$ac_ext
5601fi
5602rm -f conftest.$ac_objext conftest.$ac_ext
5603# Binary search between lo and hi bounds.
5604while test "x$ac_lo" != "x$ac_hi"; do
5605 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5606 cat >conftest.$ac_ext <<_ACEOF
5607#line $LINENO "configure"
5608#include "confdefs.h"
5609$ac_includes_default
5610#ifdef F77_DUMMY_MAIN
5611# ifdef __cplusplus
5612 extern "C"
5613# endif
5614 int F77_DUMMY_MAIN() { return 1; }
5615#endif
5616int
5617main ()
5618{
5619static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5620test_array [0] = 0
5621
5622 ;
5623 return 0;
5624}
5625_ACEOF
5626rm -f conftest.$ac_objext
5627if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5628 (eval $ac_compile) 2>&5
5629 ac_status=$?
5630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5631 (exit $ac_status); } &&
5632 { ac_try='test -s conftest.$ac_objext'
5633 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5634 (eval $ac_try) 2>&5
5635 ac_status=$?
5636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5637 (exit $ac_status); }; }; then
5638 ac_hi=$ac_mid
5639else
5640 echo "$as_me: failed program was:" >&5
5641cat conftest.$ac_ext >&5
5642ac_lo=`expr '(' $ac_mid ')' + 1`
5643fi
5644rm -f conftest.$ac_objext conftest.$ac_ext
5645done
5646case $ac_lo in
5647?*) ac_cv_sizeof_void_p=$ac_lo;;
5648'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
5649echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
5650 { (exit 1); exit 1; }; } ;;
5651esac
Guido van Rossumad678af1998-10-02 14:42:15 +00005652else
5653 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005654 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5655echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5656 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00005657else
Martin v. Löwis11437992002-04-12 09:54:03 +00005658 cat >conftest.$ac_ext <<_ACEOF
5659#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00005660#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005661$ac_includes_default
5662long longval () { return (long) (sizeof (void *)); }
5663unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005664#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005665#include <stdlib.h>
5666#ifdef F77_DUMMY_MAIN
5667# ifdef __cplusplus
5668 extern "C"
5669# endif
5670 int F77_DUMMY_MAIN() { return 1; }
5671#endif
5672int
5673main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00005674{
Martin v. Löwis11437992002-04-12 09:54:03 +00005675
5676 FILE *f = fopen ("conftest.val", "w");
5677 if (! f)
5678 exit (1);
5679 if (((long) (sizeof (void *))) < 0)
5680 {
5681 long i = longval ();
5682 if (i != ((long) (sizeof (void *))))
5683 exit (1);
5684 fprintf (f, "%ld\n", i);
5685 }
5686 else
5687 {
5688 unsigned long i = ulongval ();
5689 if (i != ((long) (sizeof (void *))))
5690 exit (1);
5691 fprintf (f, "%lu\n", i);
5692 }
5693 exit (ferror (f) || fclose (f) != 0);
5694
5695 ;
5696 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00005697}
Martin v. Löwis11437992002-04-12 09:54:03 +00005698_ACEOF
5699rm -f conftest$ac_exeext
5700if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5701 (eval $ac_link) 2>&5
5702 ac_status=$?
5703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5704 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5705 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5706 (eval $ac_try) 2>&5
5707 ac_status=$?
5708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5709 (exit $ac_status); }; }; then
5710 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00005711else
Martin v. Löwis11437992002-04-12 09:54:03 +00005712 echo "$as_me: program exited with status $ac_status" >&5
5713echo "$as_me: failed program was:" >&5
5714cat conftest.$ac_ext >&5
5715( exit $ac_status )
5716{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
5717echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
5718 { (exit 1); exit 1; }; }
5719fi
5720rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5721fi
5722fi
5723rm -f conftest.val
5724else
Guido van Rossumad678af1998-10-02 14:42:15 +00005725 ac_cv_sizeof_void_p=0
5726fi
Guido van Rossumad678af1998-10-02 14:42:15 +00005727fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005728echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
5729echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
5730cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00005731#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00005732_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00005733
5734
Martin v. Löwis11437992002-04-12 09:54:03 +00005735echo "$as_me:$LINENO: checking for char" >&5
5736echo $ECHO_N "checking for char... $ECHO_C" >&6
5737if test "${ac_cv_type_char+set}" = set; then
5738 echo $ECHO_N "(cached) $ECHO_C" >&6
5739else
5740 cat >conftest.$ac_ext <<_ACEOF
5741#line $LINENO "configure"
5742#include "confdefs.h"
5743$ac_includes_default
5744#ifdef F77_DUMMY_MAIN
5745# ifdef __cplusplus
5746 extern "C"
5747# endif
5748 int F77_DUMMY_MAIN() { return 1; }
5749#endif
5750int
5751main ()
5752{
5753if ((char *) 0)
5754 return 0;
5755if (sizeof (char))
5756 return 0;
5757 ;
5758 return 0;
5759}
5760_ACEOF
5761rm -f conftest.$ac_objext
5762if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5763 (eval $ac_compile) 2>&5
5764 ac_status=$?
5765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5766 (exit $ac_status); } &&
5767 { ac_try='test -s conftest.$ac_objext'
5768 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5769 (eval $ac_try) 2>&5
5770 ac_status=$?
5771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5772 (exit $ac_status); }; }; then
5773 ac_cv_type_char=yes
5774else
5775 echo "$as_me: failed program was:" >&5
5776cat conftest.$ac_ext >&5
5777ac_cv_type_char=no
5778fi
5779rm -f conftest.$ac_objext conftest.$ac_ext
5780fi
5781echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
5782echo "${ECHO_T}$ac_cv_type_char" >&6
5783
5784echo "$as_me:$LINENO: checking size of char" >&5
5785echo $ECHO_N "checking size of char... $ECHO_C" >&6
5786if test "${ac_cv_sizeof_char+set}" = set; then
5787 echo $ECHO_N "(cached) $ECHO_C" >&6
5788else
5789 if test "$ac_cv_type_char" = yes; then
5790 # The cast to unsigned long works around a bug in the HP C Compiler
5791 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5792 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5793 # This bug is HP SR number 8606223364.
5794 if test "$cross_compiling" = yes; then
5795 # Depending upon the size, compute the lo and hi bounds.
5796cat >conftest.$ac_ext <<_ACEOF
5797#line $LINENO "configure"
5798#include "confdefs.h"
5799$ac_includes_default
5800#ifdef F77_DUMMY_MAIN
5801# ifdef __cplusplus
5802 extern "C"
5803# endif
5804 int F77_DUMMY_MAIN() { return 1; }
5805#endif
5806int
5807main ()
5808{
5809static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
5810test_array [0] = 0
5811
5812 ;
5813 return 0;
5814}
5815_ACEOF
5816rm -f conftest.$ac_objext
5817if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5818 (eval $ac_compile) 2>&5
5819 ac_status=$?
5820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5821 (exit $ac_status); } &&
5822 { ac_try='test -s conftest.$ac_objext'
5823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5824 (eval $ac_try) 2>&5
5825 ac_status=$?
5826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5827 (exit $ac_status); }; }; then
5828 ac_lo=0 ac_mid=0
5829 while :; do
5830 cat >conftest.$ac_ext <<_ACEOF
5831#line $LINENO "configure"
5832#include "confdefs.h"
5833$ac_includes_default
5834#ifdef F77_DUMMY_MAIN
5835# ifdef __cplusplus
5836 extern "C"
5837# endif
5838 int F77_DUMMY_MAIN() { return 1; }
5839#endif
5840int
5841main ()
5842{
5843static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
5844test_array [0] = 0
5845
5846 ;
5847 return 0;
5848}
5849_ACEOF
5850rm -f conftest.$ac_objext
5851if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5852 (eval $ac_compile) 2>&5
5853 ac_status=$?
5854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5855 (exit $ac_status); } &&
5856 { ac_try='test -s conftest.$ac_objext'
5857 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5858 (eval $ac_try) 2>&5
5859 ac_status=$?
5860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5861 (exit $ac_status); }; }; then
5862 ac_hi=$ac_mid; break
5863else
5864 echo "$as_me: failed program was:" >&5
5865cat conftest.$ac_ext >&5
5866ac_lo=`expr $ac_mid + 1`
5867 if test $ac_lo -le $ac_mid; then
5868 ac_lo= ac_hi=
5869 break
5870 fi
5871 ac_mid=`expr 2 '*' $ac_mid + 1`
5872fi
5873rm -f conftest.$ac_objext conftest.$ac_ext
5874 done
5875else
5876 echo "$as_me: failed program was:" >&5
5877cat conftest.$ac_ext >&5
5878cat >conftest.$ac_ext <<_ACEOF
5879#line $LINENO "configure"
5880#include "confdefs.h"
5881$ac_includes_default
5882#ifdef F77_DUMMY_MAIN
5883# ifdef __cplusplus
5884 extern "C"
5885# endif
5886 int F77_DUMMY_MAIN() { return 1; }
5887#endif
5888int
5889main ()
5890{
5891static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
5892test_array [0] = 0
5893
5894 ;
5895 return 0;
5896}
5897_ACEOF
5898rm -f conftest.$ac_objext
5899if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5900 (eval $ac_compile) 2>&5
5901 ac_status=$?
5902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5903 (exit $ac_status); } &&
5904 { ac_try='test -s conftest.$ac_objext'
5905 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5906 (eval $ac_try) 2>&5
5907 ac_status=$?
5908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5909 (exit $ac_status); }; }; then
5910 ac_hi=-1 ac_mid=-1
5911 while :; do
5912 cat >conftest.$ac_ext <<_ACEOF
5913#line $LINENO "configure"
5914#include "confdefs.h"
5915$ac_includes_default
5916#ifdef F77_DUMMY_MAIN
5917# ifdef __cplusplus
5918 extern "C"
5919# endif
5920 int F77_DUMMY_MAIN() { return 1; }
5921#endif
5922int
5923main ()
5924{
5925static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
5926test_array [0] = 0
5927
5928 ;
5929 return 0;
5930}
5931_ACEOF
5932rm -f conftest.$ac_objext
5933if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5934 (eval $ac_compile) 2>&5
5935 ac_status=$?
5936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5937 (exit $ac_status); } &&
5938 { ac_try='test -s conftest.$ac_objext'
5939 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5940 (eval $ac_try) 2>&5
5941 ac_status=$?
5942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5943 (exit $ac_status); }; }; then
5944 ac_lo=$ac_mid; break
5945else
5946 echo "$as_me: failed program was:" >&5
5947cat conftest.$ac_ext >&5
5948ac_hi=`expr '(' $ac_mid ')' - 1`
5949 if test $ac_mid -le $ac_hi; then
5950 ac_lo= ac_hi=
5951 break
5952 fi
5953 ac_mid=`expr 2 '*' $ac_mid`
5954fi
5955rm -f conftest.$ac_objext conftest.$ac_ext
5956 done
5957else
5958 echo "$as_me: failed program was:" >&5
5959cat conftest.$ac_ext >&5
5960ac_lo= ac_hi=
5961fi
5962rm -f conftest.$ac_objext conftest.$ac_ext
5963fi
5964rm -f conftest.$ac_objext conftest.$ac_ext
5965# Binary search between lo and hi bounds.
5966while test "x$ac_lo" != "x$ac_hi"; do
5967 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5968 cat >conftest.$ac_ext <<_ACEOF
5969#line $LINENO "configure"
5970#include "confdefs.h"
5971$ac_includes_default
5972#ifdef F77_DUMMY_MAIN
5973# ifdef __cplusplus
5974 extern "C"
5975# endif
5976 int F77_DUMMY_MAIN() { return 1; }
5977#endif
5978int
5979main ()
5980{
5981static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
5982test_array [0] = 0
5983
5984 ;
5985 return 0;
5986}
5987_ACEOF
5988rm -f conftest.$ac_objext
5989if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5990 (eval $ac_compile) 2>&5
5991 ac_status=$?
5992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5993 (exit $ac_status); } &&
5994 { ac_try='test -s conftest.$ac_objext'
5995 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5996 (eval $ac_try) 2>&5
5997 ac_status=$?
5998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5999 (exit $ac_status); }; }; then
6000 ac_hi=$ac_mid
6001else
6002 echo "$as_me: failed program was:" >&5
6003cat conftest.$ac_ext >&5
6004ac_lo=`expr '(' $ac_mid ')' + 1`
6005fi
6006rm -f conftest.$ac_objext conftest.$ac_ext
6007done
6008case $ac_lo in
6009?*) ac_cv_sizeof_char=$ac_lo;;
6010'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6011echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6012 { (exit 1); exit 1; }; } ;;
6013esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006014else
6015 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006016 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6017echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6018 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006019else
Martin v. Löwis11437992002-04-12 09:54:03 +00006020 cat >conftest.$ac_ext <<_ACEOF
6021#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006022#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006023$ac_includes_default
6024long longval () { return (long) (sizeof (char)); }
6025unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006026#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006027#include <stdlib.h>
6028#ifdef F77_DUMMY_MAIN
6029# ifdef __cplusplus
6030 extern "C"
6031# endif
6032 int F77_DUMMY_MAIN() { return 1; }
6033#endif
6034int
6035main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006036{
Martin v. Löwis11437992002-04-12 09:54:03 +00006037
6038 FILE *f = fopen ("conftest.val", "w");
6039 if (! f)
6040 exit (1);
6041 if (((long) (sizeof (char))) < 0)
6042 {
6043 long i = longval ();
6044 if (i != ((long) (sizeof (char))))
6045 exit (1);
6046 fprintf (f, "%ld\n", i);
6047 }
6048 else
6049 {
6050 unsigned long i = ulongval ();
6051 if (i != ((long) (sizeof (char))))
6052 exit (1);
6053 fprintf (f, "%lu\n", i);
6054 }
6055 exit (ferror (f) || fclose (f) != 0);
6056
6057 ;
6058 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006059}
Martin v. Löwis11437992002-04-12 09:54:03 +00006060_ACEOF
6061rm -f conftest$ac_exeext
6062if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6063 (eval $ac_link) 2>&5
6064 ac_status=$?
6065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6066 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6067 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6068 (eval $ac_try) 2>&5
6069 ac_status=$?
6070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6071 (exit $ac_status); }; }; then
6072 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006073else
Martin v. Löwis11437992002-04-12 09:54:03 +00006074 echo "$as_me: program exited with status $ac_status" >&5
6075echo "$as_me: failed program was:" >&5
6076cat conftest.$ac_ext >&5
6077( exit $ac_status )
6078{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6079echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6080 { (exit 1); exit 1; }; }
6081fi
6082rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6083fi
6084fi
6085rm -f conftest.val
6086else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006087 ac_cv_sizeof_char=0
6088fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006089fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006090echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6091echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6092cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006093#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006094_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006095
6096
Martin v. Löwis11437992002-04-12 09:54:03 +00006097echo "$as_me:$LINENO: checking for short" >&5
6098echo $ECHO_N "checking for short... $ECHO_C" >&6
6099if test "${ac_cv_type_short+set}" = set; then
6100 echo $ECHO_N "(cached) $ECHO_C" >&6
6101else
6102 cat >conftest.$ac_ext <<_ACEOF
6103#line $LINENO "configure"
6104#include "confdefs.h"
6105$ac_includes_default
6106#ifdef F77_DUMMY_MAIN
6107# ifdef __cplusplus
6108 extern "C"
6109# endif
6110 int F77_DUMMY_MAIN() { return 1; }
6111#endif
6112int
6113main ()
6114{
6115if ((short *) 0)
6116 return 0;
6117if (sizeof (short))
6118 return 0;
6119 ;
6120 return 0;
6121}
6122_ACEOF
6123rm -f conftest.$ac_objext
6124if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6125 (eval $ac_compile) 2>&5
6126 ac_status=$?
6127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6128 (exit $ac_status); } &&
6129 { ac_try='test -s conftest.$ac_objext'
6130 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6131 (eval $ac_try) 2>&5
6132 ac_status=$?
6133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6134 (exit $ac_status); }; }; then
6135 ac_cv_type_short=yes
6136else
6137 echo "$as_me: failed program was:" >&5
6138cat conftest.$ac_ext >&5
6139ac_cv_type_short=no
6140fi
6141rm -f conftest.$ac_objext conftest.$ac_ext
6142fi
6143echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6144echo "${ECHO_T}$ac_cv_type_short" >&6
6145
6146echo "$as_me:$LINENO: checking size of short" >&5
6147echo $ECHO_N "checking size of short... $ECHO_C" >&6
6148if test "${ac_cv_sizeof_short+set}" = set; then
6149 echo $ECHO_N "(cached) $ECHO_C" >&6
6150else
6151 if test "$ac_cv_type_short" = yes; then
6152 # The cast to unsigned long works around a bug in the HP C Compiler
6153 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6154 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6155 # This bug is HP SR number 8606223364.
6156 if test "$cross_compiling" = yes; then
6157 # Depending upon the size, compute the lo and hi bounds.
6158cat >conftest.$ac_ext <<_ACEOF
6159#line $LINENO "configure"
6160#include "confdefs.h"
6161$ac_includes_default
6162#ifdef F77_DUMMY_MAIN
6163# ifdef __cplusplus
6164 extern "C"
6165# endif
6166 int F77_DUMMY_MAIN() { return 1; }
6167#endif
6168int
6169main ()
6170{
6171static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6172test_array [0] = 0
6173
6174 ;
6175 return 0;
6176}
6177_ACEOF
6178rm -f conftest.$ac_objext
6179if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6180 (eval $ac_compile) 2>&5
6181 ac_status=$?
6182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6183 (exit $ac_status); } &&
6184 { ac_try='test -s conftest.$ac_objext'
6185 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6186 (eval $ac_try) 2>&5
6187 ac_status=$?
6188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6189 (exit $ac_status); }; }; then
6190 ac_lo=0 ac_mid=0
6191 while :; do
6192 cat >conftest.$ac_ext <<_ACEOF
6193#line $LINENO "configure"
6194#include "confdefs.h"
6195$ac_includes_default
6196#ifdef F77_DUMMY_MAIN
6197# ifdef __cplusplus
6198 extern "C"
6199# endif
6200 int F77_DUMMY_MAIN() { return 1; }
6201#endif
6202int
6203main ()
6204{
6205static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6206test_array [0] = 0
6207
6208 ;
6209 return 0;
6210}
6211_ACEOF
6212rm -f conftest.$ac_objext
6213if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6214 (eval $ac_compile) 2>&5
6215 ac_status=$?
6216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6217 (exit $ac_status); } &&
6218 { ac_try='test -s conftest.$ac_objext'
6219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6220 (eval $ac_try) 2>&5
6221 ac_status=$?
6222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6223 (exit $ac_status); }; }; then
6224 ac_hi=$ac_mid; break
6225else
6226 echo "$as_me: failed program was:" >&5
6227cat conftest.$ac_ext >&5
6228ac_lo=`expr $ac_mid + 1`
6229 if test $ac_lo -le $ac_mid; then
6230 ac_lo= ac_hi=
6231 break
6232 fi
6233 ac_mid=`expr 2 '*' $ac_mid + 1`
6234fi
6235rm -f conftest.$ac_objext conftest.$ac_ext
6236 done
6237else
6238 echo "$as_me: failed program was:" >&5
6239cat conftest.$ac_ext >&5
6240cat >conftest.$ac_ext <<_ACEOF
6241#line $LINENO "configure"
6242#include "confdefs.h"
6243$ac_includes_default
6244#ifdef F77_DUMMY_MAIN
6245# ifdef __cplusplus
6246 extern "C"
6247# endif
6248 int F77_DUMMY_MAIN() { return 1; }
6249#endif
6250int
6251main ()
6252{
6253static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6254test_array [0] = 0
6255
6256 ;
6257 return 0;
6258}
6259_ACEOF
6260rm -f conftest.$ac_objext
6261if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6262 (eval $ac_compile) 2>&5
6263 ac_status=$?
6264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6265 (exit $ac_status); } &&
6266 { ac_try='test -s conftest.$ac_objext'
6267 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6268 (eval $ac_try) 2>&5
6269 ac_status=$?
6270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6271 (exit $ac_status); }; }; then
6272 ac_hi=-1 ac_mid=-1
6273 while :; do
6274 cat >conftest.$ac_ext <<_ACEOF
6275#line $LINENO "configure"
6276#include "confdefs.h"
6277$ac_includes_default
6278#ifdef F77_DUMMY_MAIN
6279# ifdef __cplusplus
6280 extern "C"
6281# endif
6282 int F77_DUMMY_MAIN() { return 1; }
6283#endif
6284int
6285main ()
6286{
6287static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6288test_array [0] = 0
6289
6290 ;
6291 return 0;
6292}
6293_ACEOF
6294rm -f conftest.$ac_objext
6295if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6296 (eval $ac_compile) 2>&5
6297 ac_status=$?
6298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6299 (exit $ac_status); } &&
6300 { ac_try='test -s conftest.$ac_objext'
6301 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6302 (eval $ac_try) 2>&5
6303 ac_status=$?
6304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6305 (exit $ac_status); }; }; then
6306 ac_lo=$ac_mid; break
6307else
6308 echo "$as_me: failed program was:" >&5
6309cat conftest.$ac_ext >&5
6310ac_hi=`expr '(' $ac_mid ')' - 1`
6311 if test $ac_mid -le $ac_hi; then
6312 ac_lo= ac_hi=
6313 break
6314 fi
6315 ac_mid=`expr 2 '*' $ac_mid`
6316fi
6317rm -f conftest.$ac_objext conftest.$ac_ext
6318 done
6319else
6320 echo "$as_me: failed program was:" >&5
6321cat conftest.$ac_ext >&5
6322ac_lo= ac_hi=
6323fi
6324rm -f conftest.$ac_objext conftest.$ac_ext
6325fi
6326rm -f conftest.$ac_objext conftest.$ac_ext
6327# Binary search between lo and hi bounds.
6328while test "x$ac_lo" != "x$ac_hi"; do
6329 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6330 cat >conftest.$ac_ext <<_ACEOF
6331#line $LINENO "configure"
6332#include "confdefs.h"
6333$ac_includes_default
6334#ifdef F77_DUMMY_MAIN
6335# ifdef __cplusplus
6336 extern "C"
6337# endif
6338 int F77_DUMMY_MAIN() { return 1; }
6339#endif
6340int
6341main ()
6342{
6343static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6344test_array [0] = 0
6345
6346 ;
6347 return 0;
6348}
6349_ACEOF
6350rm -f conftest.$ac_objext
6351if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6352 (eval $ac_compile) 2>&5
6353 ac_status=$?
6354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6355 (exit $ac_status); } &&
6356 { ac_try='test -s conftest.$ac_objext'
6357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6358 (eval $ac_try) 2>&5
6359 ac_status=$?
6360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6361 (exit $ac_status); }; }; then
6362 ac_hi=$ac_mid
6363else
6364 echo "$as_me: failed program was:" >&5
6365cat conftest.$ac_ext >&5
6366ac_lo=`expr '(' $ac_mid ')' + 1`
6367fi
6368rm -f conftest.$ac_objext conftest.$ac_ext
6369done
6370case $ac_lo in
6371?*) ac_cv_sizeof_short=$ac_lo;;
6372'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6373echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6374 { (exit 1); exit 1; }; } ;;
6375esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006376else
6377 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006378 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6379echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6380 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006381else
Martin v. Löwis11437992002-04-12 09:54:03 +00006382 cat >conftest.$ac_ext <<_ACEOF
6383#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006384#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006385$ac_includes_default
6386long longval () { return (long) (sizeof (short)); }
6387unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006388#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006389#include <stdlib.h>
6390#ifdef F77_DUMMY_MAIN
6391# ifdef __cplusplus
6392 extern "C"
6393# endif
6394 int F77_DUMMY_MAIN() { return 1; }
6395#endif
6396int
6397main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006398{
Martin v. Löwis11437992002-04-12 09:54:03 +00006399
6400 FILE *f = fopen ("conftest.val", "w");
6401 if (! f)
6402 exit (1);
6403 if (((long) (sizeof (short))) < 0)
6404 {
6405 long i = longval ();
6406 if (i != ((long) (sizeof (short))))
6407 exit (1);
6408 fprintf (f, "%ld\n", i);
6409 }
6410 else
6411 {
6412 unsigned long i = ulongval ();
6413 if (i != ((long) (sizeof (short))))
6414 exit (1);
6415 fprintf (f, "%lu\n", i);
6416 }
6417 exit (ferror (f) || fclose (f) != 0);
6418
6419 ;
6420 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006421}
Martin v. Löwis11437992002-04-12 09:54:03 +00006422_ACEOF
6423rm -f conftest$ac_exeext
6424if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6425 (eval $ac_link) 2>&5
6426 ac_status=$?
6427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6428 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6429 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6430 (eval $ac_try) 2>&5
6431 ac_status=$?
6432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6433 (exit $ac_status); }; }; then
6434 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006435else
Martin v. Löwis11437992002-04-12 09:54:03 +00006436 echo "$as_me: program exited with status $ac_status" >&5
6437echo "$as_me: failed program was:" >&5
6438cat conftest.$ac_ext >&5
6439( exit $ac_status )
6440{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6441echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6442 { (exit 1); exit 1; }; }
6443fi
6444rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6445fi
6446fi
6447rm -f conftest.val
6448else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006449 ac_cv_sizeof_short=0
6450fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006451fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006452echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
6453echo "${ECHO_T}$ac_cv_sizeof_short" >&6
6454cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006455#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006456_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006457
6458
Martin v. Löwis11437992002-04-12 09:54:03 +00006459echo "$as_me:$LINENO: checking for float" >&5
6460echo $ECHO_N "checking for float... $ECHO_C" >&6
6461if test "${ac_cv_type_float+set}" = set; then
6462 echo $ECHO_N "(cached) $ECHO_C" >&6
6463else
6464 cat >conftest.$ac_ext <<_ACEOF
6465#line $LINENO "configure"
6466#include "confdefs.h"
6467$ac_includes_default
6468#ifdef F77_DUMMY_MAIN
6469# ifdef __cplusplus
6470 extern "C"
6471# endif
6472 int F77_DUMMY_MAIN() { return 1; }
6473#endif
6474int
6475main ()
6476{
6477if ((float *) 0)
6478 return 0;
6479if (sizeof (float))
6480 return 0;
6481 ;
6482 return 0;
6483}
6484_ACEOF
6485rm -f conftest.$ac_objext
6486if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6487 (eval $ac_compile) 2>&5
6488 ac_status=$?
6489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6490 (exit $ac_status); } &&
6491 { ac_try='test -s conftest.$ac_objext'
6492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6493 (eval $ac_try) 2>&5
6494 ac_status=$?
6495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6496 (exit $ac_status); }; }; then
6497 ac_cv_type_float=yes
6498else
6499 echo "$as_me: failed program was:" >&5
6500cat conftest.$ac_ext >&5
6501ac_cv_type_float=no
6502fi
6503rm -f conftest.$ac_objext conftest.$ac_ext
6504fi
6505echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
6506echo "${ECHO_T}$ac_cv_type_float" >&6
6507
6508echo "$as_me:$LINENO: checking size of float" >&5
6509echo $ECHO_N "checking size of float... $ECHO_C" >&6
6510if test "${ac_cv_sizeof_float+set}" = set; then
6511 echo $ECHO_N "(cached) $ECHO_C" >&6
6512else
6513 if test "$ac_cv_type_float" = yes; then
6514 # The cast to unsigned long works around a bug in the HP C Compiler
6515 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6516 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6517 # This bug is HP SR number 8606223364.
6518 if test "$cross_compiling" = yes; then
6519 # Depending upon the size, compute the lo and hi bounds.
6520cat >conftest.$ac_ext <<_ACEOF
6521#line $LINENO "configure"
6522#include "confdefs.h"
6523$ac_includes_default
6524#ifdef F77_DUMMY_MAIN
6525# ifdef __cplusplus
6526 extern "C"
6527# endif
6528 int F77_DUMMY_MAIN() { return 1; }
6529#endif
6530int
6531main ()
6532{
6533static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
6534test_array [0] = 0
6535
6536 ;
6537 return 0;
6538}
6539_ACEOF
6540rm -f conftest.$ac_objext
6541if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6542 (eval $ac_compile) 2>&5
6543 ac_status=$?
6544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6545 (exit $ac_status); } &&
6546 { ac_try='test -s conftest.$ac_objext'
6547 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6548 (eval $ac_try) 2>&5
6549 ac_status=$?
6550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6551 (exit $ac_status); }; }; then
6552 ac_lo=0 ac_mid=0
6553 while :; do
6554 cat >conftest.$ac_ext <<_ACEOF
6555#line $LINENO "configure"
6556#include "confdefs.h"
6557$ac_includes_default
6558#ifdef F77_DUMMY_MAIN
6559# ifdef __cplusplus
6560 extern "C"
6561# endif
6562 int F77_DUMMY_MAIN() { return 1; }
6563#endif
6564int
6565main ()
6566{
6567static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
6568test_array [0] = 0
6569
6570 ;
6571 return 0;
6572}
6573_ACEOF
6574rm -f conftest.$ac_objext
6575if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6576 (eval $ac_compile) 2>&5
6577 ac_status=$?
6578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6579 (exit $ac_status); } &&
6580 { ac_try='test -s conftest.$ac_objext'
6581 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6582 (eval $ac_try) 2>&5
6583 ac_status=$?
6584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6585 (exit $ac_status); }; }; then
6586 ac_hi=$ac_mid; break
6587else
6588 echo "$as_me: failed program was:" >&5
6589cat conftest.$ac_ext >&5
6590ac_lo=`expr $ac_mid + 1`
6591 if test $ac_lo -le $ac_mid; then
6592 ac_lo= ac_hi=
6593 break
6594 fi
6595 ac_mid=`expr 2 '*' $ac_mid + 1`
6596fi
6597rm -f conftest.$ac_objext conftest.$ac_ext
6598 done
6599else
6600 echo "$as_me: failed program was:" >&5
6601cat conftest.$ac_ext >&5
6602cat >conftest.$ac_ext <<_ACEOF
6603#line $LINENO "configure"
6604#include "confdefs.h"
6605$ac_includes_default
6606#ifdef F77_DUMMY_MAIN
6607# ifdef __cplusplus
6608 extern "C"
6609# endif
6610 int F77_DUMMY_MAIN() { return 1; }
6611#endif
6612int
6613main ()
6614{
6615static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
6616test_array [0] = 0
6617
6618 ;
6619 return 0;
6620}
6621_ACEOF
6622rm -f conftest.$ac_objext
6623if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6624 (eval $ac_compile) 2>&5
6625 ac_status=$?
6626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6627 (exit $ac_status); } &&
6628 { ac_try='test -s conftest.$ac_objext'
6629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6630 (eval $ac_try) 2>&5
6631 ac_status=$?
6632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6633 (exit $ac_status); }; }; then
6634 ac_hi=-1 ac_mid=-1
6635 while :; do
6636 cat >conftest.$ac_ext <<_ACEOF
6637#line $LINENO "configure"
6638#include "confdefs.h"
6639$ac_includes_default
6640#ifdef F77_DUMMY_MAIN
6641# ifdef __cplusplus
6642 extern "C"
6643# endif
6644 int F77_DUMMY_MAIN() { return 1; }
6645#endif
6646int
6647main ()
6648{
6649static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
6650test_array [0] = 0
6651
6652 ;
6653 return 0;
6654}
6655_ACEOF
6656rm -f conftest.$ac_objext
6657if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6658 (eval $ac_compile) 2>&5
6659 ac_status=$?
6660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6661 (exit $ac_status); } &&
6662 { ac_try='test -s conftest.$ac_objext'
6663 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6664 (eval $ac_try) 2>&5
6665 ac_status=$?
6666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6667 (exit $ac_status); }; }; then
6668 ac_lo=$ac_mid; break
6669else
6670 echo "$as_me: failed program was:" >&5
6671cat conftest.$ac_ext >&5
6672ac_hi=`expr '(' $ac_mid ')' - 1`
6673 if test $ac_mid -le $ac_hi; then
6674 ac_lo= ac_hi=
6675 break
6676 fi
6677 ac_mid=`expr 2 '*' $ac_mid`
6678fi
6679rm -f conftest.$ac_objext conftest.$ac_ext
6680 done
6681else
6682 echo "$as_me: failed program was:" >&5
6683cat conftest.$ac_ext >&5
6684ac_lo= ac_hi=
6685fi
6686rm -f conftest.$ac_objext conftest.$ac_ext
6687fi
6688rm -f conftest.$ac_objext conftest.$ac_ext
6689# Binary search between lo and hi bounds.
6690while test "x$ac_lo" != "x$ac_hi"; do
6691 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6692 cat >conftest.$ac_ext <<_ACEOF
6693#line $LINENO "configure"
6694#include "confdefs.h"
6695$ac_includes_default
6696#ifdef F77_DUMMY_MAIN
6697# ifdef __cplusplus
6698 extern "C"
6699# endif
6700 int F77_DUMMY_MAIN() { return 1; }
6701#endif
6702int
6703main ()
6704{
6705static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
6706test_array [0] = 0
6707
6708 ;
6709 return 0;
6710}
6711_ACEOF
6712rm -f conftest.$ac_objext
6713if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6714 (eval $ac_compile) 2>&5
6715 ac_status=$?
6716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6717 (exit $ac_status); } &&
6718 { ac_try='test -s conftest.$ac_objext'
6719 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6720 (eval $ac_try) 2>&5
6721 ac_status=$?
6722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6723 (exit $ac_status); }; }; then
6724 ac_hi=$ac_mid
6725else
6726 echo "$as_me: failed program was:" >&5
6727cat conftest.$ac_ext >&5
6728ac_lo=`expr '(' $ac_mid ')' + 1`
6729fi
6730rm -f conftest.$ac_objext conftest.$ac_ext
6731done
6732case $ac_lo in
6733?*) ac_cv_sizeof_float=$ac_lo;;
6734'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
6735echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
6736 { (exit 1); exit 1; }; } ;;
6737esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006738else
6739 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006740 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6741echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6742 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006743else
Martin v. Löwis11437992002-04-12 09:54:03 +00006744 cat >conftest.$ac_ext <<_ACEOF
6745#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006746#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006747$ac_includes_default
6748long longval () { return (long) (sizeof (float)); }
6749unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006750#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006751#include <stdlib.h>
6752#ifdef F77_DUMMY_MAIN
6753# ifdef __cplusplus
6754 extern "C"
6755# endif
6756 int F77_DUMMY_MAIN() { return 1; }
6757#endif
6758int
6759main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006760{
Martin v. Löwis11437992002-04-12 09:54:03 +00006761
6762 FILE *f = fopen ("conftest.val", "w");
6763 if (! f)
6764 exit (1);
6765 if (((long) (sizeof (float))) < 0)
6766 {
6767 long i = longval ();
6768 if (i != ((long) (sizeof (float))))
6769 exit (1);
6770 fprintf (f, "%ld\n", i);
6771 }
6772 else
6773 {
6774 unsigned long i = ulongval ();
6775 if (i != ((long) (sizeof (float))))
6776 exit (1);
6777 fprintf (f, "%lu\n", i);
6778 }
6779 exit (ferror (f) || fclose (f) != 0);
6780
6781 ;
6782 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006783}
Martin v. Löwis11437992002-04-12 09:54:03 +00006784_ACEOF
6785rm -f conftest$ac_exeext
6786if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6787 (eval $ac_link) 2>&5
6788 ac_status=$?
6789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6790 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6792 (eval $ac_try) 2>&5
6793 ac_status=$?
6794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6795 (exit $ac_status); }; }; then
6796 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006797else
Martin v. Löwis11437992002-04-12 09:54:03 +00006798 echo "$as_me: program exited with status $ac_status" >&5
6799echo "$as_me: failed program was:" >&5
6800cat conftest.$ac_ext >&5
6801( exit $ac_status )
6802{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
6803echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
6804 { (exit 1); exit 1; }; }
6805fi
6806rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6807fi
6808fi
6809rm -f conftest.val
6810else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006811 ac_cv_sizeof_float=0
6812fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006813fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006814echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
6815echo "${ECHO_T}$ac_cv_sizeof_float" >&6
6816cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006817#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006818_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006819
6820
Martin v. Löwis11437992002-04-12 09:54:03 +00006821echo "$as_me:$LINENO: checking for double" >&5
6822echo $ECHO_N "checking for double... $ECHO_C" >&6
6823if test "${ac_cv_type_double+set}" = set; then
6824 echo $ECHO_N "(cached) $ECHO_C" >&6
6825else
6826 cat >conftest.$ac_ext <<_ACEOF
6827#line $LINENO "configure"
6828#include "confdefs.h"
6829$ac_includes_default
6830#ifdef F77_DUMMY_MAIN
6831# ifdef __cplusplus
6832 extern "C"
6833# endif
6834 int F77_DUMMY_MAIN() { return 1; }
6835#endif
6836int
6837main ()
6838{
6839if ((double *) 0)
6840 return 0;
6841if (sizeof (double))
6842 return 0;
6843 ;
6844 return 0;
6845}
6846_ACEOF
6847rm -f conftest.$ac_objext
6848if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6849 (eval $ac_compile) 2>&5
6850 ac_status=$?
6851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6852 (exit $ac_status); } &&
6853 { ac_try='test -s conftest.$ac_objext'
6854 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6855 (eval $ac_try) 2>&5
6856 ac_status=$?
6857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6858 (exit $ac_status); }; }; then
6859 ac_cv_type_double=yes
6860else
6861 echo "$as_me: failed program was:" >&5
6862cat conftest.$ac_ext >&5
6863ac_cv_type_double=no
6864fi
6865rm -f conftest.$ac_objext conftest.$ac_ext
6866fi
6867echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
6868echo "${ECHO_T}$ac_cv_type_double" >&6
6869
6870echo "$as_me:$LINENO: checking size of double" >&5
6871echo $ECHO_N "checking size of double... $ECHO_C" >&6
6872if test "${ac_cv_sizeof_double+set}" = set; then
6873 echo $ECHO_N "(cached) $ECHO_C" >&6
6874else
6875 if test "$ac_cv_type_double" = yes; then
6876 # The cast to unsigned long works around a bug in the HP C Compiler
6877 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6878 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6879 # This bug is HP SR number 8606223364.
6880 if test "$cross_compiling" = yes; then
6881 # Depending upon the size, compute the lo and hi bounds.
6882cat >conftest.$ac_ext <<_ACEOF
6883#line $LINENO "configure"
6884#include "confdefs.h"
6885$ac_includes_default
6886#ifdef F77_DUMMY_MAIN
6887# ifdef __cplusplus
6888 extern "C"
6889# endif
6890 int F77_DUMMY_MAIN() { return 1; }
6891#endif
6892int
6893main ()
6894{
6895static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
6896test_array [0] = 0
6897
6898 ;
6899 return 0;
6900}
6901_ACEOF
6902rm -f conftest.$ac_objext
6903if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6904 (eval $ac_compile) 2>&5
6905 ac_status=$?
6906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6907 (exit $ac_status); } &&
6908 { ac_try='test -s conftest.$ac_objext'
6909 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6910 (eval $ac_try) 2>&5
6911 ac_status=$?
6912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6913 (exit $ac_status); }; }; then
6914 ac_lo=0 ac_mid=0
6915 while :; do
6916 cat >conftest.$ac_ext <<_ACEOF
6917#line $LINENO "configure"
6918#include "confdefs.h"
6919$ac_includes_default
6920#ifdef F77_DUMMY_MAIN
6921# ifdef __cplusplus
6922 extern "C"
6923# endif
6924 int F77_DUMMY_MAIN() { return 1; }
6925#endif
6926int
6927main ()
6928{
6929static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
6930test_array [0] = 0
6931
6932 ;
6933 return 0;
6934}
6935_ACEOF
6936rm -f conftest.$ac_objext
6937if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6938 (eval $ac_compile) 2>&5
6939 ac_status=$?
6940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6941 (exit $ac_status); } &&
6942 { ac_try='test -s conftest.$ac_objext'
6943 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6944 (eval $ac_try) 2>&5
6945 ac_status=$?
6946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6947 (exit $ac_status); }; }; then
6948 ac_hi=$ac_mid; break
6949else
6950 echo "$as_me: failed program was:" >&5
6951cat conftest.$ac_ext >&5
6952ac_lo=`expr $ac_mid + 1`
6953 if test $ac_lo -le $ac_mid; then
6954 ac_lo= ac_hi=
6955 break
6956 fi
6957 ac_mid=`expr 2 '*' $ac_mid + 1`
6958fi
6959rm -f conftest.$ac_objext conftest.$ac_ext
6960 done
6961else
6962 echo "$as_me: failed program was:" >&5
6963cat conftest.$ac_ext >&5
6964cat >conftest.$ac_ext <<_ACEOF
6965#line $LINENO "configure"
6966#include "confdefs.h"
6967$ac_includes_default
6968#ifdef F77_DUMMY_MAIN
6969# ifdef __cplusplus
6970 extern "C"
6971# endif
6972 int F77_DUMMY_MAIN() { return 1; }
6973#endif
6974int
6975main ()
6976{
6977static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
6978test_array [0] = 0
6979
6980 ;
6981 return 0;
6982}
6983_ACEOF
6984rm -f conftest.$ac_objext
6985if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6986 (eval $ac_compile) 2>&5
6987 ac_status=$?
6988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6989 (exit $ac_status); } &&
6990 { ac_try='test -s conftest.$ac_objext'
6991 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6992 (eval $ac_try) 2>&5
6993 ac_status=$?
6994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6995 (exit $ac_status); }; }; then
6996 ac_hi=-1 ac_mid=-1
6997 while :; do
6998 cat >conftest.$ac_ext <<_ACEOF
6999#line $LINENO "configure"
7000#include "confdefs.h"
7001$ac_includes_default
7002#ifdef F77_DUMMY_MAIN
7003# ifdef __cplusplus
7004 extern "C"
7005# endif
7006 int F77_DUMMY_MAIN() { return 1; }
7007#endif
7008int
7009main ()
7010{
7011static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7012test_array [0] = 0
7013
7014 ;
7015 return 0;
7016}
7017_ACEOF
7018rm -f conftest.$ac_objext
7019if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7020 (eval $ac_compile) 2>&5
7021 ac_status=$?
7022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7023 (exit $ac_status); } &&
7024 { ac_try='test -s conftest.$ac_objext'
7025 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7026 (eval $ac_try) 2>&5
7027 ac_status=$?
7028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7029 (exit $ac_status); }; }; then
7030 ac_lo=$ac_mid; break
7031else
7032 echo "$as_me: failed program was:" >&5
7033cat conftest.$ac_ext >&5
7034ac_hi=`expr '(' $ac_mid ')' - 1`
7035 if test $ac_mid -le $ac_hi; then
7036 ac_lo= ac_hi=
7037 break
7038 fi
7039 ac_mid=`expr 2 '*' $ac_mid`
7040fi
7041rm -f conftest.$ac_objext conftest.$ac_ext
7042 done
7043else
7044 echo "$as_me: failed program was:" >&5
7045cat conftest.$ac_ext >&5
7046ac_lo= ac_hi=
7047fi
7048rm -f conftest.$ac_objext conftest.$ac_ext
7049fi
7050rm -f conftest.$ac_objext conftest.$ac_ext
7051# Binary search between lo and hi bounds.
7052while test "x$ac_lo" != "x$ac_hi"; do
7053 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7054 cat >conftest.$ac_ext <<_ACEOF
7055#line $LINENO "configure"
7056#include "confdefs.h"
7057$ac_includes_default
7058#ifdef F77_DUMMY_MAIN
7059# ifdef __cplusplus
7060 extern "C"
7061# endif
7062 int F77_DUMMY_MAIN() { return 1; }
7063#endif
7064int
7065main ()
7066{
7067static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7068test_array [0] = 0
7069
7070 ;
7071 return 0;
7072}
7073_ACEOF
7074rm -f conftest.$ac_objext
7075if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7076 (eval $ac_compile) 2>&5
7077 ac_status=$?
7078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7079 (exit $ac_status); } &&
7080 { ac_try='test -s conftest.$ac_objext'
7081 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7082 (eval $ac_try) 2>&5
7083 ac_status=$?
7084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7085 (exit $ac_status); }; }; then
7086 ac_hi=$ac_mid
7087else
7088 echo "$as_me: failed program was:" >&5
7089cat conftest.$ac_ext >&5
7090ac_lo=`expr '(' $ac_mid ')' + 1`
7091fi
7092rm -f conftest.$ac_objext conftest.$ac_ext
7093done
7094case $ac_lo in
7095?*) ac_cv_sizeof_double=$ac_lo;;
7096'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7097echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7098 { (exit 1); exit 1; }; } ;;
7099esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007100else
7101 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007102 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7103echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7104 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007105else
Martin v. Löwis11437992002-04-12 09:54:03 +00007106 cat >conftest.$ac_ext <<_ACEOF
7107#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007108#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007109$ac_includes_default
7110long longval () { return (long) (sizeof (double)); }
7111unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007112#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007113#include <stdlib.h>
7114#ifdef F77_DUMMY_MAIN
7115# ifdef __cplusplus
7116 extern "C"
7117# endif
7118 int F77_DUMMY_MAIN() { return 1; }
7119#endif
7120int
7121main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007122{
Martin v. Löwis11437992002-04-12 09:54:03 +00007123
7124 FILE *f = fopen ("conftest.val", "w");
7125 if (! f)
7126 exit (1);
7127 if (((long) (sizeof (double))) < 0)
7128 {
7129 long i = longval ();
7130 if (i != ((long) (sizeof (double))))
7131 exit (1);
7132 fprintf (f, "%ld\n", i);
7133 }
7134 else
7135 {
7136 unsigned long i = ulongval ();
7137 if (i != ((long) (sizeof (double))))
7138 exit (1);
7139 fprintf (f, "%lu\n", i);
7140 }
7141 exit (ferror (f) || fclose (f) != 0);
7142
7143 ;
7144 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007145}
Martin v. Löwis11437992002-04-12 09:54:03 +00007146_ACEOF
7147rm -f conftest$ac_exeext
7148if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7149 (eval $ac_link) 2>&5
7150 ac_status=$?
7151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7152 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7153 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7154 (eval $ac_try) 2>&5
7155 ac_status=$?
7156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7157 (exit $ac_status); }; }; then
7158 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007159else
Martin v. Löwis11437992002-04-12 09:54:03 +00007160 echo "$as_me: program exited with status $ac_status" >&5
7161echo "$as_me: failed program was:" >&5
7162cat conftest.$ac_ext >&5
7163( exit $ac_status )
7164{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7165echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7166 { (exit 1); exit 1; }; }
7167fi
7168rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7169fi
7170fi
7171rm -f conftest.val
7172else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007173 ac_cv_sizeof_double=0
7174fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007175fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007176echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7177echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7178cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007179#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007180_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007181
7182
Martin v. Löwis11437992002-04-12 09:54:03 +00007183echo "$as_me:$LINENO: checking for fpos_t" >&5
7184echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7185if test "${ac_cv_type_fpos_t+set}" = set; then
7186 echo $ECHO_N "(cached) $ECHO_C" >&6
7187else
7188 cat >conftest.$ac_ext <<_ACEOF
7189#line $LINENO "configure"
7190#include "confdefs.h"
7191$ac_includes_default
7192#ifdef F77_DUMMY_MAIN
7193# ifdef __cplusplus
7194 extern "C"
7195# endif
7196 int F77_DUMMY_MAIN() { return 1; }
7197#endif
7198int
7199main ()
7200{
7201if ((fpos_t *) 0)
7202 return 0;
7203if (sizeof (fpos_t))
7204 return 0;
7205 ;
7206 return 0;
7207}
7208_ACEOF
7209rm -f conftest.$ac_objext
7210if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7211 (eval $ac_compile) 2>&5
7212 ac_status=$?
7213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7214 (exit $ac_status); } &&
7215 { ac_try='test -s conftest.$ac_objext'
7216 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7217 (eval $ac_try) 2>&5
7218 ac_status=$?
7219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7220 (exit $ac_status); }; }; then
7221 ac_cv_type_fpos_t=yes
7222else
7223 echo "$as_me: failed program was:" >&5
7224cat conftest.$ac_ext >&5
7225ac_cv_type_fpos_t=no
7226fi
7227rm -f conftest.$ac_objext conftest.$ac_ext
7228fi
7229echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7230echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7231
7232echo "$as_me:$LINENO: checking size of fpos_t" >&5
7233echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7234if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7235 echo $ECHO_N "(cached) $ECHO_C" >&6
7236else
7237 if test "$ac_cv_type_fpos_t" = yes; then
7238 # The cast to unsigned long works around a bug in the HP C Compiler
7239 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7240 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7241 # This bug is HP SR number 8606223364.
7242 if test "$cross_compiling" = yes; then
7243 # Depending upon the size, compute the lo and hi bounds.
7244cat >conftest.$ac_ext <<_ACEOF
7245#line $LINENO "configure"
7246#include "confdefs.h"
7247$ac_includes_default
7248#ifdef F77_DUMMY_MAIN
7249# ifdef __cplusplus
7250 extern "C"
7251# endif
7252 int F77_DUMMY_MAIN() { return 1; }
7253#endif
7254int
7255main ()
7256{
7257static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7258test_array [0] = 0
7259
7260 ;
7261 return 0;
7262}
7263_ACEOF
7264rm -f conftest.$ac_objext
7265if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7266 (eval $ac_compile) 2>&5
7267 ac_status=$?
7268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7269 (exit $ac_status); } &&
7270 { ac_try='test -s conftest.$ac_objext'
7271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7272 (eval $ac_try) 2>&5
7273 ac_status=$?
7274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7275 (exit $ac_status); }; }; then
7276 ac_lo=0 ac_mid=0
7277 while :; do
7278 cat >conftest.$ac_ext <<_ACEOF
7279#line $LINENO "configure"
7280#include "confdefs.h"
7281$ac_includes_default
7282#ifdef F77_DUMMY_MAIN
7283# ifdef __cplusplus
7284 extern "C"
7285# endif
7286 int F77_DUMMY_MAIN() { return 1; }
7287#endif
7288int
7289main ()
7290{
7291static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7292test_array [0] = 0
7293
7294 ;
7295 return 0;
7296}
7297_ACEOF
7298rm -f conftest.$ac_objext
7299if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7300 (eval $ac_compile) 2>&5
7301 ac_status=$?
7302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7303 (exit $ac_status); } &&
7304 { ac_try='test -s conftest.$ac_objext'
7305 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7306 (eval $ac_try) 2>&5
7307 ac_status=$?
7308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7309 (exit $ac_status); }; }; then
7310 ac_hi=$ac_mid; break
7311else
7312 echo "$as_me: failed program was:" >&5
7313cat conftest.$ac_ext >&5
7314ac_lo=`expr $ac_mid + 1`
7315 if test $ac_lo -le $ac_mid; then
7316 ac_lo= ac_hi=
7317 break
7318 fi
7319 ac_mid=`expr 2 '*' $ac_mid + 1`
7320fi
7321rm -f conftest.$ac_objext conftest.$ac_ext
7322 done
7323else
7324 echo "$as_me: failed program was:" >&5
7325cat conftest.$ac_ext >&5
7326cat >conftest.$ac_ext <<_ACEOF
7327#line $LINENO "configure"
7328#include "confdefs.h"
7329$ac_includes_default
7330#ifdef F77_DUMMY_MAIN
7331# ifdef __cplusplus
7332 extern "C"
7333# endif
7334 int F77_DUMMY_MAIN() { return 1; }
7335#endif
7336int
7337main ()
7338{
7339static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7340test_array [0] = 0
7341
7342 ;
7343 return 0;
7344}
7345_ACEOF
7346rm -f conftest.$ac_objext
7347if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7348 (eval $ac_compile) 2>&5
7349 ac_status=$?
7350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7351 (exit $ac_status); } &&
7352 { ac_try='test -s conftest.$ac_objext'
7353 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7354 (eval $ac_try) 2>&5
7355 ac_status=$?
7356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7357 (exit $ac_status); }; }; then
7358 ac_hi=-1 ac_mid=-1
7359 while :; do
7360 cat >conftest.$ac_ext <<_ACEOF
7361#line $LINENO "configure"
7362#include "confdefs.h"
7363$ac_includes_default
7364#ifdef F77_DUMMY_MAIN
7365# ifdef __cplusplus
7366 extern "C"
7367# endif
7368 int F77_DUMMY_MAIN() { return 1; }
7369#endif
7370int
7371main ()
7372{
7373static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
7374test_array [0] = 0
7375
7376 ;
7377 return 0;
7378}
7379_ACEOF
7380rm -f conftest.$ac_objext
7381if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7382 (eval $ac_compile) 2>&5
7383 ac_status=$?
7384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7385 (exit $ac_status); } &&
7386 { ac_try='test -s conftest.$ac_objext'
7387 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7388 (eval $ac_try) 2>&5
7389 ac_status=$?
7390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7391 (exit $ac_status); }; }; then
7392 ac_lo=$ac_mid; break
7393else
7394 echo "$as_me: failed program was:" >&5
7395cat conftest.$ac_ext >&5
7396ac_hi=`expr '(' $ac_mid ')' - 1`
7397 if test $ac_mid -le $ac_hi; then
7398 ac_lo= ac_hi=
7399 break
7400 fi
7401 ac_mid=`expr 2 '*' $ac_mid`
7402fi
7403rm -f conftest.$ac_objext conftest.$ac_ext
7404 done
7405else
7406 echo "$as_me: failed program was:" >&5
7407cat conftest.$ac_ext >&5
7408ac_lo= ac_hi=
7409fi
7410rm -f conftest.$ac_objext conftest.$ac_ext
7411fi
7412rm -f conftest.$ac_objext conftest.$ac_ext
7413# Binary search between lo and hi bounds.
7414while test "x$ac_lo" != "x$ac_hi"; do
7415 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7416 cat >conftest.$ac_ext <<_ACEOF
7417#line $LINENO "configure"
7418#include "confdefs.h"
7419$ac_includes_default
7420#ifdef F77_DUMMY_MAIN
7421# ifdef __cplusplus
7422 extern "C"
7423# endif
7424 int F77_DUMMY_MAIN() { return 1; }
7425#endif
7426int
7427main ()
7428{
7429static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7430test_array [0] = 0
7431
7432 ;
7433 return 0;
7434}
7435_ACEOF
7436rm -f conftest.$ac_objext
7437if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7438 (eval $ac_compile) 2>&5
7439 ac_status=$?
7440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7441 (exit $ac_status); } &&
7442 { ac_try='test -s conftest.$ac_objext'
7443 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7444 (eval $ac_try) 2>&5
7445 ac_status=$?
7446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7447 (exit $ac_status); }; }; then
7448 ac_hi=$ac_mid
7449else
7450 echo "$as_me: failed program was:" >&5
7451cat conftest.$ac_ext >&5
7452ac_lo=`expr '(' $ac_mid ')' + 1`
7453fi
7454rm -f conftest.$ac_objext conftest.$ac_ext
7455done
7456case $ac_lo in
7457?*) ac_cv_sizeof_fpos_t=$ac_lo;;
7458'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7459echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7460 { (exit 1); exit 1; }; } ;;
7461esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007462else
7463 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007464 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7465echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7466 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007467else
Martin v. Löwis11437992002-04-12 09:54:03 +00007468 cat >conftest.$ac_ext <<_ACEOF
7469#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007470#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007471$ac_includes_default
7472long longval () { return (long) (sizeof (fpos_t)); }
7473unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007474#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007475#include <stdlib.h>
7476#ifdef F77_DUMMY_MAIN
7477# ifdef __cplusplus
7478 extern "C"
7479# endif
7480 int F77_DUMMY_MAIN() { return 1; }
7481#endif
7482int
7483main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007484{
Martin v. Löwis11437992002-04-12 09:54:03 +00007485
7486 FILE *f = fopen ("conftest.val", "w");
7487 if (! f)
7488 exit (1);
7489 if (((long) (sizeof (fpos_t))) < 0)
7490 {
7491 long i = longval ();
7492 if (i != ((long) (sizeof (fpos_t))))
7493 exit (1);
7494 fprintf (f, "%ld\n", i);
7495 }
7496 else
7497 {
7498 unsigned long i = ulongval ();
7499 if (i != ((long) (sizeof (fpos_t))))
7500 exit (1);
7501 fprintf (f, "%lu\n", i);
7502 }
7503 exit (ferror (f) || fclose (f) != 0);
7504
7505 ;
7506 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007507}
Martin v. Löwis11437992002-04-12 09:54:03 +00007508_ACEOF
7509rm -f conftest$ac_exeext
7510if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7511 (eval $ac_link) 2>&5
7512 ac_status=$?
7513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7514 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7515 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7516 (eval $ac_try) 2>&5
7517 ac_status=$?
7518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7519 (exit $ac_status); }; }; then
7520 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007521else
Martin v. Löwis11437992002-04-12 09:54:03 +00007522 echo "$as_me: program exited with status $ac_status" >&5
7523echo "$as_me: failed program was:" >&5
7524cat conftest.$ac_ext >&5
7525( exit $ac_status )
7526{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7527echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7528 { (exit 1); exit 1; }; }
7529fi
7530rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7531fi
7532fi
7533rm -f conftest.val
7534else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007535 ac_cv_sizeof_fpos_t=0
7536fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007537fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007538echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
7539echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
7540cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007541#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007542_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007543
Michael W. Hudson54241132001-12-07 15:38:26 +00007544
7545
Martin v. Löwis11437992002-04-12 09:54:03 +00007546echo "$as_me:$LINENO: checking for long long support" >&5
7547echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007548have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007549cat >conftest.$ac_ext <<_ACEOF
7550#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007551#include "confdefs.h"
7552
Martin v. Löwis11437992002-04-12 09:54:03 +00007553#ifdef F77_DUMMY_MAIN
7554# ifdef __cplusplus
7555 extern "C"
7556# endif
7557 int F77_DUMMY_MAIN() { return 1; }
7558#endif
7559int
7560main ()
7561{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007562long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007563 ;
7564 return 0;
7565}
7566_ACEOF
7567rm -f conftest.$ac_objext
7568if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7569 (eval $ac_compile) 2>&5
7570 ac_status=$?
7571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7572 (exit $ac_status); } &&
7573 { ac_try='test -s conftest.$ac_objext'
7574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7575 (eval $ac_try) 2>&5
7576 ac_status=$?
7577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7578 (exit $ac_status); }; }; then
7579
7580
7581cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007582#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007583_ACEOF
7584
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007585 have_long_long=yes
7586
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007587else
Martin v. Löwis11437992002-04-12 09:54:03 +00007588 echo "$as_me: failed program was:" >&5
7589cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007590fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007591rm -f conftest.$ac_objext conftest.$ac_ext
7592echo "$as_me:$LINENO: result: $have_long_long" >&5
7593echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007594if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007595echo "$as_me:$LINENO: checking for long long" >&5
7596echo $ECHO_N "checking for long long... $ECHO_C" >&6
7597if test "${ac_cv_type_long_long+set}" = set; then
7598 echo $ECHO_N "(cached) $ECHO_C" >&6
7599else
7600 cat >conftest.$ac_ext <<_ACEOF
7601#line $LINENO "configure"
7602#include "confdefs.h"
7603$ac_includes_default
7604#ifdef F77_DUMMY_MAIN
7605# ifdef __cplusplus
7606 extern "C"
7607# endif
7608 int F77_DUMMY_MAIN() { return 1; }
7609#endif
7610int
7611main ()
7612{
7613if ((long long *) 0)
7614 return 0;
7615if (sizeof (long long))
7616 return 0;
7617 ;
7618 return 0;
7619}
7620_ACEOF
7621rm -f conftest.$ac_objext
7622if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7623 (eval $ac_compile) 2>&5
7624 ac_status=$?
7625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7626 (exit $ac_status); } &&
7627 { ac_try='test -s conftest.$ac_objext'
7628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7629 (eval $ac_try) 2>&5
7630 ac_status=$?
7631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7632 (exit $ac_status); }; }; then
7633 ac_cv_type_long_long=yes
7634else
7635 echo "$as_me: failed program was:" >&5
7636cat conftest.$ac_ext >&5
7637ac_cv_type_long_long=no
7638fi
7639rm -f conftest.$ac_objext conftest.$ac_ext
7640fi
7641echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
7642echo "${ECHO_T}$ac_cv_type_long_long" >&6
7643
7644echo "$as_me:$LINENO: checking size of long long" >&5
7645echo $ECHO_N "checking size of long long... $ECHO_C" >&6
7646if test "${ac_cv_sizeof_long_long+set}" = set; then
7647 echo $ECHO_N "(cached) $ECHO_C" >&6
7648else
7649 if test "$ac_cv_type_long_long" = yes; then
7650 # The cast to unsigned long works around a bug in the HP C Compiler
7651 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7652 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7653 # This bug is HP SR number 8606223364.
7654 if test "$cross_compiling" = yes; then
7655 # Depending upon the size, compute the lo and hi bounds.
7656cat >conftest.$ac_ext <<_ACEOF
7657#line $LINENO "configure"
7658#include "confdefs.h"
7659$ac_includes_default
7660#ifdef F77_DUMMY_MAIN
7661# ifdef __cplusplus
7662 extern "C"
7663# endif
7664 int F77_DUMMY_MAIN() { return 1; }
7665#endif
7666int
7667main ()
7668{
7669static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
7670test_array [0] = 0
7671
7672 ;
7673 return 0;
7674}
7675_ACEOF
7676rm -f conftest.$ac_objext
7677if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7678 (eval $ac_compile) 2>&5
7679 ac_status=$?
7680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7681 (exit $ac_status); } &&
7682 { ac_try='test -s conftest.$ac_objext'
7683 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7684 (eval $ac_try) 2>&5
7685 ac_status=$?
7686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7687 (exit $ac_status); }; }; then
7688 ac_lo=0 ac_mid=0
7689 while :; do
7690 cat >conftest.$ac_ext <<_ACEOF
7691#line $LINENO "configure"
7692#include "confdefs.h"
7693$ac_includes_default
7694#ifdef F77_DUMMY_MAIN
7695# ifdef __cplusplus
7696 extern "C"
7697# endif
7698 int F77_DUMMY_MAIN() { return 1; }
7699#endif
7700int
7701main ()
7702{
7703static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
7704test_array [0] = 0
7705
7706 ;
7707 return 0;
7708}
7709_ACEOF
7710rm -f conftest.$ac_objext
7711if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7712 (eval $ac_compile) 2>&5
7713 ac_status=$?
7714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7715 (exit $ac_status); } &&
7716 { ac_try='test -s conftest.$ac_objext'
7717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7718 (eval $ac_try) 2>&5
7719 ac_status=$?
7720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7721 (exit $ac_status); }; }; then
7722 ac_hi=$ac_mid; break
7723else
7724 echo "$as_me: failed program was:" >&5
7725cat conftest.$ac_ext >&5
7726ac_lo=`expr $ac_mid + 1`
7727 if test $ac_lo -le $ac_mid; then
7728 ac_lo= ac_hi=
7729 break
7730 fi
7731 ac_mid=`expr 2 '*' $ac_mid + 1`
7732fi
7733rm -f conftest.$ac_objext conftest.$ac_ext
7734 done
7735else
7736 echo "$as_me: failed program was:" >&5
7737cat conftest.$ac_ext >&5
7738cat >conftest.$ac_ext <<_ACEOF
7739#line $LINENO "configure"
7740#include "confdefs.h"
7741$ac_includes_default
7742#ifdef F77_DUMMY_MAIN
7743# ifdef __cplusplus
7744 extern "C"
7745# endif
7746 int F77_DUMMY_MAIN() { return 1; }
7747#endif
7748int
7749main ()
7750{
7751static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
7752test_array [0] = 0
7753
7754 ;
7755 return 0;
7756}
7757_ACEOF
7758rm -f conftest.$ac_objext
7759if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7760 (eval $ac_compile) 2>&5
7761 ac_status=$?
7762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7763 (exit $ac_status); } &&
7764 { ac_try='test -s conftest.$ac_objext'
7765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7766 (eval $ac_try) 2>&5
7767 ac_status=$?
7768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7769 (exit $ac_status); }; }; then
7770 ac_hi=-1 ac_mid=-1
7771 while :; do
7772 cat >conftest.$ac_ext <<_ACEOF
7773#line $LINENO "configure"
7774#include "confdefs.h"
7775$ac_includes_default
7776#ifdef F77_DUMMY_MAIN
7777# ifdef __cplusplus
7778 extern "C"
7779# endif
7780 int F77_DUMMY_MAIN() { return 1; }
7781#endif
7782int
7783main ()
7784{
7785static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
7786test_array [0] = 0
7787
7788 ;
7789 return 0;
7790}
7791_ACEOF
7792rm -f conftest.$ac_objext
7793if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7794 (eval $ac_compile) 2>&5
7795 ac_status=$?
7796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7797 (exit $ac_status); } &&
7798 { ac_try='test -s conftest.$ac_objext'
7799 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7800 (eval $ac_try) 2>&5
7801 ac_status=$?
7802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7803 (exit $ac_status); }; }; then
7804 ac_lo=$ac_mid; break
7805else
7806 echo "$as_me: failed program was:" >&5
7807cat conftest.$ac_ext >&5
7808ac_hi=`expr '(' $ac_mid ')' - 1`
7809 if test $ac_mid -le $ac_hi; then
7810 ac_lo= ac_hi=
7811 break
7812 fi
7813 ac_mid=`expr 2 '*' $ac_mid`
7814fi
7815rm -f conftest.$ac_objext conftest.$ac_ext
7816 done
7817else
7818 echo "$as_me: failed program was:" >&5
7819cat conftest.$ac_ext >&5
7820ac_lo= ac_hi=
7821fi
7822rm -f conftest.$ac_objext conftest.$ac_ext
7823fi
7824rm -f conftest.$ac_objext conftest.$ac_ext
7825# Binary search between lo and hi bounds.
7826while test "x$ac_lo" != "x$ac_hi"; do
7827 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7828 cat >conftest.$ac_ext <<_ACEOF
7829#line $LINENO "configure"
7830#include "confdefs.h"
7831$ac_includes_default
7832#ifdef F77_DUMMY_MAIN
7833# ifdef __cplusplus
7834 extern "C"
7835# endif
7836 int F77_DUMMY_MAIN() { return 1; }
7837#endif
7838int
7839main ()
7840{
7841static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
7842test_array [0] = 0
7843
7844 ;
7845 return 0;
7846}
7847_ACEOF
7848rm -f conftest.$ac_objext
7849if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7850 (eval $ac_compile) 2>&5
7851 ac_status=$?
7852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7853 (exit $ac_status); } &&
7854 { ac_try='test -s conftest.$ac_objext'
7855 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7856 (eval $ac_try) 2>&5
7857 ac_status=$?
7858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7859 (exit $ac_status); }; }; then
7860 ac_hi=$ac_mid
7861else
7862 echo "$as_me: failed program was:" >&5
7863cat conftest.$ac_ext >&5
7864ac_lo=`expr '(' $ac_mid ')' + 1`
7865fi
7866rm -f conftest.$ac_objext conftest.$ac_ext
7867done
7868case $ac_lo in
7869?*) ac_cv_sizeof_long_long=$ac_lo;;
7870'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
7871echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
7872 { (exit 1); exit 1; }; } ;;
7873esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007874else
7875 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007876 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7877echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7878 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007879else
Martin v. Löwis11437992002-04-12 09:54:03 +00007880 cat >conftest.$ac_ext <<_ACEOF
7881#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007882#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007883$ac_includes_default
7884long longval () { return (long) (sizeof (long long)); }
7885unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007886#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007887#include <stdlib.h>
7888#ifdef F77_DUMMY_MAIN
7889# ifdef __cplusplus
7890 extern "C"
7891# endif
7892 int F77_DUMMY_MAIN() { return 1; }
7893#endif
7894int
7895main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007896{
Martin v. Löwis11437992002-04-12 09:54:03 +00007897
7898 FILE *f = fopen ("conftest.val", "w");
7899 if (! f)
7900 exit (1);
7901 if (((long) (sizeof (long long))) < 0)
7902 {
7903 long i = longval ();
7904 if (i != ((long) (sizeof (long long))))
7905 exit (1);
7906 fprintf (f, "%ld\n", i);
7907 }
7908 else
7909 {
7910 unsigned long i = ulongval ();
7911 if (i != ((long) (sizeof (long long))))
7912 exit (1);
7913 fprintf (f, "%lu\n", i);
7914 }
7915 exit (ferror (f) || fclose (f) != 0);
7916
7917 ;
7918 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007919}
Martin v. Löwis11437992002-04-12 09:54:03 +00007920_ACEOF
7921rm -f conftest$ac_exeext
7922if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7923 (eval $ac_link) 2>&5
7924 ac_status=$?
7925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7926 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7927 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7928 (eval $ac_try) 2>&5
7929 ac_status=$?
7930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7931 (exit $ac_status); }; }; then
7932 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007933else
Martin v. Löwis11437992002-04-12 09:54:03 +00007934 echo "$as_me: program exited with status $ac_status" >&5
7935echo "$as_me: failed program was:" >&5
7936cat conftest.$ac_ext >&5
7937( exit $ac_status )
7938{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
7939echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
7940 { (exit 1); exit 1; }; }
7941fi
7942rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7943fi
7944fi
7945rm -f conftest.val
7946else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007947 ac_cv_sizeof_long_long=0
7948fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007949fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007950echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
7951echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
7952cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007953#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007954_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007955
Michael W. Hudson54241132001-12-07 15:38:26 +00007956
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007957fi
7958
Martin v. Löwis11437992002-04-12 09:54:03 +00007959echo "$as_me:$LINENO: checking for uintptr_t support" >&5
7960echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007961have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007962cat >conftest.$ac_ext <<_ACEOF
7963#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007964#include "confdefs.h"
7965
Martin v. Löwis11437992002-04-12 09:54:03 +00007966#ifdef F77_DUMMY_MAIN
7967# ifdef __cplusplus
7968 extern "C"
7969# endif
7970 int F77_DUMMY_MAIN() { return 1; }
7971#endif
7972int
7973main ()
7974{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007975uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007976 ;
7977 return 0;
7978}
7979_ACEOF
7980rm -f conftest.$ac_objext
7981if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7982 (eval $ac_compile) 2>&5
7983 ac_status=$?
7984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7985 (exit $ac_status); } &&
7986 { ac_try='test -s conftest.$ac_objext'
7987 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7988 (eval $ac_try) 2>&5
7989 ac_status=$?
7990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7991 (exit $ac_status); }; }; then
7992
7993
7994cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007995#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007996_ACEOF
7997
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007998 have_uintptr_t=yes
7999
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008000else
Martin v. Löwis11437992002-04-12 09:54:03 +00008001 echo "$as_me: failed program was:" >&5
8002cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008003fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008004rm -f conftest.$ac_objext conftest.$ac_ext
8005echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8006echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008007if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008008echo "$as_me:$LINENO: checking for uintptr_t" >&5
8009echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8010if test "${ac_cv_type_uintptr_t+set}" = set; then
8011 echo $ECHO_N "(cached) $ECHO_C" >&6
8012else
8013 cat >conftest.$ac_ext <<_ACEOF
8014#line $LINENO "configure"
8015#include "confdefs.h"
8016$ac_includes_default
8017#ifdef F77_DUMMY_MAIN
8018# ifdef __cplusplus
8019 extern "C"
8020# endif
8021 int F77_DUMMY_MAIN() { return 1; }
8022#endif
8023int
8024main ()
8025{
8026if ((uintptr_t *) 0)
8027 return 0;
8028if (sizeof (uintptr_t))
8029 return 0;
8030 ;
8031 return 0;
8032}
8033_ACEOF
8034rm -f conftest.$ac_objext
8035if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8036 (eval $ac_compile) 2>&5
8037 ac_status=$?
8038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8039 (exit $ac_status); } &&
8040 { ac_try='test -s conftest.$ac_objext'
8041 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8042 (eval $ac_try) 2>&5
8043 ac_status=$?
8044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8045 (exit $ac_status); }; }; then
8046 ac_cv_type_uintptr_t=yes
8047else
8048 echo "$as_me: failed program was:" >&5
8049cat conftest.$ac_ext >&5
8050ac_cv_type_uintptr_t=no
8051fi
8052rm -f conftest.$ac_objext conftest.$ac_ext
8053fi
8054echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8055echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8056
8057echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8058echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8059if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8060 echo $ECHO_N "(cached) $ECHO_C" >&6
8061else
8062 if test "$ac_cv_type_uintptr_t" = yes; then
8063 # The cast to unsigned long works around a bug in the HP C Compiler
8064 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8065 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8066 # This bug is HP SR number 8606223364.
8067 if test "$cross_compiling" = yes; then
8068 # Depending upon the size, compute the lo and hi bounds.
8069cat >conftest.$ac_ext <<_ACEOF
8070#line $LINENO "configure"
8071#include "confdefs.h"
8072$ac_includes_default
8073#ifdef F77_DUMMY_MAIN
8074# ifdef __cplusplus
8075 extern "C"
8076# endif
8077 int F77_DUMMY_MAIN() { return 1; }
8078#endif
8079int
8080main ()
8081{
8082static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8083test_array [0] = 0
8084
8085 ;
8086 return 0;
8087}
8088_ACEOF
8089rm -f conftest.$ac_objext
8090if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8091 (eval $ac_compile) 2>&5
8092 ac_status=$?
8093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8094 (exit $ac_status); } &&
8095 { ac_try='test -s conftest.$ac_objext'
8096 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8097 (eval $ac_try) 2>&5
8098 ac_status=$?
8099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8100 (exit $ac_status); }; }; then
8101 ac_lo=0 ac_mid=0
8102 while :; do
8103 cat >conftest.$ac_ext <<_ACEOF
8104#line $LINENO "configure"
8105#include "confdefs.h"
8106$ac_includes_default
8107#ifdef F77_DUMMY_MAIN
8108# ifdef __cplusplus
8109 extern "C"
8110# endif
8111 int F77_DUMMY_MAIN() { return 1; }
8112#endif
8113int
8114main ()
8115{
8116static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8117test_array [0] = 0
8118
8119 ;
8120 return 0;
8121}
8122_ACEOF
8123rm -f conftest.$ac_objext
8124if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8125 (eval $ac_compile) 2>&5
8126 ac_status=$?
8127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8128 (exit $ac_status); } &&
8129 { ac_try='test -s conftest.$ac_objext'
8130 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8131 (eval $ac_try) 2>&5
8132 ac_status=$?
8133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8134 (exit $ac_status); }; }; then
8135 ac_hi=$ac_mid; break
8136else
8137 echo "$as_me: failed program was:" >&5
8138cat conftest.$ac_ext >&5
8139ac_lo=`expr $ac_mid + 1`
8140 if test $ac_lo -le $ac_mid; then
8141 ac_lo= ac_hi=
8142 break
8143 fi
8144 ac_mid=`expr 2 '*' $ac_mid + 1`
8145fi
8146rm -f conftest.$ac_objext conftest.$ac_ext
8147 done
8148else
8149 echo "$as_me: failed program was:" >&5
8150cat conftest.$ac_ext >&5
8151cat >conftest.$ac_ext <<_ACEOF
8152#line $LINENO "configure"
8153#include "confdefs.h"
8154$ac_includes_default
8155#ifdef F77_DUMMY_MAIN
8156# ifdef __cplusplus
8157 extern "C"
8158# endif
8159 int F77_DUMMY_MAIN() { return 1; }
8160#endif
8161int
8162main ()
8163{
8164static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8165test_array [0] = 0
8166
8167 ;
8168 return 0;
8169}
8170_ACEOF
8171rm -f conftest.$ac_objext
8172if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8173 (eval $ac_compile) 2>&5
8174 ac_status=$?
8175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8176 (exit $ac_status); } &&
8177 { ac_try='test -s conftest.$ac_objext'
8178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8179 (eval $ac_try) 2>&5
8180 ac_status=$?
8181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8182 (exit $ac_status); }; }; then
8183 ac_hi=-1 ac_mid=-1
8184 while :; do
8185 cat >conftest.$ac_ext <<_ACEOF
8186#line $LINENO "configure"
8187#include "confdefs.h"
8188$ac_includes_default
8189#ifdef F77_DUMMY_MAIN
8190# ifdef __cplusplus
8191 extern "C"
8192# endif
8193 int F77_DUMMY_MAIN() { return 1; }
8194#endif
8195int
8196main ()
8197{
8198static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8199test_array [0] = 0
8200
8201 ;
8202 return 0;
8203}
8204_ACEOF
8205rm -f conftest.$ac_objext
8206if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8207 (eval $ac_compile) 2>&5
8208 ac_status=$?
8209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8210 (exit $ac_status); } &&
8211 { ac_try='test -s conftest.$ac_objext'
8212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8213 (eval $ac_try) 2>&5
8214 ac_status=$?
8215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8216 (exit $ac_status); }; }; then
8217 ac_lo=$ac_mid; break
8218else
8219 echo "$as_me: failed program was:" >&5
8220cat conftest.$ac_ext >&5
8221ac_hi=`expr '(' $ac_mid ')' - 1`
8222 if test $ac_mid -le $ac_hi; then
8223 ac_lo= ac_hi=
8224 break
8225 fi
8226 ac_mid=`expr 2 '*' $ac_mid`
8227fi
8228rm -f conftest.$ac_objext conftest.$ac_ext
8229 done
8230else
8231 echo "$as_me: failed program was:" >&5
8232cat conftest.$ac_ext >&5
8233ac_lo= ac_hi=
8234fi
8235rm -f conftest.$ac_objext conftest.$ac_ext
8236fi
8237rm -f conftest.$ac_objext conftest.$ac_ext
8238# Binary search between lo and hi bounds.
8239while test "x$ac_lo" != "x$ac_hi"; do
8240 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8241 cat >conftest.$ac_ext <<_ACEOF
8242#line $LINENO "configure"
8243#include "confdefs.h"
8244$ac_includes_default
8245#ifdef F77_DUMMY_MAIN
8246# ifdef __cplusplus
8247 extern "C"
8248# endif
8249 int F77_DUMMY_MAIN() { return 1; }
8250#endif
8251int
8252main ()
8253{
8254static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8255test_array [0] = 0
8256
8257 ;
8258 return 0;
8259}
8260_ACEOF
8261rm -f conftest.$ac_objext
8262if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8263 (eval $ac_compile) 2>&5
8264 ac_status=$?
8265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8266 (exit $ac_status); } &&
8267 { ac_try='test -s conftest.$ac_objext'
8268 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8269 (eval $ac_try) 2>&5
8270 ac_status=$?
8271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8272 (exit $ac_status); }; }; then
8273 ac_hi=$ac_mid
8274else
8275 echo "$as_me: failed program was:" >&5
8276cat conftest.$ac_ext >&5
8277ac_lo=`expr '(' $ac_mid ')' + 1`
8278fi
8279rm -f conftest.$ac_objext conftest.$ac_ext
8280done
8281case $ac_lo in
8282?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8283'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8284echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8285 { (exit 1); exit 1; }; } ;;
8286esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008287else
8288 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008289 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8290echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8291 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008292else
Martin v. Löwis11437992002-04-12 09:54:03 +00008293 cat >conftest.$ac_ext <<_ACEOF
8294#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008295#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008296$ac_includes_default
8297long longval () { return (long) (sizeof (uintptr_t)); }
8298unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008299#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008300#include <stdlib.h>
8301#ifdef F77_DUMMY_MAIN
8302# ifdef __cplusplus
8303 extern "C"
8304# endif
8305 int F77_DUMMY_MAIN() { return 1; }
8306#endif
8307int
8308main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008309{
Martin v. Löwis11437992002-04-12 09:54:03 +00008310
8311 FILE *f = fopen ("conftest.val", "w");
8312 if (! f)
8313 exit (1);
8314 if (((long) (sizeof (uintptr_t))) < 0)
8315 {
8316 long i = longval ();
8317 if (i != ((long) (sizeof (uintptr_t))))
8318 exit (1);
8319 fprintf (f, "%ld\n", i);
8320 }
8321 else
8322 {
8323 unsigned long i = ulongval ();
8324 if (i != ((long) (sizeof (uintptr_t))))
8325 exit (1);
8326 fprintf (f, "%lu\n", i);
8327 }
8328 exit (ferror (f) || fclose (f) != 0);
8329
8330 ;
8331 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008332}
Martin v. Löwis11437992002-04-12 09:54:03 +00008333_ACEOF
8334rm -f conftest$ac_exeext
8335if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8336 (eval $ac_link) 2>&5
8337 ac_status=$?
8338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8339 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8340 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8341 (eval $ac_try) 2>&5
8342 ac_status=$?
8343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8344 (exit $ac_status); }; }; then
8345 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008346else
Martin v. Löwis11437992002-04-12 09:54:03 +00008347 echo "$as_me: program exited with status $ac_status" >&5
8348echo "$as_me: failed program was:" >&5
8349cat conftest.$ac_ext >&5
8350( exit $ac_status )
8351{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8352echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8353 { (exit 1); exit 1; }; }
8354fi
8355rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8356fi
8357fi
8358rm -f conftest.val
8359else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008360 ac_cv_sizeof_uintptr_t=0
8361fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008362fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008363echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8364echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8365cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008366#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008367_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008368
Michael W. Hudson54241132001-12-07 15:38:26 +00008369
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008370fi
8371
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008372# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008373echo "$as_me:$LINENO: checking size of off_t" >&5
8374echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
8375if test "${ac_cv_sizeof_off_t+set}" = set; then
8376 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008377else
8378 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008379 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008380else
Martin v. Löwis11437992002-04-12 09:54:03 +00008381 cat >conftest.$ac_ext <<_ACEOF
8382#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008383#include "confdefs.h"
8384#include <stdio.h>
8385#include <sys/types.h>
8386main()
8387{
8388 FILE *f=fopen("conftestval", "w");
8389 if (!f) exit(1);
8390 fprintf(f, "%d\n", sizeof(off_t));
8391 exit(0);
8392}
Martin v. Löwis11437992002-04-12 09:54:03 +00008393_ACEOF
8394rm -f conftest$ac_exeext
8395if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8396 (eval $ac_link) 2>&5
8397 ac_status=$?
8398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8399 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8401 (eval $ac_try) 2>&5
8402 ac_status=$?
8403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8404 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008405 ac_cv_sizeof_off_t=`cat conftestval`
8406else
Martin v. Löwis11437992002-04-12 09:54:03 +00008407 echo "$as_me: program exited with status $ac_status" >&5
8408echo "$as_me: failed program was:" >&5
8409cat conftest.$ac_ext >&5
8410( exit $ac_status )
8411ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008412fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008413rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008414fi
8415
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008416fi
8417
Martin v. Löwis11437992002-04-12 09:54:03 +00008418echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
8419echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
8420
8421cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008422#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008423_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008424
Michael W. Hudson54241132001-12-07 15:38:26 +00008425
Martin v. Löwis11437992002-04-12 09:54:03 +00008426echo "$as_me:$LINENO: checking whether to enable large file support" >&5
8427echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008428if test "$have_long_long" = yes -a \
8429 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
8430 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008431
Martin v. Löwis11437992002-04-12 09:54:03 +00008432cat >>confdefs.h <<\_ACEOF
8433#define HAVE_LARGEFILE_SUPPORT 1
8434_ACEOF
8435
8436 echo "$as_me:$LINENO: result: yes" >&5
8437echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008438else
Martin v. Löwis11437992002-04-12 09:54:03 +00008439 echo "$as_me:$LINENO: result: no" >&5
8440echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008441fi
8442
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008443# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008444echo "$as_me:$LINENO: checking size of time_t" >&5
8445echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
8446if test "${ac_cv_sizeof_time_t+set}" = set; then
8447 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008448else
8449 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008450 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008451else
Martin v. Löwis11437992002-04-12 09:54:03 +00008452 cat >conftest.$ac_ext <<_ACEOF
8453#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008454#include "confdefs.h"
8455#include <stdio.h>
8456#include <time.h>
8457main()
8458{
8459 FILE *f=fopen("conftestval", "w");
8460 if (!f) exit(1);
8461 fprintf(f, "%d\n", sizeof(time_t));
8462 exit(0);
8463}
Martin v. Löwis11437992002-04-12 09:54:03 +00008464_ACEOF
8465rm -f conftest$ac_exeext
8466if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8467 (eval $ac_link) 2>&5
8468 ac_status=$?
8469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8470 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8472 (eval $ac_try) 2>&5
8473 ac_status=$?
8474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8475 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008476 ac_cv_sizeof_time_t=`cat conftestval`
8477else
Martin v. Löwis11437992002-04-12 09:54:03 +00008478 echo "$as_me: program exited with status $ac_status" >&5
8479echo "$as_me: failed program was:" >&5
8480cat conftest.$ac_ext >&5
8481( exit $ac_status )
8482ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008483fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008484rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008485fi
8486
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008487fi
8488
Martin v. Löwis11437992002-04-12 09:54:03 +00008489echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
8490echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
8491
8492cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008493#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008494_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008495
Michael W. Hudson54241132001-12-07 15:38:26 +00008496
8497
Trent Mick635f6fb2000-08-23 21:33:05 +00008498# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008499ac_save_cc="$CC"
8500if test "$ac_cv_kpthread" = "yes"
8501then CC="$CC -Kpthread"
8502fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008503echo "$as_me:$LINENO: checking for pthread_t" >&5
8504echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008505have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008506cat >conftest.$ac_ext <<_ACEOF
8507#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008508#include "confdefs.h"
8509#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008510#ifdef F77_DUMMY_MAIN
8511# ifdef __cplusplus
8512 extern "C"
8513# endif
8514 int F77_DUMMY_MAIN() { return 1; }
8515#endif
8516int
8517main ()
8518{
Guido van Rossum12580492000-09-24 16:47:19 +00008519pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008520 ;
8521 return 0;
8522}
8523_ACEOF
8524rm -f conftest.$ac_objext
8525if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8526 (eval $ac_compile) 2>&5
8527 ac_status=$?
8528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8529 (exit $ac_status); } &&
8530 { ac_try='test -s conftest.$ac_objext'
8531 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8532 (eval $ac_try) 2>&5
8533 ac_status=$?
8534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8535 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008536 have_pthread_t=yes
8537else
Martin v. Löwis11437992002-04-12 09:54:03 +00008538 echo "$as_me: failed program was:" >&5
8539cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00008540fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008541rm -f conftest.$ac_objext conftest.$ac_ext
8542echo "$as_me:$LINENO: result: $have_pthread_t" >&5
8543echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008544if test "$have_pthread_t" = yes ; then
8545 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008546 echo "$as_me:$LINENO: checking size of pthread_t" >&5
8547echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
8548 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
8549 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008550else
8551 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008552 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00008553else
Martin v. Löwis11437992002-04-12 09:54:03 +00008554 cat >conftest.$ac_ext <<_ACEOF
8555#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008556#include "confdefs.h"
8557#include <stdio.h>
8558 #include <pthread.h>
8559 main()
8560 {
8561 FILE *f=fopen("conftestval", "w");
8562 if (!f) exit(1);
8563 fprintf(f, "%d\n", sizeof(pthread_t));
8564 exit(0);
8565 }
Martin v. Löwis11437992002-04-12 09:54:03 +00008566_ACEOF
8567rm -f conftest$ac_exeext
8568if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8569 (eval $ac_link) 2>&5
8570 ac_status=$?
8571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8572 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8573 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8574 (eval $ac_try) 2>&5
8575 ac_status=$?
8576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8577 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008578 ac_cv_sizeof_pthread_t=`cat conftestval`
8579else
Martin v. Löwis11437992002-04-12 09:54:03 +00008580 echo "$as_me: program exited with status $ac_status" >&5
8581echo "$as_me: failed program was:" >&5
8582cat conftest.$ac_ext >&5
8583( exit $ac_status )
8584ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00008585fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008586rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00008587fi
8588
Trent Mick635f6fb2000-08-23 21:33:05 +00008589fi
8590
Martin v. Löwis11437992002-04-12 09:54:03 +00008591 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
8592echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
8593
8594cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008595#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008596_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008597
8598fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008599CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008600
Martin v. Löwis11437992002-04-12 09:54:03 +00008601echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
8602echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008603# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
8604if test "${enable_toolbox_glue+set}" = set; then
8605 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00008606
Martin v. Löwis11437992002-04-12 09:54:03 +00008607fi;
Jack Jansene578a632001-08-15 01:27:14 +00008608
8609if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00008610then
Jack Jansene578a632001-08-15 01:27:14 +00008611 case $ac_sys_system/$ac_sys_release in
8612 Darwin/*)
8613 enable_toolbox_glue="yes";;
8614 *)
8615 enable_toolbox_glue="no";;
8616 esac
8617fi
8618case "$enable_toolbox_glue" in
8619yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00008620 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00008621 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00008622 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00008623
8624cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008625#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008626_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008627
8628 ;;
8629*)
8630 extra_frameworks=""
8631 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00008632 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00008633 ;;
8634esac
Martin v. Löwis11437992002-04-12 09:54:03 +00008635echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
8636echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00008637
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008638
8639case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00008640 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00008641 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00008642 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym"
8643 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00008644 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8645 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008646 Darwin/*)
8647 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00008648 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -flat_namespace -U $ns_undef_sym"
8649 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00008650 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8651 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008652esac
8653
Martin v. Löwis11437992002-04-12 09:54:03 +00008654echo "$as_me:$LINENO: checking for --enable-framework" >&5
8655echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008656if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008657then
Jack Jansenca06bc62001-08-03 15:32:23 +00008658 OPT="$OPT -fno-common -dynamic"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008659 # -U __environ is needed since bundles don't have access
8660 # to crt0 when built but will always be linked against it
Martin v. Löwis11437992002-04-12 09:54:03 +00008661 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008662 # in the build location.
Martin v. Löwis11437992002-04-12 09:54:03 +00008663
Jack Jansena3891ea2001-09-07 14:25:12 +00008664 case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00008665 Darwin/1.3*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym";;
8666 Darwin/*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-flat_namespace,-U,$ns_undef_sym";;
Jack Jansena3891ea2001-09-07 14:25:12 +00008667 esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008668
Martin v. Löwis11437992002-04-12 09:54:03 +00008669cat >>confdefs.h <<\_ACEOF
8670#define WITH_NEXT_FRAMEWORK 1
8671_ACEOF
8672
8673 echo "$as_me:$LINENO: result: yes" >&5
8674echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008675else
Martin v. Löwis11437992002-04-12 09:54:03 +00008676 echo "$as_me:$LINENO: result: no" >&5
8677echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008678fi
8679
Martin v. Löwis11437992002-04-12 09:54:03 +00008680echo "$as_me:$LINENO: checking for dyld" >&5
8681echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008682case $ac_sys_system/$ac_sys_release in
8683 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008684
Martin v. Löwis11437992002-04-12 09:54:03 +00008685cat >>confdefs.h <<\_ACEOF
8686#define WITH_DYLD 1
8687_ACEOF
8688
8689 echo "$as_me:$LINENO: result: always on for Darwin" >&5
8690echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008691 ;;
8692 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00008693 echo "$as_me:$LINENO: result: no" >&5
8694echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008695 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008696esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008697
Guido van Rossum0a516c91994-09-12 10:58:40 +00008698# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008699
Michael W. Hudson54241132001-12-07 15:38:26 +00008700
8701
8702
8703
Guido van Rossum0a516c91994-09-12 10:58:40 +00008704# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008705# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00008706echo "$as_me:$LINENO: checking SO" >&5
8707echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008708if test -z "$SO"
8709then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008710 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00008711 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008712 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008713 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008714 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008715fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008716echo "$as_me:$LINENO: result: $SO" >&5
8717echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008718# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00008719# -- "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 +00008720# (Shared libraries in this instance are shared modules to be loaded into
8721# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00008722echo "$as_me:$LINENO: checking LDSHARED" >&5
8723echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008724if test -z "$LDSHARED"
8725then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008726 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008727 AIX*)
8728 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008729 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008730 ;;
8731 BeOS*)
8732 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008733 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008734 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008735 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008736 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008737 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008738 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00008739 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00008740 then LDSHARED='$(CC) -shared'
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00008741 else LDSHARED="$(CC) -G";
Greg Ward57c9a6632000-05-26 12:22:54 +00008742 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008743 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008744 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
8745 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008746 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00008747 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8748 if test "$enable_framework" ; then
8749 # Link against the framework. All externals should be defined.
8750 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8751 else
8752 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008753 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008754 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00008755 Darwin/*)
8756 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8757 if test "$enable_framework" ; then
8758 # Link against the framework. All externals should be defined.
8759 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8760 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008761 # No framework, use the Python app as bundle-loader
8762 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8763 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008764 fi ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008765 Linux*|GNU*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00008766 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00008767 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00008768 OpenBSD*|NetBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008769 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008770 then
8771 LDSHARED="cc -shared ${LDFLAGS}"
8772 else
8773 LDSHARED="ld -Bshareable ${LDFLAGS}"
8774 fi;;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008775 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008776 if test "$GCC" = "yes"
8777 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008778 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008779 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008780 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00008781 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008782 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008783 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008784 *) LDSHARED="ld";;
8785 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008786fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008787echo "$as_me:$LINENO: result: $LDSHARED" >&5
8788echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008789BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008790# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008791# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008792echo "$as_me:$LINENO: checking CCSHARED" >&5
8793echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008794if test -z "$CCSHARED"
8795then
Guido van Rossum07397971997-04-29 21:49:50 +00008796 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008797 SunOS*) if test "$GCC" = yes;
8798 then CCSHARED="-fPIC";
8799 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008800 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008801 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008802 else CCSHARED="+z";
8803 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008804 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008805 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00008806 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008807 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008808 if test "$GCC" = "yes"
8809 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008810 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008811 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008812 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00008813 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008814 IRIX*/6*) case $CC in
8815 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008816 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008817 esac;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008818 CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008819 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008820 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008821fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008822echo "$as_me:$LINENO: result: $CCSHARED" >&5
8823echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008824# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008825# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008826echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
8827echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008828if test -z "$LINKFORSHARED"
8829then
Guido van Rossum07397971997-04-29 21:49:50 +00008830 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008831 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008832 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008833 LINKFORSHARED="-Wl,-E -Wl,+s";;
8834# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008835 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008836 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008837 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008838 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00008839 # -u __dummy makes the linker aware of the objc runtime
8840 # in System.framework; otherwise, __objcInit (referenced in
8841 # crt1.o) gets erroneously defined as common, which breaks dynamic
8842 # loading of any modules which reference it in System.framework.
8843 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
8844 # not used by the core itself but which needs to be in the core so
8845 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00008846 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00008847 if test "$enable_framework"
8848 then
8849 LINKFORSHARED="$LINKFORSHARED -framework Python"
8850 fi
8851 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008852 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008853 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008854 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008855 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008856 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8857 then
8858 LINKFORSHARED="-Wl,--export-dynamic"
8859 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008860 SunOS/5*) case $CC in
8861 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008862 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008863 then
8864 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008865 fi;;
8866 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008867 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008868fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008869echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
8870echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008871
Michael W. Hudson54241132001-12-07 15:38:26 +00008872
Martin v. Löwis11437992002-04-12 09:54:03 +00008873echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
8874echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008875if test ! "$LIBRARY" = "$LDLIBRARY"
8876then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008877 case $ac_sys_system in
8878 CYGWIN*)
8879 # Cygwin needs CCSHARED when building extension DLLs
8880 # but not when building the interpreter DLL.
8881 CFLAGSFORSHARED='';;
8882 *)
8883 CFLAGSFORSHARED='$(CCSHARED)'
8884 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008885fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008886echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
8887echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008888
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008889# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8890# library (with --enable-shared).
8891# For platforms on which shared libraries are not allowed to have unresolved
8892# symbols, this must be set to $(LIBS) (expanded by make).
8893
8894echo "$as_me:$LINENO: checking SHLIBS" >&5
8895echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
8896case "$ac_sys_system" in
8897 atheos*)
8898 SHLIBS='$(LIBS)';;
8899 *)
8900 SHLIBS='';;
8901esac
8902echo "$as_me:$LINENO: result: $SHLIBS" >&5
8903echo "${ECHO_T}$SHLIBS" >&6
8904
8905
Guido van Rossum627b2d71993-12-24 10:39:16 +00008906# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00008907
8908echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
8909echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
8910if test "${ac_cv_lib_dl_dlopen+set}" = set; then
8911 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008912else
Martin v. Löwis11437992002-04-12 09:54:03 +00008913 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008914LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008915cat >conftest.$ac_ext <<_ACEOF
8916#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00008917#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008918
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008919/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008920#ifdef __cplusplus
8921extern "C"
8922#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008923/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00008924 builtin and then its argument prototype would still apply. */
8925char dlopen ();
8926#ifdef F77_DUMMY_MAIN
8927# ifdef __cplusplus
8928 extern "C"
8929# endif
8930 int F77_DUMMY_MAIN() { return 1; }
8931#endif
8932int
8933main ()
8934{
8935dlopen ();
8936 ;
8937 return 0;
8938}
8939_ACEOF
8940rm -f conftest.$ac_objext conftest$ac_exeext
8941if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8942 (eval $ac_link) 2>&5
8943 ac_status=$?
8944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8945 (exit $ac_status); } &&
8946 { ac_try='test -s conftest$ac_exeext'
8947 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8948 (eval $ac_try) 2>&5
8949 ac_status=$?
8950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8951 (exit $ac_status); }; }; then
8952 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008953else
Martin v. Löwis11437992002-04-12 09:54:03 +00008954 echo "$as_me: failed program was:" >&5
8955cat conftest.$ac_ext >&5
8956ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008957fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008958rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8959LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008960fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008961echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
8962echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
8963if test $ac_cv_lib_dl_dlopen = yes; then
8964 cat >>confdefs.h <<_ACEOF
8965#define HAVE_LIBDL 1
8966_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008967
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008968 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008969
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008970fi
8971 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00008972
8973echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
8974echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
8975if test "${ac_cv_lib_dld_shl_load+set}" = set; then
8976 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008977else
Martin v. Löwis11437992002-04-12 09:54:03 +00008978 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008979LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008980cat >conftest.$ac_ext <<_ACEOF
8981#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00008982#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008983
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008984/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008985#ifdef __cplusplus
8986extern "C"
8987#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008988/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00008989 builtin and then its argument prototype would still apply. */
8990char shl_load ();
8991#ifdef F77_DUMMY_MAIN
8992# ifdef __cplusplus
8993 extern "C"
8994# endif
8995 int F77_DUMMY_MAIN() { return 1; }
8996#endif
8997int
8998main ()
8999{
9000shl_load ();
9001 ;
9002 return 0;
9003}
9004_ACEOF
9005rm -f conftest.$ac_objext conftest$ac_exeext
9006if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9007 (eval $ac_link) 2>&5
9008 ac_status=$?
9009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9010 (exit $ac_status); } &&
9011 { ac_try='test -s conftest$ac_exeext'
9012 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9013 (eval $ac_try) 2>&5
9014 ac_status=$?
9015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9016 (exit $ac_status); }; }; then
9017 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009018else
Martin v. Löwis11437992002-04-12 09:54:03 +00009019 echo "$as_me: failed program was:" >&5
9020cat conftest.$ac_ext >&5
9021ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009022fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009023rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9024LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009025fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009026echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9027echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9028if test $ac_cv_lib_dld_shl_load = yes; then
9029 cat >>confdefs.h <<_ACEOF
9030#define HAVE_LIBDLD 1
9031_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009032
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009033 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009034
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009035fi
9036 # Dynamic linking for HP-UX
Martin v. Löwis11437992002-04-12 09:54:03 +00009037
9038echo "$as_me:$LINENO: checking for sem_init in -lrt" >&5
9039echo $ECHO_N "checking for sem_init in -lrt... $ECHO_C" >&6
9040if test "${ac_cv_lib_rt_sem_init+set}" = set; then
9041 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009042else
Martin v. Löwis11437992002-04-12 09:54:03 +00009043 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009044LIBS="-lrt $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009045cat >conftest.$ac_ext <<_ACEOF
9046#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009047#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009048
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009049/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009050#ifdef __cplusplus
9051extern "C"
9052#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009053/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009054 builtin and then its argument prototype would still apply. */
9055char sem_init ();
9056#ifdef F77_DUMMY_MAIN
9057# ifdef __cplusplus
9058 extern "C"
9059# endif
9060 int F77_DUMMY_MAIN() { return 1; }
9061#endif
9062int
9063main ()
9064{
9065sem_init ();
9066 ;
9067 return 0;
9068}
9069_ACEOF
9070rm -f conftest.$ac_objext conftest$ac_exeext
9071if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9072 (eval $ac_link) 2>&5
9073 ac_status=$?
9074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9075 (exit $ac_status); } &&
9076 { ac_try='test -s conftest$ac_exeext'
9077 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9078 (eval $ac_try) 2>&5
9079 ac_status=$?
9080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9081 (exit $ac_status); }; }; then
9082 ac_cv_lib_rt_sem_init=yes
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009083else
Martin v. Löwis11437992002-04-12 09:54:03 +00009084 echo "$as_me: failed program was:" >&5
9085cat conftest.$ac_ext >&5
9086ac_cv_lib_rt_sem_init=no
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009087fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009088rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9089LIBS=$ac_check_lib_save_LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009090fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009091echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sem_init" >&5
9092echo "${ECHO_T}$ac_cv_lib_rt_sem_init" >&6
9093if test $ac_cv_lib_rt_sem_init = yes; then
9094 cat >>confdefs.h <<_ACEOF
9095#define HAVE_LIBRT 1
9096_ACEOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009097
9098 LIBS="-lrt $LIBS"
9099
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009100fi
9101 # 'Real Time' functions on Solaris
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009102
9103# checks for system dependent C++ extensions support
9104case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009105 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9106echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9107 cat >conftest.$ac_ext <<_ACEOF
9108#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009109#include "confdefs.h"
9110#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009111#ifdef F77_DUMMY_MAIN
9112# ifdef __cplusplus
9113 extern "C"
9114# endif
9115 int F77_DUMMY_MAIN() { return 1; }
9116#endif
9117int
9118main ()
9119{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009120loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009121 ;
9122 return 0;
9123}
9124_ACEOF
9125rm -f conftest.$ac_objext conftest$ac_exeext
9126if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9127 (eval $ac_link) 2>&5
9128 ac_status=$?
9129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9130 (exit $ac_status); } &&
9131 { ac_try='test -s conftest$ac_exeext'
9132 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9133 (eval $ac_try) 2>&5
9134 ac_status=$?
9135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9136 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009137
Martin v. Löwis11437992002-04-12 09:54:03 +00009138cat >>confdefs.h <<\_ACEOF
9139#define AIX_GENUINE_CPLUSPLUS 1
9140_ACEOF
9141
9142 echo "$as_me:$LINENO: result: yes" >&5
9143echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009144else
Martin v. Löwis11437992002-04-12 09:54:03 +00009145 echo "$as_me: failed program was:" >&5
9146cat conftest.$ac_ext >&5
9147echo "$as_me:$LINENO: result: no" >&5
9148echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009149fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009150rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009151 *) ;;
9152esac
9153
Guido van Rossum70c7f481998-03-26 18:44:10 +00009154# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
9155# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009156# BeOS' sockets are stashed in libnet.
9157case "$ac_sys_system" in
9158IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009159*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009160echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9161echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9162if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9163 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009164else
Martin v. Löwis11437992002-04-12 09:54:03 +00009165 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009166LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009167cat >conftest.$ac_ext <<_ACEOF
9168#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009169#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009170
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009171/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009172#ifdef __cplusplus
9173extern "C"
9174#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009175/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009176 builtin and then its argument prototype would still apply. */
9177char t_open ();
9178#ifdef F77_DUMMY_MAIN
9179# ifdef __cplusplus
9180 extern "C"
9181# endif
9182 int F77_DUMMY_MAIN() { return 1; }
9183#endif
9184int
9185main ()
9186{
9187t_open ();
9188 ;
9189 return 0;
9190}
9191_ACEOF
9192rm -f conftest.$ac_objext conftest$ac_exeext
9193if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9194 (eval $ac_link) 2>&5
9195 ac_status=$?
9196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9197 (exit $ac_status); } &&
9198 { ac_try='test -s conftest$ac_exeext'
9199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9200 (eval $ac_try) 2>&5
9201 ac_status=$?
9202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9203 (exit $ac_status); }; }; then
9204 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009205else
Martin v. Löwis11437992002-04-12 09:54:03 +00009206 echo "$as_me: failed program was:" >&5
9207cat conftest.$ac_ext >&5
9208ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009209fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009210rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9211LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009212fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009213echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9214echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9215if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009216 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009217fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009218 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009219echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9220echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9221if test "${ac_cv_lib_socket_socket+set}" = set; then
9222 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009223else
Martin v. Löwis11437992002-04-12 09:54:03 +00009224 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009225LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009226cat >conftest.$ac_ext <<_ACEOF
9227#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009228#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009229
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009230/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009231#ifdef __cplusplus
9232extern "C"
9233#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009234/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009235 builtin and then its argument prototype would still apply. */
9236char socket ();
9237#ifdef F77_DUMMY_MAIN
9238# ifdef __cplusplus
9239 extern "C"
9240# endif
9241 int F77_DUMMY_MAIN() { return 1; }
9242#endif
9243int
9244main ()
9245{
9246socket ();
9247 ;
9248 return 0;
9249}
9250_ACEOF
9251rm -f conftest.$ac_objext conftest$ac_exeext
9252if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9253 (eval $ac_link) 2>&5
9254 ac_status=$?
9255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9256 (exit $ac_status); } &&
9257 { ac_try='test -s conftest$ac_exeext'
9258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9259 (eval $ac_try) 2>&5
9260 ac_status=$?
9261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9262 (exit $ac_status); }; }; then
9263 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009264else
Martin v. Löwis11437992002-04-12 09:54:03 +00009265 echo "$as_me: failed program was:" >&5
9266cat conftest.$ac_ext >&5
9267ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009268fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009269rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9270LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009271fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009272echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
9273echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
9274if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +00009275 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009276fi
9277 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009278;;
9279esac
9280case "$ac_sys_system" in
9281BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009282echo "$as_me:$LINENO: checking for socket in -lnet" >&5
9283echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
9284if test "${ac_cv_lib_net_socket+set}" = set; then
9285 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009286else
Martin v. Löwis11437992002-04-12 09:54:03 +00009287 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009288LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009289cat >conftest.$ac_ext <<_ACEOF
9290#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009291#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009292
Guido van Rossumad678af1998-10-02 14:42:15 +00009293/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009294#ifdef __cplusplus
9295extern "C"
9296#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009297/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009298 builtin and then its argument prototype would still apply. */
9299char socket ();
9300#ifdef F77_DUMMY_MAIN
9301# ifdef __cplusplus
9302 extern "C"
9303# endif
9304 int F77_DUMMY_MAIN() { return 1; }
9305#endif
9306int
9307main ()
9308{
9309socket ();
9310 ;
9311 return 0;
9312}
9313_ACEOF
9314rm -f conftest.$ac_objext conftest$ac_exeext
9315if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9316 (eval $ac_link) 2>&5
9317 ac_status=$?
9318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9319 (exit $ac_status); } &&
9320 { ac_try='test -s conftest$ac_exeext'
9321 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9322 (eval $ac_try) 2>&5
9323 ac_status=$?
9324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9325 (exit $ac_status); }; }; then
9326 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009327else
Martin v. Löwis11437992002-04-12 09:54:03 +00009328 echo "$as_me: failed program was:" >&5
9329cat conftest.$ac_ext >&5
9330ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009331fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009332rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9333LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009334fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009335echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
9336echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
9337if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009338 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009339fi
9340 # BeOS
9341;;
9342esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009343
Martin v. Löwis11437992002-04-12 09:54:03 +00009344echo "$as_me:$LINENO: checking for --with-libs" >&5
9345echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
9346
Guido van Rossuma68acba1996-07-31 17:36:39 +00009347# Check whether --with-libs or --without-libs was given.
9348if test "${with_libs+set}" = set; then
9349 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +00009350
9351echo "$as_me:$LINENO: result: $withval" >&5
9352echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00009353LIBS="$withval $LIBS"
9354
9355else
Martin v. Löwis11437992002-04-12 09:54:03 +00009356 echo "$as_me:$LINENO: result: no" >&5
9357echo "${ECHO_T}no" >&6
9358fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +00009359
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009360# Determine if signalmodule should be used.
9361
9362
Martin v. Löwis11437992002-04-12 09:54:03 +00009363echo "$as_me:$LINENO: checking for --with-signal-module" >&5
9364echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
9365
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009366# Check whether --with-signal-module or --without-signal-module was given.
9367if test "${with_signal_module+set}" = set; then
9368 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009369
Martin v. Löwis11437992002-04-12 09:54:03 +00009370fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009371
9372if test -z "$with_signal_module"
9373then with_signal_module="yes"
9374fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009375echo "$as_me:$LINENO: result: $with_signal_module" >&5
9376echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009377
9378if test "${with_signal_module}" = "yes"; then
9379 USE_SIGNAL_MODULE=""
9380 SIGNAL_OBJS=""
9381else
9382 USE_SIGNAL_MODULE="#"
9383 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9384fi
9385
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009386# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009387
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009388USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009389
Martin v. Löwis11437992002-04-12 09:54:03 +00009390echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
9391echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
9392
Guido van Rossumec2f0731997-01-22 20:54:01 +00009393
9394# Check whether --with-dec-threads or --without-dec-threads was given.
9395if test "${with_dec_threads+set}" = set; then
9396 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +00009397
9398echo "$as_me:$LINENO: result: $withval" >&5
9399echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00009400LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009401if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009402 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009403fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009404else
Martin v. Löwis11437992002-04-12 09:54:03 +00009405 echo "$as_me:$LINENO: result: no" >&5
9406echo "${ECHO_T}no" >&6
9407fi;
9408
9409# Templates for things AC_DEFINEd more than once.
9410# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009411
9412
Martin v. Löwis11437992002-04-12 09:54:03 +00009413
9414
9415
9416
9417
9418echo "$as_me:$LINENO: checking for --with-threads" >&5
9419echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
9420
Guido van Rossumec2f0731997-01-22 20:54:01 +00009421# Check whether --with-threads or --without-threads was given.
9422if test "${with_threads+set}" = set; then
9423 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +00009424
Martin v. Löwis11437992002-04-12 09:54:03 +00009425fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +00009426
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009427# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009428
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009429# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009430if test "${with_thread+set}" = set; then
9431 withval="$with_thread"
Michael W. Hudson54241132001-12-07 15:38:26 +00009432
Martin v. Löwis11437992002-04-12 09:54:03 +00009433with_threads=$with_thread
9434fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009435
9436if test -z "$with_threads"
9437then with_threads="yes"
9438fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009439echo "$as_me:$LINENO: result: $with_threads" >&5
9440echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009441
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009442
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009443if test "$with_threads" = "no"
9444then
9445 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009446elif test "$ac_cv_pthread_is_default" = yes
9447then
Martin v. Löwis11437992002-04-12 09:54:03 +00009448 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009449#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009450_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009451
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009452 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +00009453 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009454#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009455_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009456
9457 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009458 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009459elif test "$ac_cv_kpthread" = "yes"
9460then
9461 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009462 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009463#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009464_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009465
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009466 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009467 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009468else
9469 if test ! -z "$with_threads" -a -d "$with_threads"
9470 then LDFLAGS="$LDFLAGS -L$with_threads"
9471 fi
9472 if test ! -z "$withval" -a -d "$withval"
9473 then LDFLAGS="$LDFLAGS -L$withval"
9474 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009475
9476 # According to the POSIX spec, a pthreads implementation must
9477 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +00009478 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
9479echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
9480 cat >conftest.$ac_ext <<_ACEOF
9481#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009482#include "confdefs.h"
9483#include <unistd.h>
9484 #ifdef _POSIX_THREADS
9485 yes
9486 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009487
9488_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009489if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9490 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009491 unistd_defines_pthreads=yes
9492else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009493 unistd_defines_pthreads=no
9494fi
9495rm -f conftest*
9496
Martin v. Löwis11437992002-04-12 09:54:03 +00009497 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
9498echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009499
Martin v. Löwis11437992002-04-12 09:54:03 +00009500 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009501#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009502_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009503
Martin v. Löwis11437992002-04-12 09:54:03 +00009504 if test "${ac_cv_header_cthreads_h+set}" = set; then
9505 echo "$as_me:$LINENO: checking for cthreads.h" >&5
9506echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9507if test "${ac_cv_header_cthreads_h+set}" = set; then
9508 echo $ECHO_N "(cached) $ECHO_C" >&6
9509fi
9510echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9511echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009512else
Martin v. Löwis11437992002-04-12 09:54:03 +00009513 # Is the header compilable?
9514echo "$as_me:$LINENO: checking cthreads.h usability" >&5
9515echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
9516cat >conftest.$ac_ext <<_ACEOF
9517#line $LINENO "configure"
9518#include "confdefs.h"
9519$ac_includes_default
9520#include <cthreads.h>
9521_ACEOF
9522rm -f conftest.$ac_objext
9523if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9524 (eval $ac_compile) 2>&5
9525 ac_status=$?
9526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9527 (exit $ac_status); } &&
9528 { ac_try='test -s conftest.$ac_objext'
9529 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9530 (eval $ac_try) 2>&5
9531 ac_status=$?
9532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9533 (exit $ac_status); }; }; then
9534 ac_header_compiler=yes
9535else
9536 echo "$as_me: failed program was:" >&5
9537cat conftest.$ac_ext >&5
9538ac_header_compiler=no
9539fi
9540rm -f conftest.$ac_objext conftest.$ac_ext
9541echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9542echo "${ECHO_T}$ac_header_compiler" >&6
9543
9544# Is the header present?
9545echo "$as_me:$LINENO: checking cthreads.h presence" >&5
9546echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
9547cat >conftest.$ac_ext <<_ACEOF
9548#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009549#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009550#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009551_ACEOF
9552if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9553 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9554 ac_status=$?
9555 egrep -v '^ *\+' conftest.er1 >conftest.err
9556 rm -f conftest.er1
9557 cat conftest.err >&5
9558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9559 (exit $ac_status); } >/dev/null; then
9560 if test -s conftest.err; then
9561 ac_cpp_err=$ac_c_preproc_warn_flag
9562 else
9563 ac_cpp_err=
9564 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009565else
Martin v. Löwis11437992002-04-12 09:54:03 +00009566 ac_cpp_err=yes
9567fi
9568if test -z "$ac_cpp_err"; then
9569 ac_header_preproc=yes
9570else
9571 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00009572 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009573 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009574fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009575rm -f conftest.err conftest.$ac_ext
9576echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9577echo "${ECHO_T}$ac_header_preproc" >&6
9578
9579# So? What about this header?
9580case $ac_header_compiler:$ac_header_preproc in
9581 yes:no )
9582 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9583echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9584 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9585echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9586 no:yes )
9587 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
9588echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
9589 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
9590echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
9591 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9592echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9593esac
9594echo "$as_me:$LINENO: checking for cthreads.h" >&5
9595echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9596if test "${ac_cv_header_cthreads_h+set}" = set; then
9597 echo $ECHO_N "(cached) $ECHO_C" >&6
9598else
9599 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009600fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009601echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9602echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
9603
9604fi
9605if test $ac_cv_header_cthreads_h = yes; then
9606 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009607#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009608_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009609
Martin v. Löwis11437992002-04-12 09:54:03 +00009610 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009611#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009612_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009613
Martin v. Löwis11437992002-04-12 09:54:03 +00009614
9615cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009616#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009617_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009618
9619 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009620 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009621else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009622
Martin v. Löwis11437992002-04-12 09:54:03 +00009623 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9624 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9625echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9626if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9627 echo $ECHO_N "(cached) $ECHO_C" >&6
9628fi
9629echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9630echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009631else
Martin v. Löwis11437992002-04-12 09:54:03 +00009632 # Is the header compilable?
9633echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
9634echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
9635cat >conftest.$ac_ext <<_ACEOF
9636#line $LINENO "configure"
9637#include "confdefs.h"
9638$ac_includes_default
9639#include <mach/cthreads.h>
9640_ACEOF
9641rm -f conftest.$ac_objext
9642if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9643 (eval $ac_compile) 2>&5
9644 ac_status=$?
9645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9646 (exit $ac_status); } &&
9647 { ac_try='test -s conftest.$ac_objext'
9648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9649 (eval $ac_try) 2>&5
9650 ac_status=$?
9651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9652 (exit $ac_status); }; }; then
9653 ac_header_compiler=yes
9654else
9655 echo "$as_me: failed program was:" >&5
9656cat conftest.$ac_ext >&5
9657ac_header_compiler=no
9658fi
9659rm -f conftest.$ac_objext conftest.$ac_ext
9660echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9661echo "${ECHO_T}$ac_header_compiler" >&6
9662
9663# Is the header present?
9664echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
9665echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
9666cat >conftest.$ac_ext <<_ACEOF
9667#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009668#include "confdefs.h"
9669#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009670_ACEOF
9671if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9672 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9673 ac_status=$?
9674 egrep -v '^ *\+' conftest.er1 >conftest.err
9675 rm -f conftest.er1
9676 cat conftest.err >&5
9677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9678 (exit $ac_status); } >/dev/null; then
9679 if test -s conftest.err; then
9680 ac_cpp_err=$ac_c_preproc_warn_flag
9681 else
9682 ac_cpp_err=
9683 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009684else
Martin v. Löwis11437992002-04-12 09:54:03 +00009685 ac_cpp_err=yes
9686fi
9687if test -z "$ac_cpp_err"; then
9688 ac_header_preproc=yes
9689else
9690 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009691 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009692 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009693fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009694rm -f conftest.err conftest.$ac_ext
9695echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9696echo "${ECHO_T}$ac_header_preproc" >&6
9697
9698# So? What about this header?
9699case $ac_header_compiler:$ac_header_preproc in
9700 yes:no )
9701 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9702echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9703 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9704echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9705 no:yes )
9706 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
9707echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
9708 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
9709echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
9710 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9711echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9712esac
9713echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9714echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9715if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9716 echo $ECHO_N "(cached) $ECHO_C" >&6
9717else
9718 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009719fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009720echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9721echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
9722
9723fi
9724if test $ac_cv_header_mach_cthreads_h = yes; then
9725 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009726#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009727_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009728
Martin v. Löwis11437992002-04-12 09:54:03 +00009729 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009730#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009731_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009732
Martin v. Löwis11437992002-04-12 09:54:03 +00009733
9734cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009735#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009736_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009737
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009738 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009739else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009740
Martin v. Löwis11437992002-04-12 09:54:03 +00009741 echo "$as_me:$LINENO: checking for --with-pth" >&5
9742echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
9743
9744# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009745if test "${with_pth+set}" = set; then
9746 withval="$with_pth"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009747
Martin v. Löwis11437992002-04-12 09:54:03 +00009748 echo "$as_me:$LINENO: result: $withval" >&5
9749echo "${ECHO_T}$withval" >&6
9750 cat >>confdefs.h <<\_ACEOF
9751#define WITH_THREAD 1
9752_ACEOF
9753
9754
9755cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009756#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009757_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009758
Martin v. Löwis130fb172001-07-19 11:00:41 +00009759 LIBS="-lpth $LIBS"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009760 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009761else
Martin v. Löwis11437992002-04-12 09:54:03 +00009762
9763 echo "$as_me:$LINENO: result: no" >&5
9764echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009765
9766 # Just looking for pthread_create in libpthread is not enough:
9767 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9768 # So we really have to include pthread.h, and then link.
9769 _libs=$LIBS
9770 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009771 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
9772echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
9773 cat >conftest.$ac_ext <<_ACEOF
9774#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009775#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009776#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009777
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009778void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009779#ifdef F77_DUMMY_MAIN
9780# ifdef __cplusplus
9781 extern "C"
9782# endif
9783 int F77_DUMMY_MAIN() { return 1; }
9784#endif
9785int
9786main ()
9787{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009788
9789pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009790 ;
9791 return 0;
9792}
9793_ACEOF
9794rm -f conftest.$ac_objext conftest$ac_exeext
9795if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9796 (eval $ac_link) 2>&5
9797 ac_status=$?
9798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9799 (exit $ac_status); } &&
9800 { ac_try='test -s conftest$ac_exeext'
9801 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9802 (eval $ac_try) 2>&5
9803 ac_status=$?
9804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9805 (exit $ac_status); }; }; then
9806
9807 echo "$as_me:$LINENO: result: yes" >&5
9808echo "${ECHO_T}yes" >&6
9809 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009810#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009811_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009812
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009813 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009814 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009815else
Martin v. Löwis11437992002-04-12 09:54:03 +00009816 echo "$as_me: failed program was:" >&5
9817cat conftest.$ac_ext >&5
9818
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009819 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +00009820 echo "$as_me:$LINENO: checking for pthread_detach" >&5
9821echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
9822if test "${ac_cv_func_pthread_detach+set}" = set; then
9823 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009824else
Martin v. Löwis11437992002-04-12 09:54:03 +00009825 cat >conftest.$ac_ext <<_ACEOF
9826#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009827#include "confdefs.h"
9828/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +00009829 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00009830#include <assert.h>
9831/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009832#ifdef __cplusplus
9833extern "C"
9834#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009835/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009836 builtin and then its argument prototype would still apply. */
9837char pthread_detach ();
9838char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +00009839
Martin v. Löwis11437992002-04-12 09:54:03 +00009840#ifdef F77_DUMMY_MAIN
9841# ifdef __cplusplus
9842 extern "C"
9843# endif
9844 int F77_DUMMY_MAIN() { return 1; }
9845#endif
9846int
9847main ()
9848{
Guido van Rossumad678af1998-10-02 14:42:15 +00009849/* The GNU C library defines this for functions which it implements
9850 to always fail with ENOSYS. Some functions are actually named
9851 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00009852#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00009853choke me
9854#else
Martin v. Löwis11437992002-04-12 09:54:03 +00009855f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +00009856#endif
9857
Martin v. Löwis11437992002-04-12 09:54:03 +00009858 ;
9859 return 0;
9860}
9861_ACEOF
9862rm -f conftest.$ac_objext conftest$ac_exeext
9863if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9864 (eval $ac_link) 2>&5
9865 ac_status=$?
9866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9867 (exit $ac_status); } &&
9868 { ac_try='test -s conftest$ac_exeext'
9869 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9870 (eval $ac_try) 2>&5
9871 ac_status=$?
9872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9873 (exit $ac_status); }; }; then
9874 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009875else
Martin v. Löwis11437992002-04-12 09:54:03 +00009876 echo "$as_me: failed program was:" >&5
9877cat conftest.$ac_ext >&5
9878ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009879fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009880rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +00009881fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009882echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
9883echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
9884if test $ac_cv_func_pthread_detach = yes; then
9885 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009886#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009887_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009888
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009889 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009890 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009891else
Guido van Rossumad678af1998-10-02 14:42:15 +00009892
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009893 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
9894 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
9895echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
9896if test "${ac_cv_header_atheos_threads_h+set}" = set; then
9897 echo $ECHO_N "(cached) $ECHO_C" >&6
9898fi
9899echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
9900echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
9901else
9902 # Is the header compilable?
9903echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
9904echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
9905cat >conftest.$ac_ext <<_ACEOF
9906#line $LINENO "configure"
9907#include "confdefs.h"
9908$ac_includes_default
9909#include <atheos/threads.h>
9910_ACEOF
9911rm -f conftest.$ac_objext
9912if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9913 (eval $ac_compile) 2>&5
9914 ac_status=$?
9915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9916 (exit $ac_status); } &&
9917 { ac_try='test -s conftest.$ac_objext'
9918 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9919 (eval $ac_try) 2>&5
9920 ac_status=$?
9921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9922 (exit $ac_status); }; }; then
9923 ac_header_compiler=yes
9924else
9925 echo "$as_me: failed program was:" >&5
9926cat conftest.$ac_ext >&5
9927ac_header_compiler=no
9928fi
9929rm -f conftest.$ac_objext conftest.$ac_ext
9930echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9931echo "${ECHO_T}$ac_header_compiler" >&6
9932
9933# Is the header present?
9934echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
9935echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
9936cat >conftest.$ac_ext <<_ACEOF
9937#line $LINENO "configure"
9938#include "confdefs.h"
9939#include <atheos/threads.h>
9940_ACEOF
9941if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9942 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9943 ac_status=$?
9944 egrep -v '^ *\+' conftest.er1 >conftest.err
9945 rm -f conftest.er1
9946 cat conftest.err >&5
9947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9948 (exit $ac_status); } >/dev/null; then
9949 if test -s conftest.err; then
9950 ac_cpp_err=$ac_c_preproc_warn_flag
9951 else
9952 ac_cpp_err=
9953 fi
9954else
9955 ac_cpp_err=yes
9956fi
9957if test -z "$ac_cpp_err"; then
9958 ac_header_preproc=yes
9959else
9960 echo "$as_me: failed program was:" >&5
9961 cat conftest.$ac_ext >&5
9962 ac_header_preproc=no
9963fi
9964rm -f conftest.err conftest.$ac_ext
9965echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9966echo "${ECHO_T}$ac_header_preproc" >&6
9967
9968# So? What about this header?
9969case $ac_header_compiler:$ac_header_preproc in
9970 yes:no )
9971 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9972echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9973 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
9974echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
9975 no:yes )
9976 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
9977echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
9978 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
9979echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
9980 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
9981echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
9982esac
9983echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
9984echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
9985if test "${ac_cv_header_atheos_threads_h+set}" = set; then
9986 echo $ECHO_N "(cached) $ECHO_C" >&6
9987else
9988 ac_cv_header_atheos_threads_h=$ac_header_preproc
9989fi
9990echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
9991echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
9992
9993fi
9994if test $ac_cv_header_atheos_threads_h = yes; then
9995 cat >>confdefs.h <<\_ACEOF
9996#define WITH_THREAD 1
9997_ACEOF
9998
9999
10000cat >>confdefs.h <<\_ACEOF
10001#define ATHEOS_THREADS 1
10002_ACEOF
10003
10004 THREADOBJ="Python/thread.o"
10005else
10006
Martin v. Löwis11437992002-04-12 09:54:03 +000010007 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10008 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10009echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10010if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10011 echo $ECHO_N "(cached) $ECHO_C" >&6
10012fi
10013echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10014echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010015else
Martin v. Löwis11437992002-04-12 09:54:03 +000010016 # Is the header compilable?
10017echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10018echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10019cat >conftest.$ac_ext <<_ACEOF
10020#line $LINENO "configure"
10021#include "confdefs.h"
10022$ac_includes_default
10023#include <kernel/OS.h>
10024_ACEOF
10025rm -f conftest.$ac_objext
10026if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10027 (eval $ac_compile) 2>&5
10028 ac_status=$?
10029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10030 (exit $ac_status); } &&
10031 { ac_try='test -s conftest.$ac_objext'
10032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10033 (eval $ac_try) 2>&5
10034 ac_status=$?
10035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10036 (exit $ac_status); }; }; then
10037 ac_header_compiler=yes
10038else
10039 echo "$as_me: failed program was:" >&5
10040cat conftest.$ac_ext >&5
10041ac_header_compiler=no
10042fi
10043rm -f conftest.$ac_objext conftest.$ac_ext
10044echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10045echo "${ECHO_T}$ac_header_compiler" >&6
10046
10047# Is the header present?
10048echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10049echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10050cat >conftest.$ac_ext <<_ACEOF
10051#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010052#include "confdefs.h"
10053#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010054_ACEOF
10055if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10056 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10057 ac_status=$?
10058 egrep -v '^ *\+' conftest.er1 >conftest.err
10059 rm -f conftest.er1
10060 cat conftest.err >&5
10061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10062 (exit $ac_status); } >/dev/null; then
10063 if test -s conftest.err; then
10064 ac_cpp_err=$ac_c_preproc_warn_flag
10065 else
10066 ac_cpp_err=
10067 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010068else
Martin v. Löwis11437992002-04-12 09:54:03 +000010069 ac_cpp_err=yes
10070fi
10071if test -z "$ac_cpp_err"; then
10072 ac_header_preproc=yes
10073else
10074 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010075 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010076 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010077fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010078rm -f conftest.err conftest.$ac_ext
10079echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10080echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010081
Martin v. Löwis11437992002-04-12 09:54:03 +000010082# So? What about this header?
10083case $ac_header_compiler:$ac_header_preproc in
10084 yes:no )
10085 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10086echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10087 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10088echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10089 no:yes )
10090 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10091echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10092 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10093echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10094 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10095echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10096esac
10097echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10098echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10099if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10100 echo $ECHO_N "(cached) $ECHO_C" >&6
10101else
10102 ac_cv_header_kernel_OS_h=$ac_header_preproc
10103fi
10104echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10105echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
10106
10107fi
10108if test $ac_cv_header_kernel_OS_h = yes; then
10109 cat >>confdefs.h <<\_ACEOF
10110#define WITH_THREAD 1
10111_ACEOF
10112
10113
10114cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010115#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010116_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010117
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010118 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010119else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010120
Martin v. Löwis11437992002-04-12 09:54:03 +000010121 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
10122echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
10123if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
10124 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010125else
Martin v. Löwis11437992002-04-12 09:54:03 +000010126 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010127LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010128cat >conftest.$ac_ext <<_ACEOF
10129#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +000010130#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010131
Greg Steinadf63d62000-07-05 10:38:09 +000010132/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010133#ifdef __cplusplus
10134extern "C"
10135#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010136/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010137 builtin and then its argument prototype would still apply. */
10138char pthread_create ();
10139#ifdef F77_DUMMY_MAIN
10140# ifdef __cplusplus
10141 extern "C"
10142# endif
10143 int F77_DUMMY_MAIN() { return 1; }
10144#endif
10145int
10146main ()
10147{
10148pthread_create ();
10149 ;
10150 return 0;
10151}
10152_ACEOF
10153rm -f conftest.$ac_objext conftest$ac_exeext
10154if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10155 (eval $ac_link) 2>&5
10156 ac_status=$?
10157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10158 (exit $ac_status); } &&
10159 { ac_try='test -s conftest$ac_exeext'
10160 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10161 (eval $ac_try) 2>&5
10162 ac_status=$?
10163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10164 (exit $ac_status); }; }; then
10165 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010166else
Martin v. Löwis11437992002-04-12 09:54:03 +000010167 echo "$as_me: failed program was:" >&5
10168cat conftest.$ac_ext >&5
10169ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010170fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010171rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10172LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010173fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010174echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10175echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10176if test $ac_cv_lib_pthreads_pthread_create = yes; then
10177 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010178#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010179_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010180
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010181 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010182 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010183 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010184else
Greg Steinadf63d62000-07-05 10:38:09 +000010185
Martin v. Löwis11437992002-04-12 09:54:03 +000010186 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10187echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10188if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10189 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010190else
Martin v. Löwis11437992002-04-12 09:54:03 +000010191 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010192LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010193cat >conftest.$ac_ext <<_ACEOF
10194#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010195#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010196
Guido van Rossum49545951997-12-02 19:28:29 +000010197/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010198#ifdef __cplusplus
10199extern "C"
10200#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010201/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010202 builtin and then its argument prototype would still apply. */
10203char pthread_create ();
10204#ifdef F77_DUMMY_MAIN
10205# ifdef __cplusplus
10206 extern "C"
10207# endif
10208 int F77_DUMMY_MAIN() { return 1; }
10209#endif
10210int
10211main ()
10212{
10213pthread_create ();
10214 ;
10215 return 0;
10216}
10217_ACEOF
10218rm -f conftest.$ac_objext conftest$ac_exeext
10219if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10220 (eval $ac_link) 2>&5
10221 ac_status=$?
10222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10223 (exit $ac_status); } &&
10224 { ac_try='test -s conftest$ac_exeext'
10225 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10226 (eval $ac_try) 2>&5
10227 ac_status=$?
10228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10229 (exit $ac_status); }; }; then
10230 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010231else
Martin v. Löwis11437992002-04-12 09:54:03 +000010232 echo "$as_me: failed program was:" >&5
10233cat conftest.$ac_ext >&5
10234ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010235fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010236rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10237LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010238fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010239echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10240echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10241if test $ac_cv_lib_c_r_pthread_create = yes; then
10242 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010243#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010244_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010245
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010246 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010247 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010248 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010249else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010250
Martin v. Löwis11437992002-04-12 09:54:03 +000010251 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
10252echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
10253if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
10254 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010255else
Martin v. Löwis11437992002-04-12 09:54:03 +000010256 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010257LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010258cat >conftest.$ac_ext <<_ACEOF
10259#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010260#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010261
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010262/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010263#ifdef __cplusplus
10264extern "C"
10265#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010266/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010267 builtin and then its argument prototype would still apply. */
10268char __d6_pthread_create ();
10269#ifdef F77_DUMMY_MAIN
10270# ifdef __cplusplus
10271 extern "C"
10272# endif
10273 int F77_DUMMY_MAIN() { return 1; }
10274#endif
10275int
10276main ()
10277{
10278__d6_pthread_create ();
10279 ;
10280 return 0;
10281}
10282_ACEOF
10283rm -f conftest.$ac_objext conftest$ac_exeext
10284if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10285 (eval $ac_link) 2>&5
10286 ac_status=$?
10287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10288 (exit $ac_status); } &&
10289 { ac_try='test -s conftest$ac_exeext'
10290 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10291 (eval $ac_try) 2>&5
10292 ac_status=$?
10293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10294 (exit $ac_status); }; }; then
10295 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010296else
Martin v. Löwis11437992002-04-12 09:54:03 +000010297 echo "$as_me: failed program was:" >&5
10298cat conftest.$ac_ext >&5
10299ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010300fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010301rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10302LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010303fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010304echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
10305echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
10306if test $ac_cv_lib_thread___d6_pthread_create = yes; then
10307 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010308#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010309_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010310
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010311 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010312 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010313 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000010314else
Guido van Rossum49545951997-12-02 19:28:29 +000010315
Martin v. Löwis11437992002-04-12 09:54:03 +000010316 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
10317echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
10318if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
10319 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010320else
Martin v. Löwis11437992002-04-12 09:54:03 +000010321 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010322LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010323cat >conftest.$ac_ext <<_ACEOF
10324#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010325#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010326
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010327/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010328#ifdef __cplusplus
10329extern "C"
10330#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010331/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010332 builtin and then its argument prototype would still apply. */
10333char __pthread_create_system ();
10334#ifdef F77_DUMMY_MAIN
10335# ifdef __cplusplus
10336 extern "C"
10337# endif
10338 int F77_DUMMY_MAIN() { return 1; }
10339#endif
10340int
10341main ()
10342{
10343__pthread_create_system ();
10344 ;
10345 return 0;
10346}
10347_ACEOF
10348rm -f conftest.$ac_objext conftest$ac_exeext
10349if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10350 (eval $ac_link) 2>&5
10351 ac_status=$?
10352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10353 (exit $ac_status); } &&
10354 { ac_try='test -s conftest$ac_exeext'
10355 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10356 (eval $ac_try) 2>&5
10357 ac_status=$?
10358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10359 (exit $ac_status); }; }; then
10360 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010361else
Martin v. Löwis11437992002-04-12 09:54:03 +000010362 echo "$as_me: failed program was:" >&5
10363cat conftest.$ac_ext >&5
10364ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010365fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010366rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10367LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010368fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010369echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10370echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
10371if test $ac_cv_lib_pthread___pthread_create_system = yes; then
10372 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010373#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010374_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010375
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010376 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010377 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010378 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010379else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010380
Martin v. Löwis11437992002-04-12 09:54:03 +000010381 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
10382echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
10383if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
10384 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010385else
Martin v. Löwis11437992002-04-12 09:54:03 +000010386 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010387LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010388cat >conftest.$ac_ext <<_ACEOF
10389#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010390#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010391
Guido van Rossumb93a8621998-05-07 13:27:32 +000010392/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010393#ifdef __cplusplus
10394extern "C"
10395#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000010396/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010397 builtin and then its argument prototype would still apply. */
10398char pthread_create ();
10399#ifdef F77_DUMMY_MAIN
10400# ifdef __cplusplus
10401 extern "C"
10402# endif
10403 int F77_DUMMY_MAIN() { return 1; }
10404#endif
10405int
10406main ()
10407{
10408pthread_create ();
10409 ;
10410 return 0;
10411}
10412_ACEOF
10413rm -f conftest.$ac_objext conftest$ac_exeext
10414if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10415 (eval $ac_link) 2>&5
10416 ac_status=$?
10417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10418 (exit $ac_status); } &&
10419 { ac_try='test -s conftest$ac_exeext'
10420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10421 (eval $ac_try) 2>&5
10422 ac_status=$?
10423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10424 (exit $ac_status); }; }; then
10425 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010426else
Martin v. Löwis11437992002-04-12 09:54:03 +000010427 echo "$as_me: failed program was:" >&5
10428cat conftest.$ac_ext >&5
10429ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010430fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010431rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10432LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010433fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010434echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
10435echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
10436if test $ac_cv_lib_cma_pthread_create = yes; then
10437 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010438#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010439_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010440
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010441 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010442 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010443 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010444else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010445
Martin v. Löwis130fb172001-07-19 11:00:41 +000010446 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010447fi
10448
Guido van Rossum627b2d71993-12-24 10:39:16 +000010449
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010450fi
10451
Guido van Rossum0be3e491997-05-22 20:33:33 +000010452fi
10453
Guido van Rossum49545951997-12-02 19:28:29 +000010454fi
10455
Guido van Rossumb93a8621998-05-07 13:27:32 +000010456fi
10457
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010458fi
10459
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010460
Michael W. Hudson54241132001-12-07 15:38:26 +000010461fi
10462
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010463
10464fi
10465
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010466fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010467rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10468fi;
10469fi
10470
10471
10472fi
10473
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010474
Michael W. Hudson54241132001-12-07 15:38:26 +000010475
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010476 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010477 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010478
10479cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010480#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010481_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010482
10483 fi
10484
Martin v. Löwis11437992002-04-12 09:54:03 +000010485 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10486echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
10487 if test "${ac_cv_pthread_system_supported+set}" = set; then
10488 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010489else
10490 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010491 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010492else
Martin v. Löwis11437992002-04-12 09:54:03 +000010493 cat >conftest.$ac_ext <<_ACEOF
10494#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010495#include "confdefs.h"
10496#include <pthread.h>
10497 void *foo(void *parm) {
10498 return NULL;
10499 }
10500 main() {
10501 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010502 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010503 if (pthread_attr_init(&attr)) exit(-1);
10504 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010505 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010506 exit(0);
10507 }
Martin v. Löwis11437992002-04-12 09:54:03 +000010508_ACEOF
10509rm -f conftest$ac_exeext
10510if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10511 (eval $ac_link) 2>&5
10512 ac_status=$?
10513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10514 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10515 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10516 (eval $ac_try) 2>&5
10517 ac_status=$?
10518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10519 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010520 ac_cv_pthread_system_supported=yes
10521else
Martin v. Löwis11437992002-04-12 09:54:03 +000010522 echo "$as_me: program exited with status $ac_status" >&5
10523echo "$as_me: failed program was:" >&5
10524cat conftest.$ac_ext >&5
10525( exit $ac_status )
10526ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010527fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010528rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010529fi
10530
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010531fi
10532
Martin v. Löwis11437992002-04-12 09:54:03 +000010533 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
10534echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010535 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010536
10537cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010538#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010539_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010540
10541 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010542
10543for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010544do
Martin v. Löwis11437992002-04-12 09:54:03 +000010545as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10546echo "$as_me:$LINENO: checking for $ac_func" >&5
10547echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10548if eval "test \"\${$as_ac_var+set}\" = set"; then
10549 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010550else
Martin v. Löwis11437992002-04-12 09:54:03 +000010551 cat >conftest.$ac_ext <<_ACEOF
10552#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010553#include "confdefs.h"
10554/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010555 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010556#include <assert.h>
10557/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010558#ifdef __cplusplus
10559extern "C"
10560#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010561/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010562 builtin and then its argument prototype would still apply. */
10563char $ac_func ();
10564char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010565
Martin v. Löwis11437992002-04-12 09:54:03 +000010566#ifdef F77_DUMMY_MAIN
10567# ifdef __cplusplus
10568 extern "C"
10569# endif
10570 int F77_DUMMY_MAIN() { return 1; }
10571#endif
10572int
10573main ()
10574{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010575/* The GNU C library defines this for functions which it implements
10576 to always fail with ENOSYS. Some functions are actually named
10577 something starting with __ and the normal name is an alias. */
10578#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10579choke me
10580#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010581f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010582#endif
10583
Martin v. Löwis11437992002-04-12 09:54:03 +000010584 ;
10585 return 0;
10586}
10587_ACEOF
10588rm -f conftest.$ac_objext conftest$ac_exeext
10589if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10590 (eval $ac_link) 2>&5
10591 ac_status=$?
10592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10593 (exit $ac_status); } &&
10594 { ac_try='test -s conftest$ac_exeext'
10595 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10596 (eval $ac_try) 2>&5
10597 ac_status=$?
10598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10599 (exit $ac_status); }; }; then
10600 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000010601else
Martin v. Löwis11437992002-04-12 09:54:03 +000010602 echo "$as_me: failed program was:" >&5
10603cat conftest.$ac_ext >&5
10604eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000010605fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010606rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010607fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010608echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10609echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10610if test `eval echo '${'$as_ac_var'}'` = yes; then
10611 cat >>confdefs.h <<_ACEOF
10612#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10613_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010614
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010615fi
10616done
10617
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010618 fi
10619
Martin v. Löwis11437992002-04-12 09:54:03 +000010620 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
10621echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
10622if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
10623 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010624else
Martin v. Löwis11437992002-04-12 09:54:03 +000010625 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010626LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010627cat >conftest.$ac_ext <<_ACEOF
10628#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010629#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010630
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010631/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010632#ifdef __cplusplus
10633extern "C"
10634#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010635/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010636 builtin and then its argument prototype would still apply. */
10637char usconfig ();
10638#ifdef F77_DUMMY_MAIN
10639# ifdef __cplusplus
10640 extern "C"
10641# endif
10642 int F77_DUMMY_MAIN() { return 1; }
10643#endif
10644int
10645main ()
10646{
10647usconfig ();
10648 ;
10649 return 0;
10650}
10651_ACEOF
10652rm -f conftest.$ac_objext conftest$ac_exeext
10653if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10654 (eval $ac_link) 2>&5
10655 ac_status=$?
10656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10657 (exit $ac_status); } &&
10658 { ac_try='test -s conftest$ac_exeext'
10659 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10660 (eval $ac_try) 2>&5
10661 ac_status=$?
10662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10663 (exit $ac_status); }; }; then
10664 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010665else
Martin v. Löwis11437992002-04-12 09:54:03 +000010666 echo "$as_me: failed program was:" >&5
10667cat conftest.$ac_ext >&5
10668ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010669fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010670rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10671LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010672fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010673echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
10674echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
10675if test $ac_cv_lib_mpc_usconfig = yes; then
10676 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010677#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010678_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010679
Martin v. Löwis130fb172001-07-19 11:00:41 +000010680 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010681 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010682 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010683fi
10684
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010685
Martin v. Löwis11437992002-04-12 09:54:03 +000010686 if test $posix_threads != "yes"; then
10687 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
10688echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
10689if test "${ac_cv_lib_thread_thr_create+set}" = set; then
10690 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010691else
Martin v. Löwis11437992002-04-12 09:54:03 +000010692 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010693LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010694cat >conftest.$ac_ext <<_ACEOF
10695#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010696#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010697
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010698/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010699#ifdef __cplusplus
10700extern "C"
10701#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010702/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010703 builtin and then its argument prototype would still apply. */
10704char thr_create ();
10705#ifdef F77_DUMMY_MAIN
10706# ifdef __cplusplus
10707 extern "C"
10708# endif
10709 int F77_DUMMY_MAIN() { return 1; }
10710#endif
10711int
10712main ()
10713{
10714thr_create ();
10715 ;
10716 return 0;
10717}
10718_ACEOF
10719rm -f conftest.$ac_objext conftest$ac_exeext
10720if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10721 (eval $ac_link) 2>&5
10722 ac_status=$?
10723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10724 (exit $ac_status); } &&
10725 { ac_try='test -s conftest$ac_exeext'
10726 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10727 (eval $ac_try) 2>&5
10728 ac_status=$?
10729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10730 (exit $ac_status); }; }; then
10731 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010732else
Martin v. Löwis11437992002-04-12 09:54:03 +000010733 echo "$as_me: failed program was:" >&5
10734cat conftest.$ac_ext >&5
10735ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010736fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010737rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10738LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010739fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010740echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
10741echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
10742if test $ac_cv_lib_thread_thr_create = yes; then
10743 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010744#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010745_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010746
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010747 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010748 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010749 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010750fi
10751
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010752 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010753
Martin v. Löwis130fb172001-07-19 11:00:41 +000010754 if test "$USE_THREAD_MODULE" != "#"
10755 then
10756 # If the above checks didn't disable threads, (at least) OSF1
10757 # needs this '-threads' argument during linking.
10758 case $ac_sys_system in
10759 OSF1) LDLAST=-threads;;
10760 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000010761 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010762fi
10763
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010764# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010765
10766
10767echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
10768echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010769# Check whether --enable-ipv6 or --disable-ipv6 was given.
10770if test "${enable_ipv6+set}" = set; then
10771 enableval="$enable_ipv6"
10772 case "$enableval" in
10773 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000010774 echo "$as_me:$LINENO: result: no" >&5
10775echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010776 ipv6=no
10777 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010778 *) echo "$as_me:$LINENO: result: yes" >&5
10779echo "${ECHO_T}yes" >&6
10780 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010781#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010782_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010783
10784 ipv6=yes
10785 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010786 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010787else
Martin v. Löwis11437992002-04-12 09:54:03 +000010788
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010789 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010790 echo "$as_me:$LINENO: result: no" >&5
10791echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010792 ipv6=no
10793
10794else
Martin v. Löwis11437992002-04-12 09:54:03 +000010795 cat >conftest.$ac_ext <<_ACEOF
10796#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010797#include "confdefs.h"
10798 /* AF_INET6 available check */
10799#include <sys/types.h>
10800#include <sys/socket.h>
10801main()
10802{
10803 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
10804 exit(1);
10805 else
10806 exit(0);
10807}
10808
Martin v. Löwis11437992002-04-12 09:54:03 +000010809_ACEOF
10810rm -f conftest$ac_exeext
10811if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10812 (eval $ac_link) 2>&5
10813 ac_status=$?
10814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10815 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10816 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10817 (eval $ac_try) 2>&5
10818 ac_status=$?
10819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10820 (exit $ac_status); }; }; then
10821 echo "$as_me:$LINENO: result: yes" >&5
10822echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010823 ipv6=yes
10824else
Martin v. Löwis11437992002-04-12 09:54:03 +000010825 echo "$as_me: program exited with status $ac_status" >&5
10826echo "$as_me: failed program was:" >&5
10827cat conftest.$ac_ext >&5
10828( exit $ac_status )
10829echo "$as_me:$LINENO: result: no" >&5
10830echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010831 ipv6=no
10832fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010833rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010834fi
10835
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010836if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010837 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
10838echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
10839 cat >conftest.$ac_ext <<_ACEOF
10840#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010841#include "confdefs.h"
10842#include <sys/types.h>
10843#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010844#ifdef F77_DUMMY_MAIN
10845# ifdef __cplusplus
10846 extern "C"
10847# endif
10848 int F77_DUMMY_MAIN() { return 1; }
10849#endif
10850int
10851main ()
10852{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010853struct sockaddr_in6 x;
10854x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010855 ;
10856 return 0;
10857}
10858_ACEOF
10859rm -f conftest.$ac_objext
10860if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10861 (eval $ac_compile) 2>&5
10862 ac_status=$?
10863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10864 (exit $ac_status); } &&
10865 { ac_try='test -s conftest.$ac_objext'
10866 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10867 (eval $ac_try) 2>&5
10868 ac_status=$?
10869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10870 (exit $ac_status); }; }; then
10871 echo "$as_me:$LINENO: result: yes" >&5
10872echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010873 ipv6=yes
10874else
Martin v. Löwis11437992002-04-12 09:54:03 +000010875 echo "$as_me: failed program was:" >&5
10876cat conftest.$ac_ext >&5
10877echo "$as_me:$LINENO: result: no" >&5
10878echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010879 ipv6=no
10880fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010881rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010882fi
10883
10884if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010885 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010886#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010887_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010888
10889fi
10890
Martin v. Löwis11437992002-04-12 09:54:03 +000010891fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010892
10893ipv6type=unknown
10894ipv6lib=none
10895ipv6trylibc=no
10896
10897if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010898 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
10899echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000010900 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10901 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010902 case $i in
10903 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000010904 cat >conftest.$ac_ext <<_ACEOF
10905#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010906#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010907
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010908#include <netinet/in.h>
10909#ifdef IPV6_INRIA_VERSION
10910yes
10911#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010912_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010913if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10914 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010915 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010916fi
10917rm -f conftest*
10918
10919 ;;
10920 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000010921 cat >conftest.$ac_ext <<_ACEOF
10922#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010923#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010924
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010925#include <netinet/in.h>
10926#ifdef __KAME__
10927yes
10928#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010929_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010930if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10931 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010932 ipv6type=$i;
10933 ipv6lib=inet6
10934 ipv6libdir=/usr/local/v6/lib
10935 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010936fi
10937rm -f conftest*
10938
10939 ;;
10940 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000010941 cat >conftest.$ac_ext <<_ACEOF
10942#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010943#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010944
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010945#include <features.h>
10946#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10947yes
10948#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010949_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010950if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10951 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010952 ipv6type=$i;
10953 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010954fi
10955rm -f conftest*
10956
10957 ;;
10958 linux-inet6)
10959 if test -d /usr/inet6; then
10960 ipv6type=$i
10961 ipv6lib=inet6
10962 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010963 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010964 fi
10965 ;;
10966 solaris)
10967 if test -f /etc/netconfig; then
10968 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
10969 ipv6type=$i
10970 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010971 fi
10972 fi
10973 ;;
10974 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000010975 cat >conftest.$ac_ext <<_ACEOF
10976#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010977#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010978
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010979#include <sys/param.h>
10980#ifdef _TOSHIBA_INET6
10981yes
10982#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010983_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010984if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10985 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010986 ipv6type=$i;
10987 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010988 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010989fi
10990rm -f conftest*
10991
10992 ;;
10993 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000010994 cat >conftest.$ac_ext <<_ACEOF
10995#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010996#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010997
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010998#include </usr/local/v6/include/sys/v6config.h>
10999#ifdef __V6D__
11000yes
11001#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011002_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011003if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11004 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011005 ipv6type=$i;
11006 ipv6lib=v6;
11007 ipv6libdir=/usr/local/v6/lib;
11008 OPT="-I/usr/local/v6/include $OPT"
11009fi
11010rm -f conftest*
11011
11012 ;;
11013 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011014 cat >conftest.$ac_ext <<_ACEOF
11015#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011016#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011017
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011018#include <sys/param.h>
11019#ifdef _ZETA_MINAMI_INET6
11020yes
11021#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011022_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011023if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11024 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011025 ipv6type=$i;
11026 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011027 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011028fi
11029rm -f conftest*
11030
11031 ;;
11032 esac
11033 if test "$ipv6type" != "unknown"; then
11034 break
11035 fi
11036 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011037 echo "$as_me:$LINENO: result: $ipv6type" >&5
11038echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011039fi
11040
11041if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11042 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11043 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11044 echo "using lib$ipv6lib"
11045 else
11046 if test $ipv6trylibc = "yes"; then
11047 echo "using libc"
11048 else
11049 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11050 echo "You need to fetch lib$ipv6lib.a from appropriate"
11051 echo 'ipv6 kit and compile beforehand.'
11052 exit 1
11053 fi
11054 fi
11055fi
11056
Jack Jansen7b8c7542002-04-14 20:12:41 +000011057# Check for universal newline support
11058echo "$as_me:$LINENO: checking for --with-universal-newline" >&5
11059echo $ECHO_N "checking for --with-universal-newline... $ECHO_C" >&6
11060
11061# Check whether --with-universal-newlines or --without-universal-newlines was given.
11062if test "${with_universal_newlines+set}" = set; then
11063 withval="$with_universal_newlines"
11064
11065fi;
11066
11067if test -z "$with_universal_newlines"
11068then with_universal_newlines="yes"
11069fi
11070if test "$with_universal_newlines" != "no"
11071then
Martin v. Löwise8aea582002-04-16 05:51:02 +000011072
11073cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011074#define WITH_UNIVERSAL_NEWLINES 1
11075_ACEOF
11076
11077fi
11078echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11079echo "${ECHO_T}$with_universal_newlines" >&6
11080
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011081# Check for --with-doc-strings
11082echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11083echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11084
11085# Check whether --with-doc-strings or --without-doc-strings was given.
11086if test "${with_doc_strings+set}" = set; then
11087 withval="$with_doc_strings"
11088
11089fi;
11090
11091if test -z "$with_doc_strings"
11092then with_doc_strings="yes"
11093fi
11094if test "$with_doc_strings" != "no"
11095then
11096
11097cat >>confdefs.h <<\_ACEOF
11098#define WITH_DOC_STRINGS 1
11099_ACEOF
11100
11101fi
11102echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11103echo "${ECHO_T}$with_doc_strings" >&6
11104
Neil Schemenauera35c6882001-02-27 04:45:05 +000011105# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011106echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11107echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11108
Neil Schemenauera35c6882001-02-27 04:45:05 +000011109# Check whether --with-pymalloc or --without-pymalloc was given.
11110if test "${with_pymalloc+set}" = set; then
11111 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011112
Martin v. Löwis11437992002-04-12 09:54:03 +000011113fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011114
Neil Schemenauer16c22972002-03-22 15:34:49 +000011115if test -z "$with_pymalloc"
11116then with_pymalloc="yes"
11117fi
11118if test "$with_pymalloc" != "no"
11119then
Martin v. Löwis11437992002-04-12 09:54:03 +000011120
11121cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011122#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011123_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011124
11125fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011126echo "$as_me:$LINENO: result: $with_pymalloc" >&5
11127echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000011128
Barry Warsawef82cd72000-06-30 16:21:01 +000011129# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011130echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
11131echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
11132
Barry Warsawef82cd72000-06-30 16:21:01 +000011133# Check whether --with-wctype-functions or --without-wctype-functions was given.
11134if test "${with_wctype_functions+set}" = set; then
11135 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000011136
Barry Warsawef82cd72000-06-30 16:21:01 +000011137if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011138then
11139
11140cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011141#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011142_ACEOF
11143
11144 echo "$as_me:$LINENO: result: yes" >&5
11145echo "${ECHO_T}yes" >&6
11146else echo "$as_me:$LINENO: result: no" >&5
11147echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011148fi
11149else
Martin v. Löwis11437992002-04-12 09:54:03 +000011150 echo "$as_me:$LINENO: result: no" >&5
11151echo "${ECHO_T}no" >&6
11152fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011153
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011154# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011155
Guido van Rossum98935bf2001-09-05 19:13:16 +000011156DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011157
Martin v. Löwis11437992002-04-12 09:54:03 +000011158echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11159echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11160
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011161# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011162if test "${with_sgi_dl+set}" = set; then
11163 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011164
11165echo "$as_me:$LINENO: result: $withval" >&5
11166echo "${ECHO_T}$withval" >&6
11167
11168cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011169#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011170_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011171
Guido van Rossume97ee181999-12-20 21:27:22 +000011172DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011173dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011174if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011175then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011176else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11177echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11178 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011179fi
11180DLINCLDIR=${dldir}
11181LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011182else
Martin v. Löwis11437992002-04-12 09:54:03 +000011183 echo "$as_me:$LINENO: result: no" >&5
11184echo "${ECHO_T}no" >&6
11185fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011186
Martin v. Löwis11437992002-04-12 09:54:03 +000011187echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11188echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011189
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011190# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011191if test "${with_dl_dld+set}" = set; then
11192 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011193
11194echo "$as_me:$LINENO: result: $withval" >&5
11195echo "${ECHO_T}$withval" >&6
11196
11197cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011198#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011199_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011200
Guido van Rossume97ee181999-12-20 21:27:22 +000011201DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011202dldir=`echo "$withval" | sed 's/,.*//'`
11203dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011204if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011205then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011206else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&5
11207echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&2;}
11208 { (exit DLD_DIRECTORY); exit DLD_DIRECTORY; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011209fi
11210DLINCLDIR=${dldir}
11211LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011212else
Martin v. Löwis11437992002-04-12 09:54:03 +000011213 echo "$as_me:$LINENO: result: no" >&5
11214echo "${ECHO_T}no" >&6
11215fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011216
Guido van Rossume97ee181999-12-20 21:27:22 +000011217# the dlopen() function means we might want to use dynload_shlib.o. some
11218# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011219
Thomas Wouters3a584202000-08-05 23:28:51 +000011220for ac_func in dlopen
11221do
Martin v. Löwis11437992002-04-12 09:54:03 +000011222as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11223echo "$as_me:$LINENO: checking for $ac_func" >&5
11224echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11225if eval "test \"\${$as_ac_var+set}\" = set"; then
11226 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011227else
Martin v. Löwis11437992002-04-12 09:54:03 +000011228 cat >conftest.$ac_ext <<_ACEOF
11229#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000011230#include "confdefs.h"
11231/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011232 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000011233#include <assert.h>
11234/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011235#ifdef __cplusplus
11236extern "C"
11237#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000011238/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011239 builtin and then its argument prototype would still apply. */
11240char $ac_func ();
11241char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000011242
Martin v. Löwis11437992002-04-12 09:54:03 +000011243#ifdef F77_DUMMY_MAIN
11244# ifdef __cplusplus
11245 extern "C"
11246# endif
11247 int F77_DUMMY_MAIN() { return 1; }
11248#endif
11249int
11250main ()
11251{
Guido van Rossume97ee181999-12-20 21:27:22 +000011252/* The GNU C library defines this for functions which it implements
11253 to always fail with ENOSYS. Some functions are actually named
11254 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011255#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000011256choke me
11257#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011258f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000011259#endif
11260
Martin v. Löwis11437992002-04-12 09:54:03 +000011261 ;
11262 return 0;
11263}
11264_ACEOF
11265rm -f conftest.$ac_objext conftest$ac_exeext
11266if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11267 (eval $ac_link) 2>&5
11268 ac_status=$?
11269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11270 (exit $ac_status); } &&
11271 { ac_try='test -s conftest$ac_exeext'
11272 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11273 (eval $ac_try) 2>&5
11274 ac_status=$?
11275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11276 (exit $ac_status); }; }; then
11277 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011278else
Martin v. Löwis11437992002-04-12 09:54:03 +000011279 echo "$as_me: failed program was:" >&5
11280cat conftest.$ac_ext >&5
11281eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011282fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011283rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011284fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011285echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11286echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11287if test `eval echo '${'$as_ac_var'}'` = yes; then
11288 cat >>confdefs.h <<_ACEOF
11289#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11290_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011291
Guido van Rossume97ee181999-12-20 21:27:22 +000011292fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011293done
Guido van Rossume97ee181999-12-20 21:27:22 +000011294
Michael W. Hudson54241132001-12-07 15:38:26 +000011295
Guido van Rossume97ee181999-12-20 21:27:22 +000011296# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11297# loading of modules.
11298
Martin v. Löwis11437992002-04-12 09:54:03 +000011299echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
11300echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011301if test -z "$DYNLOADFILE"
11302then
11303 case $ac_sys_system/$ac_sys_release in
11304 AIX*) DYNLOADFILE="dynload_aix.o";;
11305 BeOS*) DYNLOADFILE="dynload_beos.o";;
11306 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000011307 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011308 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011309 *)
11310 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11311 # out any dynamic loading
11312 if test "$ac_cv_func_dlopen" = yes
11313 then DYNLOADFILE="dynload_shlib.o"
11314 else DYNLOADFILE="dynload_stub.o"
11315 fi
11316 ;;
11317 esac
11318fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011319echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
11320echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011321if test "$DYNLOADFILE" != "dynload_stub.o"
11322then
Martin v. Löwis11437992002-04-12 09:54:03 +000011323
11324cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011325#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011326_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011327
11328fi
11329
Neil Schemenauer4e425612001-06-19 15:44:15 +000011330# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11331
Michael W. Hudson54241132001-12-07 15:38:26 +000011332
Martin v. Löwis11437992002-04-12 09:54:03 +000011333echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
11334echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011335if test -z "$MACHDEP_OBJS"
11336then
Jack Jansene578a632001-08-15 01:27:14 +000011337 MACHDEP_OBJS=$extra_machdep_objs
11338else
11339 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011340fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011341echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
11342echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011343
Guido van Rossum627b2d71993-12-24 10:39:16 +000011344# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
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
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011418
Fred Drake6b3cc522002-04-15 19:20:27 +000011419
Jack Jansen0b06be72002-06-21 14:48:38 +000011420
Martin v. Löwis244edc82001-10-04 22:44:26 +000011421for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
Fred Drake6b3cc522002-04-15 19:20:27 +000011422 fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwis606edc12002-06-13 21:09:11 +000011423 gai_strerror getgroups getlogin getpeername getpgid getpid getpwent getwd \
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011424 hstrerror inet_pton kill killpg link lstat mkfifo mknod mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +000011425 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +000011426 putenv readlink \
Martin v. Löwis61c5edf2001-10-18 04:06:00 +000011427 select setegid seteuid setgid setgroups \
Martin v. Löwis791bfda2001-07-24 06:33:08 +000011428 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Michael W. Hudson065c1a22002-06-06 13:03:44 +000011429 sigaction siginterrupt sigrelse strftime strptime symlink \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011430 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Guido van Rossumc524d952001-10-19 01:31:59 +000011431 truncate uname unsetenv waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +000011432do
Martin v. Löwis11437992002-04-12 09:54:03 +000011433as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11434echo "$as_me:$LINENO: checking for $ac_func" >&5
11435echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11436if eval "test \"\${$as_ac_var+set}\" = set"; then
11437 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011438else
Martin v. Löwis11437992002-04-12 09:54:03 +000011439 cat >conftest.$ac_ext <<_ACEOF
11440#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011441#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011442/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011443 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011444#include <assert.h>
11445/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011446#ifdef __cplusplus
11447extern "C"
11448#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011449/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011450 builtin and then its argument prototype would still apply. */
11451char $ac_func ();
11452char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011453
Martin v. Löwis11437992002-04-12 09:54:03 +000011454#ifdef F77_DUMMY_MAIN
11455# ifdef __cplusplus
11456 extern "C"
11457# endif
11458 int F77_DUMMY_MAIN() { return 1; }
11459#endif
11460int
11461main ()
11462{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011463/* The GNU C library defines this for functions which it implements
11464 to always fail with ENOSYS. Some functions are actually named
11465 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011466#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011467choke me
11468#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011469f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011470#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011471
Martin v. Löwis11437992002-04-12 09:54:03 +000011472 ;
11473 return 0;
11474}
11475_ACEOF
11476rm -f conftest.$ac_objext conftest$ac_exeext
11477if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11478 (eval $ac_link) 2>&5
11479 ac_status=$?
11480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11481 (exit $ac_status); } &&
11482 { ac_try='test -s conftest$ac_exeext'
11483 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11484 (eval $ac_try) 2>&5
11485 ac_status=$?
11486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11487 (exit $ac_status); }; }; then
11488 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011489else
Martin v. Löwis11437992002-04-12 09:54:03 +000011490 echo "$as_me: failed program was:" >&5
11491cat conftest.$ac_ext >&5
11492eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011493fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011494rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011495fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011496echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11497echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11498if test `eval echo '${'$as_ac_var'}'` = yes; then
11499 cat >>confdefs.h <<_ACEOF
11500#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11501_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011502
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011503fi
11504done
11505
Michael W. Hudson54241132001-12-07 15:38:26 +000011506
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011507# check for openpty and forkpty
11508
Martin v. Löwis11437992002-04-12 09:54:03 +000011509
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011510for ac_func in openpty
11511do
Martin v. Löwis11437992002-04-12 09:54:03 +000011512as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11513echo "$as_me:$LINENO: checking for $ac_func" >&5
11514echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11515if eval "test \"\${$as_ac_var+set}\" = set"; then
11516 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011517else
Martin v. Löwis11437992002-04-12 09:54:03 +000011518 cat >conftest.$ac_ext <<_ACEOF
11519#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011520#include "confdefs.h"
11521/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011522 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011523#include <assert.h>
11524/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011525#ifdef __cplusplus
11526extern "C"
11527#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011528/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011529 builtin and then its argument prototype would still apply. */
11530char $ac_func ();
11531char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011532
Martin v. Löwis11437992002-04-12 09:54:03 +000011533#ifdef F77_DUMMY_MAIN
11534# ifdef __cplusplus
11535 extern "C"
11536# endif
11537 int F77_DUMMY_MAIN() { return 1; }
11538#endif
11539int
11540main ()
11541{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011542/* The GNU C library defines this for functions which it implements
11543 to always fail with ENOSYS. Some functions are actually named
11544 something starting with __ and the normal name is an alias. */
11545#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11546choke me
11547#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011548f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011549#endif
11550
Martin v. Löwis11437992002-04-12 09:54:03 +000011551 ;
11552 return 0;
11553}
11554_ACEOF
11555rm -f conftest.$ac_objext conftest$ac_exeext
11556if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11557 (eval $ac_link) 2>&5
11558 ac_status=$?
11559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11560 (exit $ac_status); } &&
11561 { ac_try='test -s conftest$ac_exeext'
11562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11563 (eval $ac_try) 2>&5
11564 ac_status=$?
11565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11566 (exit $ac_status); }; }; then
11567 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011568else
Martin v. Löwis11437992002-04-12 09:54:03 +000011569 echo "$as_me: failed program was:" >&5
11570cat conftest.$ac_ext >&5
11571eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011572fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011573rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011574fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011575echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11576echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11577if test `eval echo '${'$as_ac_var'}'` = yes; then
11578 cat >>confdefs.h <<_ACEOF
11579#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11580_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011581
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011582else
Martin v. Löwis11437992002-04-12 09:54:03 +000011583 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
11584echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
11585if test "${ac_cv_lib_util_openpty+set}" = set; then
11586 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011587else
Martin v. Löwis11437992002-04-12 09:54:03 +000011588 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011589LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011590cat >conftest.$ac_ext <<_ACEOF
11591#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011592#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011593
Fred Drake8cef4cf2000-06-28 16:40:38 +000011594/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011595#ifdef __cplusplus
11596extern "C"
11597#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011598/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011599 builtin and then its argument prototype would still apply. */
11600char openpty ();
11601#ifdef F77_DUMMY_MAIN
11602# ifdef __cplusplus
11603 extern "C"
11604# endif
11605 int F77_DUMMY_MAIN() { return 1; }
11606#endif
11607int
11608main ()
11609{
11610openpty ();
11611 ;
11612 return 0;
11613}
11614_ACEOF
11615rm -f conftest.$ac_objext conftest$ac_exeext
11616if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11617 (eval $ac_link) 2>&5
11618 ac_status=$?
11619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11620 (exit $ac_status); } &&
11621 { ac_try='test -s conftest$ac_exeext'
11622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11623 (eval $ac_try) 2>&5
11624 ac_status=$?
11625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11626 (exit $ac_status); }; }; then
11627 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011628else
Martin v. Löwis11437992002-04-12 09:54:03 +000011629 echo "$as_me: failed program was:" >&5
11630cat conftest.$ac_ext >&5
11631ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011632fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011633rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11634LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011635fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011636echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
11637echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
11638if test $ac_cv_lib_util_openpty = yes; then
11639 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011640#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011641_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011642 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011643fi
11644
11645fi
11646done
11647
Martin v. Löwis11437992002-04-12 09:54:03 +000011648
Fred Drake8cef4cf2000-06-28 16:40:38 +000011649for ac_func in forkpty
11650do
Martin v. Löwis11437992002-04-12 09:54:03 +000011651as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11652echo "$as_me:$LINENO: checking for $ac_func" >&5
11653echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11654if eval "test \"\${$as_ac_var+set}\" = set"; then
11655 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011656else
Martin v. Löwis11437992002-04-12 09:54:03 +000011657 cat >conftest.$ac_ext <<_ACEOF
11658#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011659#include "confdefs.h"
11660/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011661 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000011662#include <assert.h>
11663/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011664#ifdef __cplusplus
11665extern "C"
11666#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011667/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011668 builtin and then its argument prototype would still apply. */
11669char $ac_func ();
11670char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000011671
Martin v. Löwis11437992002-04-12 09:54:03 +000011672#ifdef F77_DUMMY_MAIN
11673# ifdef __cplusplus
11674 extern "C"
11675# endif
11676 int F77_DUMMY_MAIN() { return 1; }
11677#endif
11678int
11679main ()
11680{
Fred Drake8cef4cf2000-06-28 16:40:38 +000011681/* The GNU C library defines this for functions which it implements
11682 to always fail with ENOSYS. Some functions are actually named
11683 something starting with __ and the normal name is an alias. */
11684#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11685choke me
11686#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011687f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000011688#endif
11689
Martin v. Löwis11437992002-04-12 09:54:03 +000011690 ;
11691 return 0;
11692}
11693_ACEOF
11694rm -f conftest.$ac_objext conftest$ac_exeext
11695if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11696 (eval $ac_link) 2>&5
11697 ac_status=$?
11698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11699 (exit $ac_status); } &&
11700 { ac_try='test -s conftest$ac_exeext'
11701 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11702 (eval $ac_try) 2>&5
11703 ac_status=$?
11704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11705 (exit $ac_status); }; }; then
11706 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011707else
Martin v. Löwis11437992002-04-12 09:54:03 +000011708 echo "$as_me: failed program was:" >&5
11709cat conftest.$ac_ext >&5
11710eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011711fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011712rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011713fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011714echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11715echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11716if test `eval echo '${'$as_ac_var'}'` = yes; then
11717 cat >>confdefs.h <<_ACEOF
11718#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11719_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011720
Fred Drake8cef4cf2000-06-28 16:40:38 +000011721else
Martin v. Löwis11437992002-04-12 09:54:03 +000011722 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
11723echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
11724if test "${ac_cv_lib_util_forkpty+set}" = set; then
11725 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011726else
Martin v. Löwis11437992002-04-12 09:54:03 +000011727 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011728LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011729cat >conftest.$ac_ext <<_ACEOF
11730#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011731#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011732
Fred Drake8cef4cf2000-06-28 16:40:38 +000011733/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011734#ifdef __cplusplus
11735extern "C"
11736#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011737/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011738 builtin and then its argument prototype would still apply. */
11739char forkpty ();
11740#ifdef F77_DUMMY_MAIN
11741# ifdef __cplusplus
11742 extern "C"
11743# endif
11744 int F77_DUMMY_MAIN() { return 1; }
11745#endif
11746int
11747main ()
11748{
11749forkpty ();
11750 ;
11751 return 0;
11752}
11753_ACEOF
11754rm -f conftest.$ac_objext conftest$ac_exeext
11755if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11756 (eval $ac_link) 2>&5
11757 ac_status=$?
11758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11759 (exit $ac_status); } &&
11760 { ac_try='test -s conftest$ac_exeext'
11761 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11762 (eval $ac_try) 2>&5
11763 ac_status=$?
11764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11765 (exit $ac_status); }; }; then
11766 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011767else
Martin v. Löwis11437992002-04-12 09:54:03 +000011768 echo "$as_me: failed program was:" >&5
11769cat conftest.$ac_ext >&5
11770ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011771fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011772rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11773LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011774fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011775echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
11776echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
11777if test $ac_cv_lib_util_forkpty = yes; then
11778 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011779#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011780_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011781 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011782fi
11783
11784fi
11785done
11786
Jack Jansendd19cf82001-12-06 22:36:17 +000011787
Michael W. Hudson54241132001-12-07 15:38:26 +000011788# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011789
11790
11791
11792
11793
11794
Fred Drake8cef4cf2000-06-28 16:40:38 +000011795for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
11796do
Martin v. Löwis11437992002-04-12 09:54:03 +000011797as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11798echo "$as_me:$LINENO: checking for $ac_func" >&5
11799echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11800if eval "test \"\${$as_ac_var+set}\" = set"; then
11801 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011802else
Martin v. Löwis11437992002-04-12 09:54:03 +000011803 cat >conftest.$ac_ext <<_ACEOF
11804#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011805#include "confdefs.h"
11806/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011807 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011808#include <assert.h>
11809/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011810#ifdef __cplusplus
11811extern "C"
11812#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011813/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011814 builtin and then its argument prototype would still apply. */
11815char $ac_func ();
11816char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011817
Martin v. Löwis11437992002-04-12 09:54:03 +000011818#ifdef F77_DUMMY_MAIN
11819# ifdef __cplusplus
11820 extern "C"
11821# endif
11822 int F77_DUMMY_MAIN() { return 1; }
11823#endif
11824int
11825main ()
11826{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011827/* The GNU C library defines this for functions which it implements
11828 to always fail with ENOSYS. Some functions are actually named
11829 something starting with __ and the normal name is an alias. */
11830#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11831choke me
11832#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011833f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011834#endif
11835
Martin v. Löwis11437992002-04-12 09:54:03 +000011836 ;
11837 return 0;
11838}
11839_ACEOF
11840rm -f conftest.$ac_objext conftest$ac_exeext
11841if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11842 (eval $ac_link) 2>&5
11843 ac_status=$?
11844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11845 (exit $ac_status); } &&
11846 { ac_try='test -s conftest$ac_exeext'
11847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11848 (eval $ac_try) 2>&5
11849 ac_status=$?
11850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11851 (exit $ac_status); }; }; then
11852 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011853else
Martin v. Löwis11437992002-04-12 09:54:03 +000011854 echo "$as_me: failed program was:" >&5
11855cat conftest.$ac_ext >&5
11856eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011857fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011858rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011859fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011860echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11861echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11862if test `eval echo '${'$as_ac_var'}'` = yes; then
11863 cat >>confdefs.h <<_ACEOF
11864#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11865_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011866
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011867fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011868done
11869
Michael W. Hudson54241132001-12-07 15:38:26 +000011870
Martin v. Löwis11437992002-04-12 09:54:03 +000011871
11872
11873
11874
11875
Martin v. Löwis1142de32002-03-29 16:28:31 +000011876for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000011877do
Martin v. Löwis11437992002-04-12 09:54:03 +000011878as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11879echo "$as_me:$LINENO: checking for $ac_func" >&5
11880echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11881if eval "test \"\${$as_ac_var+set}\" = set"; then
11882 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011883else
Martin v. Löwis11437992002-04-12 09:54:03 +000011884 cat >conftest.$ac_ext <<_ACEOF
11885#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011886#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011887/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011888 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011889#include <assert.h>
11890/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011891#ifdef __cplusplus
11892extern "C"
11893#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011894/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011895 builtin and then its argument prototype would still apply. */
11896char $ac_func ();
11897char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011898
Martin v. Löwis11437992002-04-12 09:54:03 +000011899#ifdef F77_DUMMY_MAIN
11900# ifdef __cplusplus
11901 extern "C"
11902# endif
11903 int F77_DUMMY_MAIN() { return 1; }
11904#endif
11905int
11906main ()
11907{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011908/* The GNU C library defines this for functions which it implements
11909 to always fail with ENOSYS. Some functions are actually named
11910 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011911#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011912choke me
11913#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011914f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011915#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011916
Martin v. Löwis11437992002-04-12 09:54:03 +000011917 ;
11918 return 0;
11919}
11920_ACEOF
11921rm -f conftest.$ac_objext conftest$ac_exeext
11922if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11923 (eval $ac_link) 2>&5
11924 ac_status=$?
11925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11926 (exit $ac_status); } &&
11927 { ac_try='test -s conftest$ac_exeext'
11928 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11929 (eval $ac_try) 2>&5
11930 ac_status=$?
11931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11932 (exit $ac_status); }; }; then
11933 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011934else
Martin v. Löwis11437992002-04-12 09:54:03 +000011935 echo "$as_me: failed program was:" >&5
11936cat conftest.$ac_ext >&5
11937eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011938fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011939rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000011940fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011941echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11942echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11943if test `eval echo '${'$as_ac_var'}'` = yes; then
11944 cat >>confdefs.h <<_ACEOF
11945#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11946_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000011947
Martin v. Löwis1142de32002-03-29 16:28:31 +000011948else
Martin v. Löwis11437992002-04-12 09:54:03 +000011949 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011950fi
11951done
11952
11953
Martin v. Löwis11437992002-04-12 09:54:03 +000011954
Martin v. Löwis1142de32002-03-29 16:28:31 +000011955for ac_func in getpgrp
11956do
Martin v. Löwis11437992002-04-12 09:54:03 +000011957as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11958echo "$as_me:$LINENO: checking for $ac_func" >&5
11959echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11960if eval "test \"\${$as_ac_var+set}\" = set"; then
11961 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000011962else
Martin v. Löwis11437992002-04-12 09:54:03 +000011963 cat >conftest.$ac_ext <<_ACEOF
11964#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011965#include "confdefs.h"
11966/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011967 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000011968#include <assert.h>
11969/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011970#ifdef __cplusplus
11971extern "C"
11972#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000011973/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011974 builtin and then its argument prototype would still apply. */
11975char $ac_func ();
11976char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000011977
Martin v. Löwis11437992002-04-12 09:54:03 +000011978#ifdef F77_DUMMY_MAIN
11979# ifdef __cplusplus
11980 extern "C"
11981# endif
11982 int F77_DUMMY_MAIN() { return 1; }
11983#endif
11984int
11985main ()
11986{
Martin v. Löwis1142de32002-03-29 16:28:31 +000011987/* The GNU C library defines this for functions which it implements
11988 to always fail with ENOSYS. Some functions are actually named
11989 something starting with __ and the normal name is an alias. */
11990#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11991choke me
11992#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011993f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000011994#endif
11995
Martin v. Löwis11437992002-04-12 09:54:03 +000011996 ;
11997 return 0;
11998}
11999_ACEOF
12000rm -f conftest.$ac_objext conftest$ac_exeext
12001if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12002 (eval $ac_link) 2>&5
12003 ac_status=$?
12004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12005 (exit $ac_status); } &&
12006 { ac_try='test -s conftest$ac_exeext'
12007 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12008 (eval $ac_try) 2>&5
12009 ac_status=$?
12010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12011 (exit $ac_status); }; }; then
12012 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012013else
Martin v. Löwis11437992002-04-12 09:54:03 +000012014 echo "$as_me: failed program was:" >&5
12015cat conftest.$ac_ext >&5
12016eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012017fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012018rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012019fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012020echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12021echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12022if test `eval echo '${'$as_ac_var'}'` = yes; then
12023 cat >>confdefs.h <<_ACEOF
12024#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12025_ACEOF
12026 cat >conftest.$ac_ext <<_ACEOF
12027#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012028#include "confdefs.h"
12029#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012030#ifdef F77_DUMMY_MAIN
12031# ifdef __cplusplus
12032 extern "C"
12033# endif
12034 int F77_DUMMY_MAIN() { return 1; }
12035#endif
12036int
12037main ()
12038{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012039getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012040 ;
12041 return 0;
12042}
12043_ACEOF
12044rm -f conftest.$ac_objext
12045if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12046 (eval $ac_compile) 2>&5
12047 ac_status=$?
12048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12049 (exit $ac_status); } &&
12050 { ac_try='test -s conftest.$ac_objext'
12051 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12052 (eval $ac_try) 2>&5
12053 ac_status=$?
12054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12055 (exit $ac_status); }; }; then
12056
12057cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012058#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012059_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012060
Martin v. Löwis11437992002-04-12 09:54:03 +000012061
Guido van Rossumf78abae1997-01-21 22:02:36 +000012062else
Martin v. Löwis11437992002-04-12 09:54:03 +000012063 echo "$as_me: failed program was:" >&5
12064cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000012065fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012066rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012067
Guido van Rossum627b2d71993-12-24 10:39:16 +000012068fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012069done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012070
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012071echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
12072echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
12073if test "${ac_cv_func_setpgrp_void+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012074 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012075else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012076 if test "$cross_compiling" = yes; then
12077 { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5
12078echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;}
12079 { (exit 1); exit 1; }; }
12080else
Martin v. Löwis11437992002-04-12 09:54:03 +000012081 cat >conftest.$ac_ext <<_ACEOF
12082#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012083#include "confdefs.h"
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012084#if HAVE_UNISTD_H
12085# include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012086#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012087
Martin v. Löwis11437992002-04-12 09:54:03 +000012088#ifdef F77_DUMMY_MAIN
12089# ifdef __cplusplus
12090 extern "C"
12091# endif
12092 int F77_DUMMY_MAIN() { return 1; }
12093#endif
12094int
12095main ()
12096{
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012097/* If this system has a BSD-style setpgrp which takes arguments,
12098 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
12099 exit successfully. */
12100 exit (setpgrp (1,1) == -1 ? 0 : 1);
Martin v. Löwis11437992002-04-12 09:54:03 +000012101 ;
12102 return 0;
12103}
12104_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012105rm -f conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000012106if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12107 (eval $ac_link) 2>&5
12108 ac_status=$?
12109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012110 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012111 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12112 (eval $ac_try) 2>&5
12113 ac_status=$?
12114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12115 (exit $ac_status); }; }; then
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012116 ac_cv_func_setpgrp_void=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012117else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012118 echo "$as_me: program exited with status $ac_status" >&5
12119echo "$as_me: failed program was:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012120cat conftest.$ac_ext >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012121( exit $ac_status )
12122ac_cv_func_setpgrp_void=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012123fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012124rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012125fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012126fi
12127echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
12128echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
12129if test $ac_cv_func_setpgrp_void = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012130
12131cat >>confdefs.h <<\_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012132#define SETPGRP_VOID 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012133_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012134
12135fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012136
Martin v. Löwis11437992002-04-12 09:54:03 +000012137
Thomas Wouters3a584202000-08-05 23:28:51 +000012138for ac_func in gettimeofday
12139do
Martin v. Löwis11437992002-04-12 09:54:03 +000012140as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12141echo "$as_me:$LINENO: checking for $ac_func" >&5
12142echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12143if eval "test \"\${$as_ac_var+set}\" = set"; then
12144 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012145else
Martin v. Löwis11437992002-04-12 09:54:03 +000012146 cat >conftest.$ac_ext <<_ACEOF
12147#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012148#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012149/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012150 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012151#include <assert.h>
12152/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012153#ifdef __cplusplus
12154extern "C"
12155#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012156/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012157 builtin and then its argument prototype would still apply. */
12158char $ac_func ();
12159char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012160
Martin v. Löwis11437992002-04-12 09:54:03 +000012161#ifdef F77_DUMMY_MAIN
12162# ifdef __cplusplus
12163 extern "C"
12164# endif
12165 int F77_DUMMY_MAIN() { return 1; }
12166#endif
12167int
12168main ()
12169{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012170/* The GNU C library defines this for functions which it implements
12171 to always fail with ENOSYS. Some functions are actually named
12172 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012173#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012174choke me
12175#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012176f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012177#endif
12178
Martin v. Löwis11437992002-04-12 09:54:03 +000012179 ;
12180 return 0;
12181}
12182_ACEOF
12183rm -f conftest.$ac_objext conftest$ac_exeext
12184if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12185 (eval $ac_link) 2>&5
12186 ac_status=$?
12187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12188 (exit $ac_status); } &&
12189 { ac_try='test -s conftest$ac_exeext'
12190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12191 (eval $ac_try) 2>&5
12192 ac_status=$?
12193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12194 (exit $ac_status); }; }; then
12195 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012196else
Martin v. Löwis11437992002-04-12 09:54:03 +000012197 echo "$as_me: failed program was:" >&5
12198cat conftest.$ac_ext >&5
12199eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012200fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012201rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012202fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012203echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12204echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12205if test `eval echo '${'$as_ac_var'}'` = yes; then
12206 cat >>confdefs.h <<_ACEOF
12207#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12208_ACEOF
12209 cat >conftest.$ac_ext <<_ACEOF
12210#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012211#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012212#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012213#ifdef F77_DUMMY_MAIN
12214# ifdef __cplusplus
12215 extern "C"
12216# endif
12217 int F77_DUMMY_MAIN() { return 1; }
12218#endif
12219int
12220main ()
12221{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012222gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012223 ;
12224 return 0;
12225}
12226_ACEOF
12227rm -f conftest.$ac_objext
12228if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12229 (eval $ac_compile) 2>&5
12230 ac_status=$?
12231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12232 (exit $ac_status); } &&
12233 { ac_try='test -s conftest.$ac_objext'
12234 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12235 (eval $ac_try) 2>&5
12236 ac_status=$?
12237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12238 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000012239 :
12240else
Martin v. Löwis11437992002-04-12 09:54:03 +000012241 echo "$as_me: failed program was:" >&5
12242cat conftest.$ac_ext >&5
12243
12244cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012245#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012246_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012247
Martin v. Löwis11437992002-04-12 09:54:03 +000012248
Guido van Rossum627b2d71993-12-24 10:39:16 +000012249fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012250rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012251
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012252fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012253done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012254
Michael W. Hudson54241132001-12-07 15:38:26 +000012255
12256
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012257# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012258# for [no]getaddrinfo in netdb.h.
12259echo "$as_me:$LINENO: checking for getaddrinfo" >&5
12260echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
12261cat >conftest.$ac_ext <<_ACEOF
12262#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012263#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012264
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012265#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012266#include <sys/socket.h>
12267#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012268#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012269
Martin v. Löwis11437992002-04-12 09:54:03 +000012270#ifdef F77_DUMMY_MAIN
12271# ifdef __cplusplus
12272 extern "C"
12273# endif
12274 int F77_DUMMY_MAIN() { return 1; }
12275#endif
12276int
12277main ()
12278{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012279
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012280getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012281
Martin v. Löwis11437992002-04-12 09:54:03 +000012282 ;
12283 return 0;
12284}
12285_ACEOF
12286rm -f conftest.$ac_objext conftest$ac_exeext
12287if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12288 (eval $ac_link) 2>&5
12289 ac_status=$?
12290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12291 (exit $ac_status); } &&
12292 { ac_try='test -s conftest$ac_exeext'
12293 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12294 (eval $ac_try) 2>&5
12295 ac_status=$?
12296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12297 (exit $ac_status); }; }; then
12298
12299echo "$as_me:$LINENO: result: yes" >&5
12300echo "${ECHO_T}yes" >&6
12301echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
12302echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012303if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012304 echo "$as_me:$LINENO: result: buggy" >&5
12305echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012306buggygetaddrinfo=yes
12307else
Martin v. Löwis11437992002-04-12 09:54:03 +000012308 cat >conftest.$ac_ext <<_ACEOF
12309#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012310#include "confdefs.h"
12311
12312#include <sys/types.h>
12313#include <netdb.h>
12314#include <string.h>
12315#include <sys/socket.h>
12316#include <netinet/in.h>
12317
12318main()
12319{
12320 int passive, gaierr, inet4 = 0, inet6 = 0;
12321 struct addrinfo hints, *ai, *aitop;
12322 char straddr[INET6_ADDRSTRLEN], strport[16];
12323
12324 for (passive = 0; passive <= 1; passive++) {
12325 memset(&hints, 0, sizeof(hints));
12326 hints.ai_family = AF_UNSPEC;
12327 hints.ai_flags = passive ? AI_PASSIVE : 0;
12328 hints.ai_socktype = SOCK_STREAM;
12329 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12330 (void)gai_strerror(gaierr);
12331 goto bad;
12332 }
12333 for (ai = aitop; ai; ai = ai->ai_next) {
12334 if (ai->ai_addr == NULL ||
12335 ai->ai_addrlen == 0 ||
12336 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12337 straddr, sizeof(straddr), strport, sizeof(strport),
12338 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12339 goto bad;
12340 }
12341 switch (ai->ai_family) {
12342 case AF_INET:
12343 if (strcmp(strport, "54321") != 0) {
12344 goto bad;
12345 }
12346 if (passive) {
12347 if (strcmp(straddr, "0.0.0.0") != 0) {
12348 goto bad;
12349 }
12350 } else {
12351 if (strcmp(straddr, "127.0.0.1") != 0) {
12352 goto bad;
12353 }
12354 }
12355 inet4++;
12356 break;
12357 case AF_INET6:
12358 if (strcmp(strport, "54321") != 0) {
12359 goto bad;
12360 }
12361 if (passive) {
12362 if (strcmp(straddr, "::") != 0) {
12363 goto bad;
12364 }
12365 } else {
12366 if (strcmp(straddr, "::1") != 0) {
12367 goto bad;
12368 }
12369 }
12370 inet6++;
12371 break;
12372 case AF_UNSPEC:
12373 goto bad;
12374 break;
12375 default:
12376 /* another family support? */
12377 break;
12378 }
12379 }
12380 }
12381
12382 if (!(inet4 == 0 || inet4 == 2))
12383 goto bad;
12384 if (!(inet6 == 0 || inet6 == 2))
12385 goto bad;
12386
12387 if (aitop)
12388 freeaddrinfo(aitop);
12389 exit(0);
12390
12391 bad:
12392 if (aitop)
12393 freeaddrinfo(aitop);
12394 exit(1);
12395}
12396
Martin v. Löwis11437992002-04-12 09:54:03 +000012397_ACEOF
12398rm -f conftest$ac_exeext
12399if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12400 (eval $ac_link) 2>&5
12401 ac_status=$?
12402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12403 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12404 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12405 (eval $ac_try) 2>&5
12406 ac_status=$?
12407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12408 (exit $ac_status); }; }; then
12409 echo "$as_me:$LINENO: result: good" >&5
12410echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012411buggygetaddrinfo=no
12412else
Martin v. Löwis11437992002-04-12 09:54:03 +000012413 echo "$as_me: program exited with status $ac_status" >&5
12414echo "$as_me: failed program was:" >&5
12415cat conftest.$ac_ext >&5
12416( exit $ac_status )
12417echo "$as_me:$LINENO: result: buggy" >&5
12418echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012419buggygetaddrinfo=yes
12420fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012421rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012422fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012423else
Martin v. Löwis11437992002-04-12 09:54:03 +000012424 echo "$as_me: failed program was:" >&5
12425cat conftest.$ac_ext >&5
12426
12427echo "$as_me:$LINENO: result: no" >&5
12428echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012429buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012430
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012431fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012432rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012433
12434if test "$buggygetaddrinfo" = "yes"; then
12435 if test "$ipv6" = "yes"; then
12436 echo 'Fatal: You must get working getaddrinfo() function.'
12437 echo ' or you can specify "--disable-ipv6"'.
12438 exit 1
12439 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012440else
Martin v. Löwis11437992002-04-12 09:54:03 +000012441
12442cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012443#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012444_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012445
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012446fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012447
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012448for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012449do
Martin v. Löwis11437992002-04-12 09:54:03 +000012450as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12451echo "$as_me:$LINENO: checking for $ac_func" >&5
12452echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12453if eval "test \"\${$as_ac_var+set}\" = set"; then
12454 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012455else
Martin v. Löwis11437992002-04-12 09:54:03 +000012456 cat >conftest.$ac_ext <<_ACEOF
12457#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012458#include "confdefs.h"
12459/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012460 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012461#include <assert.h>
12462/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012463#ifdef __cplusplus
12464extern "C"
12465#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012466/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012467 builtin and then its argument prototype would still apply. */
12468char $ac_func ();
12469char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012470
Martin v. Löwis11437992002-04-12 09:54:03 +000012471#ifdef F77_DUMMY_MAIN
12472# ifdef __cplusplus
12473 extern "C"
12474# endif
12475 int F77_DUMMY_MAIN() { return 1; }
12476#endif
12477int
12478main ()
12479{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012480/* The GNU C library defines this for functions which it implements
12481 to always fail with ENOSYS. Some functions are actually named
12482 something starting with __ and the normal name is an alias. */
12483#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12484choke me
12485#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012486f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012487#endif
12488
Martin v. Löwis11437992002-04-12 09:54:03 +000012489 ;
12490 return 0;
12491}
12492_ACEOF
12493rm -f conftest.$ac_objext conftest$ac_exeext
12494if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12495 (eval $ac_link) 2>&5
12496 ac_status=$?
12497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12498 (exit $ac_status); } &&
12499 { ac_try='test -s conftest$ac_exeext'
12500 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12501 (eval $ac_try) 2>&5
12502 ac_status=$?
12503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12504 (exit $ac_status); }; }; then
12505 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012506else
Martin v. Löwis11437992002-04-12 09:54:03 +000012507 echo "$as_me: failed program was:" >&5
12508cat conftest.$ac_ext >&5
12509eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012510fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012511rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012512fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012513echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12514echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12515if test `eval echo '${'$as_ac_var'}'` = yes; then
12516 cat >>confdefs.h <<_ACEOF
12517#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12518_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012519
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012520fi
12521done
12522
Michael W. Hudson54241132001-12-07 15:38:26 +000012523
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012524# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000012525echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
12526echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12527if test "${ac_cv_header_time+set}" = set; then
12528 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012529else
Martin v. Löwis11437992002-04-12 09:54:03 +000012530 cat >conftest.$ac_ext <<_ACEOF
12531#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012532#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012533#include <sys/types.h>
12534#include <sys/time.h>
12535#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012536
12537#ifdef F77_DUMMY_MAIN
12538# ifdef __cplusplus
12539 extern "C"
12540# endif
12541 int F77_DUMMY_MAIN() { return 1; }
12542#endif
12543int
12544main ()
12545{
12546if ((struct tm *) 0)
12547return 0;
12548 ;
12549 return 0;
12550}
12551_ACEOF
12552rm -f conftest.$ac_objext
12553if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12554 (eval $ac_compile) 2>&5
12555 ac_status=$?
12556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12557 (exit $ac_status); } &&
12558 { ac_try='test -s conftest.$ac_objext'
12559 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12560 (eval $ac_try) 2>&5
12561 ac_status=$?
12562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12563 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012564 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012565else
Martin v. Löwis11437992002-04-12 09:54:03 +000012566 echo "$as_me: failed program was:" >&5
12567cat conftest.$ac_ext >&5
12568ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012569fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012570rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012571fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012572echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
12573echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012574if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012575
12576cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012577#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012578_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012579
12580fi
12581
Martin v. Löwis11437992002-04-12 09:54:03 +000012582echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
12583echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
12584if test "${ac_cv_struct_tm+set}" = set; then
12585 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012586else
Martin v. Löwis11437992002-04-12 09:54:03 +000012587 cat >conftest.$ac_ext <<_ACEOF
12588#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012589#include "confdefs.h"
12590#include <sys/types.h>
12591#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012592
12593#ifdef F77_DUMMY_MAIN
12594# ifdef __cplusplus
12595 extern "C"
12596# endif
12597 int F77_DUMMY_MAIN() { return 1; }
12598#endif
12599int
12600main ()
12601{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012602struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000012603 ;
12604 return 0;
12605}
12606_ACEOF
12607rm -f conftest.$ac_objext
12608if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12609 (eval $ac_compile) 2>&5
12610 ac_status=$?
12611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12612 (exit $ac_status); } &&
12613 { ac_try='test -s conftest.$ac_objext'
12614 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12615 (eval $ac_try) 2>&5
12616 ac_status=$?
12617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12618 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012619 ac_cv_struct_tm=time.h
12620else
Martin v. Löwis11437992002-04-12 09:54:03 +000012621 echo "$as_me: failed program was:" >&5
12622cat conftest.$ac_ext >&5
12623ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012624fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012625rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012626fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012627echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
12628echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012629if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012630
12631cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012632#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012633_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012634
12635fi
12636
Martin v. Löwis11437992002-04-12 09:54:03 +000012637echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
12638echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
12639if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
12640 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012641else
Martin v. Löwis11437992002-04-12 09:54:03 +000012642 cat >conftest.$ac_ext <<_ACEOF
12643#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012644#include "confdefs.h"
12645#include <sys/types.h>
12646#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012647
12648
12649#ifdef F77_DUMMY_MAIN
12650# ifdef __cplusplus
12651 extern "C"
12652# endif
12653 int F77_DUMMY_MAIN() { return 1; }
12654#endif
12655int
12656main ()
12657{
12658static struct tm ac_aggr;
12659if (ac_aggr.tm_zone)
12660return 0;
12661 ;
12662 return 0;
12663}
12664_ACEOF
12665rm -f conftest.$ac_objext
12666if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12667 (eval $ac_compile) 2>&5
12668 ac_status=$?
12669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12670 (exit $ac_status); } &&
12671 { ac_try='test -s conftest.$ac_objext'
12672 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12673 (eval $ac_try) 2>&5
12674 ac_status=$?
12675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12676 (exit $ac_status); }; }; then
12677 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012678else
Martin v. Löwis11437992002-04-12 09:54:03 +000012679 echo "$as_me: failed program was:" >&5
12680cat conftest.$ac_ext >&5
12681ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012682fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012683rm -f conftest.$ac_objext conftest.$ac_ext
12684fi
12685echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
12686echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
12687if test $ac_cv_member_struct_tm_tm_zone = yes; then
12688
12689cat >>confdefs.h <<_ACEOF
12690#define HAVE_STRUCT_TM_TM_ZONE 1
12691_ACEOF
12692
12693
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012694fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012695
Martin v. Löwis11437992002-04-12 09:54:03 +000012696if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12697
12698cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012699#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012700_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012701
12702else
Martin v. Löwis11437992002-04-12 09:54:03 +000012703 echo "$as_me:$LINENO: checking for tzname" >&5
12704echo $ECHO_N "checking for tzname... $ECHO_C" >&6
12705if test "${ac_cv_var_tzname+set}" = set; then
12706 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012707else
Martin v. Löwis11437992002-04-12 09:54:03 +000012708 cat >conftest.$ac_ext <<_ACEOF
12709#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012710#include "confdefs.h"
12711#include <time.h>
12712#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012713extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012714#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012715
12716#ifdef F77_DUMMY_MAIN
12717# ifdef __cplusplus
12718 extern "C"
12719# endif
12720 int F77_DUMMY_MAIN() { return 1; }
12721#endif
12722int
12723main ()
12724{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012725atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000012726 ;
12727 return 0;
12728}
12729_ACEOF
12730rm -f conftest.$ac_objext conftest$ac_exeext
12731if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12732 (eval $ac_link) 2>&5
12733 ac_status=$?
12734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12735 (exit $ac_status); } &&
12736 { ac_try='test -s conftest$ac_exeext'
12737 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12738 (eval $ac_try) 2>&5
12739 ac_status=$?
12740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12741 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012742 ac_cv_var_tzname=yes
12743else
Martin v. Löwis11437992002-04-12 09:54:03 +000012744 echo "$as_me: failed program was:" >&5
12745cat conftest.$ac_ext >&5
12746ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012747fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012748rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012749fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012750echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
12751echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012752 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012753
12754cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012755#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012756_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012757
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012758 fi
12759fi
12760
Jack Jansendd19cf82001-12-06 22:36:17 +000012761
Martin v. Löwis11437992002-04-12 09:54:03 +000012762echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
12763echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
12764if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
12765 echo $ECHO_N "(cached) $ECHO_C" >&6
12766else
12767 cat >conftest.$ac_ext <<_ACEOF
12768#line $LINENO "configure"
12769#include "confdefs.h"
12770$ac_includes_default
12771#ifdef F77_DUMMY_MAIN
12772# ifdef __cplusplus
12773 extern "C"
12774# endif
12775 int F77_DUMMY_MAIN() { return 1; }
12776#endif
12777int
12778main ()
12779{
12780static struct stat ac_aggr;
12781if (ac_aggr.st_rdev)
12782return 0;
12783 ;
12784 return 0;
12785}
12786_ACEOF
12787rm -f conftest.$ac_objext
12788if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12789 (eval $ac_compile) 2>&5
12790 ac_status=$?
12791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12792 (exit $ac_status); } &&
12793 { ac_try='test -s conftest.$ac_objext'
12794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12795 (eval $ac_try) 2>&5
12796 ac_status=$?
12797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12798 (exit $ac_status); }; }; then
12799 ac_cv_member_struct_stat_st_rdev=yes
12800else
12801 echo "$as_me: failed program was:" >&5
12802cat conftest.$ac_ext >&5
12803ac_cv_member_struct_stat_st_rdev=no
12804fi
12805rm -f conftest.$ac_objext conftest.$ac_ext
12806fi
12807echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
12808echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
12809if test $ac_cv_member_struct_stat_st_rdev = yes; then
12810
12811cat >>confdefs.h <<_ACEOF
12812#define HAVE_STRUCT_STAT_ST_RDEV 1
12813_ACEOF
12814
12815
12816cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012817#define HAVE_ST_RDEV 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012818_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012819
12820fi
12821
Martin v. Löwis11437992002-04-12 09:54:03 +000012822
12823
12824echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
12825echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
12826if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
12827 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012828else
Martin v. Löwis11437992002-04-12 09:54:03 +000012829 cat >conftest.$ac_ext <<_ACEOF
12830#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012831#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012832$ac_includes_default
12833#ifdef F77_DUMMY_MAIN
12834# ifdef __cplusplus
12835 extern "C"
12836# endif
12837 int F77_DUMMY_MAIN() { return 1; }
12838#endif
12839int
12840main ()
12841{
12842static struct stat ac_aggr;
12843if (ac_aggr.st_blksize)
12844return 0;
12845 ;
12846 return 0;
12847}
12848_ACEOF
12849rm -f conftest.$ac_objext
12850if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12851 (eval $ac_compile) 2>&5
12852 ac_status=$?
12853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12854 (exit $ac_status); } &&
12855 { ac_try='test -s conftest.$ac_objext'
12856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12857 (eval $ac_try) 2>&5
12858 ac_status=$?
12859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12860 (exit $ac_status); }; }; then
12861 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012862else
Martin v. Löwis11437992002-04-12 09:54:03 +000012863 echo "$as_me: failed program was:" >&5
12864cat conftest.$ac_ext >&5
12865ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012866fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012867rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012868fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012869echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
12870echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
12871if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000012872
Martin v. Löwis11437992002-04-12 09:54:03 +000012873cat >>confdefs.h <<_ACEOF
12874#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12875_ACEOF
12876
12877
12878cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012879#define HAVE_ST_BLKSIZE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012880_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012881
12882fi
12883
Martin v. Löwis11437992002-04-12 09:54:03 +000012884
12885echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
12886echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
12887if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
12888 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012889else
Martin v. Löwis11437992002-04-12 09:54:03 +000012890 cat >conftest.$ac_ext <<_ACEOF
12891#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012892#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012893$ac_includes_default
12894#ifdef F77_DUMMY_MAIN
12895# ifdef __cplusplus
12896 extern "C"
12897# endif
12898 int F77_DUMMY_MAIN() { return 1; }
12899#endif
12900int
12901main ()
12902{
12903static struct stat ac_aggr;
12904if (ac_aggr.st_blocks)
12905return 0;
12906 ;
12907 return 0;
12908}
12909_ACEOF
12910rm -f conftest.$ac_objext
12911if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12912 (eval $ac_compile) 2>&5
12913 ac_status=$?
12914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12915 (exit $ac_status); } &&
12916 { ac_try='test -s conftest.$ac_objext'
12917 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12918 (eval $ac_try) 2>&5
12919 ac_status=$?
12920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12921 (exit $ac_status); }; }; then
12922 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012923else
Martin v. Löwis11437992002-04-12 09:54:03 +000012924 echo "$as_me: failed program was:" >&5
12925cat conftest.$ac_ext >&5
12926ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012927fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012928rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012929fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012930echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
12931echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
12932if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000012933
Martin v. Löwis11437992002-04-12 09:54:03 +000012934cat >>confdefs.h <<_ACEOF
12935#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12936_ACEOF
12937
12938
12939cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012940#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012941_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012942
12943else
Martin v. Löwis11437992002-04-12 09:54:03 +000012944 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012945fi
12946
Michael W. Hudson54241132001-12-07 15:38:26 +000012947
Martin v. Löwis11437992002-04-12 09:54:03 +000012948
12949echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
12950echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
12951if test "${ac_cv_header_time_altzone+set}" = set; then
12952 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012953else
Martin v. Löwis11437992002-04-12 09:54:03 +000012954 cat >conftest.$ac_ext <<_ACEOF
12955#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012956#include "confdefs.h"
12957#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012958#ifdef F77_DUMMY_MAIN
12959# ifdef __cplusplus
12960 extern "C"
12961# endif
12962 int F77_DUMMY_MAIN() { return 1; }
12963#endif
12964int
12965main ()
12966{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012967return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012968 ;
12969 return 0;
12970}
12971_ACEOF
12972rm -f conftest.$ac_objext
12973if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12974 (eval $ac_compile) 2>&5
12975 ac_status=$?
12976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12977 (exit $ac_status); } &&
12978 { ac_try='test -s conftest.$ac_objext'
12979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12980 (eval $ac_try) 2>&5
12981 ac_status=$?
12982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12983 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012984 ac_cv_header_time_altzone=yes
12985else
Martin v. Löwis11437992002-04-12 09:54:03 +000012986 echo "$as_me: failed program was:" >&5
12987cat conftest.$ac_ext >&5
12988ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012989fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012990rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012991fi
12992
Martin v. Löwis11437992002-04-12 09:54:03 +000012993echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
12994echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012995if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012996
12997cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012998#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012999_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013000
13001fi
13002
Guido van Rossumda88dad1995-01-26 00:46:29 +000013003was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013004echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
13005echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
13006cat >conftest.$ac_ext <<_ACEOF
13007#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013008#include "confdefs.h"
13009
13010#include <sys/types.h>
13011#include <sys/select.h>
13012#include <sys/time.h>
13013
Martin v. Löwis11437992002-04-12 09:54:03 +000013014#ifdef F77_DUMMY_MAIN
13015# ifdef __cplusplus
13016 extern "C"
13017# endif
13018 int F77_DUMMY_MAIN() { return 1; }
13019#endif
13020int
13021main ()
13022{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013023;
Martin v. Löwis11437992002-04-12 09:54:03 +000013024 ;
13025 return 0;
13026}
13027_ACEOF
13028rm -f conftest.$ac_objext
13029if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13030 (eval $ac_compile) 2>&5
13031 ac_status=$?
13032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13033 (exit $ac_status); } &&
13034 { ac_try='test -s conftest.$ac_objext'
13035 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13036 (eval $ac_try) 2>&5
13037 ac_status=$?
13038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13039 (exit $ac_status); }; }; then
13040
13041
13042cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013043#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013044_ACEOF
13045
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013046 was_it_defined=yes
13047
Guido van Rossumf78abae1997-01-21 22:02:36 +000013048else
Martin v. Löwis11437992002-04-12 09:54:03 +000013049 echo "$as_me: failed program was:" >&5
13050cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013051fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013052rm -f conftest.$ac_objext conftest.$ac_ext
13053echo "$as_me:$LINENO: result: $was_it_defined" >&5
13054echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013055
Martin v. Löwis11437992002-04-12 09:54:03 +000013056echo "$as_me:$LINENO: checking for addrinfo" >&5
13057echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
13058if test "${ac_cv_struct_addrinfo+set}" = set; then
13059 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013060else
Martin v. Löwis11437992002-04-12 09:54:03 +000013061 cat >conftest.$ac_ext <<_ACEOF
13062#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013063#include "confdefs.h"
13064
13065# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013066#ifdef F77_DUMMY_MAIN
13067# ifdef __cplusplus
13068 extern "C"
13069# endif
13070 int F77_DUMMY_MAIN() { return 1; }
13071#endif
13072int
13073main ()
13074{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013075struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013076 ;
13077 return 0;
13078}
13079_ACEOF
13080rm -f conftest.$ac_objext
13081if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13082 (eval $ac_compile) 2>&5
13083 ac_status=$?
13084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13085 (exit $ac_status); } &&
13086 { ac_try='test -s conftest.$ac_objext'
13087 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13088 (eval $ac_try) 2>&5
13089 ac_status=$?
13090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13091 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013092 ac_cv_struct_addrinfo=yes
13093else
Martin v. Löwis11437992002-04-12 09:54:03 +000013094 echo "$as_me: failed program was:" >&5
13095cat conftest.$ac_ext >&5
13096ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013097fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013098rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013099fi
13100
Martin v. Löwis11437992002-04-12 09:54:03 +000013101echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
13102echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013103if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013104
13105cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013106#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013107_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013108
13109fi
13110
Martin v. Löwis11437992002-04-12 09:54:03 +000013111echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
13112echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
13113if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
13114 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013115else
Martin v. Löwis11437992002-04-12 09:54:03 +000013116 cat >conftest.$ac_ext <<_ACEOF
13117#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013118#include "confdefs.h"
13119
13120# include <sys/types.h>
13121# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013122#ifdef F77_DUMMY_MAIN
13123# ifdef __cplusplus
13124 extern "C"
13125# endif
13126 int F77_DUMMY_MAIN() { return 1; }
13127#endif
13128int
13129main ()
13130{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013131struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013132 ;
13133 return 0;
13134}
13135_ACEOF
13136rm -f conftest.$ac_objext
13137if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13138 (eval $ac_compile) 2>&5
13139 ac_status=$?
13140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13141 (exit $ac_status); } &&
13142 { ac_try='test -s conftest.$ac_objext'
13143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13144 (eval $ac_try) 2>&5
13145 ac_status=$?
13146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13147 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013148 ac_cv_struct_sockaddr_storage=yes
13149else
Martin v. Löwis11437992002-04-12 09:54:03 +000013150 echo "$as_me: failed program was:" >&5
13151cat conftest.$ac_ext >&5
13152ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013153fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013154rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013155fi
13156
Martin v. Löwis11437992002-04-12 09:54:03 +000013157echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
13158echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013159if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013160
13161cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013162#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013163_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013164
13165fi
13166
Guido van Rossum627b2d71993-12-24 10:39:16 +000013167# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013168
Michael W. Hudson54241132001-12-07 15:38:26 +000013169
Martin v. Löwis11437992002-04-12 09:54:03 +000013170echo "$as_me:$LINENO: checking whether char is unsigned" >&5
13171echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
13172if test "${ac_cv_c_char_unsigned+set}" = set; then
13173 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013174else
Martin v. Löwis11437992002-04-12 09:54:03 +000013175 cat >conftest.$ac_ext <<_ACEOF
13176#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000013177#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013178$ac_includes_default
13179#ifdef F77_DUMMY_MAIN
13180# ifdef __cplusplus
13181 extern "C"
13182# endif
13183 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013184#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013185int
13186main ()
13187{
13188static int test_array [1 - 2 * !(((char) -1) < 0)];
13189test_array [0] = 0
13190
13191 ;
13192 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013193}
Martin v. Löwis11437992002-04-12 09:54:03 +000013194_ACEOF
13195rm -f conftest.$ac_objext
13196if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13197 (eval $ac_compile) 2>&5
13198 ac_status=$?
13199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13200 (exit $ac_status); } &&
13201 { ac_try='test -s conftest.$ac_objext'
13202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13203 (eval $ac_try) 2>&5
13204 ac_status=$?
13205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13206 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000013207 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013208else
13209 echo "$as_me: failed program was:" >&5
13210cat conftest.$ac_ext >&5
13211ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013212fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013213rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013214fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013215echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
13216echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013217if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013218 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013219#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013220_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013221
13222fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013223
Martin v. Löwis11437992002-04-12 09:54:03 +000013224echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
13225echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13226if test "${ac_cv_prog_cc_stdc+set}" = set; then
13227 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013228else
Martin v. Löwis11437992002-04-12 09:54:03 +000013229 ac_cv_prog_cc_stdc=no
13230ac_save_CC=$CC
13231cat >conftest.$ac_ext <<_ACEOF
13232#line $LINENO "configure"
13233#include "confdefs.h"
13234#include <stdarg.h>
13235#include <stdio.h>
13236#include <sys/types.h>
13237#include <sys/stat.h>
13238/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
13239struct buf { int x; };
13240FILE * (*rcsopen) (struct buf *, struct stat *, int);
13241static char *e (p, i)
13242 char **p;
13243 int i;
13244{
13245 return p[i];
13246}
13247static char *f (char * (*g) (char **, int), char **p, ...)
13248{
13249 char *s;
13250 va_list v;
13251 va_start (v,p);
13252 s = g (p, va_arg (v,int));
13253 va_end (v);
13254 return s;
13255}
13256int test (int i, double x);
13257struct s1 {int (*f) (int a);};
13258struct s2 {int (*f) (double a);};
13259int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13260int argc;
13261char **argv;
13262#ifdef F77_DUMMY_MAIN
13263# ifdef __cplusplus
13264 extern "C"
13265# endif
13266 int F77_DUMMY_MAIN() { return 1; }
13267#endif
13268int
13269main ()
13270{
13271return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
13272 ;
13273 return 0;
13274}
13275_ACEOF
13276# Don't try gcc -ansi; that turns off useful extensions and
13277# breaks some systems' header files.
13278# AIX -qlanglvl=ansi
13279# Ultrix and OSF/1 -std1
13280# HP-UX 10.20 and later -Ae
13281# HP-UX older versions -Aa -D_HPUX_SOURCE
13282# SVR4 -Xc -D__EXTENSIONS__
13283for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13284do
13285 CC="$ac_save_CC $ac_arg"
13286 rm -f conftest.$ac_objext
13287if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13288 (eval $ac_compile) 2>&5
13289 ac_status=$?
13290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13291 (exit $ac_status); } &&
13292 { ac_try='test -s conftest.$ac_objext'
13293 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13294 (eval $ac_try) 2>&5
13295 ac_status=$?
13296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13297 (exit $ac_status); }; }; then
13298 ac_cv_prog_cc_stdc=$ac_arg
13299break
13300else
13301 echo "$as_me: failed program was:" >&5
13302cat conftest.$ac_ext >&5
13303fi
13304rm -f conftest.$ac_objext
13305done
13306rm -f conftest.$ac_ext conftest.$ac_objext
13307CC=$ac_save_CC
13308
13309fi
13310
13311case "x$ac_cv_prog_cc_stdc" in
13312 x|xno)
13313 echo "$as_me:$LINENO: result: none needed" >&5
13314echo "${ECHO_T}none needed" >&6 ;;
13315 *)
13316 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
13317echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13318 CC="$CC $ac_cv_prog_cc_stdc" ;;
13319esac
13320
13321echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
13322echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13323if test "${ac_cv_c_const+set}" = set; then
13324 echo $ECHO_N "(cached) $ECHO_C" >&6
13325else
13326 cat >conftest.$ac_ext <<_ACEOF
13327#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013328#include "confdefs.h"
13329
Martin v. Löwis11437992002-04-12 09:54:03 +000013330#ifdef F77_DUMMY_MAIN
13331# ifdef __cplusplus
13332 extern "C"
13333# endif
13334 int F77_DUMMY_MAIN() { return 1; }
13335#endif
13336int
13337main ()
13338{
13339/* FIXME: Include the comments suggested by Paul. */
13340#ifndef __cplusplus
13341 /* Ultrix mips cc rejects this. */
13342 typedef int charset[2];
13343 const charset x;
13344 /* SunOS 4.1.1 cc rejects this. */
13345 char const *const *ccp;
13346 char **p;
13347 /* NEC SVR4.0.2 mips cc rejects this. */
13348 struct point {int x, y;};
13349 static struct point const zero = {0,0};
13350 /* AIX XL C 1.02.0.0 rejects this.
13351 It does not let you subtract one const X* pointer from another in
13352 an arm of an if-expression whose if-part is not a constant
13353 expression */
13354 const char *g = "string";
13355 ccp = &g + (g ? g-g : 0);
13356 /* HPUX 7.0 cc rejects these. */
13357 ++ccp;
13358 p = (char**) ccp;
13359 ccp = (char const *const *) p;
13360 { /* SCO 3.2v4 cc rejects this. */
13361 char *t;
13362 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013363
Martin v. Löwis11437992002-04-12 09:54:03 +000013364 *t++ = 0;
13365 }
13366 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13367 int x[] = {25, 17};
13368 const int *foo = &x[0];
13369 ++foo;
13370 }
13371 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13372 typedef const int *iptr;
13373 iptr p = 0;
13374 ++p;
13375 }
13376 { /* AIX XL C 1.02.0.0 rejects this saying
13377 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13378 struct s { int j; const int *ap[3]; };
13379 struct s *b; b->j = 5;
13380 }
13381 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13382 const int foo = 10;
13383 }
13384#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013385
Martin v. Löwis11437992002-04-12 09:54:03 +000013386 ;
13387 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013388}
Martin v. Löwis11437992002-04-12 09:54:03 +000013389_ACEOF
13390rm -f conftest.$ac_objext
13391if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13392 (eval $ac_compile) 2>&5
13393 ac_status=$?
13394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13395 (exit $ac_status); } &&
13396 { ac_try='test -s conftest.$ac_objext'
13397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13398 (eval $ac_try) 2>&5
13399 ac_status=$?
13400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13401 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013402 ac_cv_c_const=yes
13403else
Martin v. Löwis11437992002-04-12 09:54:03 +000013404 echo "$as_me: failed program was:" >&5
13405cat conftest.$ac_ext >&5
13406ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013407fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013408rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013409fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013410echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
13411echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013412if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013413
13414cat >>confdefs.h <<\_ACEOF
13415#define const
13416_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013417
13418fi
13419
Michael W. Hudson54241132001-12-07 15:38:26 +000013420
Guido van Rossumda88dad1995-01-26 00:46:29 +000013421works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013422echo "$as_me:$LINENO: checking for working volatile" >&5
13423echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
13424cat >conftest.$ac_ext <<_ACEOF
13425#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013426#include "confdefs.h"
13427
Martin v. Löwis11437992002-04-12 09:54:03 +000013428#ifdef F77_DUMMY_MAIN
13429# ifdef __cplusplus
13430 extern "C"
13431# endif
13432 int F77_DUMMY_MAIN() { return 1; }
13433#endif
13434int
13435main ()
13436{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013437volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013438 ;
13439 return 0;
13440}
13441_ACEOF
13442rm -f conftest.$ac_objext
13443if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13444 (eval $ac_compile) 2>&5
13445 ac_status=$?
13446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13447 (exit $ac_status); } &&
13448 { ac_try='test -s conftest.$ac_objext'
13449 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13450 (eval $ac_try) 2>&5
13451 ac_status=$?
13452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13453 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013454 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013455else
Martin v. Löwis11437992002-04-12 09:54:03 +000013456 echo "$as_me: failed program was:" >&5
13457cat conftest.$ac_ext >&5
13458
13459cat >>confdefs.h <<\_ACEOF
13460#define volatile
13461_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013462
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013463
Guido van Rossum627b2d71993-12-24 10:39:16 +000013464fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013465rm -f conftest.$ac_objext conftest.$ac_ext
13466echo "$as_me:$LINENO: result: $works" >&5
13467echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013468
Guido van Rossumda88dad1995-01-26 00:46:29 +000013469works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013470echo "$as_me:$LINENO: checking for working signed char" >&5
13471echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
13472cat >conftest.$ac_ext <<_ACEOF
13473#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013474#include "confdefs.h"
13475
Martin v. Löwis11437992002-04-12 09:54:03 +000013476#ifdef F77_DUMMY_MAIN
13477# ifdef __cplusplus
13478 extern "C"
13479# endif
13480 int F77_DUMMY_MAIN() { return 1; }
13481#endif
13482int
13483main ()
13484{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013485signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013486 ;
13487 return 0;
13488}
13489_ACEOF
13490rm -f conftest.$ac_objext
13491if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13492 (eval $ac_compile) 2>&5
13493 ac_status=$?
13494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13495 (exit $ac_status); } &&
13496 { ac_try='test -s conftest.$ac_objext'
13497 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13498 (eval $ac_try) 2>&5
13499 ac_status=$?
13500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13501 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013502 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013503else
Martin v. Löwis11437992002-04-12 09:54:03 +000013504 echo "$as_me: failed program was:" >&5
13505cat conftest.$ac_ext >&5
13506
13507cat >>confdefs.h <<\_ACEOF
13508#define signed
13509_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000013510
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013511
Guido van Rossum7f43da71994-08-01 12:15:30 +000013512fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013513rm -f conftest.$ac_objext conftest.$ac_ext
13514echo "$as_me:$LINENO: result: $works" >&5
13515echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013516
Guido van Rossumda88dad1995-01-26 00:46:29 +000013517have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013518echo "$as_me:$LINENO: checking for prototypes" >&5
13519echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
13520cat >conftest.$ac_ext <<_ACEOF
13521#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013522#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013523int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013524#ifdef F77_DUMMY_MAIN
13525# ifdef __cplusplus
13526 extern "C"
13527# endif
13528 int F77_DUMMY_MAIN() { return 1; }
13529#endif
13530int
13531main ()
13532{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013533return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013534 ;
13535 return 0;
13536}
13537_ACEOF
13538rm -f conftest.$ac_objext
13539if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13540 (eval $ac_compile) 2>&5
13541 ac_status=$?
13542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13543 (exit $ac_status); } &&
13544 { ac_try='test -s conftest.$ac_objext'
13545 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13546 (eval $ac_try) 2>&5
13547 ac_status=$?
13548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13549 (exit $ac_status); }; }; then
13550
13551
13552cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013553#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013554_ACEOF
13555
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013556 have_prototypes=yes
13557
Guido van Rossumf78abae1997-01-21 22:02:36 +000013558else
Martin v. Löwis11437992002-04-12 09:54:03 +000013559 echo "$as_me: failed program was:" >&5
13560cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013561fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013562rm -f conftest.$ac_objext conftest.$ac_ext
13563echo "$as_me:$LINENO: result: $have_prototypes" >&5
13564echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013565
Guido van Rossumda88dad1995-01-26 00:46:29 +000013566works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013567echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
13568echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
13569cat >conftest.$ac_ext <<_ACEOF
13570#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013571#include "confdefs.h"
13572
13573#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013574int foo(int x, ...) {
13575 va_list va;
13576 va_start(va, x);
13577 va_arg(va, int);
13578 va_arg(va, char *);
13579 va_arg(va, double);
13580 return 0;
13581}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013582
Martin v. Löwis11437992002-04-12 09:54:03 +000013583#ifdef F77_DUMMY_MAIN
13584# ifdef __cplusplus
13585 extern "C"
13586# endif
13587 int F77_DUMMY_MAIN() { return 1; }
13588#endif
13589int
13590main ()
13591{
Guido van Rossum90eea071996-08-30 20:58:57 +000013592return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013593 ;
13594 return 0;
13595}
13596_ACEOF
13597rm -f conftest.$ac_objext
13598if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13599 (eval $ac_compile) 2>&5
13600 ac_status=$?
13601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13602 (exit $ac_status); } &&
13603 { ac_try='test -s conftest.$ac_objext'
13604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13605 (eval $ac_try) 2>&5
13606 ac_status=$?
13607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13608 (exit $ac_status); }; }; then
13609
13610
13611cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013612#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013613_ACEOF
13614
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013615 works=yes
13616
Guido van Rossumf78abae1997-01-21 22:02:36 +000013617else
Martin v. Löwis11437992002-04-12 09:54:03 +000013618 echo "$as_me: failed program was:" >&5
13619cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000013620fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013621rm -f conftest.$ac_objext conftest.$ac_ext
13622echo "$as_me:$LINENO: result: $works" >&5
13623echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013624
Guido van Rossumda88dad1995-01-26 00:46:29 +000013625if test "$have_prototypes" = yes; then
13626bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013627echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
13628echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
13629cat >conftest.$ac_ext <<_ACEOF
13630#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013631#include "confdefs.h"
13632#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013633#ifdef F77_DUMMY_MAIN
13634# ifdef __cplusplus
13635 extern "C"
13636# endif
13637 int F77_DUMMY_MAIN() { return 1; }
13638#endif
13639int
13640main ()
13641{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013642char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000013643 ;
13644 return 0;
13645}
13646_ACEOF
13647rm -f conftest.$ac_objext
13648if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13649 (eval $ac_compile) 2>&5
13650 ac_status=$?
13651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13652 (exit $ac_status); } &&
13653 { ac_try='test -s conftest.$ac_objext'
13654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13655 (eval $ac_try) 2>&5
13656 ac_status=$?
13657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13658 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000013659 :
13660else
Martin v. Löwis11437992002-04-12 09:54:03 +000013661 echo "$as_me: failed program was:" >&5
13662cat conftest.$ac_ext >&5
13663
13664cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013665#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013666_ACEOF
13667
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013668 bad_prototypes=yes
13669
Guido van Rossum627b2d71993-12-24 10:39:16 +000013670fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013671rm -f conftest.$ac_objext conftest.$ac_ext
13672echo "$as_me:$LINENO: result: $bad_prototypes" >&5
13673echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013674fi
13675
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013676# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000013677echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
13678echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
13679cat >conftest.$ac_ext <<_ACEOF
13680#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013681#include "confdefs.h"
13682#include <sys/types.h>
13683#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013684#ifdef F77_DUMMY_MAIN
13685# ifdef __cplusplus
13686 extern "C"
13687# endif
13688 int F77_DUMMY_MAIN() { return 1; }
13689#endif
13690int
13691main ()
13692{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013693struct sockaddr x;
13694x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013695 ;
13696 return 0;
13697}
13698_ACEOF
13699rm -f conftest.$ac_objext
13700if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13701 (eval $ac_compile) 2>&5
13702 ac_status=$?
13703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13704 (exit $ac_status); } &&
13705 { ac_try='test -s conftest.$ac_objext'
13706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13707 (eval $ac_try) 2>&5
13708 ac_status=$?
13709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13710 (exit $ac_status); }; }; then
13711 echo "$as_me:$LINENO: result: yes" >&5
13712echo "${ECHO_T}yes" >&6
13713
13714cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013715#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013716_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013717
13718else
Martin v. Löwis11437992002-04-12 09:54:03 +000013719 echo "$as_me: failed program was:" >&5
13720cat conftest.$ac_ext >&5
13721echo "$as_me:$LINENO: result: no" >&5
13722echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013723fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013724rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013725
Guido van Rossumda88dad1995-01-26 00:46:29 +000013726va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013727echo "$as_me:$LINENO: checking whether va_list is an array" >&5
13728echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
13729cat >conftest.$ac_ext <<_ACEOF
13730#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013731#include "confdefs.h"
13732
13733#ifdef HAVE_STDARG_PROTOTYPES
13734#include <stdarg.h>
13735#else
13736#include <varargs.h>
13737#endif
13738
Martin v. Löwis11437992002-04-12 09:54:03 +000013739#ifdef F77_DUMMY_MAIN
13740# ifdef __cplusplus
13741 extern "C"
13742# endif
13743 int F77_DUMMY_MAIN() { return 1; }
13744#endif
13745int
13746main ()
13747{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013748va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013749 ;
13750 return 0;
13751}
13752_ACEOF
13753rm -f conftest.$ac_objext
13754if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13755 (eval $ac_compile) 2>&5
13756 ac_status=$?
13757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13758 (exit $ac_status); } &&
13759 { ac_try='test -s conftest.$ac_objext'
13760 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13761 (eval $ac_try) 2>&5
13762 ac_status=$?
13763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13764 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013765 :
13766else
Martin v. Löwis11437992002-04-12 09:54:03 +000013767 echo "$as_me: failed program was:" >&5
13768cat conftest.$ac_ext >&5
13769
13770
13771cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013772#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013773_ACEOF
13774
Guido van Rossumda88dad1995-01-26 00:46:29 +000013775 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013776
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013777fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013778rm -f conftest.$ac_objext conftest.$ac_ext
13779echo "$as_me:$LINENO: result: $va_list_is_array" >&5
13780echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013781
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013782# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013783
13784
13785
13786echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
13787echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
13788if test "${ac_cv_func_gethostbyname_r+set}" = set; then
13789 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013790else
Martin v. Löwis11437992002-04-12 09:54:03 +000013791 cat >conftest.$ac_ext <<_ACEOF
13792#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013793#include "confdefs.h"
13794/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013795 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013796#include <assert.h>
13797/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013798#ifdef __cplusplus
13799extern "C"
13800#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013801/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013802 builtin and then its argument prototype would still apply. */
13803char gethostbyname_r ();
13804char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013805
Martin v. Löwis11437992002-04-12 09:54:03 +000013806#ifdef F77_DUMMY_MAIN
13807# ifdef __cplusplus
13808 extern "C"
13809# endif
13810 int F77_DUMMY_MAIN() { return 1; }
13811#endif
13812int
13813main ()
13814{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013815/* The GNU C library defines this for functions which it implements
13816 to always fail with ENOSYS. Some functions are actually named
13817 something starting with __ and the normal name is an alias. */
13818#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
13819choke me
13820#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013821f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013822#endif
13823
Martin v. Löwis11437992002-04-12 09:54:03 +000013824 ;
13825 return 0;
13826}
13827_ACEOF
13828rm -f conftest.$ac_objext conftest$ac_exeext
13829if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13830 (eval $ac_link) 2>&5
13831 ac_status=$?
13832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13833 (exit $ac_status); } &&
13834 { ac_try='test -s conftest$ac_exeext'
13835 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13836 (eval $ac_try) 2>&5
13837 ac_status=$?
13838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13839 (exit $ac_status); }; }; then
13840 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013841else
Martin v. Löwis11437992002-04-12 09:54:03 +000013842 echo "$as_me: failed program was:" >&5
13843cat conftest.$ac_ext >&5
13844ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013845fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013846rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013847fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013848echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
13849echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
13850if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013851
Martin v. Löwis11437992002-04-12 09:54:03 +000013852 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013853#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013854_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013855
Martin v. Löwis11437992002-04-12 09:54:03 +000013856 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
13857echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013858 OLD_CFLAGS=$CFLAGS
13859 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013860 cat >conftest.$ac_ext <<_ACEOF
13861#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013862#include "confdefs.h"
13863
13864# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013865
13866#ifdef F77_DUMMY_MAIN
13867# ifdef __cplusplus
13868 extern "C"
13869# endif
13870 int F77_DUMMY_MAIN() { return 1; }
13871#endif
13872int
13873main ()
13874{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013875
13876 char *name;
13877 struct hostent *he, *res;
13878 char buffer[2048];
13879 int buflen = 2048;
13880 int h_errnop;
13881
13882 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013883
13884 ;
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
13900
13901 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013902#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013903_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013904
Martin v. Löwis11437992002-04-12 09:54:03 +000013905
13906cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013907#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013908_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013909
Martin v. Löwis11437992002-04-12 09:54:03 +000013910 echo "$as_me:$LINENO: result: yes" >&5
13911echo "${ECHO_T}yes" >&6
13912
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013913else
Martin v. Löwis11437992002-04-12 09:54:03 +000013914 echo "$as_me: failed program was:" >&5
13915cat conftest.$ac_ext >&5
13916
13917 echo "$as_me:$LINENO: result: no" >&5
13918echo "${ECHO_T}no" >&6
13919 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
13920echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
13921 cat >conftest.$ac_ext <<_ACEOF
13922#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013923#include "confdefs.h"
13924
13925# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013926
13927#ifdef F77_DUMMY_MAIN
13928# ifdef __cplusplus
13929 extern "C"
13930# endif
13931 int F77_DUMMY_MAIN() { return 1; }
13932#endif
13933int
13934main ()
13935{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013936
13937 char *name;
13938 struct hostent *he;
13939 char buffer[2048];
13940 int buflen = 2048;
13941 int h_errnop;
13942
13943 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013944
13945 ;
13946 return 0;
13947}
13948_ACEOF
13949rm -f conftest.$ac_objext
13950if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13951 (eval $ac_compile) 2>&5
13952 ac_status=$?
13953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13954 (exit $ac_status); } &&
13955 { ac_try='test -s conftest.$ac_objext'
13956 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13957 (eval $ac_try) 2>&5
13958 ac_status=$?
13959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13960 (exit $ac_status); }; }; then
13961
13962 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013963#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013964_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013965
Martin v. Löwis11437992002-04-12 09:54:03 +000013966
13967cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013968#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013969_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013970
Martin v. Löwis11437992002-04-12 09:54:03 +000013971 echo "$as_me:$LINENO: result: yes" >&5
13972echo "${ECHO_T}yes" >&6
13973
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013974else
Martin v. Löwis11437992002-04-12 09:54:03 +000013975 echo "$as_me: failed program was:" >&5
13976cat conftest.$ac_ext >&5
13977
13978 echo "$as_me:$LINENO: result: no" >&5
13979echo "${ECHO_T}no" >&6
13980 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
13981echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
13982 cat >conftest.$ac_ext <<_ACEOF
13983#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013984#include "confdefs.h"
13985
13986# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013987
13988#ifdef F77_DUMMY_MAIN
13989# ifdef __cplusplus
13990 extern "C"
13991# endif
13992 int F77_DUMMY_MAIN() { return 1; }
13993#endif
13994int
13995main ()
13996{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013997
13998 char *name;
13999 struct hostent *he;
14000 struct hostent_data data;
14001
14002 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000014003
14004 ;
14005 return 0;
14006}
14007_ACEOF
14008rm -f conftest.$ac_objext
14009if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14010 (eval $ac_compile) 2>&5
14011 ac_status=$?
14012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14013 (exit $ac_status); } &&
14014 { ac_try='test -s conftest.$ac_objext'
14015 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14016 (eval $ac_try) 2>&5
14017 ac_status=$?
14018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14019 (exit $ac_status); }; }; then
14020
14021 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014022#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014023_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014024
Martin v. Löwis11437992002-04-12 09:54:03 +000014025
14026cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014027#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014028_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014029
Martin v. Löwis11437992002-04-12 09:54:03 +000014030 echo "$as_me:$LINENO: result: yes" >&5
14031echo "${ECHO_T}yes" >&6
14032
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014033else
Martin v. Löwis11437992002-04-12 09:54:03 +000014034 echo "$as_me: failed program was:" >&5
14035cat conftest.$ac_ext >&5
14036
14037 echo "$as_me:$LINENO: result: no" >&5
14038echo "${ECHO_T}no" >&6
14039
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014040fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014041rm -f conftest.$ac_objext conftest.$ac_ext
14042
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014043fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014044rm -f conftest.$ac_objext conftest.$ac_ext
14045
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014046fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014047rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014048 CFLAGS=$OLD_CFLAGS
14049
14050else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014051
Martin v. Löwis11437992002-04-12 09:54:03 +000014052
14053for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000014054do
Martin v. Löwis11437992002-04-12 09:54:03 +000014055as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14056echo "$as_me:$LINENO: checking for $ac_func" >&5
14057echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14058if eval "test \"\${$as_ac_var+set}\" = set"; then
14059 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014060else
Martin v. Löwis11437992002-04-12 09:54:03 +000014061 cat >conftest.$ac_ext <<_ACEOF
14062#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014063#include "confdefs.h"
14064/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014065 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014066#include <assert.h>
14067/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014068#ifdef __cplusplus
14069extern "C"
14070#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014071/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014072 builtin and then its argument prototype would still apply. */
14073char $ac_func ();
14074char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014075
Martin v. Löwis11437992002-04-12 09:54:03 +000014076#ifdef F77_DUMMY_MAIN
14077# ifdef __cplusplus
14078 extern "C"
14079# endif
14080 int F77_DUMMY_MAIN() { return 1; }
14081#endif
14082int
14083main ()
14084{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014085/* The GNU C library defines this for functions which it implements
14086 to always fail with ENOSYS. Some functions are actually named
14087 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014088#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014089choke me
14090#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014091f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014092#endif
14093
Martin v. Löwis11437992002-04-12 09:54:03 +000014094 ;
14095 return 0;
14096}
14097_ACEOF
14098rm -f conftest.$ac_objext conftest$ac_exeext
14099if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14100 (eval $ac_link) 2>&5
14101 ac_status=$?
14102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14103 (exit $ac_status); } &&
14104 { ac_try='test -s conftest$ac_exeext'
14105 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14106 (eval $ac_try) 2>&5
14107 ac_status=$?
14108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14109 (exit $ac_status); }; }; then
14110 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014111else
Martin v. Löwis11437992002-04-12 09:54:03 +000014112 echo "$as_me: failed program was:" >&5
14113cat conftest.$ac_ext >&5
14114eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014115fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014116rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014117fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014118echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14119echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14120if test `eval echo '${'$as_ac_var'}'` = yes; then
14121 cat >>confdefs.h <<_ACEOF
14122#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14123_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014124
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014125fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014126done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014127
Michael W. Hudson54241132001-12-07 15:38:26 +000014128
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014129fi
14130
Michael W. Hudson54241132001-12-07 15:38:26 +000014131
14132
14133
14134
14135
14136
Guido van Rossum627b2d71993-12-24 10:39:16 +000014137# checks for system services
14138# (none yet)
14139
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014140# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000014141echo "$as_me:$LINENO: checking for __fpu_control" >&5
14142echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
14143if test "${ac_cv_func___fpu_control+set}" = set; then
14144 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014145else
Martin v. Löwis11437992002-04-12 09:54:03 +000014146 cat >conftest.$ac_ext <<_ACEOF
14147#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014148#include "confdefs.h"
14149/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014150 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014151#include <assert.h>
14152/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014153#ifdef __cplusplus
14154extern "C"
14155#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014156/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014157 builtin and then its argument prototype would still apply. */
14158char __fpu_control ();
14159char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014160
Martin v. Löwis11437992002-04-12 09:54:03 +000014161#ifdef F77_DUMMY_MAIN
14162# ifdef __cplusplus
14163 extern "C"
14164# endif
14165 int F77_DUMMY_MAIN() { return 1; }
14166#endif
14167int
14168main ()
14169{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014170/* The GNU C library defines this for functions which it implements
14171 to always fail with ENOSYS. Some functions are actually named
14172 something starting with __ and the normal name is an alias. */
14173#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
14174choke me
14175#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014176f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014177#endif
14178
Martin v. Löwis11437992002-04-12 09:54:03 +000014179 ;
14180 return 0;
14181}
14182_ACEOF
14183rm -f conftest.$ac_objext conftest$ac_exeext
14184if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14185 (eval $ac_link) 2>&5
14186 ac_status=$?
14187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14188 (exit $ac_status); } &&
14189 { ac_try='test -s conftest$ac_exeext'
14190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14191 (eval $ac_try) 2>&5
14192 ac_status=$?
14193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14194 (exit $ac_status); }; }; then
14195 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014196else
Martin v. Löwis11437992002-04-12 09:54:03 +000014197 echo "$as_me: failed program was:" >&5
14198cat conftest.$ac_ext >&5
14199ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014200fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014201rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014202fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014203echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
14204echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
14205if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014206 :
14207else
Martin v. Löwis11437992002-04-12 09:54:03 +000014208
14209echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
14210echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
14211if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
14212 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014213else
Martin v. Löwis11437992002-04-12 09:54:03 +000014214 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014215LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014216cat >conftest.$ac_ext <<_ACEOF
14217#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014218#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014219
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014220/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014221#ifdef __cplusplus
14222extern "C"
14223#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014224/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014225 builtin and then its argument prototype would still apply. */
14226char __fpu_control ();
14227#ifdef F77_DUMMY_MAIN
14228# ifdef __cplusplus
14229 extern "C"
14230# endif
14231 int F77_DUMMY_MAIN() { return 1; }
14232#endif
14233int
14234main ()
14235{
14236__fpu_control ();
14237 ;
14238 return 0;
14239}
14240_ACEOF
14241rm -f conftest.$ac_objext conftest$ac_exeext
14242if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14243 (eval $ac_link) 2>&5
14244 ac_status=$?
14245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14246 (exit $ac_status); } &&
14247 { ac_try='test -s conftest$ac_exeext'
14248 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14249 (eval $ac_try) 2>&5
14250 ac_status=$?
14251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14252 (exit $ac_status); }; }; then
14253 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014254else
Martin v. Löwis11437992002-04-12 09:54:03 +000014255 echo "$as_me: failed program was:" >&5
14256cat conftest.$ac_ext >&5
14257ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014258fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014259rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14260LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014261fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014262echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
14263echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
14264if test $ac_cv_lib_ieee___fpu_control = yes; then
14265 cat >>confdefs.h <<_ACEOF
14266#define HAVE_LIBIEEE 1
14267_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014268
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014269 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014270
Guido van Rossum627b2d71993-12-24 10:39:16 +000014271fi
14272
Michael W. Hudson54241132001-12-07 15:38:26 +000014273
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014274fi
14275
Michael W. Hudson54241132001-12-07 15:38:26 +000014276
Guido van Rossum7f253911997-05-09 02:42:48 +000014277# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000014278echo "$as_me:$LINENO: checking for --with-fpectl" >&5
14279echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
14280
Guido van Rossum7f253911997-05-09 02:42:48 +000014281# Check whether --with-fpectl or --without-fpectl was given.
14282if test "${with_fpectl+set}" = set; then
14283 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000014284
Guido van Rossum7f253911997-05-09 02:42:48 +000014285if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000014286then
14287
14288cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000014289#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014290_ACEOF
14291
14292 echo "$as_me:$LINENO: result: yes" >&5
14293echo "${ECHO_T}yes" >&6
14294else echo "$as_me:$LINENO: result: no" >&5
14295echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014296fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014297else
Martin v. Löwis11437992002-04-12 09:54:03 +000014298 echo "$as_me:$LINENO: result: no" >&5
14299echo "${ECHO_T}no" >&6
14300fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000014301
Guido van Rossum7f43da71994-08-01 12:15:30 +000014302# check for --with-libm=...
14303
Guido van Rossum563e7081996-09-10 18:20:48 +000014304case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014305Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014306BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014307*) LIBM=-lm
14308esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014309echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
14310echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
14311
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014312# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014313if test "${with_libm+set}" = set; then
14314 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000014315
Guido van Rossum7f253911997-05-09 02:42:48 +000014316if test "$withval" = no
14317then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000014318 echo "$as_me:$LINENO: result: force LIBM empty" >&5
14319echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014320elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014321then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014322 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
14323echo "${ECHO_T}set LIBM=\"$withval\"" >&6
14324else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
14325echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
14326 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014327fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014328else
Martin v. Löwis11437992002-04-12 09:54:03 +000014329 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
14330echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
14331fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014332
14333# check for --with-libc=...
14334
Martin v. Löwis11437992002-04-12 09:54:03 +000014335echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
14336echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
14337
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014338# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014339if test "${with_libc+set}" = set; then
14340 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000014341
Guido van Rossum7f253911997-05-09 02:42:48 +000014342if test "$withval" = no
14343then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000014344 echo "$as_me:$LINENO: result: force LIBC empty" >&5
14345echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014346elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014347then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014348 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
14349echo "${ECHO_T}set LIBC=\"$withval\"" >&6
14350else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
14351echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
14352 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014353fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014354else
Martin v. Löwis11437992002-04-12 09:54:03 +000014355 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
14356echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
14357fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014358
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014359# check for hypot() in math library
14360LIBS_SAVE=$LIBS
14361LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000014362
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014363for ac_func in hypot
14364do
Martin v. Löwis11437992002-04-12 09:54:03 +000014365as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14366echo "$as_me:$LINENO: checking for $ac_func" >&5
14367echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14368if eval "test \"\${$as_ac_var+set}\" = set"; then
14369 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014370else
Martin v. Löwis11437992002-04-12 09:54:03 +000014371 cat >conftest.$ac_ext <<_ACEOF
14372#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014373#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014374/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014375 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014376#include <assert.h>
14377/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014378#ifdef __cplusplus
14379extern "C"
14380#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014381/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014382 builtin and then its argument prototype would still apply. */
14383char $ac_func ();
14384char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014385
Martin v. Löwis11437992002-04-12 09:54:03 +000014386#ifdef F77_DUMMY_MAIN
14387# ifdef __cplusplus
14388 extern "C"
14389# endif
14390 int F77_DUMMY_MAIN() { return 1; }
14391#endif
14392int
14393main ()
14394{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014395/* The GNU C library defines this for functions which it implements
14396 to always fail with ENOSYS. Some functions are actually named
14397 something starting with __ and the normal name is an alias. */
14398#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14399choke me
14400#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014401f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014402#endif
14403
Martin v. Löwis11437992002-04-12 09:54:03 +000014404 ;
14405 return 0;
14406}
14407_ACEOF
14408rm -f conftest.$ac_objext conftest$ac_exeext
14409if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14410 (eval $ac_link) 2>&5
14411 ac_status=$?
14412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14413 (exit $ac_status); } &&
14414 { ac_try='test -s conftest$ac_exeext'
14415 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14416 (eval $ac_try) 2>&5
14417 ac_status=$?
14418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14419 (exit $ac_status); }; }; then
14420 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014421else
Martin v. Löwis11437992002-04-12 09:54:03 +000014422 echo "$as_me: failed program was:" >&5
14423cat conftest.$ac_ext >&5
14424eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014425fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014426rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014427fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014428echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14429echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14430if test `eval echo '${'$as_ac_var'}'` = yes; then
14431 cat >>confdefs.h <<_ACEOF
14432#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14433_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000014434
Michael W. Hudson54241132001-12-07 15:38:26 +000014435else
Martin v. Löwis11437992002-04-12 09:54:03 +000014436 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014437fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014438done
14439
Michael W. Hudson54241132001-12-07 15:38:26 +000014440
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014441LIBS=$LIBS_SAVE
14442
Guido van Rossumad713701997-07-10 22:42:38 +000014443# check whether malloc(0) returns NULL or not
Martin v. Löwis11437992002-04-12 09:54:03 +000014444echo "$as_me:$LINENO: checking what malloc(0) returns" >&5
14445echo $ECHO_N "checking what malloc(0) returns... $ECHO_C" >&6
14446if test "${ac_cv_malloc_zero+set}" = set; then
14447 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014448else
14449 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000014450 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +000014451else
Martin v. Löwis11437992002-04-12 09:54:03 +000014452 cat >conftest.$ac_ext <<_ACEOF
14453#line $LINENO "configure"
Guido van Rossumad713701997-07-10 22:42:38 +000014454#include "confdefs.h"
14455#include <stdio.h>
14456#ifdef HAVE_STDLIB
14457#include <stdlib.h>
14458#else
14459char *malloc(), *realloc();
14460int *free();
14461#endif
14462main() {
14463 char *p;
14464 p = malloc(0);
14465 if (p == NULL) exit(1);
14466 p = realloc(p, 0);
14467 if (p == NULL) exit(1);
14468 free(p);
14469 exit(0);
14470}
Martin v. Löwis11437992002-04-12 09:54:03 +000014471_ACEOF
14472rm -f conftest$ac_exeext
14473if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14474 (eval $ac_link) 2>&5
14475 ac_status=$?
14476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14477 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14478 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14479 (eval $ac_try) 2>&5
14480 ac_status=$?
14481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14482 (exit $ac_status); }; }; then
Guido van Rossumad713701997-07-10 22:42:38 +000014483 ac_cv_malloc_zero=nonnull
14484else
Martin v. Löwis11437992002-04-12 09:54:03 +000014485 echo "$as_me: program exited with status $ac_status" >&5
14486echo "$as_me: failed program was:" >&5
14487cat conftest.$ac_ext >&5
14488( exit $ac_status )
14489ac_cv_malloc_zero=null
Guido van Rossumad713701997-07-10 22:42:38 +000014490fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014491rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumad713701997-07-10 22:42:38 +000014492fi
Guido van Rossumad713701997-07-10 22:42:38 +000014493fi
Guido van Rossum3065c942001-09-17 04:03:14 +000014494 # XXX arm cross-compile?
Martin v. Löwis11437992002-04-12 09:54:03 +000014495echo "$as_me:$LINENO: result: $ac_cv_malloc_zero" >&5
14496echo "${ECHO_T}$ac_cv_malloc_zero" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014497if test "$ac_cv_malloc_zero" = null
14498then
Martin v. Löwis11437992002-04-12 09:54:03 +000014499
14500cat >>confdefs.h <<\_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014501#define MALLOC_ZERO_RETURNS_NULL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014502_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014503
14504fi
14505
Guido van Rossumef2255b2000-03-10 22:30:29 +000014506# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014507if test "${ac_cv_header_wchar_h+set}" = set; then
14508 echo "$as_me:$LINENO: checking for wchar.h" >&5
14509echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14510if test "${ac_cv_header_wchar_h+set}" = set; then
14511 echo $ECHO_N "(cached) $ECHO_C" >&6
14512fi
14513echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14514echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014515else
Martin v. Löwis11437992002-04-12 09:54:03 +000014516 # Is the header compilable?
14517echo "$as_me:$LINENO: checking wchar.h usability" >&5
14518echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
14519cat >conftest.$ac_ext <<_ACEOF
14520#line $LINENO "configure"
14521#include "confdefs.h"
14522$ac_includes_default
14523#include <wchar.h>
14524_ACEOF
14525rm -f conftest.$ac_objext
14526if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14527 (eval $ac_compile) 2>&5
14528 ac_status=$?
14529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14530 (exit $ac_status); } &&
14531 { ac_try='test -s conftest.$ac_objext'
14532 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14533 (eval $ac_try) 2>&5
14534 ac_status=$?
14535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14536 (exit $ac_status); }; }; then
14537 ac_header_compiler=yes
14538else
14539 echo "$as_me: failed program was:" >&5
14540cat conftest.$ac_ext >&5
14541ac_header_compiler=no
14542fi
14543rm -f conftest.$ac_objext conftest.$ac_ext
14544echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14545echo "${ECHO_T}$ac_header_compiler" >&6
14546
14547# Is the header present?
14548echo "$as_me:$LINENO: checking wchar.h presence" >&5
14549echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
14550cat >conftest.$ac_ext <<_ACEOF
14551#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014552#include "confdefs.h"
14553#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014554_ACEOF
14555if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14556 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14557 ac_status=$?
14558 egrep -v '^ *\+' conftest.er1 >conftest.err
14559 rm -f conftest.er1
14560 cat conftest.err >&5
14561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14562 (exit $ac_status); } >/dev/null; then
14563 if test -s conftest.err; then
14564 ac_cpp_err=$ac_c_preproc_warn_flag
14565 else
14566 ac_cpp_err=
14567 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014568else
Martin v. Löwis11437992002-04-12 09:54:03 +000014569 ac_cpp_err=yes
14570fi
14571if test -z "$ac_cpp_err"; then
14572 ac_header_preproc=yes
14573else
14574 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000014575 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014576 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014577fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014578rm -f conftest.err conftest.$ac_ext
14579echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14580echo "${ECHO_T}$ac_header_preproc" >&6
14581
14582# So? What about this header?
14583case $ac_header_compiler:$ac_header_preproc in
14584 yes:no )
14585 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
14586echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14587 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14588echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14589 no:yes )
14590 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
14591echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
14592 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
14593echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
14594 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14595echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14596esac
14597echo "$as_me:$LINENO: checking for wchar.h" >&5
14598echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14599if test "${ac_cv_header_wchar_h+set}" = set; then
14600 echo $ECHO_N "(cached) $ECHO_C" >&6
14601else
14602 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000014603fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014604echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14605echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
14606
14607fi
14608if test $ac_cv_header_wchar_h = yes; then
14609
14610
14611cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000014612#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014613_ACEOF
14614
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014615 wchar_h="yes"
14616
Guido van Rossumef2255b2000-03-10 22:30:29 +000014617else
Martin v. Löwis11437992002-04-12 09:54:03 +000014618 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014619
14620fi
14621
Michael W. Hudson54241132001-12-07 15:38:26 +000014622
Martin v. Löwis11437992002-04-12 09:54:03 +000014623
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014624# determine wchar_t size
14625if test "$wchar_h" = yes
14626then
Martin v. Löwis11437992002-04-12 09:54:03 +000014627 echo "$as_me:$LINENO: checking for wchar_t" >&5
14628echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
14629if test "${ac_cv_type_wchar_t+set}" = set; then
14630 echo $ECHO_N "(cached) $ECHO_C" >&6
14631else
14632 cat >conftest.$ac_ext <<_ACEOF
14633#line $LINENO "configure"
14634#include "confdefs.h"
14635#include <wchar.h>
14636
14637#ifdef F77_DUMMY_MAIN
14638# ifdef __cplusplus
14639 extern "C"
14640# endif
14641 int F77_DUMMY_MAIN() { return 1; }
14642#endif
14643int
14644main ()
14645{
14646if ((wchar_t *) 0)
14647 return 0;
14648if (sizeof (wchar_t))
14649 return 0;
14650 ;
14651 return 0;
14652}
14653_ACEOF
14654rm -f conftest.$ac_objext
14655if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14656 (eval $ac_compile) 2>&5
14657 ac_status=$?
14658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14659 (exit $ac_status); } &&
14660 { ac_try='test -s conftest.$ac_objext'
14661 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14662 (eval $ac_try) 2>&5
14663 ac_status=$?
14664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14665 (exit $ac_status); }; }; then
14666 ac_cv_type_wchar_t=yes
14667else
14668 echo "$as_me: failed program was:" >&5
14669cat conftest.$ac_ext >&5
14670ac_cv_type_wchar_t=no
14671fi
14672rm -f conftest.$ac_objext conftest.$ac_ext
14673fi
14674echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
14675echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
14676
14677echo "$as_me:$LINENO: checking size of wchar_t" >&5
14678echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
14679if test "${ac_cv_sizeof_wchar_t+set}" = set; then
14680 echo $ECHO_N "(cached) $ECHO_C" >&6
14681else
14682 if test "$ac_cv_type_wchar_t" = yes; then
14683 # The cast to unsigned long works around a bug in the HP C Compiler
14684 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14685 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14686 # This bug is HP SR number 8606223364.
14687 if test "$cross_compiling" = yes; then
14688 # Depending upon the size, compute the lo and hi bounds.
14689cat >conftest.$ac_ext <<_ACEOF
14690#line $LINENO "configure"
14691#include "confdefs.h"
14692#include <wchar.h>
14693
14694#ifdef F77_DUMMY_MAIN
14695# ifdef __cplusplus
14696 extern "C"
14697# endif
14698 int F77_DUMMY_MAIN() { return 1; }
14699#endif
14700int
14701main ()
14702{
14703static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
14704test_array [0] = 0
14705
14706 ;
14707 return 0;
14708}
14709_ACEOF
14710rm -f conftest.$ac_objext
14711if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14712 (eval $ac_compile) 2>&5
14713 ac_status=$?
14714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14715 (exit $ac_status); } &&
14716 { ac_try='test -s conftest.$ac_objext'
14717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14718 (eval $ac_try) 2>&5
14719 ac_status=$?
14720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14721 (exit $ac_status); }; }; then
14722 ac_lo=0 ac_mid=0
14723 while :; do
14724 cat >conftest.$ac_ext <<_ACEOF
14725#line $LINENO "configure"
14726#include "confdefs.h"
14727#include <wchar.h>
14728
14729#ifdef F77_DUMMY_MAIN
14730# ifdef __cplusplus
14731 extern "C"
14732# endif
14733 int F77_DUMMY_MAIN() { return 1; }
14734#endif
14735int
14736main ()
14737{
14738static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
14739test_array [0] = 0
14740
14741 ;
14742 return 0;
14743}
14744_ACEOF
14745rm -f conftest.$ac_objext
14746if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14747 (eval $ac_compile) 2>&5
14748 ac_status=$?
14749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14750 (exit $ac_status); } &&
14751 { ac_try='test -s conftest.$ac_objext'
14752 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14753 (eval $ac_try) 2>&5
14754 ac_status=$?
14755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14756 (exit $ac_status); }; }; then
14757 ac_hi=$ac_mid; break
14758else
14759 echo "$as_me: failed program was:" >&5
14760cat conftest.$ac_ext >&5
14761ac_lo=`expr $ac_mid + 1`
14762 if test $ac_lo -le $ac_mid; then
14763 ac_lo= ac_hi=
14764 break
14765 fi
14766 ac_mid=`expr 2 '*' $ac_mid + 1`
14767fi
14768rm -f conftest.$ac_objext conftest.$ac_ext
14769 done
14770else
14771 echo "$as_me: failed program was:" >&5
14772cat conftest.$ac_ext >&5
14773cat >conftest.$ac_ext <<_ACEOF
14774#line $LINENO "configure"
14775#include "confdefs.h"
14776#include <wchar.h>
14777
14778#ifdef F77_DUMMY_MAIN
14779# ifdef __cplusplus
14780 extern "C"
14781# endif
14782 int F77_DUMMY_MAIN() { return 1; }
14783#endif
14784int
14785main ()
14786{
14787static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
14788test_array [0] = 0
14789
14790 ;
14791 return 0;
14792}
14793_ACEOF
14794rm -f conftest.$ac_objext
14795if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14796 (eval $ac_compile) 2>&5
14797 ac_status=$?
14798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14799 (exit $ac_status); } &&
14800 { ac_try='test -s conftest.$ac_objext'
14801 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14802 (eval $ac_try) 2>&5
14803 ac_status=$?
14804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14805 (exit $ac_status); }; }; then
14806 ac_hi=-1 ac_mid=-1
14807 while :; do
14808 cat >conftest.$ac_ext <<_ACEOF
14809#line $LINENO "configure"
14810#include "confdefs.h"
14811#include <wchar.h>
14812
14813#ifdef F77_DUMMY_MAIN
14814# ifdef __cplusplus
14815 extern "C"
14816# endif
14817 int F77_DUMMY_MAIN() { return 1; }
14818#endif
14819int
14820main ()
14821{
14822static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
14823test_array [0] = 0
14824
14825 ;
14826 return 0;
14827}
14828_ACEOF
14829rm -f conftest.$ac_objext
14830if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14831 (eval $ac_compile) 2>&5
14832 ac_status=$?
14833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14834 (exit $ac_status); } &&
14835 { ac_try='test -s conftest.$ac_objext'
14836 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14837 (eval $ac_try) 2>&5
14838 ac_status=$?
14839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14840 (exit $ac_status); }; }; then
14841 ac_lo=$ac_mid; break
14842else
14843 echo "$as_me: failed program was:" >&5
14844cat conftest.$ac_ext >&5
14845ac_hi=`expr '(' $ac_mid ')' - 1`
14846 if test $ac_mid -le $ac_hi; then
14847 ac_lo= ac_hi=
14848 break
14849 fi
14850 ac_mid=`expr 2 '*' $ac_mid`
14851fi
14852rm -f conftest.$ac_objext conftest.$ac_ext
14853 done
14854else
14855 echo "$as_me: failed program was:" >&5
14856cat conftest.$ac_ext >&5
14857ac_lo= ac_hi=
14858fi
14859rm -f conftest.$ac_objext conftest.$ac_ext
14860fi
14861rm -f conftest.$ac_objext conftest.$ac_ext
14862# Binary search between lo and hi bounds.
14863while test "x$ac_lo" != "x$ac_hi"; do
14864 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14865 cat >conftest.$ac_ext <<_ACEOF
14866#line $LINENO "configure"
14867#include "confdefs.h"
14868#include <wchar.h>
14869
14870#ifdef F77_DUMMY_MAIN
14871# ifdef __cplusplus
14872 extern "C"
14873# endif
14874 int F77_DUMMY_MAIN() { return 1; }
14875#endif
14876int
14877main ()
14878{
14879static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
14880test_array [0] = 0
14881
14882 ;
14883 return 0;
14884}
14885_ACEOF
14886rm -f conftest.$ac_objext
14887if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14888 (eval $ac_compile) 2>&5
14889 ac_status=$?
14890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14891 (exit $ac_status); } &&
14892 { ac_try='test -s conftest.$ac_objext'
14893 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14894 (eval $ac_try) 2>&5
14895 ac_status=$?
14896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14897 (exit $ac_status); }; }; then
14898 ac_hi=$ac_mid
14899else
14900 echo "$as_me: failed program was:" >&5
14901cat conftest.$ac_ext >&5
14902ac_lo=`expr '(' $ac_mid ')' + 1`
14903fi
14904rm -f conftest.$ac_objext conftest.$ac_ext
14905done
14906case $ac_lo in
14907?*) ac_cv_sizeof_wchar_t=$ac_lo;;
14908'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
14909echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
14910 { (exit 1); exit 1; }; } ;;
14911esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014912else
14913 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014914 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
14915echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14916 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014917else
Martin v. Löwis11437992002-04-12 09:54:03 +000014918 cat >conftest.$ac_ext <<_ACEOF
14919#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014920#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014921#include <wchar.h>
14922
14923long longval () { return (long) (sizeof (wchar_t)); }
14924unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000014925#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014926#include <stdlib.h>
14927#ifdef F77_DUMMY_MAIN
14928# ifdef __cplusplus
14929 extern "C"
14930# endif
14931 int F77_DUMMY_MAIN() { return 1; }
14932#endif
14933int
14934main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014935{
Martin v. Löwis11437992002-04-12 09:54:03 +000014936
14937 FILE *f = fopen ("conftest.val", "w");
14938 if (! f)
14939 exit (1);
14940 if (((long) (sizeof (wchar_t))) < 0)
14941 {
14942 long i = longval ();
14943 if (i != ((long) (sizeof (wchar_t))))
14944 exit (1);
14945 fprintf (f, "%ld\n", i);
14946 }
14947 else
14948 {
14949 unsigned long i = ulongval ();
14950 if (i != ((long) (sizeof (wchar_t))))
14951 exit (1);
14952 fprintf (f, "%lu\n", i);
14953 }
14954 exit (ferror (f) || fclose (f) != 0);
14955
14956 ;
14957 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014958}
Martin v. Löwis11437992002-04-12 09:54:03 +000014959_ACEOF
14960rm -f conftest$ac_exeext
14961if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14962 (eval $ac_link) 2>&5
14963 ac_status=$?
14964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14965 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14966 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14967 (eval $ac_try) 2>&5
14968 ac_status=$?
14969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14970 (exit $ac_status); }; }; then
14971 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000014972else
Martin v. Löwis11437992002-04-12 09:54:03 +000014973 echo "$as_me: program exited with status $ac_status" >&5
14974echo "$as_me: failed program was:" >&5
14975cat conftest.$ac_ext >&5
14976( exit $ac_status )
14977{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
14978echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
14979 { (exit 1); exit 1; }; }
14980fi
14981rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14982fi
14983fi
14984rm -f conftest.val
14985else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014986 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000014987fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014988fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014989echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
14990echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
14991cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014992#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014993_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014994
Michael W. Hudson54241132001-12-07 15:38:26 +000014995
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014996fi
14997
Martin v. Löwis11437992002-04-12 09:54:03 +000014998echo "$as_me:$LINENO: checking what type to use for unicode" >&5
14999echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015000# Check whether --enable-unicode or --disable-unicode was given.
15001if test "${enable_unicode+set}" = set; then
15002 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000015003
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015004else
15005 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015006fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015007
15008if test $enable_unicode = yes
15009then
Martin v. Löwisfd917792001-06-27 20:22:04 +000015010 # Without any arguments, Py_UNICODE defaults to two-byte mode
15011 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015012fi
15013
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015014
15015
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015016case "$enable_unicode" in
15017ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000015018 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015019#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000015020_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015021
15022 ;;
15023ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000015024 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015025#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000015026_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015027
15028 ;;
15029esac
15030
Michael W. Hudson54241132001-12-07 15:38:26 +000015031
Martin v. Löwis11437992002-04-12 09:54:03 +000015032
15033
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015034
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015035if test "$enable_unicode" = "no"
15036then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015037 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000015038 echo "$as_me:$LINENO: result: not used" >&5
15039echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015040else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015041 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000015042
15043cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015044#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015045_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015046
15047 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
15048 then
15049 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015050
Martin v. Löwis11437992002-04-12 09:54:03 +000015051cat >>confdefs.h <<\_ACEOF
15052#define HAVE_USABLE_WCHAR_T 1
15053_ACEOF
15054
15055 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015056#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015057_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015058
15059 elif test "$ac_cv_sizeof_short" = "$unicode_size"
15060 then
15061 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000015062 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015063#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000015064_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015065
15066 elif test "$ac_cv_sizeof_long" = "$unicode_size"
15067 then
15068 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000015069 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015070#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000015071_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015072
15073 else
15074 PY_UNICODE_TYPE="no type found"
15075 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015076 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
15077echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015078fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015079
15080# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000015081echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
15082echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
15083if test "${ac_cv_c_bigendian+set}" = set; then
15084 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015085else
Martin v. Löwis11437992002-04-12 09:54:03 +000015086 # See if sys/param.h defines the BYTE_ORDER macro.
15087cat >conftest.$ac_ext <<_ACEOF
15088#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015089#include "confdefs.h"
15090#include <sys/types.h>
15091#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015092
Martin v. Löwis11437992002-04-12 09:54:03 +000015093#ifdef F77_DUMMY_MAIN
15094# ifdef __cplusplus
15095 extern "C"
15096# endif
15097 int F77_DUMMY_MAIN() { return 1; }
15098#endif
15099int
15100main ()
15101{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015102#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15103 bogus endian macros
15104#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015105
15106 ;
15107 return 0;
15108}
15109_ACEOF
15110rm -f conftest.$ac_objext
15111if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15112 (eval $ac_compile) 2>&5
15113 ac_status=$?
15114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15115 (exit $ac_status); } &&
15116 { ac_try='test -s conftest.$ac_objext'
15117 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15118 (eval $ac_try) 2>&5
15119 ac_status=$?
15120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15121 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015122 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000015123cat >conftest.$ac_ext <<_ACEOF
15124#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015125#include "confdefs.h"
15126#include <sys/types.h>
15127#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015128
Martin v. Löwis11437992002-04-12 09:54:03 +000015129#ifdef F77_DUMMY_MAIN
15130# ifdef __cplusplus
15131 extern "C"
15132# endif
15133 int F77_DUMMY_MAIN() { return 1; }
15134#endif
15135int
15136main ()
15137{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015138#if BYTE_ORDER != BIG_ENDIAN
15139 not big endian
15140#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015141
15142 ;
15143 return 0;
15144}
15145_ACEOF
15146rm -f conftest.$ac_objext
15147if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15148 (eval $ac_compile) 2>&5
15149 ac_status=$?
15150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15151 (exit $ac_status); } &&
15152 { ac_try='test -s conftest.$ac_objext'
15153 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15154 (eval $ac_try) 2>&5
15155 ac_status=$?
15156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15157 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015158 ac_cv_c_bigendian=yes
15159else
Martin v. Löwis11437992002-04-12 09:54:03 +000015160 echo "$as_me: failed program was:" >&5
15161cat conftest.$ac_ext >&5
15162ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015163fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015164rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015165else
Martin v. Löwis11437992002-04-12 09:54:03 +000015166 echo "$as_me: failed program was:" >&5
15167cat conftest.$ac_ext >&5
15168# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000015169if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015170 # try to guess the endianess by grep'ing values into an object file
15171 ac_cv_c_bigendian=unknown
15172 cat >conftest.$ac_ext <<_ACEOF
15173#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015174#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015175short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15176short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15177void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
15178short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15179short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15180void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
15181#ifdef F77_DUMMY_MAIN
15182# ifdef __cplusplus
15183 extern "C"
15184# endif
15185 int F77_DUMMY_MAIN() { return 1; }
15186#endif
15187int
15188main ()
15189{
15190 _ascii (); _ebcdic ();
15191 ;
15192 return 0;
15193}
15194_ACEOF
15195rm -f conftest.$ac_objext
15196if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15197 (eval $ac_compile) 2>&5
15198 ac_status=$?
15199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15200 (exit $ac_status); } &&
15201 { ac_try='test -s conftest.$ac_objext'
15202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15203 (eval $ac_try) 2>&5
15204 ac_status=$?
15205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15206 (exit $ac_status); }; }; then
15207 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
15208 ac_cv_c_bigendian=yes
15209fi
15210if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15211 if test "$ac_cv_c_bigendian" = unknown; then
15212 ac_cv_c_bigendian=no
15213 else
15214 # finding both strings is unlikely to happen, but who knows?
15215 ac_cv_c_bigendian=unknown
15216 fi
15217fi
15218else
15219 echo "$as_me: failed program was:" >&5
15220cat conftest.$ac_ext >&5
15221fi
15222rm -f conftest.$ac_objext conftest.$ac_ext
15223else
15224 cat >conftest.$ac_ext <<_ACEOF
15225#line $LINENO "configure"
15226#include "confdefs.h"
15227int
15228main ()
15229{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015230 /* Are we little or big endian? From Harbison&Steele. */
15231 union
15232 {
15233 long l;
15234 char c[sizeof (long)];
15235 } u;
15236 u.l = 1;
15237 exit (u.c[sizeof (long) - 1] == 1);
15238}
Martin v. Löwis11437992002-04-12 09:54:03 +000015239_ACEOF
15240rm -f conftest$ac_exeext
15241if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15242 (eval $ac_link) 2>&5
15243 ac_status=$?
15244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15245 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15246 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15247 (eval $ac_try) 2>&5
15248 ac_status=$?
15249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15250 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015251 ac_cv_c_bigendian=no
15252else
Martin v. Löwis11437992002-04-12 09:54:03 +000015253 echo "$as_me: program exited with status $ac_status" >&5
15254echo "$as_me: failed program was:" >&5
15255cat conftest.$ac_ext >&5
15256( exit $ac_status )
15257ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015258fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015259rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015260fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015261fi
15262rm -f conftest.$ac_objext conftest.$ac_ext
15263fi
15264echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
15265echo "${ECHO_T}$ac_cv_c_bigendian" >&6
15266case $ac_cv_c_bigendian in
15267 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000015268
Martin v. Löwis11437992002-04-12 09:54:03 +000015269cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015270#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015271_ACEOF
15272 ;;
15273 no)
15274 ;;
15275 *)
15276 { { echo "$as_me:$LINENO: error: unknown endianess
15277presetting ac_cv_c_bigendian=no (or yes) will help" >&5
15278echo "$as_me: error: unknown endianess
15279presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
15280 { (exit 1); exit 1; }; } ;;
15281esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015282
Michael W. Hudson54241132001-12-07 15:38:26 +000015283
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015284# Check whether right shifting a negative integer extends the sign bit
15285# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000015286echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
15287echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
15288if test "${ac_cv_rshift_extends_sign+set}" = set; then
15289 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015290else
Martin v. Löwis11437992002-04-12 09:54:03 +000015291
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015292if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015293 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015294else
Martin v. Löwis11437992002-04-12 09:54:03 +000015295 cat >conftest.$ac_ext <<_ACEOF
15296#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015297#include "confdefs.h"
15298
15299int main()
15300{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015301 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015302}
15303
Martin v. Löwis11437992002-04-12 09:54:03 +000015304_ACEOF
15305rm -f conftest$ac_exeext
15306if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15307 (eval $ac_link) 2>&5
15308 ac_status=$?
15309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15310 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15311 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15312 (eval $ac_try) 2>&5
15313 ac_status=$?
15314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15315 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000015316 ac_cv_rshift_extends_sign=yes
15317else
Martin v. Löwis11437992002-04-12 09:54:03 +000015318 echo "$as_me: program exited with status $ac_status" >&5
15319echo "$as_me: failed program was:" >&5
15320cat conftest.$ac_ext >&5
15321( exit $ac_status )
15322ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015323fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015324rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15325fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000015326fi
15327
Martin v. Löwis11437992002-04-12 09:54:03 +000015328echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
15329echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015330if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015331then
Martin v. Löwis11437992002-04-12 09:54:03 +000015332
15333cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015334#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015335_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015336
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015337fi
15338
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015339# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015340echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
15341echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
15342if test "${ac_cv_have_getc_unlocked+set}" = set; then
15343 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015344else
Martin v. Löwis11437992002-04-12 09:54:03 +000015345
15346cat >conftest.$ac_ext <<_ACEOF
15347#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015348#include "confdefs.h"
15349#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015350#ifdef F77_DUMMY_MAIN
15351# ifdef __cplusplus
15352 extern "C"
15353# endif
15354 int F77_DUMMY_MAIN() { return 1; }
15355#endif
15356int
15357main ()
15358{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015359
15360 FILE *f = fopen("/dev/null", "r");
15361 flockfile(f);
15362 getc_unlocked(f);
15363 funlockfile(f);
15364
Martin v. Löwis11437992002-04-12 09:54:03 +000015365 ;
15366 return 0;
15367}
15368_ACEOF
15369rm -f conftest.$ac_objext conftest$ac_exeext
15370if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15371 (eval $ac_link) 2>&5
15372 ac_status=$?
15373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15374 (exit $ac_status); } &&
15375 { ac_try='test -s conftest$ac_exeext'
15376 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15377 (eval $ac_try) 2>&5
15378 ac_status=$?
15379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15380 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015381 ac_cv_have_getc_unlocked=yes
15382else
Martin v. Löwis11437992002-04-12 09:54:03 +000015383 echo "$as_me: failed program was:" >&5
15384cat conftest.$ac_ext >&5
15385ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015386fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015387rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015388fi
15389
Martin v. Löwis11437992002-04-12 09:54:03 +000015390echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
15391echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015392if test "$ac_cv_have_getc_unlocked" = yes
15393then
Martin v. Löwis11437992002-04-12 09:54:03 +000015394
15395cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015396#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015397_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015398
15399fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015400
Martin v. Löwis0daad592001-09-30 21:09:59 +000015401# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000015402echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
15403echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
15404if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
15405 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015406else
Martin v. Löwis11437992002-04-12 09:54:03 +000015407 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000015408LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015409cat >conftest.$ac_ext <<_ACEOF
15410#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000015411#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015412
Guido van Rossum353ae582001-07-10 16:45:32 +000015413/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015414#ifdef __cplusplus
15415extern "C"
15416#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000015417/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015418 builtin and then its argument prototype would still apply. */
15419char rl_pre_input_hook ();
15420#ifdef F77_DUMMY_MAIN
15421# ifdef __cplusplus
15422 extern "C"
15423# endif
15424 int F77_DUMMY_MAIN() { return 1; }
15425#endif
15426int
15427main ()
15428{
15429rl_pre_input_hook ();
15430 ;
15431 return 0;
15432}
15433_ACEOF
15434rm -f conftest.$ac_objext conftest$ac_exeext
15435if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15436 (eval $ac_link) 2>&5
15437 ac_status=$?
15438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15439 (exit $ac_status); } &&
15440 { ac_try='test -s conftest$ac_exeext'
15441 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15442 (eval $ac_try) 2>&5
15443 ac_status=$?
15444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15445 (exit $ac_status); }; }; then
15446 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015447else
Martin v. Löwis11437992002-04-12 09:54:03 +000015448 echo "$as_me: failed program was:" >&5
15449cat conftest.$ac_ext >&5
15450ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015451fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015452rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15453LIBS=$ac_check_lib_save_LIBS
15454fi
15455echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15456echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
15457if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015458
Martin v. Löwis11437992002-04-12 09:54:03 +000015459cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015460#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015461_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015462
Martin v. Löwis0daad592001-09-30 21:09:59 +000015463fi
15464
Michael W. Hudson54241132001-12-07 15:38:26 +000015465
Martin v. Löwis0daad592001-09-30 21:09:59 +000015466# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000015467echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
15468echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
15469if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
15470 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015471else
Martin v. Löwis11437992002-04-12 09:54:03 +000015472 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000015473LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015474cat >conftest.$ac_ext <<_ACEOF
15475#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000015476#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015477
Martin v. Löwis0daad592001-09-30 21:09:59 +000015478/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015479#ifdef __cplusplus
15480extern "C"
15481#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000015482/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015483 builtin and then its argument prototype would still apply. */
15484char rl_completion_matches ();
15485#ifdef F77_DUMMY_MAIN
15486# ifdef __cplusplus
15487 extern "C"
15488# endif
15489 int F77_DUMMY_MAIN() { return 1; }
15490#endif
15491int
15492main ()
15493{
15494rl_completion_matches ();
15495 ;
15496 return 0;
15497}
15498_ACEOF
15499rm -f conftest.$ac_objext conftest$ac_exeext
15500if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15501 (eval $ac_link) 2>&5
15502 ac_status=$?
15503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15504 (exit $ac_status); } &&
15505 { ac_try='test -s conftest$ac_exeext'
15506 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15507 (eval $ac_try) 2>&5
15508 ac_status=$?
15509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15510 (exit $ac_status); }; }; then
15511 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015512else
Martin v. Löwis11437992002-04-12 09:54:03 +000015513 echo "$as_me: failed program was:" >&5
15514cat conftest.$ac_ext >&5
15515ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015516fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015517rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15518LIBS=$ac_check_lib_save_LIBS
15519fi
15520echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15521echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
15522if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015523
Martin v. Löwis11437992002-04-12 09:54:03 +000015524cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015525#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015526_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015527
Guido van Rossum353ae582001-07-10 16:45:32 +000015528fi
15529
Jack Jansendd19cf82001-12-06 22:36:17 +000015530
Martin v. Löwis11437992002-04-12 09:54:03 +000015531echo "$as_me:$LINENO: checking for broken nice()" >&5
15532echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
15533if test "${ac_cv_broken_nice+set}" = set; then
15534 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015535else
Martin v. Löwis11437992002-04-12 09:54:03 +000015536
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015537if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015538 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015539else
Martin v. Löwis11437992002-04-12 09:54:03 +000015540 cat >conftest.$ac_ext <<_ACEOF
15541#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015542#include "confdefs.h"
15543
15544int main()
15545{
15546 int val1 = nice(1);
15547 if (val1 != -1 && val1 == nice(2))
15548 exit(0);
15549 exit(1);
15550}
15551
Martin v. Löwis11437992002-04-12 09:54:03 +000015552_ACEOF
15553rm -f conftest$ac_exeext
15554if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15555 (eval $ac_link) 2>&5
15556 ac_status=$?
15557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15558 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15559 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15560 (eval $ac_try) 2>&5
15561 ac_status=$?
15562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15563 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015564 ac_cv_broken_nice=yes
15565else
Martin v. Löwis11437992002-04-12 09:54:03 +000015566 echo "$as_me: program exited with status $ac_status" >&5
15567echo "$as_me: failed program was:" >&5
15568cat conftest.$ac_ext >&5
15569( exit $ac_status )
15570ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015571fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015572rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15573fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015574fi
15575
Martin v. Löwis11437992002-04-12 09:54:03 +000015576echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
15577echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015578if test "$ac_cv_broken_nice" = yes
15579then
Martin v. Löwis11437992002-04-12 09:54:03 +000015580
15581cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015582#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015583_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015584
15585fi
15586
Jack Jansen666b1e72001-10-31 12:11:48 +000015587# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000015588echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
15589echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
15590if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
15591 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015592else
Martin v. Löwis11437992002-04-12 09:54:03 +000015593 cat >conftest.$ac_ext <<_ACEOF
15594#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015595#include "confdefs.h"
15596#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015597#ifdef F77_DUMMY_MAIN
15598# ifdef __cplusplus
15599 extern "C"
15600# endif
15601 int F77_DUMMY_MAIN() { return 1; }
15602#endif
15603int
15604main ()
15605{
Jack Jansen666b1e72001-10-31 12:11:48 +000015606
15607 int rtn;
15608 rtn = mvwdelch(0,0,0);
15609
Martin v. Löwis11437992002-04-12 09:54:03 +000015610 ;
15611 return 0;
15612}
15613_ACEOF
15614rm -f conftest.$ac_objext
15615if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15616 (eval $ac_compile) 2>&5
15617 ac_status=$?
15618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15619 (exit $ac_status); } &&
15620 { ac_try='test -s conftest.$ac_objext'
15621 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15622 (eval $ac_try) 2>&5
15623 ac_status=$?
15624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15625 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015626 ac_cv_mvwdelch_is_expression=yes
15627else
Martin v. Löwis11437992002-04-12 09:54:03 +000015628 echo "$as_me: failed program was:" >&5
15629cat conftest.$ac_ext >&5
15630ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015631fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015632rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015633fi
15634
Martin v. Löwis11437992002-04-12 09:54:03 +000015635echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
15636echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015637
15638if test "$ac_cv_mvwdelch_is_expression" = yes
15639then
Martin v. Löwis11437992002-04-12 09:54:03 +000015640
15641cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015642#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015643_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015644
15645fi
15646
Martin v. Löwis11437992002-04-12 09:54:03 +000015647echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
15648echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
15649if test "${ac_cv_window_has_flags+set}" = set; then
15650 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015651else
Martin v. Löwis11437992002-04-12 09:54:03 +000015652 cat >conftest.$ac_ext <<_ACEOF
15653#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015654#include "confdefs.h"
15655#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015656#ifdef F77_DUMMY_MAIN
15657# ifdef __cplusplus
15658 extern "C"
15659# endif
15660 int F77_DUMMY_MAIN() { return 1; }
15661#endif
15662int
15663main ()
15664{
Jack Jansen666b1e72001-10-31 12:11:48 +000015665
15666 WINDOW *w;
15667 w->_flags = 0;
15668
Martin v. Löwis11437992002-04-12 09:54:03 +000015669 ;
15670 return 0;
15671}
15672_ACEOF
15673rm -f conftest.$ac_objext
15674if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15675 (eval $ac_compile) 2>&5
15676 ac_status=$?
15677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15678 (exit $ac_status); } &&
15679 { ac_try='test -s conftest.$ac_objext'
15680 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15681 (eval $ac_try) 2>&5
15682 ac_status=$?
15683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15684 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015685 ac_cv_window_has_flags=yes
15686else
Martin v. Löwis11437992002-04-12 09:54:03 +000015687 echo "$as_me: failed program was:" >&5
15688cat conftest.$ac_ext >&5
15689ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015690fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015691rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015692fi
15693
Martin v. Löwis11437992002-04-12 09:54:03 +000015694echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
15695echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015696
Jack Jansen666b1e72001-10-31 12:11:48 +000015697
15698if test "$ac_cv_window_has_flags" = yes
15699then
Martin v. Löwis11437992002-04-12 09:54:03 +000015700
15701cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015702#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015703_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015704
15705fi
15706
Guido van Rossum95713eb2000-05-18 20:53:31 +000015707# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
15708# Add sys/socket.h to confdefs.h
15709cat >> confdefs.h <<\EOF
15710#ifdef HAVE_SYS_SOCKET_H
15711#include <sys/socket.h>
15712#endif
15713EOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015714echo "$as_me:$LINENO: checking for socklen_t" >&5
15715echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
15716if test "${ac_cv_type_socklen_t+set}" = set; then
15717 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000015718else
Martin v. Löwis11437992002-04-12 09:54:03 +000015719 cat >conftest.$ac_ext <<_ACEOF
15720#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000015721#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015722$ac_includes_default
15723#ifdef F77_DUMMY_MAIN
15724# ifdef __cplusplus
15725 extern "C"
15726# endif
15727 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015728#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015729int
15730main ()
15731{
15732if ((socklen_t *) 0)
15733 return 0;
15734if (sizeof (socklen_t))
15735 return 0;
15736 ;
15737 return 0;
15738}
15739_ACEOF
15740rm -f conftest.$ac_objext
15741if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15742 (eval $ac_compile) 2>&5
15743 ac_status=$?
15744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15745 (exit $ac_status); } &&
15746 { ac_try='test -s conftest.$ac_objext'
15747 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15748 (eval $ac_try) 2>&5
15749 ac_status=$?
15750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15751 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015752 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000015753else
Martin v. Löwis11437992002-04-12 09:54:03 +000015754 echo "$as_me: failed program was:" >&5
15755cat conftest.$ac_ext >&5
15756ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000015757fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015758rm -f conftest.$ac_objext conftest.$ac_ext
15759fi
15760echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
15761echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
15762if test $ac_cv_type_socklen_t = yes; then
15763 :
15764else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015765
Martin v. Löwis11437992002-04-12 09:54:03 +000015766cat >>confdefs.h <<_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015767#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000015768_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015769
15770fi
15771
Michael W. Hudson54241132001-12-07 15:38:26 +000015772
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015773#AC_MSG_CHECKING(for Modules/Setup)
15774#if test ! -f Modules/Setup ; then
15775# if test ! -d Modules ; then
15776# mkdir Modules
15777# fi
15778# cp "$srcdir/Modules/Setup.dist" Modules/Setup
15779# AC_MSG_RESULT(creating)
15780#else
15781# AC_MSG_RESULT(already exists)
15782#fi
15783
Michael W. Hudson54241132001-12-07 15:38:26 +000015784
15785
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015786for h in `(cd $srcdir;echo Python/thread_*.h)`
15787do
15788 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15789done
15790
Michael W. Hudson54241132001-12-07 15:38:26 +000015791
Jack Jansen0b06be72002-06-21 14:48:38 +000015792SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000015793echo "$as_me:$LINENO: checking for build directories" >&5
15794echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015795for dir in $SRCDIRS; do
15796 if test ! -d $dir; then
15797 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015798 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015799done
Martin v. Löwis11437992002-04-12 09:54:03 +000015800echo "$as_me:$LINENO: result: done" >&5
15801echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000015802
Guido van Rossum627b2d71993-12-24 10:39:16 +000015803# generate output files
Martin v. Löwis11437992002-04-12 09:54:03 +000015804ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
15805cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015806# This file is a shell script that caches the results of configure
15807# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015808# scripts and configure runs, see configure's option --config-cache.
15809# It is not useful on other systems. If it contains results you don't
15810# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015811#
Martin v. Löwis11437992002-04-12 09:54:03 +000015812# config.status only pays attention to the cache file if you give it
15813# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015814#
Martin v. Löwis11437992002-04-12 09:54:03 +000015815# `ac_cv_env_foo' variables (set or unset) will be overriden when
15816# loading this file, other *unset* `ac_cv_foo' will be assigned the
15817# following values.
15818
15819_ACEOF
15820
Guido van Rossumf78abae1997-01-21 22:02:36 +000015821# The following way of writing the cache mishandles newlines in values,
15822# but we know of no workaround that is simple, portable, and efficient.
15823# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015824# Ultrix sh set writes to stderr and can't be redirected directly,
15825# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000015826{
15827 (set) 2>&1 |
15828 case `(ac_space=' '; set | grep ac_space) 2>&1` in
15829 *ac_space=\ *)
15830 # `set' does not quote correctly, so add quotes (double-quote
15831 # substitution turns \\\\ into \\, and sed turns \\ into \).
15832 sed -n \
15833 "s/'/'\\\\''/g;
15834 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15835 ;;
15836 *)
15837 # `set' quotes correctly as required by POSIX, so do not add quotes.
15838 sed -n \
15839 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15840 ;;
15841 esac;
15842} |
15843 sed '
15844 t clear
15845 : clear
15846 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15847 t end
15848 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15849 : end' >>confcache
15850if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015851 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015852 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15853 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015854 else
15855 echo "not updating unwritable cache $cache_file"
15856 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015857fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015858rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015859
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015860test "x$prefix" = xNONE && prefix=$ac_default_prefix
15861# Let make expand exec_prefix.
15862test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015863
Martin v. Löwis11437992002-04-12 09:54:03 +000015864# VPATH may cause trouble with some makes, so we remove $(srcdir),
15865# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15866# trailing colons and then remove the whole line if VPATH becomes empty
15867# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000015868if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015869 ac_vpsub='/^[ ]*VPATH[ ]*=/{
15870s/:*\$(srcdir):*/:/;
15871s/:*\${srcdir}:*/:/;
15872s/:*@srcdir@:*/:/;
15873s/^\([^=]*=[ ]*\):*/\1/;
15874s/:*$//;
15875s/^[^=]*=[ ]*$//;
15876}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000015877fi
15878
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015879DEFS=-DHAVE_CONFIG_H
15880
Martin v. Löwis11437992002-04-12 09:54:03 +000015881
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015882: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000015883ac_clean_files_save=$ac_clean_files
15884ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15885{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
15886echo "$as_me: creating $CONFIG_STATUS" >&6;}
15887cat >$CONFIG_STATUS <<_ACEOF
15888#! $SHELL
15889# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015890# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015891# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015892# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015893
Martin v. Löwis11437992002-04-12 09:54:03 +000015894debug=false
15895SHELL=\${CONFIG_SHELL-$SHELL}
15896_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000015897
Martin v. Löwis11437992002-04-12 09:54:03 +000015898cat >>$CONFIG_STATUS <<\_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000015899
Martin v. Löwis11437992002-04-12 09:54:03 +000015900## --------------------- ##
15901## M4sh Initialization. ##
15902## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015903
Martin v. Löwis11437992002-04-12 09:54:03 +000015904# Be Bourne compatible
15905if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15906 emulate sh
15907 NULLCMD=:
15908elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
15909 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000015910fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015911
Martin v. Löwis11437992002-04-12 09:54:03 +000015912# NLS nuisances.
15913# Support unset when possible.
15914if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
15915 as_unset=unset
15916else
15917 as_unset=false
15918fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015919
Martin v. Löwis11437992002-04-12 09:54:03 +000015920(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
15921 { $as_unset LANG || test "${LANG+set}" != set; } ||
15922 { LANG=C; export LANG; }
15923(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
15924 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
15925 { LC_ALL=C; export LC_ALL; }
15926(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
15927 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
15928 { LC_TIME=C; export LC_TIME; }
15929(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
15930 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
15931 { LC_CTYPE=C; export LC_CTYPE; }
15932(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
15933 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
15934 { LANGUAGE=C; export LANGUAGE; }
15935(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
15936 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
15937 { LC_COLLATE=C; export LC_COLLATE; }
15938(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
15939 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
15940 { LC_NUMERIC=C; export LC_NUMERIC; }
15941(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
15942 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
15943 { LC_MESSAGES=C; export LC_MESSAGES; }
15944
15945
15946# Name of the executable.
15947as_me=`(basename "$0") 2>/dev/null ||
15948$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15949 X"$0" : 'X\(//\)$' \| \
15950 X"$0" : 'X\(/\)$' \| \
15951 . : '\(.\)' 2>/dev/null ||
15952echo X/"$0" |
15953 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
15954 /^X\/\(\/\/\)$/{ s//\1/; q; }
15955 /^X\/\(\/\).*/{ s//\1/; q; }
15956 s/.*/./; q'`
15957
15958# PATH needs CR, and LINENO needs CR and PATH.
15959# Avoid depending upon Character Ranges.
15960as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15961as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15962as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15963as_cr_digits='0123456789'
15964as_cr_alnum=$as_cr_Letters$as_cr_digits
15965
15966# The user is always right.
15967if test "${PATH_SEPARATOR+set}" != set; then
15968 echo "#! /bin/sh" >conftest.sh
15969 echo "exit 0" >>conftest.sh
15970 chmod +x conftest.sh
15971 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
15972 PATH_SEPARATOR=';'
15973 else
15974 PATH_SEPARATOR=:
15975 fi
15976 rm -f conftest.sh
15977fi
15978
15979
15980 as_lineno_1=$LINENO
15981 as_lineno_2=$LINENO
15982 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
15983 test "x$as_lineno_1" != "x$as_lineno_2" &&
15984 test "x$as_lineno_3" = "x$as_lineno_2" || {
15985 # Find who we are. Look in the path if we contain no path at all
15986 # relative or not.
15987 case $0 in
15988 *[\\/]* ) as_myself=$0 ;;
15989 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15990for as_dir in $PATH
15991do
15992 IFS=$as_save_IFS
15993 test -z "$as_dir" && as_dir=.
15994 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15995done
15996
15997 ;;
15998 esac
15999 # We did not find ourselves, most probably we were run as `sh COMMAND'
16000 # in which case we are not to be found in the path.
16001 if test "x$as_myself" = x; then
16002 as_myself=$0
16003 fi
16004 if test ! -f "$as_myself"; then
16005 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
16006echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
16007 { (exit 1); exit 1; }; }
16008 fi
16009 case $CONFIG_SHELL in
16010 '')
16011 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16012for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
16013do
16014 IFS=$as_save_IFS
16015 test -z "$as_dir" && as_dir=.
16016 for as_base in sh bash ksh sh5; do
16017 case $as_dir in
16018 /*)
16019 if ("$as_dir/$as_base" -c '
16020 as_lineno_1=$LINENO
16021 as_lineno_2=$LINENO
16022 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16023 test "x$as_lineno_1" != "x$as_lineno_2" &&
16024 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
16025 CONFIG_SHELL=$as_dir/$as_base
16026 export CONFIG_SHELL
16027 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
16028 fi;;
16029 esac
16030 done
16031done
16032;;
Jack Jansendd19cf82001-12-06 22:36:17 +000016033 esac
16034
Martin v. Löwis11437992002-04-12 09:54:03 +000016035 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
16036 # uniformly replaced by the line number. The first 'sed' inserts a
16037 # line-number line before each line; the second 'sed' does the real
16038 # work. The second script uses 'N' to pair each line-number line
16039 # with the numbered line, and appends trailing '-' during
16040 # substitution so that $LINENO is not a special case at line end.
16041 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
16042 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
16043 sed '=' <$as_myself |
16044 sed '
16045 N
16046 s,$,-,
16047 : loop
16048 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
16049 t loop
16050 s,-$,,
16051 s,^['$as_cr_digits']*\n,,
16052 ' >$as_me.lineno &&
16053 chmod +x $as_me.lineno ||
16054 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16055echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
16056 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016057
Martin v. Löwis11437992002-04-12 09:54:03 +000016058 # Don't try to exec as it changes $[0], causing all sort of problems
16059 # (the dirname of $[0] is not the place where we might find the
16060 # original and so on. Autoconf is especially sensible to this).
16061 . ./$as_me.lineno
16062 # Exit status is that of the last command.
16063 exit
16064}
16065
16066
16067case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16068 *c*,-n*) ECHO_N= ECHO_C='
16069' ECHO_T=' ' ;;
16070 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16071 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
16072esac
16073
16074if expr a : '\(a\)' >/dev/null 2>&1; then
16075 as_expr=expr
16076else
16077 as_expr=false
16078fi
16079
16080rm -f conf$$ conf$$.exe conf$$.file
16081echo >conf$$.file
16082if ln -s conf$$.file conf$$ 2>/dev/null; then
16083 # We could just check for DJGPP; but this test a) works b) is more generic
16084 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16085 if test -f conf$$.exe; then
16086 # Don't use ln at all; we don't have any links
16087 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016088 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016089 as_ln_s='ln -s'
16090 fi
16091elif ln conf$$.file conf$$ 2>/dev/null; then
16092 as_ln_s=ln
16093else
16094 as_ln_s='cp -p'
16095fi
16096rm -f conf$$ conf$$.exe conf$$.file
16097
16098as_executable_p="test -f"
16099
16100# Sed expression to map a string onto a valid CPP name.
16101as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
16102
16103# Sed expression to map a string onto a valid variable name.
16104as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
16105
16106
16107# IFS
16108# We need space, tab and new line, in precisely that order.
16109as_nl='
16110'
16111IFS=" $as_nl"
16112
16113# CDPATH.
16114$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
16115
16116exec 6>&1
16117
16118# Open the log real soon, to keep \$[0] and so on meaningful, and to
16119# report actual input values of CONFIG_FILES etc. instead of their
16120# values after options handling. Logging --version etc. is OK.
16121exec 5>>config.log
16122{
16123 echo
16124 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16125## Running $as_me. ##
16126_ASBOX
16127} >&5
16128cat >&5 <<_CSEOF
16129
16130This file was extended by $as_me, which was
16131generated by GNU Autoconf 2.53. Invocation command line was
16132
16133 CONFIG_FILES = $CONFIG_FILES
16134 CONFIG_HEADERS = $CONFIG_HEADERS
16135 CONFIG_LINKS = $CONFIG_LINKS
16136 CONFIG_COMMANDS = $CONFIG_COMMANDS
16137 $ $0 $@
16138
16139_CSEOF
16140echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
16141echo >&5
16142_ACEOF
16143
16144# Files that config.status was made for.
16145if test -n "$ac_config_files"; then
16146 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16147fi
16148
16149if test -n "$ac_config_headers"; then
16150 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16151fi
16152
16153if test -n "$ac_config_links"; then
16154 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16155fi
16156
16157if test -n "$ac_config_commands"; then
16158 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16159fi
16160
16161cat >>$CONFIG_STATUS <<\_ACEOF
16162
16163ac_cs_usage="\
16164\`$as_me' instantiates files from templates according to the
16165current configuration.
16166
16167Usage: $0 [OPTIONS] [FILE]...
16168
16169 -h, --help print this help, then exit
16170 -V, --version print version number, then exit
16171 -d, --debug don't remove temporary files
16172 --recheck update $as_me by reconfiguring in the same conditions
16173 --file=FILE[:TEMPLATE]
16174 instantiate the configuration file FILE
16175 --header=FILE[:TEMPLATE]
16176 instantiate the configuration header FILE
16177
16178Configuration files:
16179$config_files
16180
16181Configuration headers:
16182$config_headers
16183
16184Report bugs to <bug-autoconf@gnu.org>."
16185_ACEOF
16186
16187cat >>$CONFIG_STATUS <<_ACEOF
16188ac_cs_version="\\
16189config.status
16190configured by $0, generated by GNU Autoconf 2.53,
16191 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16192
16193Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16194Free Software Foundation, Inc.
16195This config.status script is free software; the Free Software Foundation
16196gives unlimited permission to copy, distribute and modify it."
16197srcdir=$srcdir
16198INSTALL="$INSTALL"
16199_ACEOF
16200
16201cat >>$CONFIG_STATUS <<\_ACEOF
16202# If no file are specified by the user, then we need to provide default
16203# value. By we need to know if files were specified by the user.
16204ac_need_defaults=:
16205while test $# != 0
16206do
16207 case $1 in
16208 --*=*)
16209 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16210 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16211 shift
16212 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16213 shift
16214 ;;
16215 -*);;
16216 *) # This is not an option, so the user has probably given explicit
16217 # arguments.
16218 ac_need_defaults=false;;
16219 esac
16220
16221 case $1 in
16222 # Handling of the options.
16223_ACEOF
16224cat >>$CONFIG_STATUS <<_ACEOF
16225 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16226 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16227 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16228_ACEOF
16229cat >>$CONFIG_STATUS <<\_ACEOF
16230 --version | --vers* | -V )
16231 echo "$ac_cs_version"; exit 0 ;;
16232 --he | --h)
16233 # Conflict between --help and --header
16234 { { echo "$as_me:$LINENO: error: ambiguous option: $1
16235Try \`$0 --help' for more information." >&5
16236echo "$as_me: error: ambiguous option: $1
16237Try \`$0 --help' for more information." >&2;}
16238 { (exit 1); exit 1; }; };;
16239 --help | --hel | -h )
16240 echo "$ac_cs_usage"; exit 0 ;;
16241 --debug | --d* | -d )
16242 debug=: ;;
16243 --file | --fil | --fi | --f )
16244 shift
16245 CONFIG_FILES="$CONFIG_FILES $1"
16246 ac_need_defaults=false;;
16247 --header | --heade | --head | --hea )
16248 shift
16249 CONFIG_HEADERS="$CONFIG_HEADERS $1"
16250 ac_need_defaults=false;;
16251
16252 # This is an error.
16253 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
16254Try \`$0 --help' for more information." >&5
16255echo "$as_me: error: unrecognized option: $1
16256Try \`$0 --help' for more information." >&2;}
16257 { (exit 1); exit 1; }; } ;;
16258
16259 *) ac_config_targets="$ac_config_targets $1" ;;
16260
16261 esac
16262 shift
16263done
16264
16265_ACEOF
16266
16267
16268
16269
16270
16271cat >>$CONFIG_STATUS <<\_ACEOF
16272for ac_config_target in $ac_config_targets
16273do
16274 case "$ac_config_target" in
16275 # Handling of arguments.
16276 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16277 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
16278 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16279 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
16280echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16281 { (exit 1); exit 1; }; };;
16282 esac
16283done
16284
16285# If the user did not use the arguments to specify the items to instantiate,
16286# then the envvar interface is used. Set only those that are not.
16287# We use the long form for the default assignment because of an extremely
16288# bizarre bug on SunOS 4.1.3.
16289if $ac_need_defaults; then
16290 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16291 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16292fi
16293
16294# Create a temporary directory, and hook for its removal unless debugging.
16295$debug ||
16296{
16297 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16298 trap '{ (exit 1); exit 1; }' 1 2 13 15
16299}
16300
16301# Create a (secure) tmp directory for tmp files.
16302: ${TMPDIR=/tmp}
16303{
16304 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16305 test -n "$tmp" && test -d "$tmp"
16306} ||
16307{
16308 tmp=$TMPDIR/cs$$-$RANDOM
16309 (umask 077 && mkdir $tmp)
16310} ||
16311{
16312 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16313 { (exit 1); exit 1; }
16314}
16315
16316_ACEOF
16317
16318cat >>$CONFIG_STATUS <<_ACEOF
16319
16320#
16321# CONFIG_FILES section.
16322#
16323
16324# No need to generate the scripts if there are no CONFIG_FILES.
16325# This happens for instance when ./config.status config.h
16326if test -n "\$CONFIG_FILES"; then
16327 # Protect against being on the right side of a sed subst in config.status.
16328 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16329 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16330s,@SHELL@,$SHELL,;t t
16331s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16332s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16333s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16334s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16335s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16336s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16337s,@exec_prefix@,$exec_prefix,;t t
16338s,@prefix@,$prefix,;t t
16339s,@program_transform_name@,$program_transform_name,;t t
16340s,@bindir@,$bindir,;t t
16341s,@sbindir@,$sbindir,;t t
16342s,@libexecdir@,$libexecdir,;t t
16343s,@datadir@,$datadir,;t t
16344s,@sysconfdir@,$sysconfdir,;t t
16345s,@sharedstatedir@,$sharedstatedir,;t t
16346s,@localstatedir@,$localstatedir,;t t
16347s,@libdir@,$libdir,;t t
16348s,@includedir@,$includedir,;t t
16349s,@oldincludedir@,$oldincludedir,;t t
16350s,@infodir@,$infodir,;t t
16351s,@mandir@,$mandir,;t t
16352s,@build_alias@,$build_alias,;t t
16353s,@host_alias@,$host_alias,;t t
16354s,@target_alias@,$target_alias,;t t
16355s,@DEFS@,$DEFS,;t t
16356s,@ECHO_C@,$ECHO_C,;t t
16357s,@ECHO_N@,$ECHO_N,;t t
16358s,@ECHO_T@,$ECHO_T,;t t
16359s,@LIBS@,$LIBS,;t t
16360s,@VERSION@,$VERSION,;t t
16361s,@SOVERSION@,$SOVERSION,;t t
16362s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
16363s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
16364s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
16365s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
16366s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
16367s,@MACHDEP@,$MACHDEP,;t t
16368s,@SGI_ABI@,$SGI_ABI,;t t
16369s,@CXX@,$CXX,;t t
16370s,@MAINOBJ@,$MAINOBJ,;t t
16371s,@EXEEXT@,$EXEEXT,;t t
16372s,@CC@,$CC,;t t
16373s,@CFLAGS@,$CFLAGS,;t t
16374s,@LDFLAGS@,$LDFLAGS,;t t
16375s,@CPPFLAGS@,$CPPFLAGS,;t t
16376s,@ac_ct_CC@,$ac_ct_CC,;t t
16377s,@OBJEXT@,$OBJEXT,;t t
16378s,@CPP@,$CPP,;t t
16379s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
16380s,@LIBRARY@,$LIBRARY,;t t
16381s,@LDLIBRARY@,$LDLIBRARY,;t t
16382s,@DLLLIBRARY@,$DLLLIBRARY,;t t
16383s,@BLDLIBRARY@,$BLDLIBRARY,;t t
16384s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
16385s,@INSTSONAME@,$INSTSONAME,;t t
16386s,@RUNSHARED@,$RUNSHARED,;t t
16387s,@LINKCC@,$LINKCC,;t t
16388s,@RANLIB@,$RANLIB,;t t
16389s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16390s,@AR@,$AR,;t t
16391s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16392s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16393s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16394s,@LN@,$LN,;t t
16395s,@OPT@,$OPT,;t t
16396s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
16397s,@SO@,$SO,;t t
16398s,@LDSHARED@,$LDSHARED,;t t
16399s,@BLDSHARED@,$BLDSHARED,;t t
16400s,@CCSHARED@,$CCSHARED,;t t
16401s,@LINKFORSHARED@,$LINKFORSHARED,;t t
16402s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016403s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000016404s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
16405s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
16406s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
16407s,@LDLAST@,$LDLAST,;t t
16408s,@THREADOBJ@,$THREADOBJ,;t t
16409s,@DLINCLDIR@,$DLINCLDIR,;t t
16410s,@DYNLOADFILE@,$DYNLOADFILE,;t t
16411s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
16412s,@LIBOBJS@,$LIBOBJS,;t t
16413s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
16414s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
16415s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
16416s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
16417s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
16418s,@LIBM@,$LIBM,;t t
16419s,@LIBC@,$LIBC,;t t
16420s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
16421s,@THREADHEADERS@,$THREADHEADERS,;t t
16422s,@SRCDIRS@,$SRCDIRS,;t t
16423CEOF
16424
16425_ACEOF
16426
16427 cat >>$CONFIG_STATUS <<\_ACEOF
16428 # Split the substitutions into bite-sized pieces for seds with
16429 # small command number limits, like on Digital OSF/1 and HP-UX.
16430 ac_max_sed_lines=48
16431 ac_sed_frag=1 # Number of current file.
16432 ac_beg=1 # First line for current file.
16433 ac_end=$ac_max_sed_lines # Line after last line for current file.
16434 ac_more_lines=:
16435 ac_sed_cmds=
16436 while $ac_more_lines; do
16437 if test $ac_beg -gt 1; then
16438 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16439 else
16440 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16441 fi
16442 if test ! -s $tmp/subs.frag; then
16443 ac_more_lines=false
16444 else
16445 # The purpose of the label and of the branching condition is to
16446 # speed up the sed processing (if there are no `@' at all, there
16447 # is no need to browse any of the substitutions).
16448 # These are the two extra sed commands mentioned above.
16449 (echo ':t
16450 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16451 if test -z "$ac_sed_cmds"; then
16452 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16453 else
16454 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16455 fi
16456 ac_sed_frag=`expr $ac_sed_frag + 1`
16457 ac_beg=$ac_end
16458 ac_end=`expr $ac_end + $ac_max_sed_lines`
16459 fi
16460 done
16461 if test -z "$ac_sed_cmds"; then
16462 ac_sed_cmds=cat
16463 fi
16464fi # test -n "$CONFIG_FILES"
16465
16466_ACEOF
16467cat >>$CONFIG_STATUS <<\_ACEOF
16468for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16469 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16470 case $ac_file in
16471 - | *:- | *:-:* ) # input from stdin
16472 cat >$tmp/stdin
16473 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16474 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16475 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16476 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16477 * ) ac_file_in=$ac_file.in ;;
16478 esac
16479
16480 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16481 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16482$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16483 X"$ac_file" : 'X\(//\)[^/]' \| \
16484 X"$ac_file" : 'X\(//\)$' \| \
16485 X"$ac_file" : 'X\(/\)' \| \
16486 . : '\(.\)' 2>/dev/null ||
16487echo X"$ac_file" |
16488 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16489 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16490 /^X\(\/\/\)$/{ s//\1/; q; }
16491 /^X\(\/\).*/{ s//\1/; q; }
16492 s/.*/./; q'`
16493 { case "$ac_dir" in
16494 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16495 *) as_incr_dir=.;;
16496esac
16497as_dummy="$ac_dir"
16498for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16499 case $as_mkdir_dir in
16500 # Skip DOS drivespec
16501 ?:) as_incr_dir=$as_mkdir_dir ;;
16502 *)
16503 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16504 test -d "$as_incr_dir" ||
16505 mkdir "$as_incr_dir" ||
16506 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16507echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16508 { (exit 1); exit 1; }; }
16509 ;;
16510 esac
16511done; }
16512
16513 ac_builddir=.
16514
16515if test "$ac_dir" != .; then
16516 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
16517 # A "../" for each directory in $ac_dir_suffix.
16518 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
16519else
16520 ac_dir_suffix= ac_top_builddir=
16521fi
16522
16523case $srcdir in
16524 .) # No --srcdir option. We are building in place.
16525 ac_srcdir=.
16526 if test -z "$ac_top_builddir"; then
16527 ac_top_srcdir=.
16528 else
16529 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
16530 fi ;;
16531 [\\/]* | ?:[\\/]* ) # Absolute path.
16532 ac_srcdir=$srcdir$ac_dir_suffix;
16533 ac_top_srcdir=$srcdir ;;
16534 *) # Relative path.
16535 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
16536 ac_top_srcdir=$ac_top_builddir$srcdir ;;
16537esac
16538# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
16539# absolute.
16540ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
16541ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
16542ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
16543ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
16544
16545
16546 case $INSTALL in
16547 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16548 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
16549 esac
16550
16551 if test x"$ac_file" != x-; then
16552 { echo "$as_me:$LINENO: creating $ac_file" >&5
16553echo "$as_me: creating $ac_file" >&6;}
16554 rm -f "$ac_file"
16555 fi
16556 # Let's still pretend it is `configure' which instantiates (i.e., don't
16557 # use $as_me), people would be surprised to read:
16558 # /* config.h. Generated by config.status. */
16559 if test x"$ac_file" = x-; then
16560 configure_input=
16561 else
16562 configure_input="$ac_file. "
16563 fi
16564 configure_input=$configure_input"Generated from `echo $ac_file_in |
16565 sed 's,.*/,,'` by configure."
16566
16567 # First look for the input files in the build tree, otherwise in the
16568 # src tree.
16569 ac_file_inputs=`IFS=:
16570 for f in $ac_file_in; do
16571 case $f in
16572 -) echo $tmp/stdin ;;
16573 [\\/$]*)
16574 # Absolute (can't be DOS-style, as IFS=:)
16575 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16576echo "$as_me: error: cannot find input file: $f" >&2;}
16577 { (exit 1); exit 1; }; }
16578 echo $f;;
16579 *) # Relative
16580 if test -f "$f"; then
16581 # Build tree
16582 echo $f
16583 elif test -f "$srcdir/$f"; then
16584 # Source tree
16585 echo $srcdir/$f
16586 else
16587 # /dev/null tree
16588 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16589echo "$as_me: error: cannot find input file: $f" >&2;}
16590 { (exit 1); exit 1; }; }
16591 fi;;
16592 esac
16593 done` || { (exit 1); exit 1; }
16594_ACEOF
16595cat >>$CONFIG_STATUS <<_ACEOF
16596 sed "$ac_vpsub
16597$extrasub
16598_ACEOF
16599cat >>$CONFIG_STATUS <<\_ACEOF
16600:t
16601/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16602s,@configure_input@,$configure_input,;t t
16603s,@srcdir@,$ac_srcdir,;t t
16604s,@abs_srcdir@,$ac_abs_srcdir,;t t
16605s,@top_srcdir@,$ac_top_srcdir,;t t
16606s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
16607s,@builddir@,$ac_builddir,;t t
16608s,@abs_builddir@,$ac_abs_builddir,;t t
16609s,@top_builddir@,$ac_top_builddir,;t t
16610s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
16611s,@INSTALL@,$ac_INSTALL,;t t
16612" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16613 rm -f $tmp/stdin
16614 if test x"$ac_file" != x-; then
16615 mv $tmp/out $ac_file
16616 else
16617 cat $tmp/out
16618 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016619 fi
16620
Martin v. Löwis11437992002-04-12 09:54:03 +000016621done
16622_ACEOF
16623cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016624
Martin v. Löwis11437992002-04-12 09:54:03 +000016625#
16626# CONFIG_HEADER section.
16627#
Guido van Rossum627b2d71993-12-24 10:39:16 +000016628
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016629# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16630# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016631#
16632# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000016633ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
16634ac_dB='[ ].*$,\1#\2'
16635ac_dC=' '
16636ac_dD=',;t'
16637# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16638ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
16639ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016640ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000016641ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016642
Martin v. Löwis11437992002-04-12 09:54:03 +000016643for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000016644 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000016645 case $ac_file in
16646 - | *:- | *:-:* ) # input from stdin
16647 cat >$tmp/stdin
16648 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16649 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16650 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16651 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16652 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016653 esac
16654
Martin v. Löwis11437992002-04-12 09:54:03 +000016655 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
16656echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000016657
Martin v. Löwis11437992002-04-12 09:54:03 +000016658 # First look for the input files in the build tree, otherwise in the
16659 # src tree.
16660 ac_file_inputs=`IFS=:
16661 for f in $ac_file_in; do
16662 case $f in
16663 -) echo $tmp/stdin ;;
16664 [\\/$]*)
16665 # Absolute (can't be DOS-style, as IFS=:)
16666 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16667echo "$as_me: error: cannot find input file: $f" >&2;}
16668 { (exit 1); exit 1; }; }
16669 echo $f;;
16670 *) # Relative
16671 if test -f "$f"; then
16672 # Build tree
16673 echo $f
16674 elif test -f "$srcdir/$f"; then
16675 # Source tree
16676 echo $srcdir/$f
16677 else
16678 # /dev/null tree
16679 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16680echo "$as_me: error: cannot find input file: $f" >&2;}
16681 { (exit 1); exit 1; }; }
16682 fi;;
16683 esac
16684 done` || { (exit 1); exit 1; }
16685 # Remove the trailing spaces.
16686 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016687
Martin v. Löwis11437992002-04-12 09:54:03 +000016688_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016689
Martin v. Löwis11437992002-04-12 09:54:03 +000016690# Transform confdefs.h into two sed scripts, `conftest.defines' and
16691# `conftest.undefs', that substitutes the proper values into
16692# config.h.in to produce config.h. The first handles `#define'
16693# templates, and the second `#undef' templates.
16694# And first: Protect against being on the right side of a sed subst in
16695# config.status. Protect against being in an unquoted here document
16696# in config.status.
16697rm -f conftest.defines conftest.undefs
16698# Using a here document instead of a string reduces the quoting nightmare.
16699# Putting comments in sed scripts is not portable.
16700#
16701# `end' is used to avoid that the second main sed command (meant for
16702# 0-ary CPP macros) applies to n-ary macro definitions.
16703# See the Autoconf documentation for `clear'.
16704cat >confdef2sed.sed <<\_ACEOF
16705s/[\\&,]/\\&/g
16706s,[\\$`],\\&,g
16707t clear
16708: clear
16709s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
16710t end
16711s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
16712: end
16713_ACEOF
16714# If some macros were called several times there might be several times
16715# the same #defines, which is useless. Nevertheless, we may not want to
16716# sort them, since we want the *last* AC-DEFINE to be honored.
16717uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
16718sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
16719rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016720
16721# This sed command replaces #undef with comments. This is necessary, for
16722# example, in the case of _POSIX_SOURCE, which is predefined and required
16723# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016724cat >>conftest.undefs <<\_ACEOF
16725s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
16726_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016727
Martin v. Löwis11437992002-04-12 09:54:03 +000016728# Break up conftest.defines because some shells have a limit on the size
16729# of here documents, and old seds have small limits too (100 cmds).
16730echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
16731echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
16732echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
16733echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016734rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000016735while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000016736do
Martin v. Löwis11437992002-04-12 09:54:03 +000016737 # Write a limited-size here document to $tmp/defines.sed.
16738 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
16739 # Speed up: don't consider the non `#define' lines.
16740 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
16741 # Work around the forget-to-reset-the-flag bug.
16742 echo 't clr' >>$CONFIG_STATUS
16743 echo ': clr' >>$CONFIG_STATUS
16744 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016745 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016746 sed -f $tmp/defines.sed $tmp/in >$tmp/out
16747 rm -f $tmp/in
16748 mv $tmp/out $tmp/in
16749' >>$CONFIG_STATUS
16750 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
16751 rm -f conftest.defines
16752 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000016753done
Martin v. Löwis11437992002-04-12 09:54:03 +000016754rm -f conftest.defines
16755echo ' fi # egrep' >>$CONFIG_STATUS
16756echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016757
Martin v. Löwis11437992002-04-12 09:54:03 +000016758# Break up conftest.undefs because some shells have a limit on the size
16759# of here documents, and old seds have small limits too (100 cmds).
16760echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
16761rm -f conftest.tail
16762while grep . conftest.undefs >/dev/null
16763do
16764 # Write a limited-size here document to $tmp/undefs.sed.
16765 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
16766 # Speed up: don't consider the non `#undef'
16767 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
16768 # Work around the forget-to-reset-the-flag bug.
16769 echo 't clr' >>$CONFIG_STATUS
16770 echo ': clr' >>$CONFIG_STATUS
16771 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
16772 echo 'CEOF
16773 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
16774 rm -f $tmp/in
16775 mv $tmp/out $tmp/in
16776' >>$CONFIG_STATUS
16777 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
16778 rm -f conftest.undefs
16779 mv conftest.tail conftest.undefs
16780done
16781rm -f conftest.undefs
16782
16783cat >>$CONFIG_STATUS <<\_ACEOF
16784 # Let's still pretend it is `configure' which instantiates (i.e., don't
16785 # use $as_me), people would be surprised to read:
16786 # /* config.h. Generated by config.status. */
16787 if test x"$ac_file" = x-; then
16788 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000016789 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016790 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000016791 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016792 cat $tmp/in >>$tmp/config.h
16793 rm -f $tmp/in
16794 if test x"$ac_file" != x-; then
16795 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16796 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
16797echo "$as_me: $ac_file is unchanged" >&6;}
16798 else
16799 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16800$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16801 X"$ac_file" : 'X\(//\)[^/]' \| \
16802 X"$ac_file" : 'X\(//\)$' \| \
16803 X"$ac_file" : 'X\(/\)' \| \
16804 . : '\(.\)' 2>/dev/null ||
16805echo X"$ac_file" |
16806 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16807 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16808 /^X\(\/\/\)$/{ s//\1/; q; }
16809 /^X\(\/\).*/{ s//\1/; q; }
16810 s/.*/./; q'`
16811 { case "$ac_dir" in
16812 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16813 *) as_incr_dir=.;;
16814esac
16815as_dummy="$ac_dir"
16816for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16817 case $as_mkdir_dir in
16818 # Skip DOS drivespec
16819 ?:) as_incr_dir=$as_mkdir_dir ;;
16820 *)
16821 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16822 test -d "$as_incr_dir" ||
16823 mkdir "$as_incr_dir" ||
16824 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16825echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16826 { (exit 1); exit 1; }; }
16827 ;;
16828 esac
16829done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016830
Martin v. Löwis11437992002-04-12 09:54:03 +000016831 rm -f $ac_file
16832 mv $tmp/config.h $ac_file
16833 fi
16834 else
16835 cat $tmp/config.h
16836 rm -f $tmp/config.h
16837 fi
16838done
16839_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000016840
Martin v. Löwis11437992002-04-12 09:54:03 +000016841cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016842
Martin v. Löwis11437992002-04-12 09:54:03 +000016843{ (exit 0); exit 0; }
16844_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016845chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000016846ac_clean_files=$ac_clean_files_save
16847
16848
16849# configure is writing to config.log, and then calls config.status.
16850# config.status does its own redirection, appending to config.log.
16851# Unfortunately, on DOS this fails, as config.log is still kept open
16852# by configure, so config.status won't be able to write to it; its
16853# output is simply discarded. So we exec the FD to /dev/null,
16854# effectively closing config.log, so it can be properly (re)opened and
16855# appended to by config.status. When coming back to configure, we
16856# need to make the FD available again.
16857if test "$no_create" != yes; then
16858 ac_cs_success=:
16859 exec 5>/dev/null
16860 $SHELL $CONFIG_STATUS || ac_cs_success=false
16861 exec 5>>config.log
16862 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16863 # would make configure fail if this is the last instruction.
16864 $ac_cs_success || { (exit 1); exit 1; }
16865fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016866
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016867
16868echo "creating Setup"
16869if test ! -f Modules/Setup
16870then
16871 cp $srcdir/Modules/Setup.dist Modules/Setup
16872fi
16873
16874echo "creating Setup.local"
16875if test ! -f Modules/Setup.local
16876then
16877 echo "# Edit this file for local setup changes" >Modules/Setup.local
16878fi
16879
16880echo "creating Makefile"
16881$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16882 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016883 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016884mv config.c Modules