blob: 007ae0fc6e02f68d287241203f957be54a4a6de8 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Mark Hammond8235ea12002-07-19 06:55:41 +00002# From configure.in Revision: 1.332 .
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
Mark Hammond8235ea12002-07-19 06:55:41 +00001228
Jeremy Hylton5a7ef7e2002-07-18 22:39:34 +00001229cat >>confdefs.h <<\_ACEOF
1230#define _XOPEN_SOURCE 500
1231_ACEOF
1232
1233
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001234# Arguments passed to configure.
1235
1236CONFIG_ARGS="$ac_configure_args"
1237
Michael W. Hudson54241132001-12-07 15:38:26 +00001238
Jack Jansene578a632001-08-15 01:27:14 +00001239# Check whether --enable-framework or --disable-framework was given.
1240if test "${enable_framework+set}" = set; then
1241 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001242
Jack Jansene578a632001-08-15 01:27:14 +00001243 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001244 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001245 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001246 esac
1247 case $enableval in
1248 no)
1249 PYTHONFRAMEWORK=
1250 PYTHONFRAMEWORKDIR=no-framework
1251 PYTHONFRAMEWORKPREFIX=
1252 PYTHONFRAMEWORKINSTALLDIR=
1253 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001254 ;;
1255 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001256 PYTHONFRAMEWORK=Python
1257 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001258 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001259 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1260 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001261 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001262
Guido van Rossum563e7081996-09-10 18:20:48 +00001263else
Martin v. Löwis11437992002-04-12 09:54:03 +00001264
Jack Jansene578a632001-08-15 01:27:14 +00001265 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001266 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001267 PYTHONFRAMEWORKPREFIX=
1268 PYTHONFRAMEWORKINSTALLDIR=
1269 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001270
Martin v. Löwis11437992002-04-12 09:54:03 +00001271fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001272
1273
1274
1275
Jack Jansene578a632001-08-15 01:27:14 +00001276
1277##AC_ARG_WITH(dyld,
1278##[ --with-dyld Use (OpenStep|Rhapsody) dynamic linker],,)
1279##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001280# Set name for machine-dependent library files
1281
Martin v. Löwis11437992002-04-12 09:54:03 +00001282echo "$as_me:$LINENO: checking MACHDEP" >&5
1283echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001284if test -z "$MACHDEP"
1285then
Guido van Rossum563e7081996-09-10 18:20:48 +00001286 ac_sys_system=`uname -s`
Martin v. Löwis130fb172001-07-19 11:00:41 +00001287 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001288 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001289 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001290 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001291 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001292 ac_md_system=`echo $ac_sys_system |
1293 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1294 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001295 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001296 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001297
Guido van Rossum07397971997-04-29 21:49:50 +00001298 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001299 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001300 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001301 atheos*) MACHDEP="atheos";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001302 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001303 esac
1304fi
Guido van Rossum91922671997-10-09 20:24:13 +00001305
1306#
1307# SGI compilers allow the specification of the both the ABI and the
1308# ISA on the command line. Depending on the values of these switches,
1309# different and often incompatable code will be generated.
1310#
1311# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1312# thus supply support for various ABI/ISA combinations. The MACHDEP
1313# variable is also adjusted.
1314#
1315
1316if test ! -z "$SGI_ABI"
1317then
1318 CC="cc $SGI_ABI"
1319 LDFLAGS="$SGI_ABI $LDFLAGS"
1320 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1321fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001322echo "$as_me:$LINENO: result: $MACHDEP" >&5
1323echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001324
Guido van Rossum627b2d71993-12-24 10:39:16 +00001325# checks for alternative programs
Martin v. Löwis11437992002-04-12 09:54:03 +00001326echo "$as_me:$LINENO: checking for --without-gcc" >&5
1327echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1328
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001329# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001330if test "${with_gcc+set}" = set; then
1331 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001332
Guido van Rossum7f43da71994-08-01 12:15:30 +00001333 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001334 no) CC=cc
1335 without_gcc=yes;;
1336 yes) CC=gcc
1337 without_gcc=no;;
1338 *) CC=$withval
1339 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001340 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001341else
Martin v. Löwis11437992002-04-12 09:54:03 +00001342
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001343 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001344 AIX*) CC=cc_r
1345 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001346 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001347 case $BE_HOST_CPU in
1348 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001349 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001350 without_gcc=yes
Mark Hammond8235ea12002-07-19 06:55:41 +00001351 OPT="-O -export pragma"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001352 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001353 ;;
1354 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001355 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001356 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +00001357 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001358 ;;
1359 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001360 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1361echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1362 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001363 ;;
1364 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001365 AR="\$(srcdir)/Modules/ar_beos"
1366 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001367 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001368 Monterey*)
1369 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001370 without_gcc=;;
1371 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001372 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001373fi;
1374echo "$as_me:$LINENO: result: $without_gcc" >&5
1375echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001376
1377
Guido van Rossum95012191999-12-16 17:50:52 +00001378
Fred Drakea1a84e72001-03-06 05:52:16 +00001379MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001380echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1381echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1382
Guido van Rossum95012191999-12-16 17:50:52 +00001383# Check whether --with-cxx or --without-cxx was given.
1384if test "${with_cxx+set}" = set; then
1385 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001386
Martin v. Löwis22352952000-12-13 17:37:02 +00001387 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001388 case $withval in
1389 no) CXX=
1390 with_cxx=no;;
1391 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001392 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001393 with_cxx=$withval;;
1394 esac
1395else
Martin v. Löwis11437992002-04-12 09:54:03 +00001396
Guido van Rossum95012191999-12-16 17:50:52 +00001397 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001398 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001399
Martin v. Löwis11437992002-04-12 09:54:03 +00001400fi;
1401echo "$as_me:$LINENO: result: $with_cxx" >&5
1402echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001403
1404if test "$with_cxx" = "yes"
1405then
Martin v. Löwis11437992002-04-12 09:54:03 +00001406 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1407echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1408 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001409fi
1410
1411
1412
1413
Martin v. Löwis11437992002-04-12 09:54:03 +00001414if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001415then
1416 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1417do
Martin v. Löwis11437992002-04-12 09:54:03 +00001418 # 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 +00001419set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001420echo "$as_me:$LINENO: checking for $ac_word" >&5
1421echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1422if test "${ac_cv_prog_CXX+set}" = set; then
1423 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001424else
1425 if test -n "$CXX"; then
1426 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1427else
Martin v. Löwis11437992002-04-12 09:54:03 +00001428as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1429for as_dir in $PATH
1430do
1431 IFS=$as_save_IFS
1432 test -z "$as_dir" && as_dir=.
1433 for ac_exec_ext in '' $ac_executable_extensions; do
1434 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1435 ac_cv_prog_CXX="$ac_prog"
1436 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1437 break 2
1438 fi
1439done
1440done
1441
Martin v. Löwis22352952000-12-13 17:37:02 +00001442fi
1443fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001444CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001445if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001446 echo "$as_me:$LINENO: result: $CXX" >&5
1447echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001448else
Martin v. Löwis11437992002-04-12 09:54:03 +00001449 echo "$as_me:$LINENO: result: no" >&5
1450echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001451fi
1452
Martin v. Löwis11437992002-04-12 09:54:03 +00001453 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001454done
1455test -n "$CXX" || CXX="notfound"
1456
1457 if test "$CXX" = "notfound"
1458 then
1459 CXX=
1460 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001461 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001462ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001463ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1464ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1465ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1466 cat >conftest.$ac_ext <<_ACEOF
1467#line $LINENO "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +00001468#include "confdefs.h"
1469
Martin v. Löwis11437992002-04-12 09:54:03 +00001470#ifdef F77_DUMMY_MAIN
1471# ifdef __cplusplus
1472 extern "C"
1473# endif
1474 int F77_DUMMY_MAIN() { return 1; }
1475#endif
1476int
1477main ()
1478{
Michael W. Hudson54241132001-12-07 15:38:26 +00001479
Martin v. Löwis11437992002-04-12 09:54:03 +00001480 ;
1481 return 0;
1482}
1483_ACEOF
1484ac_clean_files_save=$ac_clean_files
1485ac_clean_files="$ac_clean_files a.out a.exe"
1486# Try to create an executable without -o first, disregard a.out.
1487# It will help us diagnose broken compilers, and finding out an intuition
1488# of exeext.
1489echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1490echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1491ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1492if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1493 (eval $ac_link_default) 2>&5
1494 ac_status=$?
1495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1496 (exit $ac_status); }; then
1497 # Find the output, starting from the most likely. This scheme is
1498# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1499# resort.
1500
1501# Be careful to initialize this variable, since it used to be cached.
1502# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1503ac_cv_exeext=
1504for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1505 ls a.out conftest 2>/dev/null;
1506 ls a.* conftest.* 2>/dev/null`; do
1507 case $ac_file in
1508 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1509 a.out ) # We found the default executable, but exeext='' is most
1510 # certainly right.
1511 break;;
1512 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1513 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1514 export ac_cv_exeext
1515 break;;
1516 * ) break;;
1517 esac
1518done
1519else
1520 echo "$as_me: failed program was:" >&5
1521cat conftest.$ac_ext >&5
1522{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables" >&5
1523echo "$as_me: error: C++ compiler cannot create executables" >&2;}
1524 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001525fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001526
1527ac_exeext=$ac_cv_exeext
1528echo "$as_me:$LINENO: result: $ac_file" >&5
1529echo "${ECHO_T}$ac_file" >&6
1530
1531# Check the compiler produces executables we can run. If not, either
1532# the compiler is broken, or we cross compile.
1533echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1534echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1535# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1536# If not cross compiling, check that we can run a simple program.
1537if test "$cross_compiling" != yes; then
1538 if { ac_try='./$ac_file'
1539 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1540 (eval $ac_try) 2>&5
1541 ac_status=$?
1542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1543 (exit $ac_status); }; }; then
1544 cross_compiling=no
1545 else
1546 if test "$cross_compiling" = maybe; then
1547 cross_compiling=yes
1548 else
1549 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1550If you meant to cross compile, use \`--host'." >&5
1551echo "$as_me: error: cannot run C++ compiled programs.
1552If you meant to cross compile, use \`--host'." >&2;}
1553 { (exit 1); exit 1; }; }
1554 fi
1555 fi
1556fi
1557echo "$as_me:$LINENO: result: yes" >&5
1558echo "${ECHO_T}yes" >&6
1559
1560rm -f a.out a.exe conftest$ac_cv_exeext
1561ac_clean_files=$ac_clean_files_save
1562# Check the compiler produces executables we can run. If not, either
1563# the compiler is broken, or we cross compile.
1564echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1565echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1566echo "$as_me:$LINENO: result: $cross_compiling" >&5
1567echo "${ECHO_T}$cross_compiling" >&6
1568
1569echo "$as_me:$LINENO: checking for suffix of executables" >&5
1570echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1571if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1572 (eval $ac_link) 2>&5
1573 ac_status=$?
1574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1575 (exit $ac_status); }; then
1576 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1577# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1578# work properly (i.e., refer to `conftest.exe'), while it won't with
1579# `rm'.
1580for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1581 case $ac_file in
1582 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1583 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1584 export ac_cv_exeext
1585 break;;
1586 * ) break;;
1587 esac
1588done
1589else
1590 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1591echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1592 { (exit 1); exit 1; }; }
1593fi
1594
1595rm -f conftest$ac_cv_exeext
1596echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1597echo "${ECHO_T}$ac_cv_exeext" >&6
1598
1599rm -f conftest.$ac_ext
1600EXEEXT=$ac_cv_exeext
1601ac_exeext=$EXEEXT
1602
1603 ac_ext=c
1604ac_cpp='$CPP $CPPFLAGS'
1605ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1606ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1607ac_compiler_gnu=$ac_cv_c_compiler_gnu
1608
1609
Martin v. Löwis22352952000-12-13 17:37:02 +00001610
1611 fi
1612fi
1613
Guido van Rossum8b131c51995-03-09 14:10:13 +00001614# If the user switches compilers, we can't believe the cache
1615if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1616then
Martin v. Löwis11437992002-04-12 09:54:03 +00001617 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1618(it is also a good idea to do 'make clean' before compiling)" >&5
1619echo "$as_me: error: cached CC is different -- throw away $cache_file
1620(it is also a good idea to do 'make clean' before compiling)" >&2;}
1621 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001622fi
1623
Martin v. Löwis11437992002-04-12 09:54:03 +00001624ac_ext=c
1625ac_cpp='$CPP $CPPFLAGS'
1626ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1627ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1628ac_compiler_gnu=$ac_cv_c_compiler_gnu
1629if test -n "$ac_tool_prefix"; then
1630 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1631set dummy ${ac_tool_prefix}gcc; ac_word=$2
1632echo "$as_me:$LINENO: checking for $ac_word" >&5
1633echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1634if test "${ac_cv_prog_CC+set}" = set; then
1635 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001636else
1637 if test -n "$CC"; then
1638 ac_cv_prog_CC="$CC" # Let the user override the test.
1639else
Martin v. Löwis11437992002-04-12 09:54:03 +00001640as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1641for as_dir in $PATH
1642do
1643 IFS=$as_save_IFS
1644 test -z "$as_dir" && as_dir=.
1645 for ac_exec_ext in '' $ac_executable_extensions; do
1646 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1647 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1648 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1649 break 2
1650 fi
1651done
1652done
1653
Jack Jansendd19cf82001-12-06 22:36:17 +00001654fi
1655fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001656CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001657if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001658 echo "$as_me:$LINENO: result: $CC" >&5
1659echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001660else
Martin v. Löwis11437992002-04-12 09:54:03 +00001661 echo "$as_me:$LINENO: result: no" >&5
1662echo "${ECHO_T}no" >&6
1663fi
1664
1665fi
1666if test -z "$ac_cv_prog_CC"; then
1667 ac_ct_CC=$CC
1668 # Extract the first word of "gcc", so it can be a program name with args.
1669set dummy gcc; ac_word=$2
1670echo "$as_me:$LINENO: checking for $ac_word" >&5
1671echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1672if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1673 echo $ECHO_N "(cached) $ECHO_C" >&6
1674else
1675 if test -n "$ac_ct_CC"; then
1676 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1677else
1678as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1679for as_dir in $PATH
1680do
1681 IFS=$as_save_IFS
1682 test -z "$as_dir" && as_dir=.
1683 for ac_exec_ext in '' $ac_executable_extensions; do
1684 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1685 ac_cv_prog_ac_ct_CC="gcc"
1686 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1687 break 2
1688 fi
1689done
1690done
1691
1692fi
1693fi
1694ac_ct_CC=$ac_cv_prog_ac_ct_CC
1695if test -n "$ac_ct_CC"; then
1696 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1697echo "${ECHO_T}$ac_ct_CC" >&6
1698else
1699 echo "$as_me:$LINENO: result: no" >&5
1700echo "${ECHO_T}no" >&6
1701fi
1702
1703 CC=$ac_ct_CC
1704else
1705 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001706fi
1707
Jack Jansendd19cf82001-12-06 22:36:17 +00001708if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001709 if test -n "$ac_tool_prefix"; then
1710 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1711set dummy ${ac_tool_prefix}cc; ac_word=$2
1712echo "$as_me:$LINENO: checking for $ac_word" >&5
1713echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1714if test "${ac_cv_prog_CC+set}" = set; then
1715 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001716else
1717 if test -n "$CC"; then
1718 ac_cv_prog_CC="$CC" # Let the user override the test.
1719else
Martin v. Löwis11437992002-04-12 09:54:03 +00001720as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1721for as_dir in $PATH
1722do
1723 IFS=$as_save_IFS
1724 test -z "$as_dir" && as_dir=.
1725 for ac_exec_ext in '' $ac_executable_extensions; do
1726 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1727 ac_cv_prog_CC="${ac_tool_prefix}cc"
1728 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1729 break 2
1730 fi
1731done
1732done
1733
1734fi
1735fi
1736CC=$ac_cv_prog_CC
1737if test -n "$CC"; then
1738 echo "$as_me:$LINENO: result: $CC" >&5
1739echo "${ECHO_T}$CC" >&6
1740else
1741 echo "$as_me:$LINENO: result: no" >&5
1742echo "${ECHO_T}no" >&6
1743fi
1744
1745fi
1746if test -z "$ac_cv_prog_CC"; then
1747 ac_ct_CC=$CC
1748 # Extract the first word of "cc", so it can be a program name with args.
1749set dummy cc; ac_word=$2
1750echo "$as_me:$LINENO: checking for $ac_word" >&5
1751echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1752if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1753 echo $ECHO_N "(cached) $ECHO_C" >&6
1754else
1755 if test -n "$ac_ct_CC"; then
1756 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1757else
1758as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1759for as_dir in $PATH
1760do
1761 IFS=$as_save_IFS
1762 test -z "$as_dir" && as_dir=.
1763 for ac_exec_ext in '' $ac_executable_extensions; do
1764 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1765 ac_cv_prog_ac_ct_CC="cc"
1766 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1767 break 2
1768 fi
1769done
1770done
1771
1772fi
1773fi
1774ac_ct_CC=$ac_cv_prog_ac_ct_CC
1775if test -n "$ac_ct_CC"; then
1776 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1777echo "${ECHO_T}$ac_ct_CC" >&6
1778else
1779 echo "$as_me:$LINENO: result: no" >&5
1780echo "${ECHO_T}no" >&6
1781fi
1782
1783 CC=$ac_ct_CC
1784else
1785 CC="$ac_cv_prog_CC"
1786fi
1787
1788fi
1789if test -z "$CC"; then
1790 # Extract the first word of "cc", so it can be a program name with args.
1791set dummy cc; ac_word=$2
1792echo "$as_me:$LINENO: checking for $ac_word" >&5
1793echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1794if test "${ac_cv_prog_CC+set}" = set; then
1795 echo $ECHO_N "(cached) $ECHO_C" >&6
1796else
1797 if test -n "$CC"; then
1798 ac_cv_prog_CC="$CC" # Let the user override the test.
1799else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001800 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001801as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1802for as_dir in $PATH
1803do
1804 IFS=$as_save_IFS
1805 test -z "$as_dir" && as_dir=.
1806 for ac_exec_ext in '' $ac_executable_extensions; do
1807 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1808 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1809 ac_prog_rejected=yes
1810 continue
1811 fi
1812 ac_cv_prog_CC="cc"
1813 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1814 break 2
1815 fi
1816done
1817done
1818
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001819if test $ac_prog_rejected = yes; then
1820 # We found a bogon in the path, so make sure we never use it.
1821 set dummy $ac_cv_prog_CC
1822 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001823 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001824 # We chose a different compiler from the bogus one.
1825 # However, it has the same basename, so the bogon will be chosen
1826 # first if we set CC to just the basename; use the full file name.
1827 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001828 set dummy "$as_dir/$ac_word" ${1+"$@"}
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001829 shift
1830 ac_cv_prog_CC="$@"
1831 fi
1832fi
1833fi
1834fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001835CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001836if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001837 echo "$as_me:$LINENO: result: $CC" >&5
1838echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001839else
Martin v. Löwis11437992002-04-12 09:54:03 +00001840 echo "$as_me:$LINENO: result: no" >&5
1841echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001842fi
1843
Martin v. Löwis11437992002-04-12 09:54:03 +00001844fi
1845if test -z "$CC"; then
1846 if test -n "$ac_tool_prefix"; then
1847 for ac_prog in cl
1848 do
1849 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1850set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1851echo "$as_me:$LINENO: checking for $ac_word" >&5
1852echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1853if test "${ac_cv_prog_CC+set}" = set; then
1854 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001855else
1856 if test -n "$CC"; then
1857 ac_cv_prog_CC="$CC" # Let the user override the test.
1858else
Martin v. Löwis11437992002-04-12 09:54:03 +00001859as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1860for as_dir in $PATH
1861do
1862 IFS=$as_save_IFS
1863 test -z "$as_dir" && as_dir=.
1864 for ac_exec_ext in '' $ac_executable_extensions; do
1865 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1866 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1867 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1868 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00001869 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001870done
1871done
1872
1873fi
1874fi
1875CC=$ac_cv_prog_CC
1876if test -n "$CC"; then
1877 echo "$as_me:$LINENO: result: $CC" >&5
1878echo "${ECHO_T}$CC" >&6
1879else
1880 echo "$as_me:$LINENO: result: no" >&5
1881echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001882fi
1883
Martin v. Löwis11437992002-04-12 09:54:03 +00001884 test -n "$CC" && break
1885 done
1886fi
1887if test -z "$CC"; then
1888 ac_ct_CC=$CC
1889 for ac_prog in cl
1890do
1891 # Extract the first word of "$ac_prog", so it can be a program name with args.
1892set dummy $ac_prog; ac_word=$2
1893echo "$as_me:$LINENO: checking for $ac_word" >&5
1894echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1895if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1896 echo $ECHO_N "(cached) $ECHO_C" >&6
1897else
1898 if test -n "$ac_ct_CC"; then
1899 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1900else
1901as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1902for as_dir in $PATH
1903do
1904 IFS=$as_save_IFS
1905 test -z "$as_dir" && as_dir=.
1906 for ac_exec_ext in '' $ac_executable_extensions; do
1907 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1908 ac_cv_prog_ac_ct_CC="$ac_prog"
1909 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1910 break 2
1911 fi
1912done
1913done
Jack Jansendd19cf82001-12-06 22:36:17 +00001914
Martin v. Löwis11437992002-04-12 09:54:03 +00001915fi
1916fi
1917ac_ct_CC=$ac_cv_prog_ac_ct_CC
1918if test -n "$ac_ct_CC"; then
1919 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1920echo "${ECHO_T}$ac_ct_CC" >&6
1921else
1922 echo "$as_me:$LINENO: result: no" >&5
1923echo "${ECHO_T}no" >&6
1924fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001925
Martin v. Löwis11437992002-04-12 09:54:03 +00001926 test -n "$ac_ct_CC" && break
1927done
Michael W. Hudson54241132001-12-07 15:38:26 +00001928
Martin v. Löwis11437992002-04-12 09:54:03 +00001929 CC=$ac_ct_CC
1930fi
1931
1932fi
1933
1934
1935test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
1936echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
1937 { (exit 1); exit 1; }; }
1938
1939# Provide some information about the compiler.
1940echo "$as_me:$LINENO:" \
1941 "checking for C compiler version" >&5
1942ac_compiler=`set X $ac_compile; echo $2`
1943{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1944 (eval $ac_compiler --version </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{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1954 (eval $ac_compiler -V </dev/null >&5) 2>&5
1955 ac_status=$?
1956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1957 (exit $ac_status); }
1958
1959cat >conftest.$ac_ext <<_ACEOF
1960#line $LINENO "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00001961#include "confdefs.h"
1962
Martin v. Löwis11437992002-04-12 09:54:03 +00001963#ifdef F77_DUMMY_MAIN
1964# ifdef __cplusplus
1965 extern "C"
1966# endif
1967 int F77_DUMMY_MAIN() { return 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001968#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00001969int
1970main ()
1971{
1972
1973 ;
1974 return 0;
1975}
1976_ACEOF
1977ac_clean_files_save=$ac_clean_files
1978ac_clean_files="$ac_clean_files a.out a.exe"
1979# Try to create an executable without -o first, disregard a.out.
1980# It will help us diagnose broken compilers, and finding out an intuition
1981# of exeext.
1982echo "$as_me:$LINENO: checking for C compiler default output" >&5
1983echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1984ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1985if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1986 (eval $ac_link_default) 2>&5
1987 ac_status=$?
1988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1989 (exit $ac_status); }; then
1990 # Find the output, starting from the most likely. This scheme is
1991# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1992# resort.
1993
1994# Be careful to initialize this variable, since it used to be cached.
1995# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1996ac_cv_exeext=
1997for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1998 ls a.out conftest 2>/dev/null;
1999 ls a.* conftest.* 2>/dev/null`; do
2000 case $ac_file in
2001 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
2002 a.out ) # We found the default executable, but exeext='' is most
2003 # certainly right.
2004 break;;
2005 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2006 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2007 export ac_cv_exeext
2008 break;;
2009 * ) break;;
2010 esac
2011done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002012else
Martin v. Löwis11437992002-04-12 09:54:03 +00002013 echo "$as_me: failed program was:" >&5
2014cat conftest.$ac_ext >&5
2015{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2016echo "$as_me: error: C compiler cannot create executables" >&2;}
2017 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002018fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002019
Martin v. Löwis11437992002-04-12 09:54:03 +00002020ac_exeext=$ac_cv_exeext
2021echo "$as_me:$LINENO: result: $ac_file" >&5
2022echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002023
Martin v. Löwis11437992002-04-12 09:54:03 +00002024# Check the compiler produces executables we can run. If not, either
2025# the compiler is broken, or we cross compile.
2026echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2027echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2028# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2029# If not cross compiling, check that we can run a simple program.
2030if test "$cross_compiling" != yes; then
2031 if { ac_try='./$ac_file'
2032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2033 (eval $ac_try) 2>&5
2034 ac_status=$?
2035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2036 (exit $ac_status); }; }; then
2037 cross_compiling=no
2038 else
2039 if test "$cross_compiling" = maybe; then
2040 cross_compiling=yes
2041 else
2042 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2043If you meant to cross compile, use \`--host'." >&5
2044echo "$as_me: error: cannot run C compiled programs.
2045If you meant to cross compile, use \`--host'." >&2;}
2046 { (exit 1); exit 1; }; }
2047 fi
2048 fi
2049fi
2050echo "$as_me:$LINENO: result: yes" >&5
2051echo "${ECHO_T}yes" >&6
2052
2053rm -f a.out a.exe conftest$ac_cv_exeext
2054ac_clean_files=$ac_clean_files_save
2055# Check the compiler produces executables we can run. If not, either
2056# the compiler is broken, or we cross compile.
2057echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2058echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2059echo "$as_me:$LINENO: result: $cross_compiling" >&5
2060echo "${ECHO_T}$cross_compiling" >&6
2061
2062echo "$as_me:$LINENO: checking for suffix of executables" >&5
2063echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2064if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2065 (eval $ac_link) 2>&5
2066 ac_status=$?
2067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2068 (exit $ac_status); }; then
2069 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2070# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2071# work properly (i.e., refer to `conftest.exe'), while it won't with
2072# `rm'.
2073for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2074 case $ac_file in
2075 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2076 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2077 export ac_cv_exeext
2078 break;;
2079 * ) break;;
2080 esac
2081done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002082else
Martin v. Löwis11437992002-04-12 09:54:03 +00002083 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2084echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2085 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002086fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002087
Martin v. Löwis11437992002-04-12 09:54:03 +00002088rm -f conftest$ac_cv_exeext
2089echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2090echo "${ECHO_T}$ac_cv_exeext" >&6
2091
2092rm -f conftest.$ac_ext
2093EXEEXT=$ac_cv_exeext
2094ac_exeext=$EXEEXT
2095echo "$as_me:$LINENO: checking for suffix of object files" >&5
2096echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2097if test "${ac_cv_objext+set}" = set; then
2098 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002099else
Martin v. Löwis11437992002-04-12 09:54:03 +00002100 cat >conftest.$ac_ext <<_ACEOF
2101#line $LINENO "configure"
2102#include "confdefs.h"
2103
2104#ifdef F77_DUMMY_MAIN
2105# ifdef __cplusplus
2106 extern "C"
2107# endif
2108 int F77_DUMMY_MAIN() { return 1; }
2109#endif
2110int
2111main ()
2112{
2113
2114 ;
2115 return 0;
2116}
2117_ACEOF
2118rm -f conftest.o conftest.obj
2119if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2120 (eval $ac_compile) 2>&5
2121 ac_status=$?
2122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2123 (exit $ac_status); }; then
2124 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2125 case $ac_file in
2126 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2127 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2128 break;;
2129 esac
2130done
2131else
2132 echo "$as_me: failed program was:" >&5
2133cat conftest.$ac_ext >&5
2134{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2135echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2136 { (exit 1); exit 1; }; }
2137fi
2138
2139rm -f conftest.$ac_cv_objext conftest.$ac_ext
2140fi
2141echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2142echo "${ECHO_T}$ac_cv_objext" >&6
2143OBJEXT=$ac_cv_objext
2144ac_objext=$OBJEXT
2145echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2146echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2147if test "${ac_cv_c_compiler_gnu+set}" = set; then
2148 echo $ECHO_N "(cached) $ECHO_C" >&6
2149else
2150 cat >conftest.$ac_ext <<_ACEOF
2151#line $LINENO "configure"
2152#include "confdefs.h"
2153
2154#ifdef F77_DUMMY_MAIN
2155# ifdef __cplusplus
2156 extern "C"
2157# endif
2158 int F77_DUMMY_MAIN() { return 1; }
2159#endif
2160int
2161main ()
2162{
2163#ifndef __GNUC__
2164 choke me
2165#endif
2166
2167 ;
2168 return 0;
2169}
2170_ACEOF
2171rm -f conftest.$ac_objext
2172if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2173 (eval $ac_compile) 2>&5
2174 ac_status=$?
2175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2176 (exit $ac_status); } &&
2177 { ac_try='test -s conftest.$ac_objext'
2178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2179 (eval $ac_try) 2>&5
2180 ac_status=$?
2181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2182 (exit $ac_status); }; }; then
2183 ac_compiler_gnu=yes
2184else
2185 echo "$as_me: failed program was:" >&5
2186cat conftest.$ac_ext >&5
2187ac_compiler_gnu=no
2188fi
2189rm -f conftest.$ac_objext conftest.$ac_ext
2190ac_cv_c_compiler_gnu=$ac_compiler_gnu
2191
2192fi
2193echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2194echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2195GCC=`test $ac_compiler_gnu = yes && echo yes`
2196ac_test_CFLAGS=${CFLAGS+set}
2197ac_save_CFLAGS=$CFLAGS
2198CFLAGS="-g"
2199echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2200echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2201if test "${ac_cv_prog_cc_g+set}" = set; then
2202 echo $ECHO_N "(cached) $ECHO_C" >&6
2203else
2204 cat >conftest.$ac_ext <<_ACEOF
2205#line $LINENO "configure"
2206#include "confdefs.h"
2207
2208#ifdef F77_DUMMY_MAIN
2209# ifdef __cplusplus
2210 extern "C"
2211# endif
2212 int F77_DUMMY_MAIN() { return 1; }
2213#endif
2214int
2215main ()
2216{
2217
2218 ;
2219 return 0;
2220}
2221_ACEOF
2222rm -f conftest.$ac_objext
2223if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2224 (eval $ac_compile) 2>&5
2225 ac_status=$?
2226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2227 (exit $ac_status); } &&
2228 { ac_try='test -s conftest.$ac_objext'
2229 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2230 (eval $ac_try) 2>&5
2231 ac_status=$?
2232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2233 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002234 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002235else
Martin v. Löwis11437992002-04-12 09:54:03 +00002236 echo "$as_me: failed program was:" >&5
2237cat conftest.$ac_ext >&5
2238ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002239fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002240rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002241fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002242echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2243echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002244if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002245 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002246elif test $ac_cv_prog_cc_g = yes; then
2247 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002248 CFLAGS="-g -O2"
2249 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002250 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002251 fi
2252else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002253 if test "$GCC" = yes; then
2254 CFLAGS="-O2"
2255 else
2256 CFLAGS=
2257 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002258fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002259# Some people use a C++ compiler to compile C. Since we use `exit',
2260# in C++ we need to declare it. In case someone uses the same compiler
2261# for both compiling C and C++ we need to have the C++ compiler decide
2262# the declaration of exit, since it's the most demanding environment.
2263cat >conftest.$ac_ext <<_ACEOF
2264#ifndef __cplusplus
2265 choke me
2266#endif
2267_ACEOF
2268rm -f conftest.$ac_objext
2269if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2270 (eval $ac_compile) 2>&5
2271 ac_status=$?
2272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2273 (exit $ac_status); } &&
2274 { ac_try='test -s conftest.$ac_objext'
2275 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2276 (eval $ac_try) 2>&5
2277 ac_status=$?
2278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2279 (exit $ac_status); }; }; then
2280 for ac_declaration in \
2281 ''\
2282 '#include <stdlib.h>' \
2283 'extern "C" void std::exit (int) throw (); using std::exit;' \
2284 'extern "C" void std::exit (int); using std::exit;' \
2285 'extern "C" void exit (int) throw ();' \
2286 'extern "C" void exit (int);' \
2287 'void exit (int);'
2288do
2289 cat >conftest.$ac_ext <<_ACEOF
2290#line $LINENO "configure"
2291#include "confdefs.h"
2292#include <stdlib.h>
2293$ac_declaration
2294#ifdef F77_DUMMY_MAIN
2295# ifdef __cplusplus
2296 extern "C"
2297# endif
2298 int F77_DUMMY_MAIN() { return 1; }
2299#endif
2300int
2301main ()
2302{
2303exit (42);
2304 ;
2305 return 0;
2306}
2307_ACEOF
2308rm -f conftest.$ac_objext
2309if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2310 (eval $ac_compile) 2>&5
2311 ac_status=$?
2312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2313 (exit $ac_status); } &&
2314 { ac_try='test -s conftest.$ac_objext'
2315 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2316 (eval $ac_try) 2>&5
2317 ac_status=$?
2318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2319 (exit $ac_status); }; }; then
2320 :
2321else
2322 echo "$as_me: failed program was:" >&5
2323cat conftest.$ac_ext >&5
2324continue
2325fi
2326rm -f conftest.$ac_objext conftest.$ac_ext
2327 cat >conftest.$ac_ext <<_ACEOF
2328#line $LINENO "configure"
2329#include "confdefs.h"
2330$ac_declaration
2331#ifdef F77_DUMMY_MAIN
2332# ifdef __cplusplus
2333 extern "C"
2334# endif
2335 int F77_DUMMY_MAIN() { return 1; }
2336#endif
2337int
2338main ()
2339{
2340exit (42);
2341 ;
2342 return 0;
2343}
2344_ACEOF
2345rm -f conftest.$ac_objext
2346if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2347 (eval $ac_compile) 2>&5
2348 ac_status=$?
2349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2350 (exit $ac_status); } &&
2351 { ac_try='test -s conftest.$ac_objext'
2352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2353 (eval $ac_try) 2>&5
2354 ac_status=$?
2355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2356 (exit $ac_status); }; }; then
2357 break
2358else
2359 echo "$as_me: failed program was:" >&5
2360cat conftest.$ac_ext >&5
2361fi
2362rm -f conftest.$ac_objext conftest.$ac_ext
2363done
2364rm -f conftest*
2365if test -n "$ac_declaration"; then
2366 echo '#ifdef __cplusplus' >>confdefs.h
2367 echo $ac_declaration >>confdefs.h
2368 echo '#endif' >>confdefs.h
2369fi
2370
2371else
2372 echo "$as_me: failed program was:" >&5
2373cat conftest.$ac_ext >&5
2374fi
2375rm -f conftest.$ac_objext conftest.$ac_ext
2376ac_ext=c
2377ac_cpp='$CPP $CPPFLAGS'
2378ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2379ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2380ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002381
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002382
2383# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002384
2385ac_ext=c
2386ac_cpp='$CPP $CPPFLAGS'
2387ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2388ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2389ac_compiler_gnu=$ac_cv_c_compiler_gnu
2390echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2391echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002392# On Suns, sometimes $CPP names a directory.
2393if test -n "$CPP" && test -d "$CPP"; then
2394 CPP=
2395fi
2396if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002397 if test "${ac_cv_prog_CPP+set}" = set; then
2398 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002399else
Martin v. Löwis11437992002-04-12 09:54:03 +00002400 # Double quotes because CPP needs to be expanded
2401 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2402 do
2403 ac_preproc_ok=false
2404for ac_c_preproc_warn_flag in '' yes
2405do
2406 # Use a header file that comes with gcc, so configuring glibc
2407 # with a fresh cross-compiler works.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002408 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002409 # not just through cpp. "Syntax error" is here to catch this case.
2410 cat >conftest.$ac_ext <<_ACEOF
2411#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002412#include "confdefs.h"
2413#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002414 Syntax error
2415_ACEOF
2416if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2417 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2418 ac_status=$?
2419 egrep -v '^ *\+' conftest.er1 >conftest.err
2420 rm -f conftest.er1
2421 cat conftest.err >&5
2422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2423 (exit $ac_status); } >/dev/null; then
2424 if test -s conftest.err; then
2425 ac_cpp_err=$ac_c_preproc_warn_flag
2426 else
2427 ac_cpp_err=
2428 fi
2429else
2430 ac_cpp_err=yes
2431fi
2432if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002433 :
2434else
Martin v. Löwis11437992002-04-12 09:54:03 +00002435 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002436 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002437 # Broken: fails on valid input.
2438continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002439fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002440rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002441
Martin v. Löwis11437992002-04-12 09:54:03 +00002442 # OK, works on sane cases. Now check whether non-existent headers
2443 # can be detected and how.
2444 cat >conftest.$ac_ext <<_ACEOF
2445#line $LINENO "configure"
2446#include "confdefs.h"
2447#include <ac_nonexistent.h>
2448_ACEOF
2449if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2450 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2451 ac_status=$?
2452 egrep -v '^ *\+' conftest.er1 >conftest.err
2453 rm -f conftest.er1
2454 cat conftest.err >&5
2455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2456 (exit $ac_status); } >/dev/null; then
2457 if test -s conftest.err; then
2458 ac_cpp_err=$ac_c_preproc_warn_flag
2459 else
2460 ac_cpp_err=
2461 fi
2462else
2463 ac_cpp_err=yes
2464fi
2465if test -z "$ac_cpp_err"; then
2466 # Broken: success on invalid input.
2467continue
2468else
2469 echo "$as_me: failed program was:" >&5
2470 cat conftest.$ac_ext >&5
2471 # Passes both tests.
2472ac_preproc_ok=:
2473break
2474fi
2475rm -f conftest.err conftest.$ac_ext
2476
2477done
2478# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2479rm -f conftest.err conftest.$ac_ext
2480if $ac_preproc_ok; then
2481 break
2482fi
2483
2484 done
2485 ac_cv_prog_CPP=$CPP
2486
2487fi
2488 CPP=$ac_cv_prog_CPP
2489else
2490 ac_cv_prog_CPP=$CPP
2491fi
2492echo "$as_me:$LINENO: result: $CPP" >&5
2493echo "${ECHO_T}$CPP" >&6
2494ac_preproc_ok=false
2495for ac_c_preproc_warn_flag in '' yes
2496do
2497 # Use a header file that comes with gcc, so configuring glibc
2498 # with a fresh cross-compiler works.
2499 # On the NeXT, cc -E runs the code through the compiler's parser,
2500 # not just through cpp. "Syntax error" is here to catch this case.
2501 cat >conftest.$ac_ext <<_ACEOF
2502#line $LINENO "configure"
2503#include "confdefs.h"
2504#include <assert.h>
2505 Syntax error
2506_ACEOF
2507if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2508 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2509 ac_status=$?
2510 egrep -v '^ *\+' conftest.er1 >conftest.err
2511 rm -f conftest.er1
2512 cat conftest.err >&5
2513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2514 (exit $ac_status); } >/dev/null; then
2515 if test -s conftest.err; then
2516 ac_cpp_err=$ac_c_preproc_warn_flag
2517 else
2518 ac_cpp_err=
2519 fi
2520else
2521 ac_cpp_err=yes
2522fi
2523if test -z "$ac_cpp_err"; then
2524 :
2525else
2526 echo "$as_me: failed program was:" >&5
2527 cat conftest.$ac_ext >&5
2528 # Broken: fails on valid input.
2529continue
2530fi
2531rm -f conftest.err conftest.$ac_ext
2532
2533 # OK, works on sane cases. Now check whether non-existent headers
2534 # can be detected and how.
2535 cat >conftest.$ac_ext <<_ACEOF
2536#line $LINENO "configure"
2537#include "confdefs.h"
2538#include <ac_nonexistent.h>
2539_ACEOF
2540if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2541 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2542 ac_status=$?
2543 egrep -v '^ *\+' conftest.er1 >conftest.err
2544 rm -f conftest.er1
2545 cat conftest.err >&5
2546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2547 (exit $ac_status); } >/dev/null; then
2548 if test -s conftest.err; then
2549 ac_cpp_err=$ac_c_preproc_warn_flag
2550 else
2551 ac_cpp_err=
2552 fi
2553else
2554 ac_cpp_err=yes
2555fi
2556if test -z "$ac_cpp_err"; then
2557 # Broken: success on invalid input.
2558continue
2559else
2560 echo "$as_me: failed program was:" >&5
2561 cat conftest.$ac_ext >&5
2562 # Passes both tests.
2563ac_preproc_ok=:
2564break
2565fi
2566rm -f conftest.err conftest.$ac_ext
2567
2568done
2569# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2570rm -f conftest.err conftest.$ac_ext
2571if $ac_preproc_ok; then
2572 :
2573else
2574 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2575echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2576 { (exit 1); exit 1; }; }
2577fi
2578
2579ac_ext=c
2580ac_cpp='$CPP $CPPFLAGS'
2581ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2582ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2583ac_compiler_gnu=$ac_cv_c_compiler_gnu
2584
2585
2586
2587echo "$as_me:$LINENO: checking for AIX" >&5
2588echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2589cat >conftest.$ac_ext <<_ACEOF
2590#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002591#include "confdefs.h"
2592#ifdef _AIX
2593 yes
2594#endif
2595
Martin v. Löwis11437992002-04-12 09:54:03 +00002596_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002597if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2598 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002599 echo "$as_me:$LINENO: result: yes" >&5
2600echo "${ECHO_T}yes" >&6
2601cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002602#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002603_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002604
2605else
Martin v. Löwis11437992002-04-12 09:54:03 +00002606 echo "$as_me:$LINENO: result: no" >&5
2607echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002608fi
2609rm -f conftest*
2610
Michael W. Hudson54241132001-12-07 15:38:26 +00002611
Martin v. Löwis11437992002-04-12 09:54:03 +00002612echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2613echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2614if test "${ac_cv_header_stdc+set}" = set; then
2615 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002616else
Martin v. Löwis11437992002-04-12 09:54:03 +00002617 cat >conftest.$ac_ext <<_ACEOF
2618#line $LINENO "configure"
2619#include "confdefs.h"
2620#include <stdlib.h>
2621#include <stdarg.h>
2622#include <string.h>
2623#include <float.h>
2624
2625_ACEOF
2626if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2627 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2628 ac_status=$?
2629 egrep -v '^ *\+' conftest.er1 >conftest.err
2630 rm -f conftest.er1
2631 cat conftest.err >&5
2632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2633 (exit $ac_status); } >/dev/null; then
2634 if test -s conftest.err; then
2635 ac_cpp_err=$ac_c_preproc_warn_flag
2636 else
2637 ac_cpp_err=
2638 fi
2639else
2640 ac_cpp_err=yes
2641fi
2642if test -z "$ac_cpp_err"; then
2643 ac_cv_header_stdc=yes
2644else
2645 echo "$as_me: failed program was:" >&5
2646 cat conftest.$ac_ext >&5
2647 ac_cv_header_stdc=no
2648fi
2649rm -f conftest.err conftest.$ac_ext
2650
2651if test $ac_cv_header_stdc = yes; then
2652 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2653 cat >conftest.$ac_ext <<_ACEOF
2654#line $LINENO "configure"
2655#include "confdefs.h"
2656#include <string.h>
2657
2658_ACEOF
2659if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2660 egrep "memchr" >/dev/null 2>&1; then
2661 :
2662else
2663 ac_cv_header_stdc=no
2664fi
2665rm -f conftest*
2666
2667fi
2668
2669if test $ac_cv_header_stdc = yes; then
2670 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2671 cat >conftest.$ac_ext <<_ACEOF
2672#line $LINENO "configure"
2673#include "confdefs.h"
2674#include <stdlib.h>
2675
2676_ACEOF
2677if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2678 egrep "free" >/dev/null 2>&1; then
2679 :
2680else
2681 ac_cv_header_stdc=no
2682fi
2683rm -f conftest*
2684
2685fi
2686
2687if test $ac_cv_header_stdc = yes; then
2688 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2689 if test "$cross_compiling" = yes; then
2690 :
2691else
2692 cat >conftest.$ac_ext <<_ACEOF
2693#line $LINENO "configure"
2694#include "confdefs.h"
2695#include <ctype.h>
2696#if ((' ' & 0x0FF) == 0x020)
2697# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2698# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2699#else
2700# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
2701 || ('j' <= (c) && (c) <= 'r') \
2702 || ('s' <= (c) && (c) <= 'z'))
2703# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2704#endif
2705
2706#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2707int
2708main ()
2709{
2710 int i;
2711 for (i = 0; i < 256; i++)
2712 if (XOR (islower (i), ISLOWER (i))
2713 || toupper (i) != TOUPPER (i))
2714 exit(2);
2715 exit (0);
2716}
2717_ACEOF
2718rm -f conftest$ac_exeext
2719if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2720 (eval $ac_link) 2>&5
2721 ac_status=$?
2722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2723 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2724 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2725 (eval $ac_try) 2>&5
2726 ac_status=$?
2727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2728 (exit $ac_status); }; }; then
2729 :
2730else
2731 echo "$as_me: program exited with status $ac_status" >&5
2732echo "$as_me: failed program was:" >&5
2733cat conftest.$ac_ext >&5
2734( exit $ac_status )
2735ac_cv_header_stdc=no
2736fi
2737rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2738fi
2739fi
2740fi
2741echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2742echo "${ECHO_T}$ac_cv_header_stdc" >&6
2743if test $ac_cv_header_stdc = yes; then
2744
2745cat >>confdefs.h <<\_ACEOF
2746#define STDC_HEADERS 1
2747_ACEOF
2748
2749fi
2750
2751# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2762 inttypes.h stdint.h unistd.h
2763do
2764as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2765echo "$as_me:$LINENO: checking for $ac_header" >&5
2766echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2767if eval "test \"\${$as_ac_Header+set}\" = set"; then
2768 echo $ECHO_N "(cached) $ECHO_C" >&6
2769else
2770 cat >conftest.$ac_ext <<_ACEOF
2771#line $LINENO "configure"
2772#include "confdefs.h"
2773$ac_includes_default
2774
2775#include <$ac_header>
2776_ACEOF
2777rm -f conftest.$ac_objext
2778if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2779 (eval $ac_compile) 2>&5
2780 ac_status=$?
2781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2782 (exit $ac_status); } &&
2783 { ac_try='test -s conftest.$ac_objext'
2784 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2785 (eval $ac_try) 2>&5
2786 ac_status=$?
2787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2788 (exit $ac_status); }; }; then
2789 eval "$as_ac_Header=yes"
2790else
2791 echo "$as_me: failed program was:" >&5
2792cat conftest.$ac_ext >&5
2793eval "$as_ac_Header=no"
2794fi
2795rm -f conftest.$ac_objext conftest.$ac_ext
2796fi
2797echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2798echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2799if test `eval echo '${'$as_ac_Header'}'` = yes; then
2800 cat >>confdefs.h <<_ACEOF
2801#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2802_ACEOF
2803
2804fi
2805
2806done
2807
2808
2809if test "${ac_cv_header_minix_config_h+set}" = set; then
2810 echo "$as_me:$LINENO: checking for minix/config.h" >&5
2811echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2812if test "${ac_cv_header_minix_config_h+set}" = set; then
2813 echo $ECHO_N "(cached) $ECHO_C" >&6
2814fi
2815echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2816echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2817else
2818 # Is the header compilable?
2819echo "$as_me:$LINENO: checking minix/config.h usability" >&5
2820echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
2821cat >conftest.$ac_ext <<_ACEOF
2822#line $LINENO "configure"
2823#include "confdefs.h"
2824$ac_includes_default
2825#include <minix/config.h>
2826_ACEOF
2827rm -f conftest.$ac_objext
2828if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2829 (eval $ac_compile) 2>&5
2830 ac_status=$?
2831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2832 (exit $ac_status); } &&
2833 { ac_try='test -s conftest.$ac_objext'
2834 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2835 (eval $ac_try) 2>&5
2836 ac_status=$?
2837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2838 (exit $ac_status); }; }; then
2839 ac_header_compiler=yes
2840else
2841 echo "$as_me: failed program was:" >&5
2842cat conftest.$ac_ext >&5
2843ac_header_compiler=no
2844fi
2845rm -f conftest.$ac_objext conftest.$ac_ext
2846echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2847echo "${ECHO_T}$ac_header_compiler" >&6
2848
2849# Is the header present?
2850echo "$as_me:$LINENO: checking minix/config.h presence" >&5
2851echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
2852cat >conftest.$ac_ext <<_ACEOF
2853#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002854#include "confdefs.h"
2855#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002856_ACEOF
2857if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2858 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2859 ac_status=$?
2860 egrep -v '^ *\+' conftest.er1 >conftest.err
2861 rm -f conftest.er1
2862 cat conftest.err >&5
2863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2864 (exit $ac_status); } >/dev/null; then
2865 if test -s conftest.err; then
2866 ac_cpp_err=$ac_c_preproc_warn_flag
2867 else
2868 ac_cpp_err=
2869 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002870else
Martin v. Löwis11437992002-04-12 09:54:03 +00002871 ac_cpp_err=yes
2872fi
2873if test -z "$ac_cpp_err"; then
2874 ac_header_preproc=yes
2875else
2876 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002877 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002878 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002879fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002880rm -f conftest.err conftest.$ac_ext
2881echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
2882echo "${ECHO_T}$ac_header_preproc" >&6
2883
2884# So? What about this header?
2885case $ac_header_compiler:$ac_header_preproc in
2886 yes:no )
2887 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
2888echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
2889 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2890echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2891 no:yes )
2892 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
2893echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
2894 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
2895echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
2896 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2897echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2898esac
2899echo "$as_me:$LINENO: checking for minix/config.h" >&5
2900echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2901if test "${ac_cv_header_minix_config_h+set}" = set; then
2902 echo $ECHO_N "(cached) $ECHO_C" >&6
2903else
2904 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002905fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002906echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2907echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2908
2909fi
2910if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002911 MINIX=yes
2912else
Martin v. Löwis11437992002-04-12 09:54:03 +00002913 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002914fi
2915
Martin v. Löwis11437992002-04-12 09:54:03 +00002916
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002917if test "$MINIX" = yes; then
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_SOURCE 1
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 _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002926_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002927
Martin v. Löwis11437992002-04-12 09:54:03 +00002928
2929cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002930#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002931_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002932
2933fi
2934
2935
Michael W. Hudson54241132001-12-07 15:38:26 +00002936
Martin v. Löwis11437992002-04-12 09:54:03 +00002937echo "$as_me:$LINENO: checking for --with-suffix" >&5
2938echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002939
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00002940# Check whether --with-suffix or --without-suffix was given.
2941if test "${with_suffix+set}" = set; then
2942 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00002943
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00002944 case $withval in
2945 no) EXEEXT=;;
2946 yes) EXEEXT=.exe;;
2947 *) EXEEXT=$withval;;
2948 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002949fi;
2950echo "$as_me:$LINENO: result: $EXEEXT" >&5
2951echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002952
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002953# Test whether we're running on a non-case-sensitive system, in which
2954# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00002955
Martin v. Löwis11437992002-04-12 09:54:03 +00002956echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
2957echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen0b06be72002-06-21 14:48:38 +00002958if test -d "${srcdir}/python"
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002959then
Martin v. Löwis11437992002-04-12 09:54:03 +00002960 echo "$as_me:$LINENO: result: yes" >&5
2961echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002962 BUILDEXEEXT=.exe
2963else
Martin v. Löwis11437992002-04-12 09:54:03 +00002964 echo "$as_me:$LINENO: result: no" >&5
2965echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002966 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002967fi
Guido van Rossumff555e32000-09-22 15:38:21 +00002968
Guido van Rossumdd997f71998-10-07 19:58:26 +00002969case $MACHDEP in
2970bsdos*)
2971 case $CC in
2972 gcc) CC="$CC -D_HAVE_BSDI";;
2973 esac;;
2974esac
2975
Guido van Rossum24b1e751997-08-21 02:29:16 +00002976case $ac_sys_system in
2977hp*|HP*)
2978 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00002979 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00002980 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002981Monterey*)
2982 case $CC in
2983 cc) CC="$CC -Wl,-Bexport";;
2984 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00002985SunOS*)
2986 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00002987
2988cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00002989#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002990_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00002991
2992 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00002993esac
2994
Michael W. Hudson54241132001-12-07 15:38:26 +00002995
2996
Martin v. Löwis11437992002-04-12 09:54:03 +00002997echo "$as_me:$LINENO: checking LIBRARY" >&5
2998echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00002999if test -z "$LIBRARY"
3000then
3001 LIBRARY='libpython$(VERSION).a'
3002fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003003echo "$as_me:$LINENO: result: $LIBRARY" >&5
3004echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003005
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003006# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003007# name of the library into which to insert object files). BLDLIBRARY is also
3008# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3009# is blank as the main program is not linked directly against LDLIBRARY.
3010# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3011# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3012# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3013# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003014#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003015# RUNSHARED is used to run shared python without installed libraries
3016#
3017# INSTSONAME is the name of the shared library that will be use to install
3018# on the system - some systems like version suffix, others don't
3019
3020
Michael W. Hudson54241132001-12-07 15:38:26 +00003021
3022
3023
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003024
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003025LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003026BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003027INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003028DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003029LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003030RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003031
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003032# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003033# If CXX is set, and if it is needed to link a main function that was
3034# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3035# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003036# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003037# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003038
Martin v. Löwis11437992002-04-12 09:54:03 +00003039echo "$as_me:$LINENO: checking LINKCC" >&5
3040echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003041if test -z "$LINKCC"
3042then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003043 if test -z "$CXX"; then
3044 LINKCC="\$(PURIFY) \$(CC)"
3045 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003046 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003047 $CXX -c conftest.$ac_ext 2>&5
3048 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3049 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3050 then
3051 LINKCC="\$(PURIFY) \$(CC)"
3052 else
3053 LINKCC="\$(PURIFY) \$(CXX)"
3054 fi
3055 rm -fr conftest*
3056 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003057 case $ac_sys_system in
3058 AIX*)
Jack Jansen524a0982002-03-12 15:25:52 +00003059 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003060 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003061 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003062 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003063 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003064 esac
3065fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003066echo "$as_me:$LINENO: result: $LINKCC" >&5
3067echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003068
Martin v. Löwis11437992002-04-12 09:54:03 +00003069echo "$as_me:$LINENO: checking for --enable-shared" >&5
3070echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003071# Check whether --enable-shared or --disable-shared was given.
3072if test "${enable_shared+set}" = set; then
3073 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003074
Martin v. Löwis11437992002-04-12 09:54:03 +00003075fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003076
3077if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003078then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003079 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003080 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003081 enable_shared="yes";;
3082 *)
3083 enable_shared="no";;
3084 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003085fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003086echo "$as_me:$LINENO: result: $enable_shared" >&5
3087echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003088
3089
Martin v. Löwis11437992002-04-12 09:54:03 +00003090echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3091echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003092
Guido van Rossumb8552162001-09-05 14:58:11 +00003093# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3094# library that we build, but we do not want to link against it (we
3095# will find it with a -framework option). For this reason there is an
3096# extra variable BLDLIBRARY against which Python and the extension
3097# modules are linked, BLDLIBRARY. This is normally the same as
3098# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003099if test "$enable_framework"
3100then
3101 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
3102 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
3103 BLDLIBRARY=''
3104else
3105 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003106fi
Jack Jansene578a632001-08-15 01:27:14 +00003107
Martin v. Löwis1142de32002-03-29 16:28:31 +00003108# Other platforms follow
3109if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003110
3111cat >>confdefs.h <<\_ACEOF
3112#define Py_ENABLE_SHARED 1
3113_ACEOF
3114
Martin v. Löwis1142de32002-03-29 16:28:31 +00003115 case $ac_sys_system in
3116 BeOS*)
3117 LDLIBRARY='libpython$(VERSION).so'
3118 ;;
3119 CYGWIN*)
3120 LDLIBRARY='libpython$(VERSION).dll.a'
3121 DLLLIBRARY='libpython$(VERSION).dll'
3122 ;;
3123 SunOS*)
3124 LDLIBRARY='libpython$(VERSION).so'
3125 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
3126 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3127 ;;
3128 Linux*)
3129 LDLIBRARY='libpython$(VERSION).so'
3130 BLDLIBRARY='-L. -lpython$(VERSION)'
3131 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3132 INSTSONAME="$LDLIBRARY".$SOVERSION
3133 ;;
3134 hp*|HP*)
3135 LDLIBRARY='libpython$(VERSION).sl'
3136 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3137 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3138 ;;
3139 OSF*)
3140 LDLIBRARY='libpython$(VERSION).so'
3141 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3142 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3143 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003144 atheos*)
3145 LDLIBRARY='libpython$(VERSION).so'
3146 BLDLIBRARY='-L. -lpython$(VERSION)'
3147 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3148 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003149 esac
3150 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3151 case $MACHDEP in
3152 dguxR4)
3153 LDLIBRARY='libpython$(VERSION).so'
3154 OPT="$OPT -pic"
3155 ;;
3156 esac
3157fi
3158
Martin v. Löwis11437992002-04-12 09:54:03 +00003159echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3160echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003161
Martin v. Löwis11437992002-04-12 09:54:03 +00003162if test -n "$ac_tool_prefix"; then
3163 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3164set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3165echo "$as_me:$LINENO: checking for $ac_word" >&5
3166echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3167if test "${ac_cv_prog_RANLIB+set}" = set; then
3168 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003169else
3170 if test -n "$RANLIB"; then
3171 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3172else
Martin v. Löwis11437992002-04-12 09:54:03 +00003173as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3174for as_dir in $PATH
3175do
3176 IFS=$as_save_IFS
3177 test -z "$as_dir" && as_dir=.
3178 for ac_exec_ext in '' $ac_executable_extensions; do
3179 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3180 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3181 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3182 break 2
3183 fi
3184done
3185done
3186
Guido van Rossum627b2d71993-12-24 10:39:16 +00003187fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003188fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003189RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003190if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003191 echo "$as_me:$LINENO: result: $RANLIB" >&5
3192echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003193else
Martin v. Löwis11437992002-04-12 09:54:03 +00003194 echo "$as_me:$LINENO: result: no" >&5
3195echo "${ECHO_T}no" >&6
3196fi
3197
3198fi
3199if test -z "$ac_cv_prog_RANLIB"; then
3200 ac_ct_RANLIB=$RANLIB
3201 # Extract the first word of "ranlib", so it can be a program name with args.
3202set dummy ranlib; ac_word=$2
3203echo "$as_me:$LINENO: checking for $ac_word" >&5
3204echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3205if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3206 echo $ECHO_N "(cached) $ECHO_C" >&6
3207else
3208 if test -n "$ac_ct_RANLIB"; then
3209 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3210else
3211as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3212for as_dir in $PATH
3213do
3214 IFS=$as_save_IFS
3215 test -z "$as_dir" && as_dir=.
3216 for ac_exec_ext in '' $ac_executable_extensions; do
3217 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3218 ac_cv_prog_ac_ct_RANLIB="ranlib"
3219 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3220 break 2
3221 fi
3222done
3223done
3224
3225 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3226fi
3227fi
3228ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3229if test -n "$ac_ct_RANLIB"; then
3230 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3231echo "${ECHO_T}$ac_ct_RANLIB" >&6
3232else
3233 echo "$as_me:$LINENO: result: no" >&5
3234echo "${ECHO_T}no" >&6
3235fi
3236
3237 RANLIB=$ac_ct_RANLIB
3238else
3239 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003240fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003241
3242
Guido van Rossum7f43da71994-08-01 12:15:30 +00003243for ac_prog in ar aal
3244do
Martin v. Löwis11437992002-04-12 09:54:03 +00003245 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003246set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003247echo "$as_me:$LINENO: checking for $ac_word" >&5
3248echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3249if test "${ac_cv_prog_AR+set}" = set; then
3250 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003251else
3252 if test -n "$AR"; then
3253 ac_cv_prog_AR="$AR" # Let the user override the test.
3254else
Martin v. Löwis11437992002-04-12 09:54:03 +00003255as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3256for as_dir in $PATH
3257do
3258 IFS=$as_save_IFS
3259 test -z "$as_dir" && as_dir=.
3260 for ac_exec_ext in '' $ac_executable_extensions; do
3261 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3262 ac_cv_prog_AR="$ac_prog"
3263 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3264 break 2
3265 fi
3266done
3267done
3268
Guido van Rossum7f43da71994-08-01 12:15:30 +00003269fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003270fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003271AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003272if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003273 echo "$as_me:$LINENO: result: $AR" >&5
3274echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003275else
Martin v. Löwis11437992002-04-12 09:54:03 +00003276 echo "$as_me:$LINENO: result: no" >&5
3277echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003278fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003279
Martin v. Löwis11437992002-04-12 09:54:03 +00003280 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003281done
3282test -n "$AR" || AR="ar"
3283
Michael W. Hudson54241132001-12-07 15:38:26 +00003284
Neil Schemenauera42c8272001-03-31 00:01:55 +00003285case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003286bsdos*|hp*|HP*)
3287 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003288 if test -z "$INSTALL"
3289 then
3290 INSTALL="${srcdir}/install-sh -c"
3291 fi
3292esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003293ac_aux_dir=
3294for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3295 if test -f $ac_dir/install-sh; then
3296 ac_aux_dir=$ac_dir
3297 ac_install_sh="$ac_aux_dir/install-sh -c"
3298 break
3299 elif test -f $ac_dir/install.sh; then
3300 ac_aux_dir=$ac_dir
3301 ac_install_sh="$ac_aux_dir/install.sh -c"
3302 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003303 elif test -f $ac_dir/shtool; then
3304 ac_aux_dir=$ac_dir
3305 ac_install_sh="$ac_aux_dir/shtool install -c"
3306 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003307 fi
3308done
3309if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003310 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3311echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3312 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003313fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003314ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3315ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3316ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003317
3318# Find a good install program. We prefer a C program (faster),
3319# so one script is as good as another. But avoid the broken or
3320# incompatible versions:
3321# SysV /etc/install, /usr/sbin/install
3322# SunOS /usr/etc/install
3323# IRIX /sbin/install
3324# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003325# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003326# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3327# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3328# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3329# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003330echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3331echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003332if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003333if test "${ac_cv_path_install+set}" = set; then
3334 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003335else
Martin v. Löwis11437992002-04-12 09:54:03 +00003336 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3337for as_dir in $PATH
3338do
3339 IFS=$as_save_IFS
3340 test -z "$as_dir" && as_dir=.
3341 # Account for people who put trailing slashes in PATH elements.
3342case $as_dir/ in
3343 ./ | .// | /cC/* | \
3344 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3345 /usr/ucb/* ) ;;
3346 *)
3347 # OSF1 and SCO ODT 3.0 have their own names for install.
3348 # Don't use installbsd from OSF since it installs stuff as root
3349 # by default.
3350 for ac_prog in ginstall scoinst install; do
3351 for ac_exec_ext in '' $ac_executable_extensions; do
3352 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3353 if test $ac_prog = install &&
3354 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3355 # AIX install. It has an incompatible calling convention.
3356 :
3357 elif test $ac_prog = install &&
3358 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3359 # program-specific install script used by HP pwplus--don't use.
3360 :
3361 else
3362 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3363 break 3
3364 fi
3365 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003366 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003367 done
3368 ;;
3369esac
3370done
3371
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003372
3373fi
3374 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003375 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003376 else
3377 # As a last resort, use the slow shell script. We don't cache a
3378 # path for INSTALL within a source directory, because that will
3379 # break other packages using the cache if that directory is
3380 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003381 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003382 fi
3383fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003384echo "$as_me:$LINENO: result: $INSTALL" >&5
3385echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003386
3387# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3388# It thinks the first close brace ends the variable substitution.
3389test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3390
Martin v. Löwis11437992002-04-12 09:54:03 +00003391test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003392
3393test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3394
Michael W. Hudson54241132001-12-07 15:38:26 +00003395
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003396# Not every filesystem supports hard links
3397
3398if test -z "$LN" ; then
3399 case $ac_sys_system in
3400 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003401 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003402 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003403 *) LN=ln;;
3404 esac
3405fi
3406
Fred Drake109d9862001-07-11 06:27:56 +00003407# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003408echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3409echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3410
Fred Drake109d9862001-07-11 06:27:56 +00003411# Check whether --with-pydebug or --without-pydebug was given.
3412if test "${with_pydebug+set}" = set; then
3413 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003414
Fred Drake109d9862001-07-11 06:27:56 +00003415if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003416then
3417
3418cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003419#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003420_ACEOF
3421
3422 echo "$as_me:$LINENO: result: yes" >&5
3423echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003424 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003425else echo "$as_me:$LINENO: result: no" >&5
3426echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003427fi
3428else
Martin v. Löwis11437992002-04-12 09:54:03 +00003429 echo "$as_me:$LINENO: result: no" >&5
3430echo "${ECHO_T}no" >&6
3431fi;
Fred Drake109d9862001-07-11 06:27:56 +00003432
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003433# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003434
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003435if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003436then
Guido van Rossumedca74a1997-07-18 23:29:40 +00003437 case $GCC in
3438 yes)
3439 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003440 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003441 if test "$Py_DEBUG" = 'true' ; then
3442 # Optimization messes up debuggers, so turn it off for
3443 # debug builds.
3444 OPT="-g -Wall -Wstrict-prototypes"
3445 else
3446 OPT="-g -O3 -Wall -Wstrict-prototypes"
3447 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003448 *)
Fred Drake109d9862001-07-11 06:27:56 +00003449 OPT="-O3 -Wall -Wstrict-prototypes";;
3450 esac
3451 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003452 *)
3453 case $ac_sys_system in
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003454 OpenUNIX*|UnixWare*)
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003455 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
3456 *)
3457 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003458 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003459 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00003460 case $ac_sys_system in
3461 Darwin*)
Jack Jansen524a0982002-03-12 15:25:52 +00003462 OPT="$OPT -Wno-long-double -no-cpp-precomp";;
Jack Jansenca06bc62001-08-03 15:32:23 +00003463 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003464fi
3465
Fred Drakee1ceaa02001-12-04 20:55:47 +00003466if test "$Py_DEBUG" = 'true'; then
3467 :
3468else
3469 OPT="-DNDEBUG $OPT"
3470fi
3471
Trent Mick635f6fb2000-08-23 21:33:05 +00003472# The current (beta) Monterey compiler dies with optimizations
3473case $ac_sys_system in
3474Monterey*) OPT="";;
3475esac
3476
Guido van Rossum563e7081996-09-10 18:20:48 +00003477if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003478then
3479 OPT="$OPT $ac_arch_flags"
3480fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003481
Martin v. Löwis11437992002-04-12 09:54:03 +00003482echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3483echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3484if test "${ac_cv_opt_olimit_ok+set}" = set; then
3485 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003486else
3487 ac_save_cc="$CC"
3488CC="$CC -OPT:Olimit=0"
3489if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003490 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003491else
Martin v. Löwis11437992002-04-12 09:54:03 +00003492 cat >conftest.$ac_ext <<_ACEOF
3493#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003494#include "confdefs.h"
3495int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003496_ACEOF
3497rm -f conftest$ac_exeext
3498if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3499 (eval $ac_link) 2>&5
3500 ac_status=$?
3501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3502 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3503 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3504 (eval $ac_try) 2>&5
3505 ac_status=$?
3506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3507 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003508 ac_cv_opt_olimit_ok=yes
3509else
Martin v. Löwis11437992002-04-12 09:54:03 +00003510 echo "$as_me: program exited with status $ac_status" >&5
3511echo "$as_me: failed program was:" >&5
3512cat conftest.$ac_ext >&5
3513( exit $ac_status )
3514ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003515fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003516rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003517fi
Guido van Rossum91922671997-10-09 20:24:13 +00003518CC="$ac_save_cc"
3519fi
3520
Martin v. Löwis11437992002-04-12 09:54:03 +00003521echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3522echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003523if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003524 case $ac_sys_system in
3525 Darwin*) OPT="$OPT" ;;
3526 *) OPT="$OPT -OPT:Olimit=0";;
3527 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003528else
Martin v. Löwis11437992002-04-12 09:54:03 +00003529 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3530echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3531 if test "${ac_cv_olimit_ok+set}" = set; then
3532 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003533else
3534 ac_save_cc="$CC"
3535 CC="$CC -Olimit 1500"
3536 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003537 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003538else
Martin v. Löwis11437992002-04-12 09:54:03 +00003539 cat >conftest.$ac_ext <<_ACEOF
3540#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003541#include "confdefs.h"
3542int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003543_ACEOF
3544rm -f conftest$ac_exeext
3545if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3546 (eval $ac_link) 2>&5
3547 ac_status=$?
3548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3549 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3551 (eval $ac_try) 2>&5
3552 ac_status=$?
3553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3554 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003555 ac_cv_olimit_ok=yes
3556else
Martin v. Löwis11437992002-04-12 09:54:03 +00003557 echo "$as_me: program exited with status $ac_status" >&5
3558echo "$as_me: failed program was:" >&5
3559cat conftest.$ac_ext >&5
3560( exit $ac_status )
3561ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003562fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003563rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003564fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003565 CC="$ac_save_cc"
3566fi
3567
Martin v. Löwis11437992002-04-12 09:54:03 +00003568 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3569echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003570 if test $ac_cv_olimit_ok = yes; then
3571 OPT="$OPT -Olimit 1500"
3572 fi
3573fi
3574
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003575# On some compilers, pthreads are available without further options
3576# (e.g. MacOS X). On some of these systems, the compiler will not
3577# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3578# So we have to see first whether pthreads are available without
3579# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003580echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3581echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3582if test "${ac_cv_pthread_is_default+set}" = set; then
3583 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003584else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003585 if test "$cross_compiling" = yes; then
3586 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003587else
Martin v. Löwis11437992002-04-12 09:54:03 +00003588 cat >conftest.$ac_ext <<_ACEOF
3589#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003590#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003591
Martin v. Löwis130fb172001-07-19 11:00:41 +00003592#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003593
3594void* routine(void* p){return NULL;}
3595
3596int main(){
3597 pthread_t p;
3598 if(pthread_create(&p,NULL,routine,NULL)!=0)
3599 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003600 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003601 return 0;
3602}
3603
Martin v. Löwis11437992002-04-12 09:54:03 +00003604_ACEOF
3605rm -f conftest$ac_exeext
3606if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3607 (eval $ac_link) 2>&5
3608 ac_status=$?
3609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3610 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3611 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3612 (eval $ac_try) 2>&5
3613 ac_status=$?
3614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3615 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003616 ac_cv_pthread_is_default=yes
3617else
Martin v. Löwis11437992002-04-12 09:54:03 +00003618 echo "$as_me: program exited with status $ac_status" >&5
3619echo "$as_me: failed program was:" >&5
3620cat conftest.$ac_ext >&5
3621( exit $ac_status )
3622ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003623fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003624rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003625fi
3626
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003627fi
3628
Martin v. Löwis11437992002-04-12 09:54:03 +00003629echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3630echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003631
Michael W. Hudson54241132001-12-07 15:38:26 +00003632
Martin v. Löwis11437992002-04-12 09:54:03 +00003633if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003634then
3635 ac_cv_kpthread=no
3636else
3637# -Kpthread, if available, provides the right #defines
3638# and linker options to make pthread_create available
3639# Some compilers won't report that they do not support -Kpthread,
3640# so we need to run a program to see whether it really made the
3641# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003642echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3643echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3644if test "${ac_cv_kpthread+set}" = set; then
3645 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003646else
3647 ac_save_cc="$CC"
3648CC="$CC -Kpthread"
3649if test "$cross_compiling" = yes; then
3650 ac_cv_kpthread=no
3651else
Martin v. Löwis11437992002-04-12 09:54:03 +00003652 cat >conftest.$ac_ext <<_ACEOF
3653#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003654#include "confdefs.h"
3655
3656#include <pthread.h>
3657
3658void* routine(void* p){return NULL;}
3659
3660int main(){
3661 pthread_t p;
3662 if(pthread_create(&p,NULL,routine,NULL)!=0)
3663 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003664 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003665 return 0;
3666}
3667
Martin v. Löwis11437992002-04-12 09:54:03 +00003668_ACEOF
3669rm -f conftest$ac_exeext
3670if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3671 (eval $ac_link) 2>&5
3672 ac_status=$?
3673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3674 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3676 (eval $ac_try) 2>&5
3677 ac_status=$?
3678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3679 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003680 ac_cv_kpthread=yes
3681else
Martin v. Löwis11437992002-04-12 09:54:03 +00003682 echo "$as_me: program exited with status $ac_status" >&5
3683echo "$as_me: failed program was:" >&5
3684cat conftest.$ac_ext >&5
3685( exit $ac_status )
3686ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003687fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003688rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003689fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003690CC="$ac_save_cc"
3691fi
3692
Martin v. Löwis11437992002-04-12 09:54:03 +00003693echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3694echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003695fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003696
Michael W. Hudson54241132001-12-07 15:38:26 +00003697
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003698# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00003699echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3700echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3701if test "${ac_cv_header_stdc+set}" = set; then
3702 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003703else
Martin v. Löwis11437992002-04-12 09:54:03 +00003704 cat >conftest.$ac_ext <<_ACEOF
3705#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003706#include "confdefs.h"
3707#include <stdlib.h>
3708#include <stdarg.h>
3709#include <string.h>
3710#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003711
3712_ACEOF
3713if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3714 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3715 ac_status=$?
3716 egrep -v '^ *\+' conftest.er1 >conftest.err
3717 rm -f conftest.er1
3718 cat conftest.err >&5
3719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3720 (exit $ac_status); } >/dev/null; then
3721 if test -s conftest.err; then
3722 ac_cpp_err=$ac_c_preproc_warn_flag
3723 else
3724 ac_cpp_err=
3725 fi
3726else
3727 ac_cpp_err=yes
3728fi
3729if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003730 ac_cv_header_stdc=yes
3731else
Martin v. Löwis11437992002-04-12 09:54:03 +00003732 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003733 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003734 ac_cv_header_stdc=no
3735fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003736rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003737
3738if test $ac_cv_header_stdc = yes; then
3739 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003740 cat >conftest.$ac_ext <<_ACEOF
3741#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003742#include "confdefs.h"
3743#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003744
3745_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003746if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3747 egrep "memchr" >/dev/null 2>&1; then
3748 :
3749else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003750 ac_cv_header_stdc=no
3751fi
3752rm -f conftest*
3753
3754fi
3755
3756if test $ac_cv_header_stdc = yes; then
3757 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003758 cat >conftest.$ac_ext <<_ACEOF
3759#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003760#include "confdefs.h"
3761#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003762
3763_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003764if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3765 egrep "free" >/dev/null 2>&1; then
3766 :
3767else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003768 ac_cv_header_stdc=no
3769fi
3770rm -f conftest*
3771
3772fi
3773
3774if test $ac_cv_header_stdc = yes; then
3775 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00003776 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003777 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003778else
Martin v. Löwis11437992002-04-12 09:54:03 +00003779 cat >conftest.$ac_ext <<_ACEOF
3780#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003781#include "confdefs.h"
3782#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003783#if ((' ' & 0x0FF) == 0x020)
3784# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3785# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3786#else
3787# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3788 || ('j' <= (c) && (c) <= 'r') \
3789 || ('s' <= (c) && (c) <= 'z'))
3790# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3791#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00003792
Martin v. Löwis11437992002-04-12 09:54:03 +00003793#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3794int
3795main ()
3796{
3797 int i;
3798 for (i = 0; i < 256; i++)
3799 if (XOR (islower (i), ISLOWER (i))
3800 || toupper (i) != TOUPPER (i))
3801 exit(2);
3802 exit (0);
3803}
3804_ACEOF
3805rm -f conftest$ac_exeext
3806if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3807 (eval $ac_link) 2>&5
3808 ac_status=$?
3809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3810 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3811 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3812 (eval $ac_try) 2>&5
3813 ac_status=$?
3814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3815 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003816 :
3817else
Martin v. Löwis11437992002-04-12 09:54:03 +00003818 echo "$as_me: program exited with status $ac_status" >&5
3819echo "$as_me: failed program was:" >&5
3820cat conftest.$ac_ext >&5
3821( exit $ac_status )
3822ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003823fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003824rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00003825fi
3826fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003827fi
3828echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3829echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003830if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003831
3832cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003833#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003834_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003835
3836fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003837
Martin v. Löwis11437992002-04-12 09:54:03 +00003838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
Martin v. Löwis11437992002-04-12 09:54:03 +00003875for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003876libintl.h locale.h ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00003877signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Skip Montanaro57454e52002-06-14 20:30:31 +00003878sys/audioio.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003879sys/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 +00003880sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Skip Montanaro8345f712002-06-25 05:53:48 +00003881sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00003882do
Martin v. Löwis11437992002-04-12 09:54:03 +00003883as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3884if eval "test \"\${$as_ac_Header+set}\" = set"; then
3885 echo "$as_me:$LINENO: checking for $ac_header" >&5
3886echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3887if eval "test \"\${$as_ac_Header+set}\" = set"; then
3888 echo $ECHO_N "(cached) $ECHO_C" >&6
3889fi
3890echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3891echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003892else
Martin v. Löwis11437992002-04-12 09:54:03 +00003893 # Is the header compilable?
3894echo "$as_me:$LINENO: checking $ac_header usability" >&5
3895echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3896cat >conftest.$ac_ext <<_ACEOF
3897#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003898#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00003899$ac_includes_default
3900#include <$ac_header>
3901_ACEOF
3902rm -f conftest.$ac_objext
3903if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3904 (eval $ac_compile) 2>&5
3905 ac_status=$?
3906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3907 (exit $ac_status); } &&
3908 { ac_try='test -s conftest.$ac_objext'
3909 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3910 (eval $ac_try) 2>&5
3911 ac_status=$?
3912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3913 (exit $ac_status); }; }; then
3914 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00003915else
Martin v. Löwis11437992002-04-12 09:54:03 +00003916 echo "$as_me: failed program was:" >&5
3917cat conftest.$ac_ext >&5
3918ac_header_compiler=no
3919fi
3920rm -f conftest.$ac_objext conftest.$ac_ext
3921echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3922echo "${ECHO_T}$ac_header_compiler" >&6
3923
3924# Is the header present?
3925echo "$as_me:$LINENO: checking $ac_header presence" >&5
3926echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3927cat >conftest.$ac_ext <<_ACEOF
3928#line $LINENO "configure"
3929#include "confdefs.h"
3930#include <$ac_header>
3931_ACEOF
3932if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3933 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3934 ac_status=$?
3935 egrep -v '^ *\+' conftest.er1 >conftest.err
3936 rm -f conftest.er1
3937 cat conftest.err >&5
3938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3939 (exit $ac_status); } >/dev/null; then
3940 if test -s conftest.err; then
3941 ac_cpp_err=$ac_c_preproc_warn_flag
3942 else
3943 ac_cpp_err=
3944 fi
3945else
3946 ac_cpp_err=yes
3947fi
3948if test -z "$ac_cpp_err"; then
3949 ac_header_preproc=yes
3950else
3951 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003952 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003953 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00003954fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003955rm -f conftest.err conftest.$ac_ext
3956echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3957echo "${ECHO_T}$ac_header_preproc" >&6
3958
3959# So? What about this header?
3960case $ac_header_compiler:$ac_header_preproc in
3961 yes:no )
3962 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3963echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3964 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3965echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3966 no:yes )
3967 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3968echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3969 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3970echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3971 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3972echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3973esac
3974echo "$as_me:$LINENO: checking for $ac_header" >&5
3975echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3976if eval "test \"\${$as_ac_Header+set}\" = set"; then
3977 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003978else
Martin v. Löwis11437992002-04-12 09:54:03 +00003979 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003980fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003981echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3982echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3983
3984fi
3985if test `eval echo '${'$as_ac_Header'}'` = yes; then
3986 cat >>confdefs.h <<_ACEOF
3987#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3988_ACEOF
3989
3990fi
3991
Guido van Rossum627b2d71993-12-24 10:39:16 +00003992done
3993
Martin v. Löwis11437992002-04-12 09:54:03 +00003994
3995
3996
3997
3998
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003999ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004000for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4001 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4002echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4003echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4004if eval "test \"\${$as_ac_Header+set}\" = set"; then
4005 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004006else
Martin v. Löwis11437992002-04-12 09:54:03 +00004007 cat >conftest.$ac_ext <<_ACEOF
4008#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004009#include "confdefs.h"
4010#include <sys/types.h>
4011#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004012
4013#ifdef F77_DUMMY_MAIN
4014# ifdef __cplusplus
4015 extern "C"
4016# endif
4017 int F77_DUMMY_MAIN() { return 1; }
4018#endif
4019int
4020main ()
4021{
4022if ((DIR *) 0)
4023return 0;
4024 ;
4025 return 0;
4026}
4027_ACEOF
4028rm -f conftest.$ac_objext
4029if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4030 (eval $ac_compile) 2>&5
4031 ac_status=$?
4032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4033 (exit $ac_status); } &&
4034 { ac_try='test -s conftest.$ac_objext'
4035 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4036 (eval $ac_try) 2>&5
4037 ac_status=$?
4038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4039 (exit $ac_status); }; }; then
4040 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004041else
Martin v. Löwis11437992002-04-12 09:54:03 +00004042 echo "$as_me: failed program was:" >&5
4043cat conftest.$ac_ext >&5
4044eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004045fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004046rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004047fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004048echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4049echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4050if test `eval echo '${'$as_ac_Header'}'` = yes; then
4051 cat >>confdefs.h <<_ACEOF
4052#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4053_ACEOF
4054
4055ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004056fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004057
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004058done
4059# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4060if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004061 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4062echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4063if test "${ac_cv_search_opendir+set}" = set; then
4064 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004065else
Martin v. Löwis11437992002-04-12 09:54:03 +00004066 ac_func_search_save_LIBS=$LIBS
4067ac_cv_search_opendir=no
4068cat >conftest.$ac_ext <<_ACEOF
4069#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004070#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004071
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004072/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004073#ifdef __cplusplus
4074extern "C"
4075#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004076/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004077 builtin and then its argument prototype would still apply. */
4078char opendir ();
4079#ifdef F77_DUMMY_MAIN
4080# ifdef __cplusplus
4081 extern "C"
4082# endif
4083 int F77_DUMMY_MAIN() { return 1; }
4084#endif
4085int
4086main ()
4087{
4088opendir ();
4089 ;
4090 return 0;
4091}
4092_ACEOF
4093rm -f conftest.$ac_objext conftest$ac_exeext
4094if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4095 (eval $ac_link) 2>&5
4096 ac_status=$?
4097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4098 (exit $ac_status); } &&
4099 { ac_try='test -s conftest$ac_exeext'
4100 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4101 (eval $ac_try) 2>&5
4102 ac_status=$?
4103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4104 (exit $ac_status); }; }; then
4105 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004106else
Martin v. Löwis11437992002-04-12 09:54:03 +00004107 echo "$as_me: failed program was:" >&5
4108cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004109fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004110rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4111if test "$ac_cv_search_opendir" = no; then
4112 for ac_lib in dir; do
4113 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4114 cat >conftest.$ac_ext <<_ACEOF
4115#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004116#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004117
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004118/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004119#ifdef __cplusplus
4120extern "C"
4121#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004122/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004123 builtin and then its argument prototype would still apply. */
4124char opendir ();
4125#ifdef F77_DUMMY_MAIN
4126# ifdef __cplusplus
4127 extern "C"
4128# endif
4129 int F77_DUMMY_MAIN() { return 1; }
4130#endif
4131int
4132main ()
4133{
4134opendir ();
4135 ;
4136 return 0;
4137}
4138_ACEOF
4139rm -f conftest.$ac_objext conftest$ac_exeext
4140if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4141 (eval $ac_link) 2>&5
4142 ac_status=$?
4143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4144 (exit $ac_status); } &&
4145 { ac_try='test -s conftest$ac_exeext'
4146 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4147 (eval $ac_try) 2>&5
4148 ac_status=$?
4149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4150 (exit $ac_status); }; }; then
4151 ac_cv_search_opendir="-l$ac_lib"
4152break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004153else
Martin v. Löwis11437992002-04-12 09:54:03 +00004154 echo "$as_me: failed program was:" >&5
4155cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004156fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004157rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4158 done
4159fi
4160LIBS=$ac_func_search_save_LIBS
4161fi
4162echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4163echo "${ECHO_T}$ac_cv_search_opendir" >&6
4164if test "$ac_cv_search_opendir" != no; then
4165 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004166
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004167fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004168
Michael W. Hudson54241132001-12-07 15:38:26 +00004169else
Martin v. Löwis11437992002-04-12 09:54:03 +00004170 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4171echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4172if test "${ac_cv_search_opendir+set}" = set; then
4173 echo $ECHO_N "(cached) $ECHO_C" >&6
4174else
4175 ac_func_search_save_LIBS=$LIBS
4176ac_cv_search_opendir=no
4177cat >conftest.$ac_ext <<_ACEOF
4178#line $LINENO "configure"
4179#include "confdefs.h"
4180
4181/* Override any gcc2 internal prototype to avoid an error. */
4182#ifdef __cplusplus
4183extern "C"
4184#endif
4185/* We use char because int might match the return type of a gcc2
4186 builtin and then its argument prototype would still apply. */
4187char opendir ();
4188#ifdef F77_DUMMY_MAIN
4189# ifdef __cplusplus
4190 extern "C"
4191# endif
4192 int F77_DUMMY_MAIN() { return 1; }
4193#endif
4194int
4195main ()
4196{
4197opendir ();
4198 ;
4199 return 0;
4200}
4201_ACEOF
4202rm -f conftest.$ac_objext conftest$ac_exeext
4203if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4204 (eval $ac_link) 2>&5
4205 ac_status=$?
4206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4207 (exit $ac_status); } &&
4208 { ac_try='test -s conftest$ac_exeext'
4209 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4210 (eval $ac_try) 2>&5
4211 ac_status=$?
4212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4213 (exit $ac_status); }; }; then
4214 ac_cv_search_opendir="none required"
4215else
4216 echo "$as_me: failed program was:" >&5
4217cat conftest.$ac_ext >&5
4218fi
4219rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4220if test "$ac_cv_search_opendir" = no; then
4221 for ac_lib in x; do
4222 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4223 cat >conftest.$ac_ext <<_ACEOF
4224#line $LINENO "configure"
4225#include "confdefs.h"
4226
4227/* Override any gcc2 internal prototype to avoid an error. */
4228#ifdef __cplusplus
4229extern "C"
4230#endif
4231/* We use char because int might match the return type of a gcc2
4232 builtin and then its argument prototype would still apply. */
4233char opendir ();
4234#ifdef F77_DUMMY_MAIN
4235# ifdef __cplusplus
4236 extern "C"
4237# endif
4238 int F77_DUMMY_MAIN() { return 1; }
4239#endif
4240int
4241main ()
4242{
4243opendir ();
4244 ;
4245 return 0;
4246}
4247_ACEOF
4248rm -f conftest.$ac_objext conftest$ac_exeext
4249if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4250 (eval $ac_link) 2>&5
4251 ac_status=$?
4252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4253 (exit $ac_status); } &&
4254 { ac_try='test -s conftest$ac_exeext'
4255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4256 (eval $ac_try) 2>&5
4257 ac_status=$?
4258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4259 (exit $ac_status); }; }; then
4260 ac_cv_search_opendir="-l$ac_lib"
4261break
4262else
4263 echo "$as_me: failed program was:" >&5
4264cat conftest.$ac_ext >&5
4265fi
4266rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4267 done
4268fi
4269LIBS=$ac_func_search_save_LIBS
4270fi
4271echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4272echo "${ECHO_T}$ac_cv_search_opendir" >&6
4273if test "$ac_cv_search_opendir" != no; then
4274 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4275
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004276fi
4277
4278fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004279
Michael W. Hudson54241132001-12-07 15:38:26 +00004280
Guido van Rossum627b2d71993-12-24 10:39:16 +00004281# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004282was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004283echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4284echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4285cat >conftest.$ac_ext <<_ACEOF
4286#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004287#include "confdefs.h"
4288#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004289
4290_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004291if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4292 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004293 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004294else
Martin v. Löwis11437992002-04-12 09:54:03 +00004295
4296
4297cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004298#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004299_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004300
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004301
Guido van Rossum627b2d71993-12-24 10:39:16 +00004302fi
4303rm -f conftest*
4304
Martin v. Löwis11437992002-04-12 09:54:03 +00004305echo "$as_me:$LINENO: result: $was_it_defined" >&5
4306echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004307
Guido van Rossum810cc512001-09-09 23:51:39 +00004308# Two defines needed to enable largefile support on various platforms
4309# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00004310
Martin v. Löwis11437992002-04-12 09:54:03 +00004311cat >>confdefs.h <<\_ACEOF
4312#define _LARGEFILE_SOURCE 1
4313_ACEOF
4314
4315
4316cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004317#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00004318_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004319
Michael W. Hudson54241132001-12-07 15:38:26 +00004320
Guido van Rossum84e7b241996-08-19 21:59:00 +00004321# Add some code to confdefs.h so that the test for off_t works on SCO
4322cat >> confdefs.h <<\EOF
4323#if defined(SCO_DS)
4324#undef _OFF_T
4325#endif
4326EOF
4327
Guido van Rossumef2255b2000-03-10 22:30:29 +00004328# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00004329echo "$as_me:$LINENO: checking for mode_t" >&5
4330echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
4331if test "${ac_cv_type_mode_t+set}" = set; then
4332 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004333else
Martin v. Löwis11437992002-04-12 09:54:03 +00004334 cat >conftest.$ac_ext <<_ACEOF
4335#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004336#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004337$ac_includes_default
4338#ifdef F77_DUMMY_MAIN
4339# ifdef __cplusplus
4340 extern "C"
4341# endif
4342 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004343#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004344int
4345main ()
4346{
4347if ((mode_t *) 0)
4348 return 0;
4349if (sizeof (mode_t))
4350 return 0;
4351 ;
4352 return 0;
4353}
4354_ACEOF
4355rm -f conftest.$ac_objext
4356if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4357 (eval $ac_compile) 2>&5
4358 ac_status=$?
4359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4360 (exit $ac_status); } &&
4361 { ac_try='test -s conftest.$ac_objext'
4362 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4363 (eval $ac_try) 2>&5
4364 ac_status=$?
4365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4366 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00004367 ac_cv_type_mode_t=yes
4368else
Martin v. Löwis11437992002-04-12 09:54:03 +00004369 echo "$as_me: failed program was:" >&5
4370cat conftest.$ac_ext >&5
4371ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00004372fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004373rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004374fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004375echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4376echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4377if test $ac_cv_type_mode_t = yes; then
4378 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004379else
Martin v. Löwis11437992002-04-12 09:54:03 +00004380
4381cat >>confdefs.h <<_ACEOF
4382#define mode_t int
4383_ACEOF
4384
4385fi
4386
4387echo "$as_me:$LINENO: checking for off_t" >&5
4388echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4389if test "${ac_cv_type_off_t+set}" = set; then
4390 echo $ECHO_N "(cached) $ECHO_C" >&6
4391else
4392 cat >conftest.$ac_ext <<_ACEOF
4393#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004394#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004395$ac_includes_default
4396#ifdef F77_DUMMY_MAIN
4397# ifdef __cplusplus
4398 extern "C"
4399# endif
4400 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004401#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004402int
4403main ()
4404{
4405if ((off_t *) 0)
4406 return 0;
4407if (sizeof (off_t))
4408 return 0;
4409 ;
4410 return 0;
4411}
4412_ACEOF
4413rm -f conftest.$ac_objext
4414if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4415 (eval $ac_compile) 2>&5
4416 ac_status=$?
4417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4418 (exit $ac_status); } &&
4419 { ac_try='test -s conftest.$ac_objext'
4420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4421 (eval $ac_try) 2>&5
4422 ac_status=$?
4423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4424 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004425 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004426else
Martin v. Löwis11437992002-04-12 09:54:03 +00004427 echo "$as_me: failed program was:" >&5
4428cat conftest.$ac_ext >&5
4429ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004430fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004431rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004432fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004433echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
4434echo "${ECHO_T}$ac_cv_type_off_t" >&6
4435if test $ac_cv_type_off_t = yes; then
4436 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004437else
Martin v. Löwis11437992002-04-12 09:54:03 +00004438
4439cat >>confdefs.h <<_ACEOF
4440#define off_t long
4441_ACEOF
4442
4443fi
4444
4445echo "$as_me:$LINENO: checking for pid_t" >&5
4446echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4447if test "${ac_cv_type_pid_t+set}" = set; then
4448 echo $ECHO_N "(cached) $ECHO_C" >&6
4449else
4450 cat >conftest.$ac_ext <<_ACEOF
4451#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004452#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004453$ac_includes_default
4454#ifdef F77_DUMMY_MAIN
4455# ifdef __cplusplus
4456 extern "C"
4457# endif
4458 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004459#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004460int
4461main ()
4462{
4463if ((pid_t *) 0)
4464 return 0;
4465if (sizeof (pid_t))
4466 return 0;
4467 ;
4468 return 0;
4469}
4470_ACEOF
4471rm -f conftest.$ac_objext
4472if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4473 (eval $ac_compile) 2>&5
4474 ac_status=$?
4475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4476 (exit $ac_status); } &&
4477 { ac_try='test -s conftest.$ac_objext'
4478 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4479 (eval $ac_try) 2>&5
4480 ac_status=$?
4481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4482 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004483 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004484else
Martin v. Löwis11437992002-04-12 09:54:03 +00004485 echo "$as_me: failed program was:" >&5
4486cat conftest.$ac_ext >&5
4487ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004488fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004489rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004490fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004491echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
4492echo "${ECHO_T}$ac_cv_type_pid_t" >&6
4493if test $ac_cv_type_pid_t = yes; then
4494 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004495else
Martin v. Löwis11437992002-04-12 09:54:03 +00004496
4497cat >>confdefs.h <<_ACEOF
4498#define pid_t int
4499_ACEOF
4500
4501fi
4502
4503echo "$as_me:$LINENO: checking return type of signal handlers" >&5
4504echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
4505if test "${ac_cv_type_signal+set}" = set; then
4506 echo $ECHO_N "(cached) $ECHO_C" >&6
4507else
4508 cat >conftest.$ac_ext <<_ACEOF
4509#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004510#include "confdefs.h"
4511#include <sys/types.h>
4512#include <signal.h>
4513#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004514# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00004515#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004516#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004517extern "C" void (*signal (int, void (*)(int)))(int);
4518#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004519void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004520#endif
4521
Martin v. Löwis11437992002-04-12 09:54:03 +00004522#ifdef F77_DUMMY_MAIN
4523# ifdef __cplusplus
4524 extern "C"
4525# endif
4526 int F77_DUMMY_MAIN() { return 1; }
4527#endif
4528int
4529main ()
4530{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004531int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00004532 ;
4533 return 0;
4534}
4535_ACEOF
4536rm -f conftest.$ac_objext
4537if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4538 (eval $ac_compile) 2>&5
4539 ac_status=$?
4540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4541 (exit $ac_status); } &&
4542 { ac_try='test -s conftest.$ac_objext'
4543 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4544 (eval $ac_try) 2>&5
4545 ac_status=$?
4546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4547 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004548 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00004549else
Martin v. Löwis11437992002-04-12 09:54:03 +00004550 echo "$as_me: failed program was:" >&5
4551cat conftest.$ac_ext >&5
4552ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00004553fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004554rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004555fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004556echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
4557echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004558
Martin v. Löwis11437992002-04-12 09:54:03 +00004559cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004560#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004561_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004562
Michael W. Hudson54241132001-12-07 15:38:26 +00004563
Martin v. Löwis11437992002-04-12 09:54:03 +00004564echo "$as_me:$LINENO: checking for size_t" >&5
4565echo $ECHO_N "checking for size_t... $ECHO_C" >&6
4566if test "${ac_cv_type_size_t+set}" = set; then
4567 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004568else
Martin v. Löwis11437992002-04-12 09:54:03 +00004569 cat >conftest.$ac_ext <<_ACEOF
4570#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004571#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004572$ac_includes_default
4573#ifdef F77_DUMMY_MAIN
4574# ifdef __cplusplus
4575 extern "C"
4576# endif
4577 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004578#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004579int
4580main ()
4581{
4582if ((size_t *) 0)
4583 return 0;
4584if (sizeof (size_t))
4585 return 0;
4586 ;
4587 return 0;
4588}
4589_ACEOF
4590rm -f conftest.$ac_objext
4591if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4592 (eval $ac_compile) 2>&5
4593 ac_status=$?
4594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4595 (exit $ac_status); } &&
4596 { ac_try='test -s conftest.$ac_objext'
4597 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4598 (eval $ac_try) 2>&5
4599 ac_status=$?
4600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4601 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004602 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004603else
Martin v. Löwis11437992002-04-12 09:54:03 +00004604 echo "$as_me: failed program was:" >&5
4605cat conftest.$ac_ext >&5
4606ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004607fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004608rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004609fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004610echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
4611echo "${ECHO_T}$ac_cv_type_size_t" >&6
4612if test $ac_cv_type_size_t = yes; then
4613 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004614else
Martin v. Löwis11437992002-04-12 09:54:03 +00004615
4616cat >>confdefs.h <<_ACEOF
4617#define size_t unsigned
4618_ACEOF
4619
4620fi
4621
4622echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
4623echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
4624if test "${ac_cv_type_uid_t+set}" = set; then
4625 echo $ECHO_N "(cached) $ECHO_C" >&6
4626else
4627 cat >conftest.$ac_ext <<_ACEOF
4628#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004629#include "confdefs.h"
4630#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004631
4632_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004633if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4634 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004635 ac_cv_type_uid_t=yes
4636else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004637 ac_cv_type_uid_t=no
4638fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004639rm -f conftest*
4640
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004641fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004642echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
4643echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004644if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004645
Martin v. Löwis11437992002-04-12 09:54:03 +00004646cat >>confdefs.h <<\_ACEOF
4647#define uid_t int
4648_ACEOF
4649
4650
4651cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004652#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00004653_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004654
4655fi
4656
Jack Jansendd19cf82001-12-06 22:36:17 +00004657
Michael W. Hudson54241132001-12-07 15:38:26 +00004658# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00004659echo "$as_me:$LINENO: checking for int" >&5
4660echo $ECHO_N "checking for int... $ECHO_C" >&6
4661if test "${ac_cv_type_int+set}" = set; then
4662 echo $ECHO_N "(cached) $ECHO_C" >&6
4663else
4664 cat >conftest.$ac_ext <<_ACEOF
4665#line $LINENO "configure"
4666#include "confdefs.h"
4667$ac_includes_default
4668#ifdef F77_DUMMY_MAIN
4669# ifdef __cplusplus
4670 extern "C"
4671# endif
4672 int F77_DUMMY_MAIN() { return 1; }
4673#endif
4674int
4675main ()
4676{
4677if ((int *) 0)
4678 return 0;
4679if (sizeof (int))
4680 return 0;
4681 ;
4682 return 0;
4683}
4684_ACEOF
4685rm -f conftest.$ac_objext
4686if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4687 (eval $ac_compile) 2>&5
4688 ac_status=$?
4689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4690 (exit $ac_status); } &&
4691 { ac_try='test -s conftest.$ac_objext'
4692 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4693 (eval $ac_try) 2>&5
4694 ac_status=$?
4695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4696 (exit $ac_status); }; }; then
4697 ac_cv_type_int=yes
4698else
4699 echo "$as_me: failed program was:" >&5
4700cat conftest.$ac_ext >&5
4701ac_cv_type_int=no
4702fi
4703rm -f conftest.$ac_objext conftest.$ac_ext
4704fi
4705echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
4706echo "${ECHO_T}$ac_cv_type_int" >&6
4707
4708echo "$as_me:$LINENO: checking size of int" >&5
4709echo $ECHO_N "checking size of int... $ECHO_C" >&6
4710if test "${ac_cv_sizeof_int+set}" = set; then
4711 echo $ECHO_N "(cached) $ECHO_C" >&6
4712else
4713 if test "$ac_cv_type_int" = yes; then
4714 # The cast to unsigned long works around a bug in the HP C Compiler
4715 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4716 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4717 # This bug is HP SR number 8606223364.
4718 if test "$cross_compiling" = yes; then
4719 # Depending upon the size, compute the lo and hi bounds.
4720cat >conftest.$ac_ext <<_ACEOF
4721#line $LINENO "configure"
4722#include "confdefs.h"
4723$ac_includes_default
4724#ifdef F77_DUMMY_MAIN
4725# ifdef __cplusplus
4726 extern "C"
4727# endif
4728 int F77_DUMMY_MAIN() { return 1; }
4729#endif
4730int
4731main ()
4732{
4733static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
4734test_array [0] = 0
4735
4736 ;
4737 return 0;
4738}
4739_ACEOF
4740rm -f conftest.$ac_objext
4741if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4742 (eval $ac_compile) 2>&5
4743 ac_status=$?
4744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4745 (exit $ac_status); } &&
4746 { ac_try='test -s conftest.$ac_objext'
4747 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4748 (eval $ac_try) 2>&5
4749 ac_status=$?
4750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4751 (exit $ac_status); }; }; then
4752 ac_lo=0 ac_mid=0
4753 while :; do
4754 cat >conftest.$ac_ext <<_ACEOF
4755#line $LINENO "configure"
4756#include "confdefs.h"
4757$ac_includes_default
4758#ifdef F77_DUMMY_MAIN
4759# ifdef __cplusplus
4760 extern "C"
4761# endif
4762 int F77_DUMMY_MAIN() { return 1; }
4763#endif
4764int
4765main ()
4766{
4767static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4768test_array [0] = 0
4769
4770 ;
4771 return 0;
4772}
4773_ACEOF
4774rm -f conftest.$ac_objext
4775if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4776 (eval $ac_compile) 2>&5
4777 ac_status=$?
4778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4779 (exit $ac_status); } &&
4780 { ac_try='test -s conftest.$ac_objext'
4781 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4782 (eval $ac_try) 2>&5
4783 ac_status=$?
4784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4785 (exit $ac_status); }; }; then
4786 ac_hi=$ac_mid; break
4787else
4788 echo "$as_me: failed program was:" >&5
4789cat conftest.$ac_ext >&5
4790ac_lo=`expr $ac_mid + 1`
4791 if test $ac_lo -le $ac_mid; then
4792 ac_lo= ac_hi=
4793 break
4794 fi
4795 ac_mid=`expr 2 '*' $ac_mid + 1`
4796fi
4797rm -f conftest.$ac_objext conftest.$ac_ext
4798 done
4799else
4800 echo "$as_me: failed program was:" >&5
4801cat conftest.$ac_ext >&5
4802cat >conftest.$ac_ext <<_ACEOF
4803#line $LINENO "configure"
4804#include "confdefs.h"
4805$ac_includes_default
4806#ifdef F77_DUMMY_MAIN
4807# ifdef __cplusplus
4808 extern "C"
4809# endif
4810 int F77_DUMMY_MAIN() { return 1; }
4811#endif
4812int
4813main ()
4814{
4815static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
4816test_array [0] = 0
4817
4818 ;
4819 return 0;
4820}
4821_ACEOF
4822rm -f conftest.$ac_objext
4823if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4824 (eval $ac_compile) 2>&5
4825 ac_status=$?
4826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4827 (exit $ac_status); } &&
4828 { ac_try='test -s conftest.$ac_objext'
4829 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4830 (eval $ac_try) 2>&5
4831 ac_status=$?
4832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4833 (exit $ac_status); }; }; then
4834 ac_hi=-1 ac_mid=-1
4835 while :; do
4836 cat >conftest.$ac_ext <<_ACEOF
4837#line $LINENO "configure"
4838#include "confdefs.h"
4839$ac_includes_default
4840#ifdef F77_DUMMY_MAIN
4841# ifdef __cplusplus
4842 extern "C"
4843# endif
4844 int F77_DUMMY_MAIN() { return 1; }
4845#endif
4846int
4847main ()
4848{
4849static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
4850test_array [0] = 0
4851
4852 ;
4853 return 0;
4854}
4855_ACEOF
4856rm -f conftest.$ac_objext
4857if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4858 (eval $ac_compile) 2>&5
4859 ac_status=$?
4860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4861 (exit $ac_status); } &&
4862 { ac_try='test -s conftest.$ac_objext'
4863 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4864 (eval $ac_try) 2>&5
4865 ac_status=$?
4866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4867 (exit $ac_status); }; }; then
4868 ac_lo=$ac_mid; break
4869else
4870 echo "$as_me: failed program was:" >&5
4871cat conftest.$ac_ext >&5
4872ac_hi=`expr '(' $ac_mid ')' - 1`
4873 if test $ac_mid -le $ac_hi; then
4874 ac_lo= ac_hi=
4875 break
4876 fi
4877 ac_mid=`expr 2 '*' $ac_mid`
4878fi
4879rm -f conftest.$ac_objext conftest.$ac_ext
4880 done
4881else
4882 echo "$as_me: failed program was:" >&5
4883cat conftest.$ac_ext >&5
4884ac_lo= ac_hi=
4885fi
4886rm -f conftest.$ac_objext conftest.$ac_ext
4887fi
4888rm -f conftest.$ac_objext conftest.$ac_ext
4889# Binary search between lo and hi bounds.
4890while test "x$ac_lo" != "x$ac_hi"; do
4891 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4892 cat >conftest.$ac_ext <<_ACEOF
4893#line $LINENO "configure"
4894#include "confdefs.h"
4895$ac_includes_default
4896#ifdef F77_DUMMY_MAIN
4897# ifdef __cplusplus
4898 extern "C"
4899# endif
4900 int F77_DUMMY_MAIN() { return 1; }
4901#endif
4902int
4903main ()
4904{
4905static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4906test_array [0] = 0
4907
4908 ;
4909 return 0;
4910}
4911_ACEOF
4912rm -f conftest.$ac_objext
4913if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4914 (eval $ac_compile) 2>&5
4915 ac_status=$?
4916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4917 (exit $ac_status); } &&
4918 { ac_try='test -s conftest.$ac_objext'
4919 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4920 (eval $ac_try) 2>&5
4921 ac_status=$?
4922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4923 (exit $ac_status); }; }; then
4924 ac_hi=$ac_mid
4925else
4926 echo "$as_me: failed program was:" >&5
4927cat conftest.$ac_ext >&5
4928ac_lo=`expr '(' $ac_mid ')' + 1`
4929fi
4930rm -f conftest.$ac_objext conftest.$ac_ext
4931done
4932case $ac_lo in
4933?*) ac_cv_sizeof_int=$ac_lo;;
4934'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
4935echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
4936 { (exit 1); exit 1; }; } ;;
4937esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004938else
4939 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004940 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
4941echo "$as_me: error: cannot run test program while cross compiling" >&2;}
4942 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004943else
Martin v. Löwis11437992002-04-12 09:54:03 +00004944 cat >conftest.$ac_ext <<_ACEOF
4945#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004946#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004947$ac_includes_default
4948long longval () { return (long) (sizeof (int)); }
4949unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00004950#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004951#include <stdlib.h>
4952#ifdef F77_DUMMY_MAIN
4953# ifdef __cplusplus
4954 extern "C"
4955# endif
4956 int F77_DUMMY_MAIN() { return 1; }
4957#endif
4958int
4959main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004960{
Martin v. Löwis11437992002-04-12 09:54:03 +00004961
4962 FILE *f = fopen ("conftest.val", "w");
4963 if (! f)
4964 exit (1);
4965 if (((long) (sizeof (int))) < 0)
4966 {
4967 long i = longval ();
4968 if (i != ((long) (sizeof (int))))
4969 exit (1);
4970 fprintf (f, "%ld\n", i);
4971 }
4972 else
4973 {
4974 unsigned long i = ulongval ();
4975 if (i != ((long) (sizeof (int))))
4976 exit (1);
4977 fprintf (f, "%lu\n", i);
4978 }
4979 exit (ferror (f) || fclose (f) != 0);
4980
4981 ;
4982 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004983}
Martin v. Löwis11437992002-04-12 09:54:03 +00004984_ACEOF
4985rm -f conftest$ac_exeext
4986if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4987 (eval $ac_link) 2>&5
4988 ac_status=$?
4989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4990 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4991 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4992 (eval $ac_try) 2>&5
4993 ac_status=$?
4994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4995 (exit $ac_status); }; }; then
4996 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004997else
Martin v. Löwis11437992002-04-12 09:54:03 +00004998 echo "$as_me: program exited with status $ac_status" >&5
4999echo "$as_me: failed program was:" >&5
5000cat conftest.$ac_ext >&5
5001( exit $ac_status )
5002{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5003echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5004 { (exit 1); exit 1; }; }
5005fi
5006rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5007fi
5008fi
5009rm -f conftest.val
5010else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005011 ac_cv_sizeof_int=0
5012fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005013fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005014echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5015echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5016cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005017#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005018_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005019
5020
Martin v. Löwis11437992002-04-12 09:54:03 +00005021echo "$as_me:$LINENO: checking for long" >&5
5022echo $ECHO_N "checking for long... $ECHO_C" >&6
5023if test "${ac_cv_type_long+set}" = set; then
5024 echo $ECHO_N "(cached) $ECHO_C" >&6
5025else
5026 cat >conftest.$ac_ext <<_ACEOF
5027#line $LINENO "configure"
5028#include "confdefs.h"
5029$ac_includes_default
5030#ifdef F77_DUMMY_MAIN
5031# ifdef __cplusplus
5032 extern "C"
5033# endif
5034 int F77_DUMMY_MAIN() { return 1; }
5035#endif
5036int
5037main ()
5038{
5039if ((long *) 0)
5040 return 0;
5041if (sizeof (long))
5042 return 0;
5043 ;
5044 return 0;
5045}
5046_ACEOF
5047rm -f conftest.$ac_objext
5048if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5049 (eval $ac_compile) 2>&5
5050 ac_status=$?
5051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5052 (exit $ac_status); } &&
5053 { ac_try='test -s conftest.$ac_objext'
5054 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5055 (eval $ac_try) 2>&5
5056 ac_status=$?
5057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5058 (exit $ac_status); }; }; then
5059 ac_cv_type_long=yes
5060else
5061 echo "$as_me: failed program was:" >&5
5062cat conftest.$ac_ext >&5
5063ac_cv_type_long=no
5064fi
5065rm -f conftest.$ac_objext conftest.$ac_ext
5066fi
5067echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5068echo "${ECHO_T}$ac_cv_type_long" >&6
5069
5070echo "$as_me:$LINENO: checking size of long" >&5
5071echo $ECHO_N "checking size of long... $ECHO_C" >&6
5072if test "${ac_cv_sizeof_long+set}" = set; then
5073 echo $ECHO_N "(cached) $ECHO_C" >&6
5074else
5075 if test "$ac_cv_type_long" = yes; then
5076 # The cast to unsigned long works around a bug in the HP C Compiler
5077 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5078 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5079 # This bug is HP SR number 8606223364.
5080 if test "$cross_compiling" = yes; then
5081 # Depending upon the size, compute the lo and hi bounds.
5082cat >conftest.$ac_ext <<_ACEOF
5083#line $LINENO "configure"
5084#include "confdefs.h"
5085$ac_includes_default
5086#ifdef F77_DUMMY_MAIN
5087# ifdef __cplusplus
5088 extern "C"
5089# endif
5090 int F77_DUMMY_MAIN() { return 1; }
5091#endif
5092int
5093main ()
5094{
5095static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5096test_array [0] = 0
5097
5098 ;
5099 return 0;
5100}
5101_ACEOF
5102rm -f conftest.$ac_objext
5103if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5104 (eval $ac_compile) 2>&5
5105 ac_status=$?
5106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5107 (exit $ac_status); } &&
5108 { ac_try='test -s conftest.$ac_objext'
5109 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5110 (eval $ac_try) 2>&5
5111 ac_status=$?
5112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5113 (exit $ac_status); }; }; then
5114 ac_lo=0 ac_mid=0
5115 while :; do
5116 cat >conftest.$ac_ext <<_ACEOF
5117#line $LINENO "configure"
5118#include "confdefs.h"
5119$ac_includes_default
5120#ifdef F77_DUMMY_MAIN
5121# ifdef __cplusplus
5122 extern "C"
5123# endif
5124 int F77_DUMMY_MAIN() { return 1; }
5125#endif
5126int
5127main ()
5128{
5129static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5130test_array [0] = 0
5131
5132 ;
5133 return 0;
5134}
5135_ACEOF
5136rm -f conftest.$ac_objext
5137if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5138 (eval $ac_compile) 2>&5
5139 ac_status=$?
5140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5141 (exit $ac_status); } &&
5142 { ac_try='test -s conftest.$ac_objext'
5143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5144 (eval $ac_try) 2>&5
5145 ac_status=$?
5146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5147 (exit $ac_status); }; }; then
5148 ac_hi=$ac_mid; break
5149else
5150 echo "$as_me: failed program was:" >&5
5151cat conftest.$ac_ext >&5
5152ac_lo=`expr $ac_mid + 1`
5153 if test $ac_lo -le $ac_mid; then
5154 ac_lo= ac_hi=
5155 break
5156 fi
5157 ac_mid=`expr 2 '*' $ac_mid + 1`
5158fi
5159rm -f conftest.$ac_objext conftest.$ac_ext
5160 done
5161else
5162 echo "$as_me: failed program was:" >&5
5163cat conftest.$ac_ext >&5
5164cat >conftest.$ac_ext <<_ACEOF
5165#line $LINENO "configure"
5166#include "confdefs.h"
5167$ac_includes_default
5168#ifdef F77_DUMMY_MAIN
5169# ifdef __cplusplus
5170 extern "C"
5171# endif
5172 int F77_DUMMY_MAIN() { return 1; }
5173#endif
5174int
5175main ()
5176{
5177static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5178test_array [0] = 0
5179
5180 ;
5181 return 0;
5182}
5183_ACEOF
5184rm -f conftest.$ac_objext
5185if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5186 (eval $ac_compile) 2>&5
5187 ac_status=$?
5188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5189 (exit $ac_status); } &&
5190 { ac_try='test -s conftest.$ac_objext'
5191 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5192 (eval $ac_try) 2>&5
5193 ac_status=$?
5194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5195 (exit $ac_status); }; }; then
5196 ac_hi=-1 ac_mid=-1
5197 while :; do
5198 cat >conftest.$ac_ext <<_ACEOF
5199#line $LINENO "configure"
5200#include "confdefs.h"
5201$ac_includes_default
5202#ifdef F77_DUMMY_MAIN
5203# ifdef __cplusplus
5204 extern "C"
5205# endif
5206 int F77_DUMMY_MAIN() { return 1; }
5207#endif
5208int
5209main ()
5210{
5211static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5212test_array [0] = 0
5213
5214 ;
5215 return 0;
5216}
5217_ACEOF
5218rm -f conftest.$ac_objext
5219if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5220 (eval $ac_compile) 2>&5
5221 ac_status=$?
5222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5223 (exit $ac_status); } &&
5224 { ac_try='test -s conftest.$ac_objext'
5225 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5226 (eval $ac_try) 2>&5
5227 ac_status=$?
5228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5229 (exit $ac_status); }; }; then
5230 ac_lo=$ac_mid; break
5231else
5232 echo "$as_me: failed program was:" >&5
5233cat conftest.$ac_ext >&5
5234ac_hi=`expr '(' $ac_mid ')' - 1`
5235 if test $ac_mid -le $ac_hi; then
5236 ac_lo= ac_hi=
5237 break
5238 fi
5239 ac_mid=`expr 2 '*' $ac_mid`
5240fi
5241rm -f conftest.$ac_objext conftest.$ac_ext
5242 done
5243else
5244 echo "$as_me: failed program was:" >&5
5245cat conftest.$ac_ext >&5
5246ac_lo= ac_hi=
5247fi
5248rm -f conftest.$ac_objext conftest.$ac_ext
5249fi
5250rm -f conftest.$ac_objext conftest.$ac_ext
5251# Binary search between lo and hi bounds.
5252while test "x$ac_lo" != "x$ac_hi"; do
5253 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5254 cat >conftest.$ac_ext <<_ACEOF
5255#line $LINENO "configure"
5256#include "confdefs.h"
5257$ac_includes_default
5258#ifdef F77_DUMMY_MAIN
5259# ifdef __cplusplus
5260 extern "C"
5261# endif
5262 int F77_DUMMY_MAIN() { return 1; }
5263#endif
5264int
5265main ()
5266{
5267static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5268test_array [0] = 0
5269
5270 ;
5271 return 0;
5272}
5273_ACEOF
5274rm -f conftest.$ac_objext
5275if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5276 (eval $ac_compile) 2>&5
5277 ac_status=$?
5278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5279 (exit $ac_status); } &&
5280 { ac_try='test -s conftest.$ac_objext'
5281 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5282 (eval $ac_try) 2>&5
5283 ac_status=$?
5284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5285 (exit $ac_status); }; }; then
5286 ac_hi=$ac_mid
5287else
5288 echo "$as_me: failed program was:" >&5
5289cat conftest.$ac_ext >&5
5290ac_lo=`expr '(' $ac_mid ')' + 1`
5291fi
5292rm -f conftest.$ac_objext conftest.$ac_ext
5293done
5294case $ac_lo in
5295?*) ac_cv_sizeof_long=$ac_lo;;
5296'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5297echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5298 { (exit 1); exit 1; }; } ;;
5299esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005300else
5301 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005302 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5303echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5304 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005305else
Martin v. Löwis11437992002-04-12 09:54:03 +00005306 cat >conftest.$ac_ext <<_ACEOF
5307#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005308#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005309$ac_includes_default
5310long longval () { return (long) (sizeof (long)); }
5311unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005312#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005313#include <stdlib.h>
5314#ifdef F77_DUMMY_MAIN
5315# ifdef __cplusplus
5316 extern "C"
5317# endif
5318 int F77_DUMMY_MAIN() { return 1; }
5319#endif
5320int
5321main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005322{
Martin v. Löwis11437992002-04-12 09:54:03 +00005323
5324 FILE *f = fopen ("conftest.val", "w");
5325 if (! f)
5326 exit (1);
5327 if (((long) (sizeof (long))) < 0)
5328 {
5329 long i = longval ();
5330 if (i != ((long) (sizeof (long))))
5331 exit (1);
5332 fprintf (f, "%ld\n", i);
5333 }
5334 else
5335 {
5336 unsigned long i = ulongval ();
5337 if (i != ((long) (sizeof (long))))
5338 exit (1);
5339 fprintf (f, "%lu\n", i);
5340 }
5341 exit (ferror (f) || fclose (f) != 0);
5342
5343 ;
5344 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005345}
Martin v. Löwis11437992002-04-12 09:54:03 +00005346_ACEOF
5347rm -f conftest$ac_exeext
5348if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5349 (eval $ac_link) 2>&5
5350 ac_status=$?
5351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5352 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5353 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5354 (eval $ac_try) 2>&5
5355 ac_status=$?
5356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5357 (exit $ac_status); }; }; then
5358 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005359else
Martin v. Löwis11437992002-04-12 09:54:03 +00005360 echo "$as_me: program exited with status $ac_status" >&5
5361echo "$as_me: failed program was:" >&5
5362cat conftest.$ac_ext >&5
5363( exit $ac_status )
5364{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5365echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5366 { (exit 1); exit 1; }; }
5367fi
5368rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5369fi
5370fi
5371rm -f conftest.val
5372else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005373 ac_cv_sizeof_long=0
5374fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005375fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005376echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5377echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5378cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005379#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00005380_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005381
5382
Martin v. Löwis11437992002-04-12 09:54:03 +00005383echo "$as_me:$LINENO: checking for void *" >&5
5384echo $ECHO_N "checking for void *... $ECHO_C" >&6
5385if test "${ac_cv_type_void_p+set}" = set; then
5386 echo $ECHO_N "(cached) $ECHO_C" >&6
5387else
5388 cat >conftest.$ac_ext <<_ACEOF
5389#line $LINENO "configure"
5390#include "confdefs.h"
5391$ac_includes_default
5392#ifdef F77_DUMMY_MAIN
5393# ifdef __cplusplus
5394 extern "C"
5395# endif
5396 int F77_DUMMY_MAIN() { return 1; }
5397#endif
5398int
5399main ()
5400{
5401if ((void * *) 0)
5402 return 0;
5403if (sizeof (void *))
5404 return 0;
5405 ;
5406 return 0;
5407}
5408_ACEOF
5409rm -f conftest.$ac_objext
5410if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5411 (eval $ac_compile) 2>&5
5412 ac_status=$?
5413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5414 (exit $ac_status); } &&
5415 { ac_try='test -s conftest.$ac_objext'
5416 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5417 (eval $ac_try) 2>&5
5418 ac_status=$?
5419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5420 (exit $ac_status); }; }; then
5421 ac_cv_type_void_p=yes
5422else
5423 echo "$as_me: failed program was:" >&5
5424cat conftest.$ac_ext >&5
5425ac_cv_type_void_p=no
5426fi
5427rm -f conftest.$ac_objext conftest.$ac_ext
5428fi
5429echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
5430echo "${ECHO_T}$ac_cv_type_void_p" >&6
5431
5432echo "$as_me:$LINENO: checking size of void *" >&5
5433echo $ECHO_N "checking size of void *... $ECHO_C" >&6
5434if test "${ac_cv_sizeof_void_p+set}" = set; then
5435 echo $ECHO_N "(cached) $ECHO_C" >&6
5436else
5437 if test "$ac_cv_type_void_p" = yes; then
5438 # The cast to unsigned long works around a bug in the HP C Compiler
5439 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5440 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5441 # This bug is HP SR number 8606223364.
5442 if test "$cross_compiling" = yes; then
5443 # Depending upon the size, compute the lo and hi bounds.
5444cat >conftest.$ac_ext <<_ACEOF
5445#line $LINENO "configure"
5446#include "confdefs.h"
5447$ac_includes_default
5448#ifdef F77_DUMMY_MAIN
5449# ifdef __cplusplus
5450 extern "C"
5451# endif
5452 int F77_DUMMY_MAIN() { return 1; }
5453#endif
5454int
5455main ()
5456{
5457static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
5458test_array [0] = 0
5459
5460 ;
5461 return 0;
5462}
5463_ACEOF
5464rm -f conftest.$ac_objext
5465if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5466 (eval $ac_compile) 2>&5
5467 ac_status=$?
5468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5469 (exit $ac_status); } &&
5470 { ac_try='test -s conftest.$ac_objext'
5471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5472 (eval $ac_try) 2>&5
5473 ac_status=$?
5474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5475 (exit $ac_status); }; }; then
5476 ac_lo=0 ac_mid=0
5477 while :; do
5478 cat >conftest.$ac_ext <<_ACEOF
5479#line $LINENO "configure"
5480#include "confdefs.h"
5481$ac_includes_default
5482#ifdef F77_DUMMY_MAIN
5483# ifdef __cplusplus
5484 extern "C"
5485# endif
5486 int F77_DUMMY_MAIN() { return 1; }
5487#endif
5488int
5489main ()
5490{
5491static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5492test_array [0] = 0
5493
5494 ;
5495 return 0;
5496}
5497_ACEOF
5498rm -f conftest.$ac_objext
5499if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5500 (eval $ac_compile) 2>&5
5501 ac_status=$?
5502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5503 (exit $ac_status); } &&
5504 { ac_try='test -s conftest.$ac_objext'
5505 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5506 (eval $ac_try) 2>&5
5507 ac_status=$?
5508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5509 (exit $ac_status); }; }; then
5510 ac_hi=$ac_mid; break
5511else
5512 echo "$as_me: failed program was:" >&5
5513cat conftest.$ac_ext >&5
5514ac_lo=`expr $ac_mid + 1`
5515 if test $ac_lo -le $ac_mid; then
5516 ac_lo= ac_hi=
5517 break
5518 fi
5519 ac_mid=`expr 2 '*' $ac_mid + 1`
5520fi
5521rm -f conftest.$ac_objext conftest.$ac_ext
5522 done
5523else
5524 echo "$as_me: failed program was:" >&5
5525cat conftest.$ac_ext >&5
5526cat >conftest.$ac_ext <<_ACEOF
5527#line $LINENO "configure"
5528#include "confdefs.h"
5529$ac_includes_default
5530#ifdef F77_DUMMY_MAIN
5531# ifdef __cplusplus
5532 extern "C"
5533# endif
5534 int F77_DUMMY_MAIN() { return 1; }
5535#endif
5536int
5537main ()
5538{
5539static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
5540test_array [0] = 0
5541
5542 ;
5543 return 0;
5544}
5545_ACEOF
5546rm -f conftest.$ac_objext
5547if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5548 (eval $ac_compile) 2>&5
5549 ac_status=$?
5550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5551 (exit $ac_status); } &&
5552 { ac_try='test -s conftest.$ac_objext'
5553 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5554 (eval $ac_try) 2>&5
5555 ac_status=$?
5556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5557 (exit $ac_status); }; }; then
5558 ac_hi=-1 ac_mid=-1
5559 while :; do
5560 cat >conftest.$ac_ext <<_ACEOF
5561#line $LINENO "configure"
5562#include "confdefs.h"
5563$ac_includes_default
5564#ifdef F77_DUMMY_MAIN
5565# ifdef __cplusplus
5566 extern "C"
5567# endif
5568 int F77_DUMMY_MAIN() { return 1; }
5569#endif
5570int
5571main ()
5572{
5573static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
5574test_array [0] = 0
5575
5576 ;
5577 return 0;
5578}
5579_ACEOF
5580rm -f conftest.$ac_objext
5581if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5582 (eval $ac_compile) 2>&5
5583 ac_status=$?
5584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5585 (exit $ac_status); } &&
5586 { ac_try='test -s conftest.$ac_objext'
5587 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5588 (eval $ac_try) 2>&5
5589 ac_status=$?
5590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5591 (exit $ac_status); }; }; then
5592 ac_lo=$ac_mid; break
5593else
5594 echo "$as_me: failed program was:" >&5
5595cat conftest.$ac_ext >&5
5596ac_hi=`expr '(' $ac_mid ')' - 1`
5597 if test $ac_mid -le $ac_hi; then
5598 ac_lo= ac_hi=
5599 break
5600 fi
5601 ac_mid=`expr 2 '*' $ac_mid`
5602fi
5603rm -f conftest.$ac_objext conftest.$ac_ext
5604 done
5605else
5606 echo "$as_me: failed program was:" >&5
5607cat conftest.$ac_ext >&5
5608ac_lo= ac_hi=
5609fi
5610rm -f conftest.$ac_objext conftest.$ac_ext
5611fi
5612rm -f conftest.$ac_objext conftest.$ac_ext
5613# Binary search between lo and hi bounds.
5614while test "x$ac_lo" != "x$ac_hi"; do
5615 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5616 cat >conftest.$ac_ext <<_ACEOF
5617#line $LINENO "configure"
5618#include "confdefs.h"
5619$ac_includes_default
5620#ifdef F77_DUMMY_MAIN
5621# ifdef __cplusplus
5622 extern "C"
5623# endif
5624 int F77_DUMMY_MAIN() { return 1; }
5625#endif
5626int
5627main ()
5628{
5629static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5630test_array [0] = 0
5631
5632 ;
5633 return 0;
5634}
5635_ACEOF
5636rm -f conftest.$ac_objext
5637if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5638 (eval $ac_compile) 2>&5
5639 ac_status=$?
5640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5641 (exit $ac_status); } &&
5642 { ac_try='test -s conftest.$ac_objext'
5643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5644 (eval $ac_try) 2>&5
5645 ac_status=$?
5646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5647 (exit $ac_status); }; }; then
5648 ac_hi=$ac_mid
5649else
5650 echo "$as_me: failed program was:" >&5
5651cat conftest.$ac_ext >&5
5652ac_lo=`expr '(' $ac_mid ')' + 1`
5653fi
5654rm -f conftest.$ac_objext conftest.$ac_ext
5655done
5656case $ac_lo in
5657?*) ac_cv_sizeof_void_p=$ac_lo;;
5658'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
5659echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
5660 { (exit 1); exit 1; }; } ;;
5661esac
Guido van Rossumad678af1998-10-02 14:42:15 +00005662else
5663 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005664 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5665echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5666 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00005667else
Martin v. Löwis11437992002-04-12 09:54:03 +00005668 cat >conftest.$ac_ext <<_ACEOF
5669#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00005670#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005671$ac_includes_default
5672long longval () { return (long) (sizeof (void *)); }
5673unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005674#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005675#include <stdlib.h>
5676#ifdef F77_DUMMY_MAIN
5677# ifdef __cplusplus
5678 extern "C"
5679# endif
5680 int F77_DUMMY_MAIN() { return 1; }
5681#endif
5682int
5683main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00005684{
Martin v. Löwis11437992002-04-12 09:54:03 +00005685
5686 FILE *f = fopen ("conftest.val", "w");
5687 if (! f)
5688 exit (1);
5689 if (((long) (sizeof (void *))) < 0)
5690 {
5691 long i = longval ();
5692 if (i != ((long) (sizeof (void *))))
5693 exit (1);
5694 fprintf (f, "%ld\n", i);
5695 }
5696 else
5697 {
5698 unsigned long i = ulongval ();
5699 if (i != ((long) (sizeof (void *))))
5700 exit (1);
5701 fprintf (f, "%lu\n", i);
5702 }
5703 exit (ferror (f) || fclose (f) != 0);
5704
5705 ;
5706 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00005707}
Martin v. Löwis11437992002-04-12 09:54:03 +00005708_ACEOF
5709rm -f conftest$ac_exeext
5710if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5711 (eval $ac_link) 2>&5
5712 ac_status=$?
5713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5714 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5715 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5716 (eval $ac_try) 2>&5
5717 ac_status=$?
5718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5719 (exit $ac_status); }; }; then
5720 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00005721else
Martin v. Löwis11437992002-04-12 09:54:03 +00005722 echo "$as_me: program exited with status $ac_status" >&5
5723echo "$as_me: failed program was:" >&5
5724cat conftest.$ac_ext >&5
5725( exit $ac_status )
5726{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
5727echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
5728 { (exit 1); exit 1; }; }
5729fi
5730rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5731fi
5732fi
5733rm -f conftest.val
5734else
Guido van Rossumad678af1998-10-02 14:42:15 +00005735 ac_cv_sizeof_void_p=0
5736fi
Guido van Rossumad678af1998-10-02 14:42:15 +00005737fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005738echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
5739echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
5740cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00005741#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00005742_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00005743
5744
Martin v. Löwis11437992002-04-12 09:54:03 +00005745echo "$as_me:$LINENO: checking for char" >&5
5746echo $ECHO_N "checking for char... $ECHO_C" >&6
5747if test "${ac_cv_type_char+set}" = set; then
5748 echo $ECHO_N "(cached) $ECHO_C" >&6
5749else
5750 cat >conftest.$ac_ext <<_ACEOF
5751#line $LINENO "configure"
5752#include "confdefs.h"
5753$ac_includes_default
5754#ifdef F77_DUMMY_MAIN
5755# ifdef __cplusplus
5756 extern "C"
5757# endif
5758 int F77_DUMMY_MAIN() { return 1; }
5759#endif
5760int
5761main ()
5762{
5763if ((char *) 0)
5764 return 0;
5765if (sizeof (char))
5766 return 0;
5767 ;
5768 return 0;
5769}
5770_ACEOF
5771rm -f conftest.$ac_objext
5772if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5773 (eval $ac_compile) 2>&5
5774 ac_status=$?
5775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5776 (exit $ac_status); } &&
5777 { ac_try='test -s conftest.$ac_objext'
5778 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5779 (eval $ac_try) 2>&5
5780 ac_status=$?
5781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5782 (exit $ac_status); }; }; then
5783 ac_cv_type_char=yes
5784else
5785 echo "$as_me: failed program was:" >&5
5786cat conftest.$ac_ext >&5
5787ac_cv_type_char=no
5788fi
5789rm -f conftest.$ac_objext conftest.$ac_ext
5790fi
5791echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
5792echo "${ECHO_T}$ac_cv_type_char" >&6
5793
5794echo "$as_me:$LINENO: checking size of char" >&5
5795echo $ECHO_N "checking size of char... $ECHO_C" >&6
5796if test "${ac_cv_sizeof_char+set}" = set; then
5797 echo $ECHO_N "(cached) $ECHO_C" >&6
5798else
5799 if test "$ac_cv_type_char" = yes; then
5800 # The cast to unsigned long works around a bug in the HP C Compiler
5801 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5802 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5803 # This bug is HP SR number 8606223364.
5804 if test "$cross_compiling" = yes; then
5805 # Depending upon the size, compute the lo and hi bounds.
5806cat >conftest.$ac_ext <<_ACEOF
5807#line $LINENO "configure"
5808#include "confdefs.h"
5809$ac_includes_default
5810#ifdef F77_DUMMY_MAIN
5811# ifdef __cplusplus
5812 extern "C"
5813# endif
5814 int F77_DUMMY_MAIN() { return 1; }
5815#endif
5816int
5817main ()
5818{
5819static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
5820test_array [0] = 0
5821
5822 ;
5823 return 0;
5824}
5825_ACEOF
5826rm -f conftest.$ac_objext
5827if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5828 (eval $ac_compile) 2>&5
5829 ac_status=$?
5830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5831 (exit $ac_status); } &&
5832 { ac_try='test -s conftest.$ac_objext'
5833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5834 (eval $ac_try) 2>&5
5835 ac_status=$?
5836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5837 (exit $ac_status); }; }; then
5838 ac_lo=0 ac_mid=0
5839 while :; do
5840 cat >conftest.$ac_ext <<_ACEOF
5841#line $LINENO "configure"
5842#include "confdefs.h"
5843$ac_includes_default
5844#ifdef F77_DUMMY_MAIN
5845# ifdef __cplusplus
5846 extern "C"
5847# endif
5848 int F77_DUMMY_MAIN() { return 1; }
5849#endif
5850int
5851main ()
5852{
5853static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
5854test_array [0] = 0
5855
5856 ;
5857 return 0;
5858}
5859_ACEOF
5860rm -f conftest.$ac_objext
5861if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5862 (eval $ac_compile) 2>&5
5863 ac_status=$?
5864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5865 (exit $ac_status); } &&
5866 { ac_try='test -s conftest.$ac_objext'
5867 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5868 (eval $ac_try) 2>&5
5869 ac_status=$?
5870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5871 (exit $ac_status); }; }; then
5872 ac_hi=$ac_mid; break
5873else
5874 echo "$as_me: failed program was:" >&5
5875cat conftest.$ac_ext >&5
5876ac_lo=`expr $ac_mid + 1`
5877 if test $ac_lo -le $ac_mid; then
5878 ac_lo= ac_hi=
5879 break
5880 fi
5881 ac_mid=`expr 2 '*' $ac_mid + 1`
5882fi
5883rm -f conftest.$ac_objext conftest.$ac_ext
5884 done
5885else
5886 echo "$as_me: failed program was:" >&5
5887cat conftest.$ac_ext >&5
5888cat >conftest.$ac_ext <<_ACEOF
5889#line $LINENO "configure"
5890#include "confdefs.h"
5891$ac_includes_default
5892#ifdef F77_DUMMY_MAIN
5893# ifdef __cplusplus
5894 extern "C"
5895# endif
5896 int F77_DUMMY_MAIN() { return 1; }
5897#endif
5898int
5899main ()
5900{
5901static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
5902test_array [0] = 0
5903
5904 ;
5905 return 0;
5906}
5907_ACEOF
5908rm -f conftest.$ac_objext
5909if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5910 (eval $ac_compile) 2>&5
5911 ac_status=$?
5912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5913 (exit $ac_status); } &&
5914 { ac_try='test -s conftest.$ac_objext'
5915 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5916 (eval $ac_try) 2>&5
5917 ac_status=$?
5918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5919 (exit $ac_status); }; }; then
5920 ac_hi=-1 ac_mid=-1
5921 while :; do
5922 cat >conftest.$ac_ext <<_ACEOF
5923#line $LINENO "configure"
5924#include "confdefs.h"
5925$ac_includes_default
5926#ifdef F77_DUMMY_MAIN
5927# ifdef __cplusplus
5928 extern "C"
5929# endif
5930 int F77_DUMMY_MAIN() { return 1; }
5931#endif
5932int
5933main ()
5934{
5935static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
5936test_array [0] = 0
5937
5938 ;
5939 return 0;
5940}
5941_ACEOF
5942rm -f conftest.$ac_objext
5943if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5944 (eval $ac_compile) 2>&5
5945 ac_status=$?
5946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5947 (exit $ac_status); } &&
5948 { ac_try='test -s conftest.$ac_objext'
5949 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5950 (eval $ac_try) 2>&5
5951 ac_status=$?
5952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5953 (exit $ac_status); }; }; then
5954 ac_lo=$ac_mid; break
5955else
5956 echo "$as_me: failed program was:" >&5
5957cat conftest.$ac_ext >&5
5958ac_hi=`expr '(' $ac_mid ')' - 1`
5959 if test $ac_mid -le $ac_hi; then
5960 ac_lo= ac_hi=
5961 break
5962 fi
5963 ac_mid=`expr 2 '*' $ac_mid`
5964fi
5965rm -f conftest.$ac_objext conftest.$ac_ext
5966 done
5967else
5968 echo "$as_me: failed program was:" >&5
5969cat conftest.$ac_ext >&5
5970ac_lo= ac_hi=
5971fi
5972rm -f conftest.$ac_objext conftest.$ac_ext
5973fi
5974rm -f conftest.$ac_objext conftest.$ac_ext
5975# Binary search between lo and hi bounds.
5976while test "x$ac_lo" != "x$ac_hi"; do
5977 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5978 cat >conftest.$ac_ext <<_ACEOF
5979#line $LINENO "configure"
5980#include "confdefs.h"
5981$ac_includes_default
5982#ifdef F77_DUMMY_MAIN
5983# ifdef __cplusplus
5984 extern "C"
5985# endif
5986 int F77_DUMMY_MAIN() { return 1; }
5987#endif
5988int
5989main ()
5990{
5991static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
5992test_array [0] = 0
5993
5994 ;
5995 return 0;
5996}
5997_ACEOF
5998rm -f conftest.$ac_objext
5999if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6000 (eval $ac_compile) 2>&5
6001 ac_status=$?
6002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6003 (exit $ac_status); } &&
6004 { ac_try='test -s conftest.$ac_objext'
6005 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6006 (eval $ac_try) 2>&5
6007 ac_status=$?
6008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6009 (exit $ac_status); }; }; then
6010 ac_hi=$ac_mid
6011else
6012 echo "$as_me: failed program was:" >&5
6013cat conftest.$ac_ext >&5
6014ac_lo=`expr '(' $ac_mid ')' + 1`
6015fi
6016rm -f conftest.$ac_objext conftest.$ac_ext
6017done
6018case $ac_lo in
6019?*) ac_cv_sizeof_char=$ac_lo;;
6020'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6021echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6022 { (exit 1); exit 1; }; } ;;
6023esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006024else
6025 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006026 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6027echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6028 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006029else
Martin v. Löwis11437992002-04-12 09:54:03 +00006030 cat >conftest.$ac_ext <<_ACEOF
6031#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006032#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006033$ac_includes_default
6034long longval () { return (long) (sizeof (char)); }
6035unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006036#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006037#include <stdlib.h>
6038#ifdef F77_DUMMY_MAIN
6039# ifdef __cplusplus
6040 extern "C"
6041# endif
6042 int F77_DUMMY_MAIN() { return 1; }
6043#endif
6044int
6045main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006046{
Martin v. Löwis11437992002-04-12 09:54:03 +00006047
6048 FILE *f = fopen ("conftest.val", "w");
6049 if (! f)
6050 exit (1);
6051 if (((long) (sizeof (char))) < 0)
6052 {
6053 long i = longval ();
6054 if (i != ((long) (sizeof (char))))
6055 exit (1);
6056 fprintf (f, "%ld\n", i);
6057 }
6058 else
6059 {
6060 unsigned long i = ulongval ();
6061 if (i != ((long) (sizeof (char))))
6062 exit (1);
6063 fprintf (f, "%lu\n", i);
6064 }
6065 exit (ferror (f) || fclose (f) != 0);
6066
6067 ;
6068 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006069}
Martin v. Löwis11437992002-04-12 09:54:03 +00006070_ACEOF
6071rm -f conftest$ac_exeext
6072if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6073 (eval $ac_link) 2>&5
6074 ac_status=$?
6075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6076 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6077 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6078 (eval $ac_try) 2>&5
6079 ac_status=$?
6080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6081 (exit $ac_status); }; }; then
6082 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006083else
Martin v. Löwis11437992002-04-12 09:54:03 +00006084 echo "$as_me: program exited with status $ac_status" >&5
6085echo "$as_me: failed program was:" >&5
6086cat conftest.$ac_ext >&5
6087( exit $ac_status )
6088{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6089echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6090 { (exit 1); exit 1; }; }
6091fi
6092rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6093fi
6094fi
6095rm -f conftest.val
6096else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006097 ac_cv_sizeof_char=0
6098fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006099fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006100echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6101echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6102cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006103#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006104_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006105
6106
Martin v. Löwis11437992002-04-12 09:54:03 +00006107echo "$as_me:$LINENO: checking for short" >&5
6108echo $ECHO_N "checking for short... $ECHO_C" >&6
6109if test "${ac_cv_type_short+set}" = set; then
6110 echo $ECHO_N "(cached) $ECHO_C" >&6
6111else
6112 cat >conftest.$ac_ext <<_ACEOF
6113#line $LINENO "configure"
6114#include "confdefs.h"
6115$ac_includes_default
6116#ifdef F77_DUMMY_MAIN
6117# ifdef __cplusplus
6118 extern "C"
6119# endif
6120 int F77_DUMMY_MAIN() { return 1; }
6121#endif
6122int
6123main ()
6124{
6125if ((short *) 0)
6126 return 0;
6127if (sizeof (short))
6128 return 0;
6129 ;
6130 return 0;
6131}
6132_ACEOF
6133rm -f conftest.$ac_objext
6134if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6135 (eval $ac_compile) 2>&5
6136 ac_status=$?
6137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6138 (exit $ac_status); } &&
6139 { ac_try='test -s conftest.$ac_objext'
6140 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6141 (eval $ac_try) 2>&5
6142 ac_status=$?
6143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6144 (exit $ac_status); }; }; then
6145 ac_cv_type_short=yes
6146else
6147 echo "$as_me: failed program was:" >&5
6148cat conftest.$ac_ext >&5
6149ac_cv_type_short=no
6150fi
6151rm -f conftest.$ac_objext conftest.$ac_ext
6152fi
6153echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6154echo "${ECHO_T}$ac_cv_type_short" >&6
6155
6156echo "$as_me:$LINENO: checking size of short" >&5
6157echo $ECHO_N "checking size of short... $ECHO_C" >&6
6158if test "${ac_cv_sizeof_short+set}" = set; then
6159 echo $ECHO_N "(cached) $ECHO_C" >&6
6160else
6161 if test "$ac_cv_type_short" = yes; then
6162 # The cast to unsigned long works around a bug in the HP C Compiler
6163 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6164 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6165 # This bug is HP SR number 8606223364.
6166 if test "$cross_compiling" = yes; then
6167 # Depending upon the size, compute the lo and hi bounds.
6168cat >conftest.$ac_ext <<_ACEOF
6169#line $LINENO "configure"
6170#include "confdefs.h"
6171$ac_includes_default
6172#ifdef F77_DUMMY_MAIN
6173# ifdef __cplusplus
6174 extern "C"
6175# endif
6176 int F77_DUMMY_MAIN() { return 1; }
6177#endif
6178int
6179main ()
6180{
6181static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6182test_array [0] = 0
6183
6184 ;
6185 return 0;
6186}
6187_ACEOF
6188rm -f conftest.$ac_objext
6189if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6190 (eval $ac_compile) 2>&5
6191 ac_status=$?
6192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6193 (exit $ac_status); } &&
6194 { ac_try='test -s conftest.$ac_objext'
6195 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6196 (eval $ac_try) 2>&5
6197 ac_status=$?
6198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6199 (exit $ac_status); }; }; then
6200 ac_lo=0 ac_mid=0
6201 while :; do
6202 cat >conftest.$ac_ext <<_ACEOF
6203#line $LINENO "configure"
6204#include "confdefs.h"
6205$ac_includes_default
6206#ifdef F77_DUMMY_MAIN
6207# ifdef __cplusplus
6208 extern "C"
6209# endif
6210 int F77_DUMMY_MAIN() { return 1; }
6211#endif
6212int
6213main ()
6214{
6215static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6216test_array [0] = 0
6217
6218 ;
6219 return 0;
6220}
6221_ACEOF
6222rm -f conftest.$ac_objext
6223if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6224 (eval $ac_compile) 2>&5
6225 ac_status=$?
6226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6227 (exit $ac_status); } &&
6228 { ac_try='test -s conftest.$ac_objext'
6229 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6230 (eval $ac_try) 2>&5
6231 ac_status=$?
6232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6233 (exit $ac_status); }; }; then
6234 ac_hi=$ac_mid; break
6235else
6236 echo "$as_me: failed program was:" >&5
6237cat conftest.$ac_ext >&5
6238ac_lo=`expr $ac_mid + 1`
6239 if test $ac_lo -le $ac_mid; then
6240 ac_lo= ac_hi=
6241 break
6242 fi
6243 ac_mid=`expr 2 '*' $ac_mid + 1`
6244fi
6245rm -f conftest.$ac_objext conftest.$ac_ext
6246 done
6247else
6248 echo "$as_me: failed program was:" >&5
6249cat conftest.$ac_ext >&5
6250cat >conftest.$ac_ext <<_ACEOF
6251#line $LINENO "configure"
6252#include "confdefs.h"
6253$ac_includes_default
6254#ifdef F77_DUMMY_MAIN
6255# ifdef __cplusplus
6256 extern "C"
6257# endif
6258 int F77_DUMMY_MAIN() { return 1; }
6259#endif
6260int
6261main ()
6262{
6263static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6264test_array [0] = 0
6265
6266 ;
6267 return 0;
6268}
6269_ACEOF
6270rm -f conftest.$ac_objext
6271if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6272 (eval $ac_compile) 2>&5
6273 ac_status=$?
6274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6275 (exit $ac_status); } &&
6276 { ac_try='test -s conftest.$ac_objext'
6277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6278 (eval $ac_try) 2>&5
6279 ac_status=$?
6280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6281 (exit $ac_status); }; }; then
6282 ac_hi=-1 ac_mid=-1
6283 while :; do
6284 cat >conftest.$ac_ext <<_ACEOF
6285#line $LINENO "configure"
6286#include "confdefs.h"
6287$ac_includes_default
6288#ifdef F77_DUMMY_MAIN
6289# ifdef __cplusplus
6290 extern "C"
6291# endif
6292 int F77_DUMMY_MAIN() { return 1; }
6293#endif
6294int
6295main ()
6296{
6297static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6298test_array [0] = 0
6299
6300 ;
6301 return 0;
6302}
6303_ACEOF
6304rm -f conftest.$ac_objext
6305if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6306 (eval $ac_compile) 2>&5
6307 ac_status=$?
6308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6309 (exit $ac_status); } &&
6310 { ac_try='test -s conftest.$ac_objext'
6311 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6312 (eval $ac_try) 2>&5
6313 ac_status=$?
6314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6315 (exit $ac_status); }; }; then
6316 ac_lo=$ac_mid; break
6317else
6318 echo "$as_me: failed program was:" >&5
6319cat conftest.$ac_ext >&5
6320ac_hi=`expr '(' $ac_mid ')' - 1`
6321 if test $ac_mid -le $ac_hi; then
6322 ac_lo= ac_hi=
6323 break
6324 fi
6325 ac_mid=`expr 2 '*' $ac_mid`
6326fi
6327rm -f conftest.$ac_objext conftest.$ac_ext
6328 done
6329else
6330 echo "$as_me: failed program was:" >&5
6331cat conftest.$ac_ext >&5
6332ac_lo= ac_hi=
6333fi
6334rm -f conftest.$ac_objext conftest.$ac_ext
6335fi
6336rm -f conftest.$ac_objext conftest.$ac_ext
6337# Binary search between lo and hi bounds.
6338while test "x$ac_lo" != "x$ac_hi"; do
6339 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6340 cat >conftest.$ac_ext <<_ACEOF
6341#line $LINENO "configure"
6342#include "confdefs.h"
6343$ac_includes_default
6344#ifdef F77_DUMMY_MAIN
6345# ifdef __cplusplus
6346 extern "C"
6347# endif
6348 int F77_DUMMY_MAIN() { return 1; }
6349#endif
6350int
6351main ()
6352{
6353static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6354test_array [0] = 0
6355
6356 ;
6357 return 0;
6358}
6359_ACEOF
6360rm -f conftest.$ac_objext
6361if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6362 (eval $ac_compile) 2>&5
6363 ac_status=$?
6364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6365 (exit $ac_status); } &&
6366 { ac_try='test -s conftest.$ac_objext'
6367 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6368 (eval $ac_try) 2>&5
6369 ac_status=$?
6370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6371 (exit $ac_status); }; }; then
6372 ac_hi=$ac_mid
6373else
6374 echo "$as_me: failed program was:" >&5
6375cat conftest.$ac_ext >&5
6376ac_lo=`expr '(' $ac_mid ')' + 1`
6377fi
6378rm -f conftest.$ac_objext conftest.$ac_ext
6379done
6380case $ac_lo in
6381?*) ac_cv_sizeof_short=$ac_lo;;
6382'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6383echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6384 { (exit 1); exit 1; }; } ;;
6385esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006386else
6387 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006388 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6389echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6390 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006391else
Martin v. Löwis11437992002-04-12 09:54:03 +00006392 cat >conftest.$ac_ext <<_ACEOF
6393#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006394#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006395$ac_includes_default
6396long longval () { return (long) (sizeof (short)); }
6397unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006398#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006399#include <stdlib.h>
6400#ifdef F77_DUMMY_MAIN
6401# ifdef __cplusplus
6402 extern "C"
6403# endif
6404 int F77_DUMMY_MAIN() { return 1; }
6405#endif
6406int
6407main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006408{
Martin v. Löwis11437992002-04-12 09:54:03 +00006409
6410 FILE *f = fopen ("conftest.val", "w");
6411 if (! f)
6412 exit (1);
6413 if (((long) (sizeof (short))) < 0)
6414 {
6415 long i = longval ();
6416 if (i != ((long) (sizeof (short))))
6417 exit (1);
6418 fprintf (f, "%ld\n", i);
6419 }
6420 else
6421 {
6422 unsigned long i = ulongval ();
6423 if (i != ((long) (sizeof (short))))
6424 exit (1);
6425 fprintf (f, "%lu\n", i);
6426 }
6427 exit (ferror (f) || fclose (f) != 0);
6428
6429 ;
6430 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006431}
Martin v. Löwis11437992002-04-12 09:54:03 +00006432_ACEOF
6433rm -f conftest$ac_exeext
6434if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6435 (eval $ac_link) 2>&5
6436 ac_status=$?
6437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6438 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6439 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6440 (eval $ac_try) 2>&5
6441 ac_status=$?
6442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6443 (exit $ac_status); }; }; then
6444 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006445else
Martin v. Löwis11437992002-04-12 09:54:03 +00006446 echo "$as_me: program exited with status $ac_status" >&5
6447echo "$as_me: failed program was:" >&5
6448cat conftest.$ac_ext >&5
6449( exit $ac_status )
6450{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6451echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6452 { (exit 1); exit 1; }; }
6453fi
6454rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6455fi
6456fi
6457rm -f conftest.val
6458else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006459 ac_cv_sizeof_short=0
6460fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006461fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006462echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
6463echo "${ECHO_T}$ac_cv_sizeof_short" >&6
6464cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006465#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006466_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006467
6468
Martin v. Löwis11437992002-04-12 09:54:03 +00006469echo "$as_me:$LINENO: checking for float" >&5
6470echo $ECHO_N "checking for float... $ECHO_C" >&6
6471if test "${ac_cv_type_float+set}" = set; then
6472 echo $ECHO_N "(cached) $ECHO_C" >&6
6473else
6474 cat >conftest.$ac_ext <<_ACEOF
6475#line $LINENO "configure"
6476#include "confdefs.h"
6477$ac_includes_default
6478#ifdef F77_DUMMY_MAIN
6479# ifdef __cplusplus
6480 extern "C"
6481# endif
6482 int F77_DUMMY_MAIN() { return 1; }
6483#endif
6484int
6485main ()
6486{
6487if ((float *) 0)
6488 return 0;
6489if (sizeof (float))
6490 return 0;
6491 ;
6492 return 0;
6493}
6494_ACEOF
6495rm -f conftest.$ac_objext
6496if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6497 (eval $ac_compile) 2>&5
6498 ac_status=$?
6499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6500 (exit $ac_status); } &&
6501 { ac_try='test -s conftest.$ac_objext'
6502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6503 (eval $ac_try) 2>&5
6504 ac_status=$?
6505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6506 (exit $ac_status); }; }; then
6507 ac_cv_type_float=yes
6508else
6509 echo "$as_me: failed program was:" >&5
6510cat conftest.$ac_ext >&5
6511ac_cv_type_float=no
6512fi
6513rm -f conftest.$ac_objext conftest.$ac_ext
6514fi
6515echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
6516echo "${ECHO_T}$ac_cv_type_float" >&6
6517
6518echo "$as_me:$LINENO: checking size of float" >&5
6519echo $ECHO_N "checking size of float... $ECHO_C" >&6
6520if test "${ac_cv_sizeof_float+set}" = set; then
6521 echo $ECHO_N "(cached) $ECHO_C" >&6
6522else
6523 if test "$ac_cv_type_float" = yes; then
6524 # The cast to unsigned long works around a bug in the HP C Compiler
6525 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6526 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6527 # This bug is HP SR number 8606223364.
6528 if test "$cross_compiling" = yes; then
6529 # Depending upon the size, compute the lo and hi bounds.
6530cat >conftest.$ac_ext <<_ACEOF
6531#line $LINENO "configure"
6532#include "confdefs.h"
6533$ac_includes_default
6534#ifdef F77_DUMMY_MAIN
6535# ifdef __cplusplus
6536 extern "C"
6537# endif
6538 int F77_DUMMY_MAIN() { return 1; }
6539#endif
6540int
6541main ()
6542{
6543static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
6544test_array [0] = 0
6545
6546 ;
6547 return 0;
6548}
6549_ACEOF
6550rm -f conftest.$ac_objext
6551if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6552 (eval $ac_compile) 2>&5
6553 ac_status=$?
6554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6555 (exit $ac_status); } &&
6556 { ac_try='test -s conftest.$ac_objext'
6557 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6558 (eval $ac_try) 2>&5
6559 ac_status=$?
6560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6561 (exit $ac_status); }; }; then
6562 ac_lo=0 ac_mid=0
6563 while :; do
6564 cat >conftest.$ac_ext <<_ACEOF
6565#line $LINENO "configure"
6566#include "confdefs.h"
6567$ac_includes_default
6568#ifdef F77_DUMMY_MAIN
6569# ifdef __cplusplus
6570 extern "C"
6571# endif
6572 int F77_DUMMY_MAIN() { return 1; }
6573#endif
6574int
6575main ()
6576{
6577static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
6578test_array [0] = 0
6579
6580 ;
6581 return 0;
6582}
6583_ACEOF
6584rm -f conftest.$ac_objext
6585if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6586 (eval $ac_compile) 2>&5
6587 ac_status=$?
6588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6589 (exit $ac_status); } &&
6590 { ac_try='test -s conftest.$ac_objext'
6591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6592 (eval $ac_try) 2>&5
6593 ac_status=$?
6594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6595 (exit $ac_status); }; }; then
6596 ac_hi=$ac_mid; break
6597else
6598 echo "$as_me: failed program was:" >&5
6599cat conftest.$ac_ext >&5
6600ac_lo=`expr $ac_mid + 1`
6601 if test $ac_lo -le $ac_mid; then
6602 ac_lo= ac_hi=
6603 break
6604 fi
6605 ac_mid=`expr 2 '*' $ac_mid + 1`
6606fi
6607rm -f conftest.$ac_objext conftest.$ac_ext
6608 done
6609else
6610 echo "$as_me: failed program was:" >&5
6611cat conftest.$ac_ext >&5
6612cat >conftest.$ac_ext <<_ACEOF
6613#line $LINENO "configure"
6614#include "confdefs.h"
6615$ac_includes_default
6616#ifdef F77_DUMMY_MAIN
6617# ifdef __cplusplus
6618 extern "C"
6619# endif
6620 int F77_DUMMY_MAIN() { return 1; }
6621#endif
6622int
6623main ()
6624{
6625static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
6626test_array [0] = 0
6627
6628 ;
6629 return 0;
6630}
6631_ACEOF
6632rm -f conftest.$ac_objext
6633if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6634 (eval $ac_compile) 2>&5
6635 ac_status=$?
6636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6637 (exit $ac_status); } &&
6638 { ac_try='test -s conftest.$ac_objext'
6639 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6640 (eval $ac_try) 2>&5
6641 ac_status=$?
6642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6643 (exit $ac_status); }; }; then
6644 ac_hi=-1 ac_mid=-1
6645 while :; do
6646 cat >conftest.$ac_ext <<_ACEOF
6647#line $LINENO "configure"
6648#include "confdefs.h"
6649$ac_includes_default
6650#ifdef F77_DUMMY_MAIN
6651# ifdef __cplusplus
6652 extern "C"
6653# endif
6654 int F77_DUMMY_MAIN() { return 1; }
6655#endif
6656int
6657main ()
6658{
6659static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
6660test_array [0] = 0
6661
6662 ;
6663 return 0;
6664}
6665_ACEOF
6666rm -f conftest.$ac_objext
6667if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6668 (eval $ac_compile) 2>&5
6669 ac_status=$?
6670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6671 (exit $ac_status); } &&
6672 { ac_try='test -s conftest.$ac_objext'
6673 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6674 (eval $ac_try) 2>&5
6675 ac_status=$?
6676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6677 (exit $ac_status); }; }; then
6678 ac_lo=$ac_mid; break
6679else
6680 echo "$as_me: failed program was:" >&5
6681cat conftest.$ac_ext >&5
6682ac_hi=`expr '(' $ac_mid ')' - 1`
6683 if test $ac_mid -le $ac_hi; then
6684 ac_lo= ac_hi=
6685 break
6686 fi
6687 ac_mid=`expr 2 '*' $ac_mid`
6688fi
6689rm -f conftest.$ac_objext conftest.$ac_ext
6690 done
6691else
6692 echo "$as_me: failed program was:" >&5
6693cat conftest.$ac_ext >&5
6694ac_lo= ac_hi=
6695fi
6696rm -f conftest.$ac_objext conftest.$ac_ext
6697fi
6698rm -f conftest.$ac_objext conftest.$ac_ext
6699# Binary search between lo and hi bounds.
6700while test "x$ac_lo" != "x$ac_hi"; do
6701 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6702 cat >conftest.$ac_ext <<_ACEOF
6703#line $LINENO "configure"
6704#include "confdefs.h"
6705$ac_includes_default
6706#ifdef F77_DUMMY_MAIN
6707# ifdef __cplusplus
6708 extern "C"
6709# endif
6710 int F77_DUMMY_MAIN() { return 1; }
6711#endif
6712int
6713main ()
6714{
6715static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
6716test_array [0] = 0
6717
6718 ;
6719 return 0;
6720}
6721_ACEOF
6722rm -f conftest.$ac_objext
6723if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6724 (eval $ac_compile) 2>&5
6725 ac_status=$?
6726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6727 (exit $ac_status); } &&
6728 { ac_try='test -s conftest.$ac_objext'
6729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6730 (eval $ac_try) 2>&5
6731 ac_status=$?
6732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6733 (exit $ac_status); }; }; then
6734 ac_hi=$ac_mid
6735else
6736 echo "$as_me: failed program was:" >&5
6737cat conftest.$ac_ext >&5
6738ac_lo=`expr '(' $ac_mid ')' + 1`
6739fi
6740rm -f conftest.$ac_objext conftest.$ac_ext
6741done
6742case $ac_lo in
6743?*) ac_cv_sizeof_float=$ac_lo;;
6744'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
6745echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
6746 { (exit 1); exit 1; }; } ;;
6747esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006748else
6749 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006750 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6751echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6752 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006753else
Martin v. Löwis11437992002-04-12 09:54:03 +00006754 cat >conftest.$ac_ext <<_ACEOF
6755#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006756#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006757$ac_includes_default
6758long longval () { return (long) (sizeof (float)); }
6759unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006760#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006761#include <stdlib.h>
6762#ifdef F77_DUMMY_MAIN
6763# ifdef __cplusplus
6764 extern "C"
6765# endif
6766 int F77_DUMMY_MAIN() { return 1; }
6767#endif
6768int
6769main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006770{
Martin v. Löwis11437992002-04-12 09:54:03 +00006771
6772 FILE *f = fopen ("conftest.val", "w");
6773 if (! f)
6774 exit (1);
6775 if (((long) (sizeof (float))) < 0)
6776 {
6777 long i = longval ();
6778 if (i != ((long) (sizeof (float))))
6779 exit (1);
6780 fprintf (f, "%ld\n", i);
6781 }
6782 else
6783 {
6784 unsigned long i = ulongval ();
6785 if (i != ((long) (sizeof (float))))
6786 exit (1);
6787 fprintf (f, "%lu\n", i);
6788 }
6789 exit (ferror (f) || fclose (f) != 0);
6790
6791 ;
6792 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006793}
Martin v. Löwis11437992002-04-12 09:54:03 +00006794_ACEOF
6795rm -f conftest$ac_exeext
6796if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6797 (eval $ac_link) 2>&5
6798 ac_status=$?
6799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6800 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6801 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6802 (eval $ac_try) 2>&5
6803 ac_status=$?
6804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6805 (exit $ac_status); }; }; then
6806 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006807else
Martin v. Löwis11437992002-04-12 09:54:03 +00006808 echo "$as_me: program exited with status $ac_status" >&5
6809echo "$as_me: failed program was:" >&5
6810cat conftest.$ac_ext >&5
6811( exit $ac_status )
6812{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
6813echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
6814 { (exit 1); exit 1; }; }
6815fi
6816rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6817fi
6818fi
6819rm -f conftest.val
6820else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006821 ac_cv_sizeof_float=0
6822fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006823fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006824echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
6825echo "${ECHO_T}$ac_cv_sizeof_float" >&6
6826cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006827#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006828_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006829
6830
Martin v. Löwis11437992002-04-12 09:54:03 +00006831echo "$as_me:$LINENO: checking for double" >&5
6832echo $ECHO_N "checking for double... $ECHO_C" >&6
6833if test "${ac_cv_type_double+set}" = set; then
6834 echo $ECHO_N "(cached) $ECHO_C" >&6
6835else
6836 cat >conftest.$ac_ext <<_ACEOF
6837#line $LINENO "configure"
6838#include "confdefs.h"
6839$ac_includes_default
6840#ifdef F77_DUMMY_MAIN
6841# ifdef __cplusplus
6842 extern "C"
6843# endif
6844 int F77_DUMMY_MAIN() { return 1; }
6845#endif
6846int
6847main ()
6848{
6849if ((double *) 0)
6850 return 0;
6851if (sizeof (double))
6852 return 0;
6853 ;
6854 return 0;
6855}
6856_ACEOF
6857rm -f conftest.$ac_objext
6858if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6859 (eval $ac_compile) 2>&5
6860 ac_status=$?
6861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6862 (exit $ac_status); } &&
6863 { ac_try='test -s conftest.$ac_objext'
6864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6865 (eval $ac_try) 2>&5
6866 ac_status=$?
6867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6868 (exit $ac_status); }; }; then
6869 ac_cv_type_double=yes
6870else
6871 echo "$as_me: failed program was:" >&5
6872cat conftest.$ac_ext >&5
6873ac_cv_type_double=no
6874fi
6875rm -f conftest.$ac_objext conftest.$ac_ext
6876fi
6877echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
6878echo "${ECHO_T}$ac_cv_type_double" >&6
6879
6880echo "$as_me:$LINENO: checking size of double" >&5
6881echo $ECHO_N "checking size of double... $ECHO_C" >&6
6882if test "${ac_cv_sizeof_double+set}" = set; then
6883 echo $ECHO_N "(cached) $ECHO_C" >&6
6884else
6885 if test "$ac_cv_type_double" = yes; then
6886 # The cast to unsigned long works around a bug in the HP C Compiler
6887 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6888 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6889 # This bug is HP SR number 8606223364.
6890 if test "$cross_compiling" = yes; then
6891 # Depending upon the size, compute the lo and hi bounds.
6892cat >conftest.$ac_ext <<_ACEOF
6893#line $LINENO "configure"
6894#include "confdefs.h"
6895$ac_includes_default
6896#ifdef F77_DUMMY_MAIN
6897# ifdef __cplusplus
6898 extern "C"
6899# endif
6900 int F77_DUMMY_MAIN() { return 1; }
6901#endif
6902int
6903main ()
6904{
6905static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
6906test_array [0] = 0
6907
6908 ;
6909 return 0;
6910}
6911_ACEOF
6912rm -f conftest.$ac_objext
6913if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6914 (eval $ac_compile) 2>&5
6915 ac_status=$?
6916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6917 (exit $ac_status); } &&
6918 { ac_try='test -s conftest.$ac_objext'
6919 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6920 (eval $ac_try) 2>&5
6921 ac_status=$?
6922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6923 (exit $ac_status); }; }; then
6924 ac_lo=0 ac_mid=0
6925 while :; do
6926 cat >conftest.$ac_ext <<_ACEOF
6927#line $LINENO "configure"
6928#include "confdefs.h"
6929$ac_includes_default
6930#ifdef F77_DUMMY_MAIN
6931# ifdef __cplusplus
6932 extern "C"
6933# endif
6934 int F77_DUMMY_MAIN() { return 1; }
6935#endif
6936int
6937main ()
6938{
6939static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
6940test_array [0] = 0
6941
6942 ;
6943 return 0;
6944}
6945_ACEOF
6946rm -f conftest.$ac_objext
6947if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6948 (eval $ac_compile) 2>&5
6949 ac_status=$?
6950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6951 (exit $ac_status); } &&
6952 { ac_try='test -s conftest.$ac_objext'
6953 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6954 (eval $ac_try) 2>&5
6955 ac_status=$?
6956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6957 (exit $ac_status); }; }; then
6958 ac_hi=$ac_mid; break
6959else
6960 echo "$as_me: failed program was:" >&5
6961cat conftest.$ac_ext >&5
6962ac_lo=`expr $ac_mid + 1`
6963 if test $ac_lo -le $ac_mid; then
6964 ac_lo= ac_hi=
6965 break
6966 fi
6967 ac_mid=`expr 2 '*' $ac_mid + 1`
6968fi
6969rm -f conftest.$ac_objext conftest.$ac_ext
6970 done
6971else
6972 echo "$as_me: failed program was:" >&5
6973cat conftest.$ac_ext >&5
6974cat >conftest.$ac_ext <<_ACEOF
6975#line $LINENO "configure"
6976#include "confdefs.h"
6977$ac_includes_default
6978#ifdef F77_DUMMY_MAIN
6979# ifdef __cplusplus
6980 extern "C"
6981# endif
6982 int F77_DUMMY_MAIN() { return 1; }
6983#endif
6984int
6985main ()
6986{
6987static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
6988test_array [0] = 0
6989
6990 ;
6991 return 0;
6992}
6993_ACEOF
6994rm -f conftest.$ac_objext
6995if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6996 (eval $ac_compile) 2>&5
6997 ac_status=$?
6998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6999 (exit $ac_status); } &&
7000 { ac_try='test -s conftest.$ac_objext'
7001 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7002 (eval $ac_try) 2>&5
7003 ac_status=$?
7004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7005 (exit $ac_status); }; }; then
7006 ac_hi=-1 ac_mid=-1
7007 while :; do
7008 cat >conftest.$ac_ext <<_ACEOF
7009#line $LINENO "configure"
7010#include "confdefs.h"
7011$ac_includes_default
7012#ifdef F77_DUMMY_MAIN
7013# ifdef __cplusplus
7014 extern "C"
7015# endif
7016 int F77_DUMMY_MAIN() { return 1; }
7017#endif
7018int
7019main ()
7020{
7021static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7022test_array [0] = 0
7023
7024 ;
7025 return 0;
7026}
7027_ACEOF
7028rm -f conftest.$ac_objext
7029if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7030 (eval $ac_compile) 2>&5
7031 ac_status=$?
7032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7033 (exit $ac_status); } &&
7034 { ac_try='test -s conftest.$ac_objext'
7035 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7036 (eval $ac_try) 2>&5
7037 ac_status=$?
7038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7039 (exit $ac_status); }; }; then
7040 ac_lo=$ac_mid; break
7041else
7042 echo "$as_me: failed program was:" >&5
7043cat conftest.$ac_ext >&5
7044ac_hi=`expr '(' $ac_mid ')' - 1`
7045 if test $ac_mid -le $ac_hi; then
7046 ac_lo= ac_hi=
7047 break
7048 fi
7049 ac_mid=`expr 2 '*' $ac_mid`
7050fi
7051rm -f conftest.$ac_objext conftest.$ac_ext
7052 done
7053else
7054 echo "$as_me: failed program was:" >&5
7055cat conftest.$ac_ext >&5
7056ac_lo= ac_hi=
7057fi
7058rm -f conftest.$ac_objext conftest.$ac_ext
7059fi
7060rm -f conftest.$ac_objext conftest.$ac_ext
7061# Binary search between lo and hi bounds.
7062while test "x$ac_lo" != "x$ac_hi"; do
7063 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7064 cat >conftest.$ac_ext <<_ACEOF
7065#line $LINENO "configure"
7066#include "confdefs.h"
7067$ac_includes_default
7068#ifdef F77_DUMMY_MAIN
7069# ifdef __cplusplus
7070 extern "C"
7071# endif
7072 int F77_DUMMY_MAIN() { return 1; }
7073#endif
7074int
7075main ()
7076{
7077static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7078test_array [0] = 0
7079
7080 ;
7081 return 0;
7082}
7083_ACEOF
7084rm -f conftest.$ac_objext
7085if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7086 (eval $ac_compile) 2>&5
7087 ac_status=$?
7088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7089 (exit $ac_status); } &&
7090 { ac_try='test -s conftest.$ac_objext'
7091 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7092 (eval $ac_try) 2>&5
7093 ac_status=$?
7094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7095 (exit $ac_status); }; }; then
7096 ac_hi=$ac_mid
7097else
7098 echo "$as_me: failed program was:" >&5
7099cat conftest.$ac_ext >&5
7100ac_lo=`expr '(' $ac_mid ')' + 1`
7101fi
7102rm -f conftest.$ac_objext conftest.$ac_ext
7103done
7104case $ac_lo in
7105?*) ac_cv_sizeof_double=$ac_lo;;
7106'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7107echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7108 { (exit 1); exit 1; }; } ;;
7109esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007110else
7111 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007112 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7113echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7114 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007115else
Martin v. Löwis11437992002-04-12 09:54:03 +00007116 cat >conftest.$ac_ext <<_ACEOF
7117#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007118#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007119$ac_includes_default
7120long longval () { return (long) (sizeof (double)); }
7121unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007122#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007123#include <stdlib.h>
7124#ifdef F77_DUMMY_MAIN
7125# ifdef __cplusplus
7126 extern "C"
7127# endif
7128 int F77_DUMMY_MAIN() { return 1; }
7129#endif
7130int
7131main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007132{
Martin v. Löwis11437992002-04-12 09:54:03 +00007133
7134 FILE *f = fopen ("conftest.val", "w");
7135 if (! f)
7136 exit (1);
7137 if (((long) (sizeof (double))) < 0)
7138 {
7139 long i = longval ();
7140 if (i != ((long) (sizeof (double))))
7141 exit (1);
7142 fprintf (f, "%ld\n", i);
7143 }
7144 else
7145 {
7146 unsigned long i = ulongval ();
7147 if (i != ((long) (sizeof (double))))
7148 exit (1);
7149 fprintf (f, "%lu\n", i);
7150 }
7151 exit (ferror (f) || fclose (f) != 0);
7152
7153 ;
7154 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007155}
Martin v. Löwis11437992002-04-12 09:54:03 +00007156_ACEOF
7157rm -f conftest$ac_exeext
7158if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7159 (eval $ac_link) 2>&5
7160 ac_status=$?
7161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7162 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7163 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7164 (eval $ac_try) 2>&5
7165 ac_status=$?
7166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7167 (exit $ac_status); }; }; then
7168 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007169else
Martin v. Löwis11437992002-04-12 09:54:03 +00007170 echo "$as_me: program exited with status $ac_status" >&5
7171echo "$as_me: failed program was:" >&5
7172cat conftest.$ac_ext >&5
7173( exit $ac_status )
7174{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7175echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7176 { (exit 1); exit 1; }; }
7177fi
7178rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7179fi
7180fi
7181rm -f conftest.val
7182else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007183 ac_cv_sizeof_double=0
7184fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007185fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007186echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7187echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7188cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007189#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007190_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007191
7192
Martin v. Löwis11437992002-04-12 09:54:03 +00007193echo "$as_me:$LINENO: checking for fpos_t" >&5
7194echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7195if test "${ac_cv_type_fpos_t+set}" = set; then
7196 echo $ECHO_N "(cached) $ECHO_C" >&6
7197else
7198 cat >conftest.$ac_ext <<_ACEOF
7199#line $LINENO "configure"
7200#include "confdefs.h"
7201$ac_includes_default
7202#ifdef F77_DUMMY_MAIN
7203# ifdef __cplusplus
7204 extern "C"
7205# endif
7206 int F77_DUMMY_MAIN() { return 1; }
7207#endif
7208int
7209main ()
7210{
7211if ((fpos_t *) 0)
7212 return 0;
7213if (sizeof (fpos_t))
7214 return 0;
7215 ;
7216 return 0;
7217}
7218_ACEOF
7219rm -f conftest.$ac_objext
7220if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7221 (eval $ac_compile) 2>&5
7222 ac_status=$?
7223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7224 (exit $ac_status); } &&
7225 { ac_try='test -s conftest.$ac_objext'
7226 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7227 (eval $ac_try) 2>&5
7228 ac_status=$?
7229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7230 (exit $ac_status); }; }; then
7231 ac_cv_type_fpos_t=yes
7232else
7233 echo "$as_me: failed program was:" >&5
7234cat conftest.$ac_ext >&5
7235ac_cv_type_fpos_t=no
7236fi
7237rm -f conftest.$ac_objext conftest.$ac_ext
7238fi
7239echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7240echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7241
7242echo "$as_me:$LINENO: checking size of fpos_t" >&5
7243echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7244if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7245 echo $ECHO_N "(cached) $ECHO_C" >&6
7246else
7247 if test "$ac_cv_type_fpos_t" = yes; then
7248 # The cast to unsigned long works around a bug in the HP C Compiler
7249 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7250 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7251 # This bug is HP SR number 8606223364.
7252 if test "$cross_compiling" = yes; then
7253 # Depending upon the size, compute the lo and hi bounds.
7254cat >conftest.$ac_ext <<_ACEOF
7255#line $LINENO "configure"
7256#include "confdefs.h"
7257$ac_includes_default
7258#ifdef F77_DUMMY_MAIN
7259# ifdef __cplusplus
7260 extern "C"
7261# endif
7262 int F77_DUMMY_MAIN() { return 1; }
7263#endif
7264int
7265main ()
7266{
7267static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7268test_array [0] = 0
7269
7270 ;
7271 return 0;
7272}
7273_ACEOF
7274rm -f conftest.$ac_objext
7275if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7276 (eval $ac_compile) 2>&5
7277 ac_status=$?
7278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7279 (exit $ac_status); } &&
7280 { ac_try='test -s conftest.$ac_objext'
7281 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7282 (eval $ac_try) 2>&5
7283 ac_status=$?
7284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7285 (exit $ac_status); }; }; then
7286 ac_lo=0 ac_mid=0
7287 while :; do
7288 cat >conftest.$ac_ext <<_ACEOF
7289#line $LINENO "configure"
7290#include "confdefs.h"
7291$ac_includes_default
7292#ifdef F77_DUMMY_MAIN
7293# ifdef __cplusplus
7294 extern "C"
7295# endif
7296 int F77_DUMMY_MAIN() { return 1; }
7297#endif
7298int
7299main ()
7300{
7301static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7302test_array [0] = 0
7303
7304 ;
7305 return 0;
7306}
7307_ACEOF
7308rm -f conftest.$ac_objext
7309if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7310 (eval $ac_compile) 2>&5
7311 ac_status=$?
7312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7313 (exit $ac_status); } &&
7314 { ac_try='test -s conftest.$ac_objext'
7315 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7316 (eval $ac_try) 2>&5
7317 ac_status=$?
7318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7319 (exit $ac_status); }; }; then
7320 ac_hi=$ac_mid; break
7321else
7322 echo "$as_me: failed program was:" >&5
7323cat conftest.$ac_ext >&5
7324ac_lo=`expr $ac_mid + 1`
7325 if test $ac_lo -le $ac_mid; then
7326 ac_lo= ac_hi=
7327 break
7328 fi
7329 ac_mid=`expr 2 '*' $ac_mid + 1`
7330fi
7331rm -f conftest.$ac_objext conftest.$ac_ext
7332 done
7333else
7334 echo "$as_me: failed program was:" >&5
7335cat conftest.$ac_ext >&5
7336cat >conftest.$ac_ext <<_ACEOF
7337#line $LINENO "configure"
7338#include "confdefs.h"
7339$ac_includes_default
7340#ifdef F77_DUMMY_MAIN
7341# ifdef __cplusplus
7342 extern "C"
7343# endif
7344 int F77_DUMMY_MAIN() { return 1; }
7345#endif
7346int
7347main ()
7348{
7349static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7350test_array [0] = 0
7351
7352 ;
7353 return 0;
7354}
7355_ACEOF
7356rm -f conftest.$ac_objext
7357if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7358 (eval $ac_compile) 2>&5
7359 ac_status=$?
7360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7361 (exit $ac_status); } &&
7362 { ac_try='test -s conftest.$ac_objext'
7363 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7364 (eval $ac_try) 2>&5
7365 ac_status=$?
7366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7367 (exit $ac_status); }; }; then
7368 ac_hi=-1 ac_mid=-1
7369 while :; do
7370 cat >conftest.$ac_ext <<_ACEOF
7371#line $LINENO "configure"
7372#include "confdefs.h"
7373$ac_includes_default
7374#ifdef F77_DUMMY_MAIN
7375# ifdef __cplusplus
7376 extern "C"
7377# endif
7378 int F77_DUMMY_MAIN() { return 1; }
7379#endif
7380int
7381main ()
7382{
7383static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
7384test_array [0] = 0
7385
7386 ;
7387 return 0;
7388}
7389_ACEOF
7390rm -f conftest.$ac_objext
7391if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7392 (eval $ac_compile) 2>&5
7393 ac_status=$?
7394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7395 (exit $ac_status); } &&
7396 { ac_try='test -s conftest.$ac_objext'
7397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7398 (eval $ac_try) 2>&5
7399 ac_status=$?
7400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7401 (exit $ac_status); }; }; then
7402 ac_lo=$ac_mid; break
7403else
7404 echo "$as_me: failed program was:" >&5
7405cat conftest.$ac_ext >&5
7406ac_hi=`expr '(' $ac_mid ')' - 1`
7407 if test $ac_mid -le $ac_hi; then
7408 ac_lo= ac_hi=
7409 break
7410 fi
7411 ac_mid=`expr 2 '*' $ac_mid`
7412fi
7413rm -f conftest.$ac_objext conftest.$ac_ext
7414 done
7415else
7416 echo "$as_me: failed program was:" >&5
7417cat conftest.$ac_ext >&5
7418ac_lo= ac_hi=
7419fi
7420rm -f conftest.$ac_objext conftest.$ac_ext
7421fi
7422rm -f conftest.$ac_objext conftest.$ac_ext
7423# Binary search between lo and hi bounds.
7424while test "x$ac_lo" != "x$ac_hi"; do
7425 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7426 cat >conftest.$ac_ext <<_ACEOF
7427#line $LINENO "configure"
7428#include "confdefs.h"
7429$ac_includes_default
7430#ifdef F77_DUMMY_MAIN
7431# ifdef __cplusplus
7432 extern "C"
7433# endif
7434 int F77_DUMMY_MAIN() { return 1; }
7435#endif
7436int
7437main ()
7438{
7439static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7440test_array [0] = 0
7441
7442 ;
7443 return 0;
7444}
7445_ACEOF
7446rm -f conftest.$ac_objext
7447if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7448 (eval $ac_compile) 2>&5
7449 ac_status=$?
7450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7451 (exit $ac_status); } &&
7452 { ac_try='test -s conftest.$ac_objext'
7453 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7454 (eval $ac_try) 2>&5
7455 ac_status=$?
7456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7457 (exit $ac_status); }; }; then
7458 ac_hi=$ac_mid
7459else
7460 echo "$as_me: failed program was:" >&5
7461cat conftest.$ac_ext >&5
7462ac_lo=`expr '(' $ac_mid ')' + 1`
7463fi
7464rm -f conftest.$ac_objext conftest.$ac_ext
7465done
7466case $ac_lo in
7467?*) ac_cv_sizeof_fpos_t=$ac_lo;;
7468'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7469echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7470 { (exit 1); exit 1; }; } ;;
7471esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007472else
7473 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007474 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7475echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7476 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007477else
Martin v. Löwis11437992002-04-12 09:54:03 +00007478 cat >conftest.$ac_ext <<_ACEOF
7479#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007480#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007481$ac_includes_default
7482long longval () { return (long) (sizeof (fpos_t)); }
7483unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007484#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007485#include <stdlib.h>
7486#ifdef F77_DUMMY_MAIN
7487# ifdef __cplusplus
7488 extern "C"
7489# endif
7490 int F77_DUMMY_MAIN() { return 1; }
7491#endif
7492int
7493main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007494{
Martin v. Löwis11437992002-04-12 09:54:03 +00007495
7496 FILE *f = fopen ("conftest.val", "w");
7497 if (! f)
7498 exit (1);
7499 if (((long) (sizeof (fpos_t))) < 0)
7500 {
7501 long i = longval ();
7502 if (i != ((long) (sizeof (fpos_t))))
7503 exit (1);
7504 fprintf (f, "%ld\n", i);
7505 }
7506 else
7507 {
7508 unsigned long i = ulongval ();
7509 if (i != ((long) (sizeof (fpos_t))))
7510 exit (1);
7511 fprintf (f, "%lu\n", i);
7512 }
7513 exit (ferror (f) || fclose (f) != 0);
7514
7515 ;
7516 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007517}
Martin v. Löwis11437992002-04-12 09:54:03 +00007518_ACEOF
7519rm -f conftest$ac_exeext
7520if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7521 (eval $ac_link) 2>&5
7522 ac_status=$?
7523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7524 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7525 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7526 (eval $ac_try) 2>&5
7527 ac_status=$?
7528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7529 (exit $ac_status); }; }; then
7530 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007531else
Martin v. Löwis11437992002-04-12 09:54:03 +00007532 echo "$as_me: program exited with status $ac_status" >&5
7533echo "$as_me: failed program was:" >&5
7534cat conftest.$ac_ext >&5
7535( exit $ac_status )
7536{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7537echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7538 { (exit 1); exit 1; }; }
7539fi
7540rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7541fi
7542fi
7543rm -f conftest.val
7544else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007545 ac_cv_sizeof_fpos_t=0
7546fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007547fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007548echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
7549echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
7550cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007551#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007552_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007553
Michael W. Hudson54241132001-12-07 15:38:26 +00007554
7555
Martin v. Löwis11437992002-04-12 09:54:03 +00007556echo "$as_me:$LINENO: checking for long long support" >&5
7557echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007558have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007559cat >conftest.$ac_ext <<_ACEOF
7560#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007561#include "confdefs.h"
7562
Martin v. Löwis11437992002-04-12 09:54:03 +00007563#ifdef F77_DUMMY_MAIN
7564# ifdef __cplusplus
7565 extern "C"
7566# endif
7567 int F77_DUMMY_MAIN() { return 1; }
7568#endif
7569int
7570main ()
7571{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007572long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007573 ;
7574 return 0;
7575}
7576_ACEOF
7577rm -f conftest.$ac_objext
7578if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7579 (eval $ac_compile) 2>&5
7580 ac_status=$?
7581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7582 (exit $ac_status); } &&
7583 { ac_try='test -s conftest.$ac_objext'
7584 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7585 (eval $ac_try) 2>&5
7586 ac_status=$?
7587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7588 (exit $ac_status); }; }; then
7589
7590
7591cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007592#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007593_ACEOF
7594
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007595 have_long_long=yes
7596
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007597else
Martin v. Löwis11437992002-04-12 09:54:03 +00007598 echo "$as_me: failed program was:" >&5
7599cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007600fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007601rm -f conftest.$ac_objext conftest.$ac_ext
7602echo "$as_me:$LINENO: result: $have_long_long" >&5
7603echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007604if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007605echo "$as_me:$LINENO: checking for long long" >&5
7606echo $ECHO_N "checking for long long... $ECHO_C" >&6
7607if test "${ac_cv_type_long_long+set}" = set; then
7608 echo $ECHO_N "(cached) $ECHO_C" >&6
7609else
7610 cat >conftest.$ac_ext <<_ACEOF
7611#line $LINENO "configure"
7612#include "confdefs.h"
7613$ac_includes_default
7614#ifdef F77_DUMMY_MAIN
7615# ifdef __cplusplus
7616 extern "C"
7617# endif
7618 int F77_DUMMY_MAIN() { return 1; }
7619#endif
7620int
7621main ()
7622{
7623if ((long long *) 0)
7624 return 0;
7625if (sizeof (long long))
7626 return 0;
7627 ;
7628 return 0;
7629}
7630_ACEOF
7631rm -f conftest.$ac_objext
7632if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7633 (eval $ac_compile) 2>&5
7634 ac_status=$?
7635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7636 (exit $ac_status); } &&
7637 { ac_try='test -s conftest.$ac_objext'
7638 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7639 (eval $ac_try) 2>&5
7640 ac_status=$?
7641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7642 (exit $ac_status); }; }; then
7643 ac_cv_type_long_long=yes
7644else
7645 echo "$as_me: failed program was:" >&5
7646cat conftest.$ac_ext >&5
7647ac_cv_type_long_long=no
7648fi
7649rm -f conftest.$ac_objext conftest.$ac_ext
7650fi
7651echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
7652echo "${ECHO_T}$ac_cv_type_long_long" >&6
7653
7654echo "$as_me:$LINENO: checking size of long long" >&5
7655echo $ECHO_N "checking size of long long... $ECHO_C" >&6
7656if test "${ac_cv_sizeof_long_long+set}" = set; then
7657 echo $ECHO_N "(cached) $ECHO_C" >&6
7658else
7659 if test "$ac_cv_type_long_long" = yes; then
7660 # The cast to unsigned long works around a bug in the HP C Compiler
7661 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7662 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7663 # This bug is HP SR number 8606223364.
7664 if test "$cross_compiling" = yes; then
7665 # Depending upon the size, compute the lo and hi bounds.
7666cat >conftest.$ac_ext <<_ACEOF
7667#line $LINENO "configure"
7668#include "confdefs.h"
7669$ac_includes_default
7670#ifdef F77_DUMMY_MAIN
7671# ifdef __cplusplus
7672 extern "C"
7673# endif
7674 int F77_DUMMY_MAIN() { return 1; }
7675#endif
7676int
7677main ()
7678{
7679static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
7680test_array [0] = 0
7681
7682 ;
7683 return 0;
7684}
7685_ACEOF
7686rm -f conftest.$ac_objext
7687if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7688 (eval $ac_compile) 2>&5
7689 ac_status=$?
7690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7691 (exit $ac_status); } &&
7692 { ac_try='test -s conftest.$ac_objext'
7693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7694 (eval $ac_try) 2>&5
7695 ac_status=$?
7696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7697 (exit $ac_status); }; }; then
7698 ac_lo=0 ac_mid=0
7699 while :; do
7700 cat >conftest.$ac_ext <<_ACEOF
7701#line $LINENO "configure"
7702#include "confdefs.h"
7703$ac_includes_default
7704#ifdef F77_DUMMY_MAIN
7705# ifdef __cplusplus
7706 extern "C"
7707# endif
7708 int F77_DUMMY_MAIN() { return 1; }
7709#endif
7710int
7711main ()
7712{
7713static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
7714test_array [0] = 0
7715
7716 ;
7717 return 0;
7718}
7719_ACEOF
7720rm -f conftest.$ac_objext
7721if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7722 (eval $ac_compile) 2>&5
7723 ac_status=$?
7724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7725 (exit $ac_status); } &&
7726 { ac_try='test -s conftest.$ac_objext'
7727 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7728 (eval $ac_try) 2>&5
7729 ac_status=$?
7730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7731 (exit $ac_status); }; }; then
7732 ac_hi=$ac_mid; break
7733else
7734 echo "$as_me: failed program was:" >&5
7735cat conftest.$ac_ext >&5
7736ac_lo=`expr $ac_mid + 1`
7737 if test $ac_lo -le $ac_mid; then
7738 ac_lo= ac_hi=
7739 break
7740 fi
7741 ac_mid=`expr 2 '*' $ac_mid + 1`
7742fi
7743rm -f conftest.$ac_objext conftest.$ac_ext
7744 done
7745else
7746 echo "$as_me: failed program was:" >&5
7747cat conftest.$ac_ext >&5
7748cat >conftest.$ac_ext <<_ACEOF
7749#line $LINENO "configure"
7750#include "confdefs.h"
7751$ac_includes_default
7752#ifdef F77_DUMMY_MAIN
7753# ifdef __cplusplus
7754 extern "C"
7755# endif
7756 int F77_DUMMY_MAIN() { return 1; }
7757#endif
7758int
7759main ()
7760{
7761static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
7762test_array [0] = 0
7763
7764 ;
7765 return 0;
7766}
7767_ACEOF
7768rm -f conftest.$ac_objext
7769if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7770 (eval $ac_compile) 2>&5
7771 ac_status=$?
7772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7773 (exit $ac_status); } &&
7774 { ac_try='test -s conftest.$ac_objext'
7775 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7776 (eval $ac_try) 2>&5
7777 ac_status=$?
7778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7779 (exit $ac_status); }; }; then
7780 ac_hi=-1 ac_mid=-1
7781 while :; do
7782 cat >conftest.$ac_ext <<_ACEOF
7783#line $LINENO "configure"
7784#include "confdefs.h"
7785$ac_includes_default
7786#ifdef F77_DUMMY_MAIN
7787# ifdef __cplusplus
7788 extern "C"
7789# endif
7790 int F77_DUMMY_MAIN() { return 1; }
7791#endif
7792int
7793main ()
7794{
7795static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
7796test_array [0] = 0
7797
7798 ;
7799 return 0;
7800}
7801_ACEOF
7802rm -f conftest.$ac_objext
7803if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7804 (eval $ac_compile) 2>&5
7805 ac_status=$?
7806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7807 (exit $ac_status); } &&
7808 { ac_try='test -s conftest.$ac_objext'
7809 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7810 (eval $ac_try) 2>&5
7811 ac_status=$?
7812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7813 (exit $ac_status); }; }; then
7814 ac_lo=$ac_mid; break
7815else
7816 echo "$as_me: failed program was:" >&5
7817cat conftest.$ac_ext >&5
7818ac_hi=`expr '(' $ac_mid ')' - 1`
7819 if test $ac_mid -le $ac_hi; then
7820 ac_lo= ac_hi=
7821 break
7822 fi
7823 ac_mid=`expr 2 '*' $ac_mid`
7824fi
7825rm -f conftest.$ac_objext conftest.$ac_ext
7826 done
7827else
7828 echo "$as_me: failed program was:" >&5
7829cat conftest.$ac_ext >&5
7830ac_lo= ac_hi=
7831fi
7832rm -f conftest.$ac_objext conftest.$ac_ext
7833fi
7834rm -f conftest.$ac_objext conftest.$ac_ext
7835# Binary search between lo and hi bounds.
7836while test "x$ac_lo" != "x$ac_hi"; do
7837 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7838 cat >conftest.$ac_ext <<_ACEOF
7839#line $LINENO "configure"
7840#include "confdefs.h"
7841$ac_includes_default
7842#ifdef F77_DUMMY_MAIN
7843# ifdef __cplusplus
7844 extern "C"
7845# endif
7846 int F77_DUMMY_MAIN() { return 1; }
7847#endif
7848int
7849main ()
7850{
7851static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
7852test_array [0] = 0
7853
7854 ;
7855 return 0;
7856}
7857_ACEOF
7858rm -f conftest.$ac_objext
7859if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7860 (eval $ac_compile) 2>&5
7861 ac_status=$?
7862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7863 (exit $ac_status); } &&
7864 { ac_try='test -s conftest.$ac_objext'
7865 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7866 (eval $ac_try) 2>&5
7867 ac_status=$?
7868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7869 (exit $ac_status); }; }; then
7870 ac_hi=$ac_mid
7871else
7872 echo "$as_me: failed program was:" >&5
7873cat conftest.$ac_ext >&5
7874ac_lo=`expr '(' $ac_mid ')' + 1`
7875fi
7876rm -f conftest.$ac_objext conftest.$ac_ext
7877done
7878case $ac_lo in
7879?*) ac_cv_sizeof_long_long=$ac_lo;;
7880'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
7881echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
7882 { (exit 1); exit 1; }; } ;;
7883esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007884else
7885 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007886 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7887echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7888 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007889else
Martin v. Löwis11437992002-04-12 09:54:03 +00007890 cat >conftest.$ac_ext <<_ACEOF
7891#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007892#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007893$ac_includes_default
7894long longval () { return (long) (sizeof (long long)); }
7895unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007896#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007897#include <stdlib.h>
7898#ifdef F77_DUMMY_MAIN
7899# ifdef __cplusplus
7900 extern "C"
7901# endif
7902 int F77_DUMMY_MAIN() { return 1; }
7903#endif
7904int
7905main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007906{
Martin v. Löwis11437992002-04-12 09:54:03 +00007907
7908 FILE *f = fopen ("conftest.val", "w");
7909 if (! f)
7910 exit (1);
7911 if (((long) (sizeof (long long))) < 0)
7912 {
7913 long i = longval ();
7914 if (i != ((long) (sizeof (long long))))
7915 exit (1);
7916 fprintf (f, "%ld\n", i);
7917 }
7918 else
7919 {
7920 unsigned long i = ulongval ();
7921 if (i != ((long) (sizeof (long long))))
7922 exit (1);
7923 fprintf (f, "%lu\n", i);
7924 }
7925 exit (ferror (f) || fclose (f) != 0);
7926
7927 ;
7928 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007929}
Martin v. Löwis11437992002-04-12 09:54:03 +00007930_ACEOF
7931rm -f conftest$ac_exeext
7932if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7933 (eval $ac_link) 2>&5
7934 ac_status=$?
7935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7936 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7937 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7938 (eval $ac_try) 2>&5
7939 ac_status=$?
7940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7941 (exit $ac_status); }; }; then
7942 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007943else
Martin v. Löwis11437992002-04-12 09:54:03 +00007944 echo "$as_me: program exited with status $ac_status" >&5
7945echo "$as_me: failed program was:" >&5
7946cat conftest.$ac_ext >&5
7947( exit $ac_status )
7948{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
7949echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
7950 { (exit 1); exit 1; }; }
7951fi
7952rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7953fi
7954fi
7955rm -f conftest.val
7956else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007957 ac_cv_sizeof_long_long=0
7958fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007959fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007960echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
7961echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
7962cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007963#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007964_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007965
Michael W. Hudson54241132001-12-07 15:38:26 +00007966
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007967fi
7968
Martin v. Löwis11437992002-04-12 09:54:03 +00007969echo "$as_me:$LINENO: checking for uintptr_t support" >&5
7970echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007971have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007972cat >conftest.$ac_ext <<_ACEOF
7973#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007974#include "confdefs.h"
7975
Martin v. Löwis11437992002-04-12 09:54:03 +00007976#ifdef F77_DUMMY_MAIN
7977# ifdef __cplusplus
7978 extern "C"
7979# endif
7980 int F77_DUMMY_MAIN() { return 1; }
7981#endif
7982int
7983main ()
7984{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007985uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007986 ;
7987 return 0;
7988}
7989_ACEOF
7990rm -f conftest.$ac_objext
7991if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7992 (eval $ac_compile) 2>&5
7993 ac_status=$?
7994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7995 (exit $ac_status); } &&
7996 { ac_try='test -s conftest.$ac_objext'
7997 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7998 (eval $ac_try) 2>&5
7999 ac_status=$?
8000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8001 (exit $ac_status); }; }; then
8002
8003
8004cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008005#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008006_ACEOF
8007
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008008 have_uintptr_t=yes
8009
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008010else
Martin v. Löwis11437992002-04-12 09:54:03 +00008011 echo "$as_me: failed program was:" >&5
8012cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008013fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008014rm -f conftest.$ac_objext conftest.$ac_ext
8015echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8016echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008017if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008018echo "$as_me:$LINENO: checking for uintptr_t" >&5
8019echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8020if test "${ac_cv_type_uintptr_t+set}" = set; then
8021 echo $ECHO_N "(cached) $ECHO_C" >&6
8022else
8023 cat >conftest.$ac_ext <<_ACEOF
8024#line $LINENO "configure"
8025#include "confdefs.h"
8026$ac_includes_default
8027#ifdef F77_DUMMY_MAIN
8028# ifdef __cplusplus
8029 extern "C"
8030# endif
8031 int F77_DUMMY_MAIN() { return 1; }
8032#endif
8033int
8034main ()
8035{
8036if ((uintptr_t *) 0)
8037 return 0;
8038if (sizeof (uintptr_t))
8039 return 0;
8040 ;
8041 return 0;
8042}
8043_ACEOF
8044rm -f conftest.$ac_objext
8045if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8046 (eval $ac_compile) 2>&5
8047 ac_status=$?
8048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8049 (exit $ac_status); } &&
8050 { ac_try='test -s conftest.$ac_objext'
8051 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8052 (eval $ac_try) 2>&5
8053 ac_status=$?
8054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8055 (exit $ac_status); }; }; then
8056 ac_cv_type_uintptr_t=yes
8057else
8058 echo "$as_me: failed program was:" >&5
8059cat conftest.$ac_ext >&5
8060ac_cv_type_uintptr_t=no
8061fi
8062rm -f conftest.$ac_objext conftest.$ac_ext
8063fi
8064echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8065echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8066
8067echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8068echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8069if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8070 echo $ECHO_N "(cached) $ECHO_C" >&6
8071else
8072 if test "$ac_cv_type_uintptr_t" = yes; then
8073 # The cast to unsigned long works around a bug in the HP C Compiler
8074 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8075 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8076 # This bug is HP SR number 8606223364.
8077 if test "$cross_compiling" = yes; then
8078 # Depending upon the size, compute the lo and hi bounds.
8079cat >conftest.$ac_ext <<_ACEOF
8080#line $LINENO "configure"
8081#include "confdefs.h"
8082$ac_includes_default
8083#ifdef F77_DUMMY_MAIN
8084# ifdef __cplusplus
8085 extern "C"
8086# endif
8087 int F77_DUMMY_MAIN() { return 1; }
8088#endif
8089int
8090main ()
8091{
8092static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8093test_array [0] = 0
8094
8095 ;
8096 return 0;
8097}
8098_ACEOF
8099rm -f conftest.$ac_objext
8100if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8101 (eval $ac_compile) 2>&5
8102 ac_status=$?
8103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8104 (exit $ac_status); } &&
8105 { ac_try='test -s conftest.$ac_objext'
8106 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8107 (eval $ac_try) 2>&5
8108 ac_status=$?
8109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8110 (exit $ac_status); }; }; then
8111 ac_lo=0 ac_mid=0
8112 while :; do
8113 cat >conftest.$ac_ext <<_ACEOF
8114#line $LINENO "configure"
8115#include "confdefs.h"
8116$ac_includes_default
8117#ifdef F77_DUMMY_MAIN
8118# ifdef __cplusplus
8119 extern "C"
8120# endif
8121 int F77_DUMMY_MAIN() { return 1; }
8122#endif
8123int
8124main ()
8125{
8126static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8127test_array [0] = 0
8128
8129 ;
8130 return 0;
8131}
8132_ACEOF
8133rm -f conftest.$ac_objext
8134if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8135 (eval $ac_compile) 2>&5
8136 ac_status=$?
8137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8138 (exit $ac_status); } &&
8139 { ac_try='test -s conftest.$ac_objext'
8140 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8141 (eval $ac_try) 2>&5
8142 ac_status=$?
8143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8144 (exit $ac_status); }; }; then
8145 ac_hi=$ac_mid; break
8146else
8147 echo "$as_me: failed program was:" >&5
8148cat conftest.$ac_ext >&5
8149ac_lo=`expr $ac_mid + 1`
8150 if test $ac_lo -le $ac_mid; then
8151 ac_lo= ac_hi=
8152 break
8153 fi
8154 ac_mid=`expr 2 '*' $ac_mid + 1`
8155fi
8156rm -f conftest.$ac_objext conftest.$ac_ext
8157 done
8158else
8159 echo "$as_me: failed program was:" >&5
8160cat conftest.$ac_ext >&5
8161cat >conftest.$ac_ext <<_ACEOF
8162#line $LINENO "configure"
8163#include "confdefs.h"
8164$ac_includes_default
8165#ifdef F77_DUMMY_MAIN
8166# ifdef __cplusplus
8167 extern "C"
8168# endif
8169 int F77_DUMMY_MAIN() { return 1; }
8170#endif
8171int
8172main ()
8173{
8174static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8175test_array [0] = 0
8176
8177 ;
8178 return 0;
8179}
8180_ACEOF
8181rm -f conftest.$ac_objext
8182if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8183 (eval $ac_compile) 2>&5
8184 ac_status=$?
8185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8186 (exit $ac_status); } &&
8187 { ac_try='test -s conftest.$ac_objext'
8188 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8189 (eval $ac_try) 2>&5
8190 ac_status=$?
8191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8192 (exit $ac_status); }; }; then
8193 ac_hi=-1 ac_mid=-1
8194 while :; do
8195 cat >conftest.$ac_ext <<_ACEOF
8196#line $LINENO "configure"
8197#include "confdefs.h"
8198$ac_includes_default
8199#ifdef F77_DUMMY_MAIN
8200# ifdef __cplusplus
8201 extern "C"
8202# endif
8203 int F77_DUMMY_MAIN() { return 1; }
8204#endif
8205int
8206main ()
8207{
8208static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8209test_array [0] = 0
8210
8211 ;
8212 return 0;
8213}
8214_ACEOF
8215rm -f conftest.$ac_objext
8216if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8217 (eval $ac_compile) 2>&5
8218 ac_status=$?
8219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8220 (exit $ac_status); } &&
8221 { ac_try='test -s conftest.$ac_objext'
8222 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8223 (eval $ac_try) 2>&5
8224 ac_status=$?
8225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8226 (exit $ac_status); }; }; then
8227 ac_lo=$ac_mid; break
8228else
8229 echo "$as_me: failed program was:" >&5
8230cat conftest.$ac_ext >&5
8231ac_hi=`expr '(' $ac_mid ')' - 1`
8232 if test $ac_mid -le $ac_hi; then
8233 ac_lo= ac_hi=
8234 break
8235 fi
8236 ac_mid=`expr 2 '*' $ac_mid`
8237fi
8238rm -f conftest.$ac_objext conftest.$ac_ext
8239 done
8240else
8241 echo "$as_me: failed program was:" >&5
8242cat conftest.$ac_ext >&5
8243ac_lo= ac_hi=
8244fi
8245rm -f conftest.$ac_objext conftest.$ac_ext
8246fi
8247rm -f conftest.$ac_objext conftest.$ac_ext
8248# Binary search between lo and hi bounds.
8249while test "x$ac_lo" != "x$ac_hi"; do
8250 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8251 cat >conftest.$ac_ext <<_ACEOF
8252#line $LINENO "configure"
8253#include "confdefs.h"
8254$ac_includes_default
8255#ifdef F77_DUMMY_MAIN
8256# ifdef __cplusplus
8257 extern "C"
8258# endif
8259 int F77_DUMMY_MAIN() { return 1; }
8260#endif
8261int
8262main ()
8263{
8264static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8265test_array [0] = 0
8266
8267 ;
8268 return 0;
8269}
8270_ACEOF
8271rm -f conftest.$ac_objext
8272if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8273 (eval $ac_compile) 2>&5
8274 ac_status=$?
8275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8276 (exit $ac_status); } &&
8277 { ac_try='test -s conftest.$ac_objext'
8278 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8279 (eval $ac_try) 2>&5
8280 ac_status=$?
8281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8282 (exit $ac_status); }; }; then
8283 ac_hi=$ac_mid
8284else
8285 echo "$as_me: failed program was:" >&5
8286cat conftest.$ac_ext >&5
8287ac_lo=`expr '(' $ac_mid ')' + 1`
8288fi
8289rm -f conftest.$ac_objext conftest.$ac_ext
8290done
8291case $ac_lo in
8292?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8293'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8294echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8295 { (exit 1); exit 1; }; } ;;
8296esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008297else
8298 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008299 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8300echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8301 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008302else
Martin v. Löwis11437992002-04-12 09:54:03 +00008303 cat >conftest.$ac_ext <<_ACEOF
8304#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008305#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008306$ac_includes_default
8307long longval () { return (long) (sizeof (uintptr_t)); }
8308unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008309#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008310#include <stdlib.h>
8311#ifdef F77_DUMMY_MAIN
8312# ifdef __cplusplus
8313 extern "C"
8314# endif
8315 int F77_DUMMY_MAIN() { return 1; }
8316#endif
8317int
8318main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008319{
Martin v. Löwis11437992002-04-12 09:54:03 +00008320
8321 FILE *f = fopen ("conftest.val", "w");
8322 if (! f)
8323 exit (1);
8324 if (((long) (sizeof (uintptr_t))) < 0)
8325 {
8326 long i = longval ();
8327 if (i != ((long) (sizeof (uintptr_t))))
8328 exit (1);
8329 fprintf (f, "%ld\n", i);
8330 }
8331 else
8332 {
8333 unsigned long i = ulongval ();
8334 if (i != ((long) (sizeof (uintptr_t))))
8335 exit (1);
8336 fprintf (f, "%lu\n", i);
8337 }
8338 exit (ferror (f) || fclose (f) != 0);
8339
8340 ;
8341 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008342}
Martin v. Löwis11437992002-04-12 09:54:03 +00008343_ACEOF
8344rm -f conftest$ac_exeext
8345if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8346 (eval $ac_link) 2>&5
8347 ac_status=$?
8348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8349 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8351 (eval $ac_try) 2>&5
8352 ac_status=$?
8353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8354 (exit $ac_status); }; }; then
8355 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008356else
Martin v. Löwis11437992002-04-12 09:54:03 +00008357 echo "$as_me: program exited with status $ac_status" >&5
8358echo "$as_me: failed program was:" >&5
8359cat conftest.$ac_ext >&5
8360( exit $ac_status )
8361{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8362echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8363 { (exit 1); exit 1; }; }
8364fi
8365rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8366fi
8367fi
8368rm -f conftest.val
8369else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008370 ac_cv_sizeof_uintptr_t=0
8371fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008372fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008373echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8374echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8375cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008376#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008377_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008378
Michael W. Hudson54241132001-12-07 15:38:26 +00008379
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008380fi
8381
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008382# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008383echo "$as_me:$LINENO: checking size of off_t" >&5
8384echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
8385if test "${ac_cv_sizeof_off_t+set}" = set; then
8386 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008387else
8388 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008389 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008390else
Martin v. Löwis11437992002-04-12 09:54:03 +00008391 cat >conftest.$ac_ext <<_ACEOF
8392#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008393#include "confdefs.h"
8394#include <stdio.h>
8395#include <sys/types.h>
8396main()
8397{
8398 FILE *f=fopen("conftestval", "w");
8399 if (!f) exit(1);
8400 fprintf(f, "%d\n", sizeof(off_t));
8401 exit(0);
8402}
Martin v. Löwis11437992002-04-12 09:54:03 +00008403_ACEOF
8404rm -f conftest$ac_exeext
8405if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8406 (eval $ac_link) 2>&5
8407 ac_status=$?
8408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8409 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8410 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8411 (eval $ac_try) 2>&5
8412 ac_status=$?
8413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8414 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008415 ac_cv_sizeof_off_t=`cat conftestval`
8416else
Martin v. Löwis11437992002-04-12 09:54:03 +00008417 echo "$as_me: program exited with status $ac_status" >&5
8418echo "$as_me: failed program was:" >&5
8419cat conftest.$ac_ext >&5
8420( exit $ac_status )
8421ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008422fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008423rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008424fi
8425
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008426fi
8427
Martin v. Löwis11437992002-04-12 09:54:03 +00008428echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
8429echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
8430
8431cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008432#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008433_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008434
Michael W. Hudson54241132001-12-07 15:38:26 +00008435
Martin v. Löwis11437992002-04-12 09:54:03 +00008436echo "$as_me:$LINENO: checking whether to enable large file support" >&5
8437echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008438if test "$have_long_long" = yes -a \
8439 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
8440 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008441
Martin v. Löwis11437992002-04-12 09:54:03 +00008442cat >>confdefs.h <<\_ACEOF
8443#define HAVE_LARGEFILE_SUPPORT 1
8444_ACEOF
8445
8446 echo "$as_me:$LINENO: result: yes" >&5
8447echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008448else
Martin v. Löwis11437992002-04-12 09:54:03 +00008449 echo "$as_me:$LINENO: result: no" >&5
8450echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008451fi
8452
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008453# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008454echo "$as_me:$LINENO: checking size of time_t" >&5
8455echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
8456if test "${ac_cv_sizeof_time_t+set}" = set; then
8457 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008458else
8459 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008460 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008461else
Martin v. Löwis11437992002-04-12 09:54:03 +00008462 cat >conftest.$ac_ext <<_ACEOF
8463#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008464#include "confdefs.h"
8465#include <stdio.h>
8466#include <time.h>
8467main()
8468{
8469 FILE *f=fopen("conftestval", "w");
8470 if (!f) exit(1);
8471 fprintf(f, "%d\n", sizeof(time_t));
8472 exit(0);
8473}
Martin v. Löwis11437992002-04-12 09:54:03 +00008474_ACEOF
8475rm -f conftest$ac_exeext
8476if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8477 (eval $ac_link) 2>&5
8478 ac_status=$?
8479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8480 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8481 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8482 (eval $ac_try) 2>&5
8483 ac_status=$?
8484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8485 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008486 ac_cv_sizeof_time_t=`cat conftestval`
8487else
Martin v. Löwis11437992002-04-12 09:54:03 +00008488 echo "$as_me: program exited with status $ac_status" >&5
8489echo "$as_me: failed program was:" >&5
8490cat conftest.$ac_ext >&5
8491( exit $ac_status )
8492ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008493fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008494rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008495fi
8496
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008497fi
8498
Martin v. Löwis11437992002-04-12 09:54:03 +00008499echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
8500echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
8501
8502cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008503#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008504_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008505
Michael W. Hudson54241132001-12-07 15:38:26 +00008506
8507
Trent Mick635f6fb2000-08-23 21:33:05 +00008508# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008509ac_save_cc="$CC"
8510if test "$ac_cv_kpthread" = "yes"
8511then CC="$CC -Kpthread"
8512fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008513echo "$as_me:$LINENO: checking for pthread_t" >&5
8514echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008515have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008516cat >conftest.$ac_ext <<_ACEOF
8517#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008518#include "confdefs.h"
8519#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008520#ifdef F77_DUMMY_MAIN
8521# ifdef __cplusplus
8522 extern "C"
8523# endif
8524 int F77_DUMMY_MAIN() { return 1; }
8525#endif
8526int
8527main ()
8528{
Guido van Rossum12580492000-09-24 16:47:19 +00008529pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008530 ;
8531 return 0;
8532}
8533_ACEOF
8534rm -f conftest.$ac_objext
8535if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8536 (eval $ac_compile) 2>&5
8537 ac_status=$?
8538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8539 (exit $ac_status); } &&
8540 { ac_try='test -s conftest.$ac_objext'
8541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8542 (eval $ac_try) 2>&5
8543 ac_status=$?
8544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8545 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008546 have_pthread_t=yes
8547else
Martin v. Löwis11437992002-04-12 09:54:03 +00008548 echo "$as_me: failed program was:" >&5
8549cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00008550fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008551rm -f conftest.$ac_objext conftest.$ac_ext
8552echo "$as_me:$LINENO: result: $have_pthread_t" >&5
8553echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008554if test "$have_pthread_t" = yes ; then
8555 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008556 echo "$as_me:$LINENO: checking size of pthread_t" >&5
8557echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
8558 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
8559 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008560else
8561 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008562 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00008563else
Martin v. Löwis11437992002-04-12 09:54:03 +00008564 cat >conftest.$ac_ext <<_ACEOF
8565#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008566#include "confdefs.h"
8567#include <stdio.h>
8568 #include <pthread.h>
8569 main()
8570 {
8571 FILE *f=fopen("conftestval", "w");
8572 if (!f) exit(1);
8573 fprintf(f, "%d\n", sizeof(pthread_t));
8574 exit(0);
8575 }
Martin v. Löwis11437992002-04-12 09:54:03 +00008576_ACEOF
8577rm -f conftest$ac_exeext
8578if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8579 (eval $ac_link) 2>&5
8580 ac_status=$?
8581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8582 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8584 (eval $ac_try) 2>&5
8585 ac_status=$?
8586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8587 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008588 ac_cv_sizeof_pthread_t=`cat conftestval`
8589else
Martin v. Löwis11437992002-04-12 09:54:03 +00008590 echo "$as_me: program exited with status $ac_status" >&5
8591echo "$as_me: failed program was:" >&5
8592cat conftest.$ac_ext >&5
8593( exit $ac_status )
8594ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00008595fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008596rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00008597fi
8598
Trent Mick635f6fb2000-08-23 21:33:05 +00008599fi
8600
Martin v. Löwis11437992002-04-12 09:54:03 +00008601 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
8602echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
8603
8604cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008605#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008606_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008607
8608fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008609CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008610
Martin v. Löwis11437992002-04-12 09:54:03 +00008611echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
8612echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008613# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
8614if test "${enable_toolbox_glue+set}" = set; then
8615 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00008616
Martin v. Löwis11437992002-04-12 09:54:03 +00008617fi;
Jack Jansene578a632001-08-15 01:27:14 +00008618
8619if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00008620then
Jack Jansene578a632001-08-15 01:27:14 +00008621 case $ac_sys_system/$ac_sys_release in
8622 Darwin/*)
8623 enable_toolbox_glue="yes";;
8624 *)
8625 enable_toolbox_glue="no";;
8626 esac
8627fi
8628case "$enable_toolbox_glue" in
8629yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00008630 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00008631 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00008632 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00008633
8634cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008635#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008636_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008637
8638 ;;
8639*)
8640 extra_frameworks=""
8641 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00008642 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00008643 ;;
8644esac
Martin v. Löwis11437992002-04-12 09:54:03 +00008645echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
8646echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00008647
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008648
8649case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00008650 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00008651 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00008652 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym"
8653 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00008654 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8655 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008656 Darwin/*)
8657 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00008658 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -flat_namespace -U $ns_undef_sym"
8659 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00008660 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8661 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008662esac
8663
Martin v. Löwis11437992002-04-12 09:54:03 +00008664echo "$as_me:$LINENO: checking for --enable-framework" >&5
8665echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008666if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008667then
Jack Jansenca06bc62001-08-03 15:32:23 +00008668 OPT="$OPT -fno-common -dynamic"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008669 # -U __environ is needed since bundles don't have access
8670 # to crt0 when built but will always be linked against it
Martin v. Löwis11437992002-04-12 09:54:03 +00008671 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008672 # in the build location.
Martin v. Löwis11437992002-04-12 09:54:03 +00008673
Jack Jansena3891ea2001-09-07 14:25:12 +00008674 case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00008675 Darwin/1.3*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym";;
8676 Darwin/*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-flat_namespace,-U,$ns_undef_sym";;
Jack Jansena3891ea2001-09-07 14:25:12 +00008677 esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008678
Martin v. Löwis11437992002-04-12 09:54:03 +00008679cat >>confdefs.h <<\_ACEOF
8680#define WITH_NEXT_FRAMEWORK 1
8681_ACEOF
8682
8683 echo "$as_me:$LINENO: result: yes" >&5
8684echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008685else
Martin v. Löwis11437992002-04-12 09:54:03 +00008686 echo "$as_me:$LINENO: result: no" >&5
8687echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008688fi
8689
Martin v. Löwis11437992002-04-12 09:54:03 +00008690echo "$as_me:$LINENO: checking for dyld" >&5
8691echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008692case $ac_sys_system/$ac_sys_release in
8693 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008694
Martin v. Löwis11437992002-04-12 09:54:03 +00008695cat >>confdefs.h <<\_ACEOF
8696#define WITH_DYLD 1
8697_ACEOF
8698
8699 echo "$as_me:$LINENO: result: always on for Darwin" >&5
8700echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008701 ;;
8702 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00008703 echo "$as_me:$LINENO: result: no" >&5
8704echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008705 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008706esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008707
Guido van Rossum0a516c91994-09-12 10:58:40 +00008708# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008709
Michael W. Hudson54241132001-12-07 15:38:26 +00008710
8711
8712
8713
Guido van Rossum0a516c91994-09-12 10:58:40 +00008714# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008715# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00008716echo "$as_me:$LINENO: checking SO" >&5
8717echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008718if test -z "$SO"
8719then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008720 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00008721 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008722 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008723 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008724 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008725fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008726echo "$as_me:$LINENO: result: $SO" >&5
8727echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008728# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00008729# -- "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 +00008730# (Shared libraries in this instance are shared modules to be loaded into
8731# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00008732echo "$as_me:$LINENO: checking LDSHARED" >&5
8733echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008734if test -z "$LDSHARED"
8735then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008736 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008737 AIX*)
8738 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008739 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008740 ;;
8741 BeOS*)
8742 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008743 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008744 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008745 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008746 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008747 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008748 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +00008749 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00008750 then LDSHARED='$(CC) -shared'
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00008751 else LDSHARED="$(CC) -G";
Greg Ward57c9a662000-05-26 12:22:54 +00008752 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008753 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008754 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
8755 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008756 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00008757 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8758 if test "$enable_framework" ; then
8759 # Link against the framework. All externals should be defined.
8760 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8761 else
8762 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008763 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008764 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00008765 Darwin/*)
8766 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8767 if test "$enable_framework" ; then
8768 # Link against the framework. All externals should be defined.
8769 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8770 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008771 # No framework, use the Python app as bundle-loader
8772 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8773 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008774 fi ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008775 Linux*|GNU*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00008776 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00008777 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00008778 OpenBSD*|NetBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008779 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008780 then
8781 LDSHARED="cc -shared ${LDFLAGS}"
8782 else
8783 LDSHARED="ld -Bshareable ${LDFLAGS}"
8784 fi;;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008785 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008786 if test "$GCC" = "yes"
8787 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008788 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008789 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008790 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00008791 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008792 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008793 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008794 *) LDSHARED="ld";;
8795 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008796fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008797echo "$as_me:$LINENO: result: $LDSHARED" >&5
8798echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008799BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008800# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008801# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008802echo "$as_me:$LINENO: checking CCSHARED" >&5
8803echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008804if test -z "$CCSHARED"
8805then
Guido van Rossum07397971997-04-29 21:49:50 +00008806 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008807 SunOS*) if test "$GCC" = yes;
8808 then CCSHARED="-fPIC";
8809 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008810 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008811 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008812 else CCSHARED="+z";
8813 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008814 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008815 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00008816 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008817 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008818 if test "$GCC" = "yes"
8819 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008820 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008821 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008822 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00008823 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008824 IRIX*/6*) case $CC in
8825 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008826 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008827 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008828 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008829 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008830fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008831echo "$as_me:$LINENO: result: $CCSHARED" >&5
8832echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008833# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008834# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008835echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
8836echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008837if test -z "$LINKFORSHARED"
8838then
Guido van Rossum07397971997-04-29 21:49:50 +00008839 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008840 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008841 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008842 LINKFORSHARED="-Wl,-E -Wl,+s";;
8843# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008844 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008845 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008846 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008847 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00008848 # -u __dummy makes the linker aware of the objc runtime
8849 # in System.framework; otherwise, __objcInit (referenced in
8850 # crt1.o) gets erroneously defined as common, which breaks dynamic
8851 # loading of any modules which reference it in System.framework.
8852 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
8853 # not used by the core itself but which needs to be in the core so
8854 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00008855 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00008856 if test "$enable_framework"
8857 then
8858 LINKFORSHARED="$LINKFORSHARED -framework Python"
8859 fi
8860 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008861 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008862 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008863 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008864 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008865 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8866 then
8867 LINKFORSHARED="-Wl,--export-dynamic"
8868 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008869 SunOS/5*) case $CC in
8870 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008871 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008872 then
8873 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008874 fi;;
8875 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008876 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008877fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008878echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
8879echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008880
Michael W. Hudson54241132001-12-07 15:38:26 +00008881
Martin v. Löwis11437992002-04-12 09:54:03 +00008882echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
8883echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008884if test ! "$LIBRARY" = "$LDLIBRARY"
8885then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008886 case $ac_sys_system in
8887 CYGWIN*)
8888 # Cygwin needs CCSHARED when building extension DLLs
8889 # but not when building the interpreter DLL.
8890 CFLAGSFORSHARED='';;
8891 *)
8892 CFLAGSFORSHARED='$(CCSHARED)'
8893 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008894fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008895echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
8896echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008897
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008898# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8899# library (with --enable-shared).
8900# For platforms on which shared libraries are not allowed to have unresolved
8901# symbols, this must be set to $(LIBS) (expanded by make).
8902
8903echo "$as_me:$LINENO: checking SHLIBS" >&5
8904echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
8905case "$ac_sys_system" in
8906 atheos*)
8907 SHLIBS='$(LIBS)';;
8908 *)
8909 SHLIBS='';;
8910esac
8911echo "$as_me:$LINENO: result: $SHLIBS" >&5
8912echo "${ECHO_T}$SHLIBS" >&6
8913
8914
Guido van Rossum627b2d71993-12-24 10:39:16 +00008915# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00008916
8917echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
8918echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
8919if test "${ac_cv_lib_dl_dlopen+set}" = set; then
8920 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008921else
Martin v. Löwis11437992002-04-12 09:54:03 +00008922 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008923LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008924cat >conftest.$ac_ext <<_ACEOF
8925#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00008926#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008927
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008928/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008929#ifdef __cplusplus
8930extern "C"
8931#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008932/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00008933 builtin and then its argument prototype would still apply. */
8934char dlopen ();
8935#ifdef F77_DUMMY_MAIN
8936# ifdef __cplusplus
8937 extern "C"
8938# endif
8939 int F77_DUMMY_MAIN() { return 1; }
8940#endif
8941int
8942main ()
8943{
8944dlopen ();
8945 ;
8946 return 0;
8947}
8948_ACEOF
8949rm -f conftest.$ac_objext conftest$ac_exeext
8950if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8951 (eval $ac_link) 2>&5
8952 ac_status=$?
8953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8954 (exit $ac_status); } &&
8955 { ac_try='test -s conftest$ac_exeext'
8956 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8957 (eval $ac_try) 2>&5
8958 ac_status=$?
8959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8960 (exit $ac_status); }; }; then
8961 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008962else
Martin v. Löwis11437992002-04-12 09:54:03 +00008963 echo "$as_me: failed program was:" >&5
8964cat conftest.$ac_ext >&5
8965ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008966fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008967rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8968LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008969fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008970echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
8971echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
8972if test $ac_cv_lib_dl_dlopen = yes; then
8973 cat >>confdefs.h <<_ACEOF
8974#define HAVE_LIBDL 1
8975_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008976
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008977 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008978
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008979fi
8980 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00008981
8982echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
8983echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
8984if test "${ac_cv_lib_dld_shl_load+set}" = set; then
8985 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008986else
Martin v. Löwis11437992002-04-12 09:54:03 +00008987 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008988LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008989cat >conftest.$ac_ext <<_ACEOF
8990#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00008991#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008992
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008993/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008994#ifdef __cplusplus
8995extern "C"
8996#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008997/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00008998 builtin and then its argument prototype would still apply. */
8999char shl_load ();
9000#ifdef F77_DUMMY_MAIN
9001# ifdef __cplusplus
9002 extern "C"
9003# endif
9004 int F77_DUMMY_MAIN() { return 1; }
9005#endif
9006int
9007main ()
9008{
9009shl_load ();
9010 ;
9011 return 0;
9012}
9013_ACEOF
9014rm -f conftest.$ac_objext conftest$ac_exeext
9015if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9016 (eval $ac_link) 2>&5
9017 ac_status=$?
9018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9019 (exit $ac_status); } &&
9020 { ac_try='test -s conftest$ac_exeext'
9021 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9022 (eval $ac_try) 2>&5
9023 ac_status=$?
9024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9025 (exit $ac_status); }; }; then
9026 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009027else
Martin v. Löwis11437992002-04-12 09:54:03 +00009028 echo "$as_me: failed program was:" >&5
9029cat conftest.$ac_ext >&5
9030ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009031fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009032rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9033LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009034fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009035echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9036echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9037if test $ac_cv_lib_dld_shl_load = yes; then
9038 cat >>confdefs.h <<_ACEOF
9039#define HAVE_LIBDLD 1
9040_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009041
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009042 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009043
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009044fi
9045 # Dynamic linking for HP-UX
Martin v. Löwis11437992002-04-12 09:54:03 +00009046
9047echo "$as_me:$LINENO: checking for sem_init in -lrt" >&5
9048echo $ECHO_N "checking for sem_init in -lrt... $ECHO_C" >&6
9049if test "${ac_cv_lib_rt_sem_init+set}" = set; then
9050 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009051else
Martin v. Löwis11437992002-04-12 09:54:03 +00009052 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009053LIBS="-lrt $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009054cat >conftest.$ac_ext <<_ACEOF
9055#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009056#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009057
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009058/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009059#ifdef __cplusplus
9060extern "C"
9061#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009062/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009063 builtin and then its argument prototype would still apply. */
9064char sem_init ();
9065#ifdef F77_DUMMY_MAIN
9066# ifdef __cplusplus
9067 extern "C"
9068# endif
9069 int F77_DUMMY_MAIN() { return 1; }
9070#endif
9071int
9072main ()
9073{
9074sem_init ();
9075 ;
9076 return 0;
9077}
9078_ACEOF
9079rm -f conftest.$ac_objext conftest$ac_exeext
9080if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9081 (eval $ac_link) 2>&5
9082 ac_status=$?
9083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9084 (exit $ac_status); } &&
9085 { ac_try='test -s conftest$ac_exeext'
9086 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9087 (eval $ac_try) 2>&5
9088 ac_status=$?
9089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9090 (exit $ac_status); }; }; then
9091 ac_cv_lib_rt_sem_init=yes
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009092else
Martin v. Löwis11437992002-04-12 09:54:03 +00009093 echo "$as_me: failed program was:" >&5
9094cat conftest.$ac_ext >&5
9095ac_cv_lib_rt_sem_init=no
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009096fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009097rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9098LIBS=$ac_check_lib_save_LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009099fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009100echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sem_init" >&5
9101echo "${ECHO_T}$ac_cv_lib_rt_sem_init" >&6
9102if test $ac_cv_lib_rt_sem_init = yes; then
9103 cat >>confdefs.h <<_ACEOF
9104#define HAVE_LIBRT 1
9105_ACEOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009106
9107 LIBS="-lrt $LIBS"
9108
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009109fi
9110 # 'Real Time' functions on Solaris
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009111
9112# checks for system dependent C++ extensions support
9113case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009114 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9115echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9116 cat >conftest.$ac_ext <<_ACEOF
9117#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009118#include "confdefs.h"
9119#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009120#ifdef F77_DUMMY_MAIN
9121# ifdef __cplusplus
9122 extern "C"
9123# endif
9124 int F77_DUMMY_MAIN() { return 1; }
9125#endif
9126int
9127main ()
9128{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009129loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009130 ;
9131 return 0;
9132}
9133_ACEOF
9134rm -f conftest.$ac_objext conftest$ac_exeext
9135if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9136 (eval $ac_link) 2>&5
9137 ac_status=$?
9138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9139 (exit $ac_status); } &&
9140 { ac_try='test -s conftest$ac_exeext'
9141 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9142 (eval $ac_try) 2>&5
9143 ac_status=$?
9144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9145 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009146
Martin v. Löwis11437992002-04-12 09:54:03 +00009147cat >>confdefs.h <<\_ACEOF
9148#define AIX_GENUINE_CPLUSPLUS 1
9149_ACEOF
9150
9151 echo "$as_me:$LINENO: result: yes" >&5
9152echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009153else
Martin v. Löwis11437992002-04-12 09:54:03 +00009154 echo "$as_me: failed program was:" >&5
9155cat conftest.$ac_ext >&5
9156echo "$as_me:$LINENO: result: no" >&5
9157echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009158fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009159rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009160 *) ;;
9161esac
9162
Guido van Rossum70c7f481998-03-26 18:44:10 +00009163# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
9164# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009165# BeOS' sockets are stashed in libnet.
9166case "$ac_sys_system" in
9167IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009168*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009169echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9170echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9171if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9172 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009173else
Martin v. Löwis11437992002-04-12 09:54:03 +00009174 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009175LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009176cat >conftest.$ac_ext <<_ACEOF
9177#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009178#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009179
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009180/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009181#ifdef __cplusplus
9182extern "C"
9183#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009184/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009185 builtin and then its argument prototype would still apply. */
9186char t_open ();
9187#ifdef F77_DUMMY_MAIN
9188# ifdef __cplusplus
9189 extern "C"
9190# endif
9191 int F77_DUMMY_MAIN() { return 1; }
9192#endif
9193int
9194main ()
9195{
9196t_open ();
9197 ;
9198 return 0;
9199}
9200_ACEOF
9201rm -f conftest.$ac_objext conftest$ac_exeext
9202if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9203 (eval $ac_link) 2>&5
9204 ac_status=$?
9205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9206 (exit $ac_status); } &&
9207 { ac_try='test -s conftest$ac_exeext'
9208 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9209 (eval $ac_try) 2>&5
9210 ac_status=$?
9211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9212 (exit $ac_status); }; }; then
9213 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009214else
Martin v. Löwis11437992002-04-12 09:54:03 +00009215 echo "$as_me: failed program was:" >&5
9216cat conftest.$ac_ext >&5
9217ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009218fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009219rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9220LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009221fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009222echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9223echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9224if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009225 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009226fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009227 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009228echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9229echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9230if test "${ac_cv_lib_socket_socket+set}" = set; then
9231 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009232else
Martin v. Löwis11437992002-04-12 09:54:03 +00009233 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009234LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009235cat >conftest.$ac_ext <<_ACEOF
9236#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009237#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009238
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009239/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009240#ifdef __cplusplus
9241extern "C"
9242#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009243/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009244 builtin and then its argument prototype would still apply. */
9245char socket ();
9246#ifdef F77_DUMMY_MAIN
9247# ifdef __cplusplus
9248 extern "C"
9249# endif
9250 int F77_DUMMY_MAIN() { return 1; }
9251#endif
9252int
9253main ()
9254{
9255socket ();
9256 ;
9257 return 0;
9258}
9259_ACEOF
9260rm -f conftest.$ac_objext conftest$ac_exeext
9261if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9262 (eval $ac_link) 2>&5
9263 ac_status=$?
9264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9265 (exit $ac_status); } &&
9266 { ac_try='test -s conftest$ac_exeext'
9267 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9268 (eval $ac_try) 2>&5
9269 ac_status=$?
9270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9271 (exit $ac_status); }; }; then
9272 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009273else
Martin v. Löwis11437992002-04-12 09:54:03 +00009274 echo "$as_me: failed program was:" >&5
9275cat conftest.$ac_ext >&5
9276ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009277fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009278rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9279LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009280fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009281echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
9282echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
9283if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +00009284 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009285fi
9286 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009287;;
9288esac
9289case "$ac_sys_system" in
9290BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009291echo "$as_me:$LINENO: checking for socket in -lnet" >&5
9292echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
9293if test "${ac_cv_lib_net_socket+set}" = set; then
9294 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009295else
Martin v. Löwis11437992002-04-12 09:54:03 +00009296 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009297LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009298cat >conftest.$ac_ext <<_ACEOF
9299#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009300#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009301
Guido van Rossumad678af1998-10-02 14:42:15 +00009302/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009303#ifdef __cplusplus
9304extern "C"
9305#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009306/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009307 builtin and then its argument prototype would still apply. */
9308char socket ();
9309#ifdef F77_DUMMY_MAIN
9310# ifdef __cplusplus
9311 extern "C"
9312# endif
9313 int F77_DUMMY_MAIN() { return 1; }
9314#endif
9315int
9316main ()
9317{
9318socket ();
9319 ;
9320 return 0;
9321}
9322_ACEOF
9323rm -f conftest.$ac_objext conftest$ac_exeext
9324if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9325 (eval $ac_link) 2>&5
9326 ac_status=$?
9327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9328 (exit $ac_status); } &&
9329 { ac_try='test -s conftest$ac_exeext'
9330 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9331 (eval $ac_try) 2>&5
9332 ac_status=$?
9333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9334 (exit $ac_status); }; }; then
9335 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009336else
Martin v. Löwis11437992002-04-12 09:54:03 +00009337 echo "$as_me: failed program was:" >&5
9338cat conftest.$ac_ext >&5
9339ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009340fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009341rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9342LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009343fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009344echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
9345echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
9346if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009347 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009348fi
9349 # BeOS
9350;;
9351esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009352
Martin v. Löwis11437992002-04-12 09:54:03 +00009353echo "$as_me:$LINENO: checking for --with-libs" >&5
9354echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
9355
Guido van Rossuma68acba1996-07-31 17:36:39 +00009356# Check whether --with-libs or --without-libs was given.
9357if test "${with_libs+set}" = set; then
9358 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +00009359
9360echo "$as_me:$LINENO: result: $withval" >&5
9361echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00009362LIBS="$withval $LIBS"
9363
9364else
Martin v. Löwis11437992002-04-12 09:54:03 +00009365 echo "$as_me:$LINENO: result: no" >&5
9366echo "${ECHO_T}no" >&6
9367fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +00009368
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009369# Determine if signalmodule should be used.
9370
9371
Martin v. Löwis11437992002-04-12 09:54:03 +00009372echo "$as_me:$LINENO: checking for --with-signal-module" >&5
9373echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
9374
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009375# Check whether --with-signal-module or --without-signal-module was given.
9376if test "${with_signal_module+set}" = set; then
9377 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009378
Martin v. Löwis11437992002-04-12 09:54:03 +00009379fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009380
9381if test -z "$with_signal_module"
9382then with_signal_module="yes"
9383fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009384echo "$as_me:$LINENO: result: $with_signal_module" >&5
9385echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009386
9387if test "${with_signal_module}" = "yes"; then
9388 USE_SIGNAL_MODULE=""
9389 SIGNAL_OBJS=""
9390else
9391 USE_SIGNAL_MODULE="#"
9392 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9393fi
9394
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009395# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009396
Barry Warsawc0d24d82000-06-29 16:12:00 +00009397USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009398
Martin v. Löwis11437992002-04-12 09:54:03 +00009399echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
9400echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
9401
Guido van Rossumec2f0731997-01-22 20:54:01 +00009402
9403# Check whether --with-dec-threads or --without-dec-threads was given.
9404if test "${with_dec_threads+set}" = set; then
9405 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +00009406
9407echo "$as_me:$LINENO: result: $withval" >&5
9408echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00009409LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009410if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009411 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009412fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009413else
Martin v. Löwis11437992002-04-12 09:54:03 +00009414 echo "$as_me:$LINENO: result: no" >&5
9415echo "${ECHO_T}no" >&6
9416fi;
9417
9418# Templates for things AC_DEFINEd more than once.
9419# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009420
9421
Martin v. Löwis11437992002-04-12 09:54:03 +00009422
9423
9424
9425
9426
9427echo "$as_me:$LINENO: checking for --with-threads" >&5
9428echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
9429
Guido van Rossumec2f0731997-01-22 20:54:01 +00009430# Check whether --with-threads or --without-threads was given.
9431if test "${with_threads+set}" = set; then
9432 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +00009433
Martin v. Löwis11437992002-04-12 09:54:03 +00009434fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +00009435
Barry Warsawc0d24d82000-06-29 16:12:00 +00009436# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009437
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009438# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009439if test "${with_thread+set}" = set; then
9440 withval="$with_thread"
Michael W. Hudson54241132001-12-07 15:38:26 +00009441
Martin v. Löwis11437992002-04-12 09:54:03 +00009442with_threads=$with_thread
9443fi;
Barry Warsawc0d24d82000-06-29 16:12:00 +00009444
9445if test -z "$with_threads"
9446then with_threads="yes"
9447fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009448echo "$as_me:$LINENO: result: $with_threads" >&5
9449echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d82000-06-29 16:12:00 +00009450
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009451
Barry Warsawc0d24d82000-06-29 16:12:00 +00009452if test "$with_threads" = "no"
9453then
9454 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009455elif test "$ac_cv_pthread_is_default" = yes
9456then
Martin v. Löwis11437992002-04-12 09:54:03 +00009457 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009458#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009459_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009460
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009461 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +00009462 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009463#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009464_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009465
9466 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009467 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009468elif test "$ac_cv_kpthread" = "yes"
9469then
9470 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009471 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009472#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009473_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009474
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009475 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009476 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009477else
9478 if test ! -z "$with_threads" -a -d "$with_threads"
9479 then LDFLAGS="$LDFLAGS -L$with_threads"
9480 fi
9481 if test ! -z "$withval" -a -d "$withval"
9482 then LDFLAGS="$LDFLAGS -L$withval"
9483 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009484
9485 # According to the POSIX spec, a pthreads implementation must
9486 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +00009487 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
9488echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
9489 cat >conftest.$ac_ext <<_ACEOF
9490#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009491#include "confdefs.h"
9492#include <unistd.h>
9493 #ifdef _POSIX_THREADS
9494 yes
9495 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009496
9497_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009498if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9499 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009500 unistd_defines_pthreads=yes
9501else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009502 unistd_defines_pthreads=no
9503fi
9504rm -f conftest*
9505
Martin v. Löwis11437992002-04-12 09:54:03 +00009506 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
9507echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009508
Martin v. Löwis11437992002-04-12 09:54:03 +00009509 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009510#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009511_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009512
Martin v. Löwis11437992002-04-12 09:54:03 +00009513 if test "${ac_cv_header_cthreads_h+set}" = set; then
9514 echo "$as_me:$LINENO: checking for cthreads.h" >&5
9515echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9516if test "${ac_cv_header_cthreads_h+set}" = set; then
9517 echo $ECHO_N "(cached) $ECHO_C" >&6
9518fi
9519echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9520echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009521else
Martin v. Löwis11437992002-04-12 09:54:03 +00009522 # Is the header compilable?
9523echo "$as_me:$LINENO: checking cthreads.h usability" >&5
9524echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
9525cat >conftest.$ac_ext <<_ACEOF
9526#line $LINENO "configure"
9527#include "confdefs.h"
9528$ac_includes_default
9529#include <cthreads.h>
9530_ACEOF
9531rm -f conftest.$ac_objext
9532if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9533 (eval $ac_compile) 2>&5
9534 ac_status=$?
9535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9536 (exit $ac_status); } &&
9537 { ac_try='test -s conftest.$ac_objext'
9538 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9539 (eval $ac_try) 2>&5
9540 ac_status=$?
9541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9542 (exit $ac_status); }; }; then
9543 ac_header_compiler=yes
9544else
9545 echo "$as_me: failed program was:" >&5
9546cat conftest.$ac_ext >&5
9547ac_header_compiler=no
9548fi
9549rm -f conftest.$ac_objext conftest.$ac_ext
9550echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9551echo "${ECHO_T}$ac_header_compiler" >&6
9552
9553# Is the header present?
9554echo "$as_me:$LINENO: checking cthreads.h presence" >&5
9555echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
9556cat >conftest.$ac_ext <<_ACEOF
9557#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009558#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009559#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009560_ACEOF
9561if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9562 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9563 ac_status=$?
9564 egrep -v '^ *\+' conftest.er1 >conftest.err
9565 rm -f conftest.er1
9566 cat conftest.err >&5
9567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9568 (exit $ac_status); } >/dev/null; then
9569 if test -s conftest.err; then
9570 ac_cpp_err=$ac_c_preproc_warn_flag
9571 else
9572 ac_cpp_err=
9573 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009574else
Martin v. Löwis11437992002-04-12 09:54:03 +00009575 ac_cpp_err=yes
9576fi
9577if test -z "$ac_cpp_err"; then
9578 ac_header_preproc=yes
9579else
9580 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00009581 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009582 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009583fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009584rm -f conftest.err conftest.$ac_ext
9585echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9586echo "${ECHO_T}$ac_header_preproc" >&6
9587
9588# So? What about this header?
9589case $ac_header_compiler:$ac_header_preproc in
9590 yes:no )
9591 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9592echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9593 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9594echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9595 no:yes )
9596 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
9597echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
9598 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
9599echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
9600 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9601echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9602esac
9603echo "$as_me:$LINENO: checking for cthreads.h" >&5
9604echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9605if test "${ac_cv_header_cthreads_h+set}" = set; then
9606 echo $ECHO_N "(cached) $ECHO_C" >&6
9607else
9608 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009609fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009610echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9611echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
9612
9613fi
9614if test $ac_cv_header_cthreads_h = yes; then
9615 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009616#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009617_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009618
Martin v. Löwis11437992002-04-12 09:54:03 +00009619 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009620#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009621_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009622
Martin v. Löwis11437992002-04-12 09:54:03 +00009623
9624cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009625#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009626_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009627
9628 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009629 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009630else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009631
Martin v. Löwis11437992002-04-12 09:54:03 +00009632 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9633 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9634echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9635if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9636 echo $ECHO_N "(cached) $ECHO_C" >&6
9637fi
9638echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9639echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009640else
Martin v. Löwis11437992002-04-12 09:54:03 +00009641 # Is the header compilable?
9642echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
9643echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
9644cat >conftest.$ac_ext <<_ACEOF
9645#line $LINENO "configure"
9646#include "confdefs.h"
9647$ac_includes_default
9648#include <mach/cthreads.h>
9649_ACEOF
9650rm -f conftest.$ac_objext
9651if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9652 (eval $ac_compile) 2>&5
9653 ac_status=$?
9654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9655 (exit $ac_status); } &&
9656 { ac_try='test -s conftest.$ac_objext'
9657 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9658 (eval $ac_try) 2>&5
9659 ac_status=$?
9660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9661 (exit $ac_status); }; }; then
9662 ac_header_compiler=yes
9663else
9664 echo "$as_me: failed program was:" >&5
9665cat conftest.$ac_ext >&5
9666ac_header_compiler=no
9667fi
9668rm -f conftest.$ac_objext conftest.$ac_ext
9669echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9670echo "${ECHO_T}$ac_header_compiler" >&6
9671
9672# Is the header present?
9673echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
9674echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
9675cat >conftest.$ac_ext <<_ACEOF
9676#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009677#include "confdefs.h"
9678#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009679_ACEOF
9680if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9681 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9682 ac_status=$?
9683 egrep -v '^ *\+' conftest.er1 >conftest.err
9684 rm -f conftest.er1
9685 cat conftest.err >&5
9686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9687 (exit $ac_status); } >/dev/null; then
9688 if test -s conftest.err; then
9689 ac_cpp_err=$ac_c_preproc_warn_flag
9690 else
9691 ac_cpp_err=
9692 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009693else
Martin v. Löwis11437992002-04-12 09:54:03 +00009694 ac_cpp_err=yes
9695fi
9696if test -z "$ac_cpp_err"; then
9697 ac_header_preproc=yes
9698else
9699 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009700 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009701 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009702fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009703rm -f conftest.err conftest.$ac_ext
9704echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9705echo "${ECHO_T}$ac_header_preproc" >&6
9706
9707# So? What about this header?
9708case $ac_header_compiler:$ac_header_preproc in
9709 yes:no )
9710 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9711echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9712 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9713echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9714 no:yes )
9715 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
9716echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
9717 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
9718echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
9719 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9720echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9721esac
9722echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9723echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9724if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9725 echo $ECHO_N "(cached) $ECHO_C" >&6
9726else
9727 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009728fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009729echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9730echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
9731
9732fi
9733if test $ac_cv_header_mach_cthreads_h = yes; then
9734 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009735#define WITH_THREAD 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öwis11437992002-04-12 09:54:03 +00009738 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009739#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009740_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009741
Martin v. Löwis11437992002-04-12 09:54:03 +00009742
9743cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009744#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009745_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009746
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009747 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009748else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009749
Martin v. Löwis11437992002-04-12 09:54:03 +00009750 echo "$as_me:$LINENO: checking for --with-pth" >&5
9751echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
9752
9753# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009754if test "${with_pth+set}" = set; then
9755 withval="$with_pth"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009756
Martin v. Löwis11437992002-04-12 09:54:03 +00009757 echo "$as_me:$LINENO: result: $withval" >&5
9758echo "${ECHO_T}$withval" >&6
9759 cat >>confdefs.h <<\_ACEOF
9760#define WITH_THREAD 1
9761_ACEOF
9762
9763
9764cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009765#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009766_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009767
Martin v. Löwis130fb172001-07-19 11:00:41 +00009768 LIBS="-lpth $LIBS"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009769 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009770else
Martin v. Löwis11437992002-04-12 09:54:03 +00009771
9772 echo "$as_me:$LINENO: result: no" >&5
9773echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009774
9775 # Just looking for pthread_create in libpthread is not enough:
9776 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9777 # So we really have to include pthread.h, and then link.
9778 _libs=$LIBS
9779 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009780 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
9781echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
9782 cat >conftest.$ac_ext <<_ACEOF
9783#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009784#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009785#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009786
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009787void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009788#ifdef F77_DUMMY_MAIN
9789# ifdef __cplusplus
9790 extern "C"
9791# endif
9792 int F77_DUMMY_MAIN() { return 1; }
9793#endif
9794int
9795main ()
9796{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009797
9798pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009799 ;
9800 return 0;
9801}
9802_ACEOF
9803rm -f conftest.$ac_objext conftest$ac_exeext
9804if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9805 (eval $ac_link) 2>&5
9806 ac_status=$?
9807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9808 (exit $ac_status); } &&
9809 { ac_try='test -s conftest$ac_exeext'
9810 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9811 (eval $ac_try) 2>&5
9812 ac_status=$?
9813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9814 (exit $ac_status); }; }; then
9815
9816 echo "$as_me:$LINENO: result: yes" >&5
9817echo "${ECHO_T}yes" >&6
9818 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009819#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009820_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009821
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009822 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009823 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009824else
Martin v. Löwis11437992002-04-12 09:54:03 +00009825 echo "$as_me: failed program was:" >&5
9826cat conftest.$ac_ext >&5
9827
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009828 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +00009829 echo "$as_me:$LINENO: checking for pthread_detach" >&5
9830echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
9831if test "${ac_cv_func_pthread_detach+set}" = set; then
9832 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009833else
Martin v. Löwis11437992002-04-12 09:54:03 +00009834 cat >conftest.$ac_ext <<_ACEOF
9835#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009836#include "confdefs.h"
9837/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +00009838 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00009839#include <assert.h>
9840/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009841#ifdef __cplusplus
9842extern "C"
9843#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009844/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009845 builtin and then its argument prototype would still apply. */
9846char pthread_detach ();
9847char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +00009848
Martin v. Löwis11437992002-04-12 09:54:03 +00009849#ifdef F77_DUMMY_MAIN
9850# ifdef __cplusplus
9851 extern "C"
9852# endif
9853 int F77_DUMMY_MAIN() { return 1; }
9854#endif
9855int
9856main ()
9857{
Guido van Rossumad678af1998-10-02 14:42:15 +00009858/* The GNU C library defines this for functions which it implements
9859 to always fail with ENOSYS. Some functions are actually named
9860 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00009861#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00009862choke me
9863#else
Martin v. Löwis11437992002-04-12 09:54:03 +00009864f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +00009865#endif
9866
Martin v. Löwis11437992002-04-12 09:54:03 +00009867 ;
9868 return 0;
9869}
9870_ACEOF
9871rm -f conftest.$ac_objext conftest$ac_exeext
9872if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9873 (eval $ac_link) 2>&5
9874 ac_status=$?
9875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9876 (exit $ac_status); } &&
9877 { ac_try='test -s conftest$ac_exeext'
9878 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9879 (eval $ac_try) 2>&5
9880 ac_status=$?
9881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9882 (exit $ac_status); }; }; then
9883 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009884else
Martin v. Löwis11437992002-04-12 09:54:03 +00009885 echo "$as_me: failed program was:" >&5
9886cat conftest.$ac_ext >&5
9887ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009888fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009889rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +00009890fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009891echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
9892echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
9893if test $ac_cv_func_pthread_detach = yes; then
9894 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009895#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009896_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009897
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009898 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009899 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009900else
Guido van Rossumad678af1998-10-02 14:42:15 +00009901
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009902 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
9903 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
9904echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
9905if test "${ac_cv_header_atheos_threads_h+set}" = set; then
9906 echo $ECHO_N "(cached) $ECHO_C" >&6
9907fi
9908echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
9909echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
9910else
9911 # Is the header compilable?
9912echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
9913echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
9914cat >conftest.$ac_ext <<_ACEOF
9915#line $LINENO "configure"
9916#include "confdefs.h"
9917$ac_includes_default
9918#include <atheos/threads.h>
9919_ACEOF
9920rm -f conftest.$ac_objext
9921if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9922 (eval $ac_compile) 2>&5
9923 ac_status=$?
9924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9925 (exit $ac_status); } &&
9926 { ac_try='test -s conftest.$ac_objext'
9927 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9928 (eval $ac_try) 2>&5
9929 ac_status=$?
9930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9931 (exit $ac_status); }; }; then
9932 ac_header_compiler=yes
9933else
9934 echo "$as_me: failed program was:" >&5
9935cat conftest.$ac_ext >&5
9936ac_header_compiler=no
9937fi
9938rm -f conftest.$ac_objext conftest.$ac_ext
9939echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9940echo "${ECHO_T}$ac_header_compiler" >&6
9941
9942# Is the header present?
9943echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
9944echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
9945cat >conftest.$ac_ext <<_ACEOF
9946#line $LINENO "configure"
9947#include "confdefs.h"
9948#include <atheos/threads.h>
9949_ACEOF
9950if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9951 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9952 ac_status=$?
9953 egrep -v '^ *\+' conftest.er1 >conftest.err
9954 rm -f conftest.er1
9955 cat conftest.err >&5
9956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9957 (exit $ac_status); } >/dev/null; then
9958 if test -s conftest.err; then
9959 ac_cpp_err=$ac_c_preproc_warn_flag
9960 else
9961 ac_cpp_err=
9962 fi
9963else
9964 ac_cpp_err=yes
9965fi
9966if test -z "$ac_cpp_err"; then
9967 ac_header_preproc=yes
9968else
9969 echo "$as_me: failed program was:" >&5
9970 cat conftest.$ac_ext >&5
9971 ac_header_preproc=no
9972fi
9973rm -f conftest.err conftest.$ac_ext
9974echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9975echo "${ECHO_T}$ac_header_preproc" >&6
9976
9977# So? What about this header?
9978case $ac_header_compiler:$ac_header_preproc in
9979 yes:no )
9980 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9981echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9982 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
9983echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
9984 no:yes )
9985 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
9986echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
9987 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
9988echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
9989 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
9990echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
9991esac
9992echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
9993echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
9994if test "${ac_cv_header_atheos_threads_h+set}" = set; then
9995 echo $ECHO_N "(cached) $ECHO_C" >&6
9996else
9997 ac_cv_header_atheos_threads_h=$ac_header_preproc
9998fi
9999echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10000echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10001
10002fi
10003if test $ac_cv_header_atheos_threads_h = yes; then
10004 cat >>confdefs.h <<\_ACEOF
10005#define WITH_THREAD 1
10006_ACEOF
10007
10008
10009cat >>confdefs.h <<\_ACEOF
10010#define ATHEOS_THREADS 1
10011_ACEOF
10012
10013 THREADOBJ="Python/thread.o"
10014else
10015
Martin v. Löwis11437992002-04-12 09:54:03 +000010016 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10017 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10018echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10019if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10020 echo $ECHO_N "(cached) $ECHO_C" >&6
10021fi
10022echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10023echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010024else
Martin v. Löwis11437992002-04-12 09:54:03 +000010025 # Is the header compilable?
10026echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10027echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10028cat >conftest.$ac_ext <<_ACEOF
10029#line $LINENO "configure"
10030#include "confdefs.h"
10031$ac_includes_default
10032#include <kernel/OS.h>
10033_ACEOF
10034rm -f conftest.$ac_objext
10035if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10036 (eval $ac_compile) 2>&5
10037 ac_status=$?
10038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10039 (exit $ac_status); } &&
10040 { ac_try='test -s conftest.$ac_objext'
10041 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10042 (eval $ac_try) 2>&5
10043 ac_status=$?
10044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10045 (exit $ac_status); }; }; then
10046 ac_header_compiler=yes
10047else
10048 echo "$as_me: failed program was:" >&5
10049cat conftest.$ac_ext >&5
10050ac_header_compiler=no
10051fi
10052rm -f conftest.$ac_objext conftest.$ac_ext
10053echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10054echo "${ECHO_T}$ac_header_compiler" >&6
10055
10056# Is the header present?
10057echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10058echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10059cat >conftest.$ac_ext <<_ACEOF
10060#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010061#include "confdefs.h"
10062#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010063_ACEOF
10064if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10065 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10066 ac_status=$?
10067 egrep -v '^ *\+' conftest.er1 >conftest.err
10068 rm -f conftest.er1
10069 cat conftest.err >&5
10070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10071 (exit $ac_status); } >/dev/null; then
10072 if test -s conftest.err; then
10073 ac_cpp_err=$ac_c_preproc_warn_flag
10074 else
10075 ac_cpp_err=
10076 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010077else
Martin v. Löwis11437992002-04-12 09:54:03 +000010078 ac_cpp_err=yes
10079fi
10080if test -z "$ac_cpp_err"; then
10081 ac_header_preproc=yes
10082else
10083 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010084 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010085 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010086fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010087rm -f conftest.err conftest.$ac_ext
10088echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10089echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010090
Martin v. Löwis11437992002-04-12 09:54:03 +000010091# So? What about this header?
10092case $ac_header_compiler:$ac_header_preproc in
10093 yes:no )
10094 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10095echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10096 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10097echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10098 no:yes )
10099 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10100echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10101 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10102echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10103 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10104echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10105esac
10106echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10107echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10108if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10109 echo $ECHO_N "(cached) $ECHO_C" >&6
10110else
10111 ac_cv_header_kernel_OS_h=$ac_header_preproc
10112fi
10113echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10114echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
10115
10116fi
10117if test $ac_cv_header_kernel_OS_h = yes; then
10118 cat >>confdefs.h <<\_ACEOF
10119#define WITH_THREAD 1
10120_ACEOF
10121
10122
10123cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010124#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010125_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010126
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010127 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010128else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010129
Martin v. Löwis11437992002-04-12 09:54:03 +000010130 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
10131echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
10132if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
10133 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010134else
Martin v. Löwis11437992002-04-12 09:54:03 +000010135 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010136LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010137cat >conftest.$ac_ext <<_ACEOF
10138#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +000010139#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010140
Greg Steinadf63d62000-07-05 10:38:09 +000010141/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010142#ifdef __cplusplus
10143extern "C"
10144#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010145/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010146 builtin and then its argument prototype would still apply. */
10147char pthread_create ();
10148#ifdef F77_DUMMY_MAIN
10149# ifdef __cplusplus
10150 extern "C"
10151# endif
10152 int F77_DUMMY_MAIN() { return 1; }
10153#endif
10154int
10155main ()
10156{
10157pthread_create ();
10158 ;
10159 return 0;
10160}
10161_ACEOF
10162rm -f conftest.$ac_objext conftest$ac_exeext
10163if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10164 (eval $ac_link) 2>&5
10165 ac_status=$?
10166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10167 (exit $ac_status); } &&
10168 { ac_try='test -s conftest$ac_exeext'
10169 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10170 (eval $ac_try) 2>&5
10171 ac_status=$?
10172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10173 (exit $ac_status); }; }; then
10174 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010175else
Martin v. Löwis11437992002-04-12 09:54:03 +000010176 echo "$as_me: failed program was:" >&5
10177cat conftest.$ac_ext >&5
10178ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010179fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010180rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10181LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010182fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010183echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10184echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10185if test $ac_cv_lib_pthreads_pthread_create = yes; then
10186 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010187#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010188_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010189
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010190 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010191 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010192 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010193else
Greg Steinadf63d62000-07-05 10:38:09 +000010194
Martin v. Löwis11437992002-04-12 09:54:03 +000010195 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10196echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10197if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10198 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010199else
Martin v. Löwis11437992002-04-12 09:54:03 +000010200 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010201LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010202cat >conftest.$ac_ext <<_ACEOF
10203#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010204#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010205
Guido van Rossum49545951997-12-02 19:28:29 +000010206/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010207#ifdef __cplusplus
10208extern "C"
10209#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010210/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010211 builtin and then its argument prototype would still apply. */
10212char pthread_create ();
10213#ifdef F77_DUMMY_MAIN
10214# ifdef __cplusplus
10215 extern "C"
10216# endif
10217 int F77_DUMMY_MAIN() { return 1; }
10218#endif
10219int
10220main ()
10221{
10222pthread_create ();
10223 ;
10224 return 0;
10225}
10226_ACEOF
10227rm -f conftest.$ac_objext conftest$ac_exeext
10228if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10229 (eval $ac_link) 2>&5
10230 ac_status=$?
10231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10232 (exit $ac_status); } &&
10233 { ac_try='test -s conftest$ac_exeext'
10234 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10235 (eval $ac_try) 2>&5
10236 ac_status=$?
10237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10238 (exit $ac_status); }; }; then
10239 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010240else
Martin v. Löwis11437992002-04-12 09:54:03 +000010241 echo "$as_me: failed program was:" >&5
10242cat conftest.$ac_ext >&5
10243ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010244fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010245rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10246LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010247fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010248echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10249echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10250if test $ac_cv_lib_c_r_pthread_create = yes; then
10251 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010252#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010253_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010254
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010255 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010256 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010257 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010258else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010259
Martin v. Löwis11437992002-04-12 09:54:03 +000010260 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
10261echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
10262if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
10263 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010264else
Martin v. Löwis11437992002-04-12 09:54:03 +000010265 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010266LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010267cat >conftest.$ac_ext <<_ACEOF
10268#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010269#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010270
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010271/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010272#ifdef __cplusplus
10273extern "C"
10274#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010275/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010276 builtin and then its argument prototype would still apply. */
10277char __d6_pthread_create ();
10278#ifdef F77_DUMMY_MAIN
10279# ifdef __cplusplus
10280 extern "C"
10281# endif
10282 int F77_DUMMY_MAIN() { return 1; }
10283#endif
10284int
10285main ()
10286{
10287__d6_pthread_create ();
10288 ;
10289 return 0;
10290}
10291_ACEOF
10292rm -f conftest.$ac_objext conftest$ac_exeext
10293if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10294 (eval $ac_link) 2>&5
10295 ac_status=$?
10296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10297 (exit $ac_status); } &&
10298 { ac_try='test -s conftest$ac_exeext'
10299 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10300 (eval $ac_try) 2>&5
10301 ac_status=$?
10302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10303 (exit $ac_status); }; }; then
10304 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010305else
Martin v. Löwis11437992002-04-12 09:54:03 +000010306 echo "$as_me: failed program was:" >&5
10307cat conftest.$ac_ext >&5
10308ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010309fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010310rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10311LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010312fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010313echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
10314echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
10315if test $ac_cv_lib_thread___d6_pthread_create = yes; then
10316 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010317#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010318_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010319
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010320 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010321 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010322 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000010323else
Guido van Rossum49545951997-12-02 19:28:29 +000010324
Martin v. Löwis11437992002-04-12 09:54:03 +000010325 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
10326echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
10327if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
10328 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010329else
Martin v. Löwis11437992002-04-12 09:54:03 +000010330 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010331LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010332cat >conftest.$ac_ext <<_ACEOF
10333#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010334#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010335
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010336/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010337#ifdef __cplusplus
10338extern "C"
10339#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010340/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010341 builtin and then its argument prototype would still apply. */
10342char __pthread_create_system ();
10343#ifdef F77_DUMMY_MAIN
10344# ifdef __cplusplus
10345 extern "C"
10346# endif
10347 int F77_DUMMY_MAIN() { return 1; }
10348#endif
10349int
10350main ()
10351{
10352__pthread_create_system ();
10353 ;
10354 return 0;
10355}
10356_ACEOF
10357rm -f conftest.$ac_objext conftest$ac_exeext
10358if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10359 (eval $ac_link) 2>&5
10360 ac_status=$?
10361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10362 (exit $ac_status); } &&
10363 { ac_try='test -s conftest$ac_exeext'
10364 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10365 (eval $ac_try) 2>&5
10366 ac_status=$?
10367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10368 (exit $ac_status); }; }; then
10369 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010370else
Martin v. Löwis11437992002-04-12 09:54:03 +000010371 echo "$as_me: failed program was:" >&5
10372cat conftest.$ac_ext >&5
10373ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010374fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010375rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10376LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010377fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010378echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10379echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
10380if test $ac_cv_lib_pthread___pthread_create_system = yes; then
10381 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010382#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010383_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010384
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010385 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010386 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010387 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010388else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010389
Martin v. Löwis11437992002-04-12 09:54:03 +000010390 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
10391echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
10392if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
10393 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010394else
Martin v. Löwis11437992002-04-12 09:54:03 +000010395 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010396LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010397cat >conftest.$ac_ext <<_ACEOF
10398#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010399#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010400
Guido van Rossumb93a8621998-05-07 13:27:32 +000010401/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010402#ifdef __cplusplus
10403extern "C"
10404#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000010405/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010406 builtin and then its argument prototype would still apply. */
10407char pthread_create ();
10408#ifdef F77_DUMMY_MAIN
10409# ifdef __cplusplus
10410 extern "C"
10411# endif
10412 int F77_DUMMY_MAIN() { return 1; }
10413#endif
10414int
10415main ()
10416{
10417pthread_create ();
10418 ;
10419 return 0;
10420}
10421_ACEOF
10422rm -f conftest.$ac_objext conftest$ac_exeext
10423if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10424 (eval $ac_link) 2>&5
10425 ac_status=$?
10426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10427 (exit $ac_status); } &&
10428 { ac_try='test -s conftest$ac_exeext'
10429 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10430 (eval $ac_try) 2>&5
10431 ac_status=$?
10432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10433 (exit $ac_status); }; }; then
10434 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010435else
Martin v. Löwis11437992002-04-12 09:54:03 +000010436 echo "$as_me: failed program was:" >&5
10437cat conftest.$ac_ext >&5
10438ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010439fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010440rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10441LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010442fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010443echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
10444echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
10445if test $ac_cv_lib_cma_pthread_create = yes; then
10446 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010447#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010448_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010449
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010450 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010451 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010452 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010453else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010454
Martin v. Löwis130fb172001-07-19 11:00:41 +000010455 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010456fi
10457
Guido van Rossum627b2d71993-12-24 10:39:16 +000010458
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010459fi
10460
Guido van Rossum0be3e491997-05-22 20:33:33 +000010461fi
10462
Guido van Rossum49545951997-12-02 19:28:29 +000010463fi
10464
Guido van Rossumb93a8621998-05-07 13:27:32 +000010465fi
10466
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010467fi
10468
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010469
Michael W. Hudson54241132001-12-07 15:38:26 +000010470fi
10471
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010472
10473fi
10474
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010475fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010476rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10477fi;
10478fi
10479
10480
10481fi
10482
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010483
Michael W. Hudson54241132001-12-07 15:38:26 +000010484
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010485 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010486 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010487
10488cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010489#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010490_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010491
10492 fi
10493
Martin v. Löwis11437992002-04-12 09:54:03 +000010494 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10495echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
10496 if test "${ac_cv_pthread_system_supported+set}" = set; then
10497 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010498else
10499 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010500 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010501else
Martin v. Löwis11437992002-04-12 09:54:03 +000010502 cat >conftest.$ac_ext <<_ACEOF
10503#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010504#include "confdefs.h"
10505#include <pthread.h>
10506 void *foo(void *parm) {
10507 return NULL;
10508 }
10509 main() {
10510 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010511 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010512 if (pthread_attr_init(&attr)) exit(-1);
10513 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010514 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010515 exit(0);
10516 }
Martin v. Löwis11437992002-04-12 09:54:03 +000010517_ACEOF
10518rm -f conftest$ac_exeext
10519if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10520 (eval $ac_link) 2>&5
10521 ac_status=$?
10522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10523 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10524 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10525 (eval $ac_try) 2>&5
10526 ac_status=$?
10527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10528 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010529 ac_cv_pthread_system_supported=yes
10530else
Martin v. Löwis11437992002-04-12 09:54:03 +000010531 echo "$as_me: program exited with status $ac_status" >&5
10532echo "$as_me: failed program was:" >&5
10533cat conftest.$ac_ext >&5
10534( exit $ac_status )
10535ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010536fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010537rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010538fi
10539
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010540fi
10541
Martin v. Löwis11437992002-04-12 09:54:03 +000010542 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
10543echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010544 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010545
10546cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010547#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010548_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010549
10550 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010551
10552for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010553do
Martin v. Löwis11437992002-04-12 09:54:03 +000010554as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10555echo "$as_me:$LINENO: checking for $ac_func" >&5
10556echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10557if eval "test \"\${$as_ac_var+set}\" = set"; then
10558 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010559else
Martin v. Löwis11437992002-04-12 09:54:03 +000010560 cat >conftest.$ac_ext <<_ACEOF
10561#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010562#include "confdefs.h"
10563/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010564 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010565#include <assert.h>
10566/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010567#ifdef __cplusplus
10568extern "C"
10569#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010570/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010571 builtin and then its argument prototype would still apply. */
10572char $ac_func ();
10573char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010574
Martin v. Löwis11437992002-04-12 09:54:03 +000010575#ifdef F77_DUMMY_MAIN
10576# ifdef __cplusplus
10577 extern "C"
10578# endif
10579 int F77_DUMMY_MAIN() { return 1; }
10580#endif
10581int
10582main ()
10583{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010584/* The GNU C library defines this for functions which it implements
10585 to always fail with ENOSYS. Some functions are actually named
10586 something starting with __ and the normal name is an alias. */
10587#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10588choke me
10589#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010590f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010591#endif
10592
Martin v. Löwis11437992002-04-12 09:54:03 +000010593 ;
10594 return 0;
10595}
10596_ACEOF
10597rm -f conftest.$ac_objext conftest$ac_exeext
10598if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10599 (eval $ac_link) 2>&5
10600 ac_status=$?
10601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10602 (exit $ac_status); } &&
10603 { ac_try='test -s conftest$ac_exeext'
10604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10605 (eval $ac_try) 2>&5
10606 ac_status=$?
10607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10608 (exit $ac_status); }; }; then
10609 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000010610else
Martin v. Löwis11437992002-04-12 09:54:03 +000010611 echo "$as_me: failed program was:" >&5
10612cat conftest.$ac_ext >&5
10613eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000010614fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010615rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010616fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010617echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10618echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10619if test `eval echo '${'$as_ac_var'}'` = yes; then
10620 cat >>confdefs.h <<_ACEOF
10621#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10622_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010623
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010624fi
10625done
10626
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010627 fi
10628
Martin v. Löwis11437992002-04-12 09:54:03 +000010629 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
10630echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
10631if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
10632 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010633else
Martin v. Löwis11437992002-04-12 09:54:03 +000010634 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010635LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010636cat >conftest.$ac_ext <<_ACEOF
10637#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010638#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010639
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010640/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010641#ifdef __cplusplus
10642extern "C"
10643#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010644/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010645 builtin and then its argument prototype would still apply. */
10646char usconfig ();
10647#ifdef F77_DUMMY_MAIN
10648# ifdef __cplusplus
10649 extern "C"
10650# endif
10651 int F77_DUMMY_MAIN() { return 1; }
10652#endif
10653int
10654main ()
10655{
10656usconfig ();
10657 ;
10658 return 0;
10659}
10660_ACEOF
10661rm -f conftest.$ac_objext conftest$ac_exeext
10662if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10663 (eval $ac_link) 2>&5
10664 ac_status=$?
10665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10666 (exit $ac_status); } &&
10667 { ac_try='test -s conftest$ac_exeext'
10668 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10669 (eval $ac_try) 2>&5
10670 ac_status=$?
10671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10672 (exit $ac_status); }; }; then
10673 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010674else
Martin v. Löwis11437992002-04-12 09:54:03 +000010675 echo "$as_me: failed program was:" >&5
10676cat conftest.$ac_ext >&5
10677ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010678fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010679rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10680LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010681fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010682echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
10683echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
10684if test $ac_cv_lib_mpc_usconfig = yes; then
10685 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010686#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010687_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010688
Martin v. Löwis130fb172001-07-19 11:00:41 +000010689 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010690 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010691 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010692fi
10693
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010694
Martin v. Löwis11437992002-04-12 09:54:03 +000010695 if test $posix_threads != "yes"; then
10696 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
10697echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
10698if test "${ac_cv_lib_thread_thr_create+set}" = set; then
10699 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010700else
Martin v. Löwis11437992002-04-12 09:54:03 +000010701 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010702LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010703cat >conftest.$ac_ext <<_ACEOF
10704#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010705#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010706
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010707/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010708#ifdef __cplusplus
10709extern "C"
10710#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010711/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010712 builtin and then its argument prototype would still apply. */
10713char thr_create ();
10714#ifdef F77_DUMMY_MAIN
10715# ifdef __cplusplus
10716 extern "C"
10717# endif
10718 int F77_DUMMY_MAIN() { return 1; }
10719#endif
10720int
10721main ()
10722{
10723thr_create ();
10724 ;
10725 return 0;
10726}
10727_ACEOF
10728rm -f conftest.$ac_objext conftest$ac_exeext
10729if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10730 (eval $ac_link) 2>&5
10731 ac_status=$?
10732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10733 (exit $ac_status); } &&
10734 { ac_try='test -s conftest$ac_exeext'
10735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10736 (eval $ac_try) 2>&5
10737 ac_status=$?
10738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10739 (exit $ac_status); }; }; then
10740 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010741else
Martin v. Löwis11437992002-04-12 09:54:03 +000010742 echo "$as_me: failed program was:" >&5
10743cat conftest.$ac_ext >&5
10744ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010745fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010746rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10747LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010748fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010749echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
10750echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
10751if test $ac_cv_lib_thread_thr_create = yes; then
10752 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010753#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010754_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010755
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010756 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010757 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010758 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010759fi
10760
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010761 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010762
Martin v. Löwis130fb172001-07-19 11:00:41 +000010763 if test "$USE_THREAD_MODULE" != "#"
10764 then
10765 # If the above checks didn't disable threads, (at least) OSF1
10766 # needs this '-threads' argument during linking.
10767 case $ac_sys_system in
10768 OSF1) LDLAST=-threads;;
10769 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000010770 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010771fi
10772
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010773# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010774
10775
10776echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
10777echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010778# Check whether --enable-ipv6 or --disable-ipv6 was given.
10779if test "${enable_ipv6+set}" = set; then
10780 enableval="$enable_ipv6"
10781 case "$enableval" in
10782 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000010783 echo "$as_me:$LINENO: result: no" >&5
10784echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010785 ipv6=no
10786 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010787 *) echo "$as_me:$LINENO: result: yes" >&5
10788echo "${ECHO_T}yes" >&6
10789 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010790#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010791_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010792
10793 ipv6=yes
10794 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010795 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010796else
Martin v. Löwis11437992002-04-12 09:54:03 +000010797
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010798 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010799 echo "$as_me:$LINENO: result: no" >&5
10800echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010801 ipv6=no
10802
10803else
Martin v. Löwis11437992002-04-12 09:54:03 +000010804 cat >conftest.$ac_ext <<_ACEOF
10805#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010806#include "confdefs.h"
10807 /* AF_INET6 available check */
10808#include <sys/types.h>
10809#include <sys/socket.h>
10810main()
10811{
10812 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
10813 exit(1);
10814 else
10815 exit(0);
10816}
10817
Martin v. Löwis11437992002-04-12 09:54:03 +000010818_ACEOF
10819rm -f conftest$ac_exeext
10820if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10821 (eval $ac_link) 2>&5
10822 ac_status=$?
10823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10824 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10825 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10826 (eval $ac_try) 2>&5
10827 ac_status=$?
10828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10829 (exit $ac_status); }; }; then
10830 echo "$as_me:$LINENO: result: yes" >&5
10831echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010832 ipv6=yes
10833else
Martin v. Löwis11437992002-04-12 09:54:03 +000010834 echo "$as_me: program exited with status $ac_status" >&5
10835echo "$as_me: failed program was:" >&5
10836cat conftest.$ac_ext >&5
10837( exit $ac_status )
10838echo "$as_me:$LINENO: result: no" >&5
10839echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010840 ipv6=no
10841fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010842rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010843fi
10844
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010845if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010846 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
10847echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
10848 cat >conftest.$ac_ext <<_ACEOF
10849#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010850#include "confdefs.h"
10851#include <sys/types.h>
10852#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010853#ifdef F77_DUMMY_MAIN
10854# ifdef __cplusplus
10855 extern "C"
10856# endif
10857 int F77_DUMMY_MAIN() { return 1; }
10858#endif
10859int
10860main ()
10861{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010862struct sockaddr_in6 x;
10863x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010864 ;
10865 return 0;
10866}
10867_ACEOF
10868rm -f conftest.$ac_objext
10869if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10870 (eval $ac_compile) 2>&5
10871 ac_status=$?
10872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10873 (exit $ac_status); } &&
10874 { ac_try='test -s conftest.$ac_objext'
10875 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10876 (eval $ac_try) 2>&5
10877 ac_status=$?
10878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10879 (exit $ac_status); }; }; then
10880 echo "$as_me:$LINENO: result: yes" >&5
10881echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010882 ipv6=yes
10883else
Martin v. Löwis11437992002-04-12 09:54:03 +000010884 echo "$as_me: failed program was:" >&5
10885cat conftest.$ac_ext >&5
10886echo "$as_me:$LINENO: result: no" >&5
10887echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010888 ipv6=no
10889fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010890rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010891fi
10892
10893if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010894 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010895#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010896_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010897
10898fi
10899
Martin v. Löwis11437992002-04-12 09:54:03 +000010900fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010901
10902ipv6type=unknown
10903ipv6lib=none
10904ipv6trylibc=no
10905
10906if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010907 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
10908echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000010909 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10910 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010911 case $i in
10912 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000010913 cat >conftest.$ac_ext <<_ACEOF
10914#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010915#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010916
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010917#include <netinet/in.h>
10918#ifdef IPV6_INRIA_VERSION
10919yes
10920#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010921_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010922if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10923 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010924 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010925fi
10926rm -f conftest*
10927
10928 ;;
10929 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000010930 cat >conftest.$ac_ext <<_ACEOF
10931#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010932#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010933
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010934#include <netinet/in.h>
10935#ifdef __KAME__
10936yes
10937#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010938_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010939if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10940 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010941 ipv6type=$i;
10942 ipv6lib=inet6
10943 ipv6libdir=/usr/local/v6/lib
10944 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010945fi
10946rm -f conftest*
10947
10948 ;;
10949 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000010950 cat >conftest.$ac_ext <<_ACEOF
10951#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010952#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010953
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010954#include <features.h>
10955#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10956yes
10957#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010958_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010959if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10960 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010961 ipv6type=$i;
10962 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010963fi
10964rm -f conftest*
10965
10966 ;;
10967 linux-inet6)
10968 if test -d /usr/inet6; then
10969 ipv6type=$i
10970 ipv6lib=inet6
10971 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010972 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010973 fi
10974 ;;
10975 solaris)
10976 if test -f /etc/netconfig; then
10977 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
10978 ipv6type=$i
10979 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010980 fi
10981 fi
10982 ;;
10983 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000010984 cat >conftest.$ac_ext <<_ACEOF
10985#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010986#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010987
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010988#include <sys/param.h>
10989#ifdef _TOSHIBA_INET6
10990yes
10991#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010992_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010993if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10994 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010995 ipv6type=$i;
10996 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010997 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010998fi
10999rm -f conftest*
11000
11001 ;;
11002 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011003 cat >conftest.$ac_ext <<_ACEOF
11004#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011005#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011006
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011007#include </usr/local/v6/include/sys/v6config.h>
11008#ifdef __V6D__
11009yes
11010#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011011_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011012if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11013 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011014 ipv6type=$i;
11015 ipv6lib=v6;
11016 ipv6libdir=/usr/local/v6/lib;
11017 OPT="-I/usr/local/v6/include $OPT"
11018fi
11019rm -f conftest*
11020
11021 ;;
11022 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011023 cat >conftest.$ac_ext <<_ACEOF
11024#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011025#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011026
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011027#include <sys/param.h>
11028#ifdef _ZETA_MINAMI_INET6
11029yes
11030#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011031_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011032if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11033 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011034 ipv6type=$i;
11035 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011036 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011037fi
11038rm -f conftest*
11039
11040 ;;
11041 esac
11042 if test "$ipv6type" != "unknown"; then
11043 break
11044 fi
11045 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011046 echo "$as_me:$LINENO: result: $ipv6type" >&5
11047echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011048fi
11049
11050if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11051 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11052 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11053 echo "using lib$ipv6lib"
11054 else
11055 if test $ipv6trylibc = "yes"; then
11056 echo "using libc"
11057 else
11058 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11059 echo "You need to fetch lib$ipv6lib.a from appropriate"
11060 echo 'ipv6 kit and compile beforehand.'
11061 exit 1
11062 fi
11063 fi
11064fi
11065
Jack Jansen7b8c7542002-04-14 20:12:41 +000011066# Check for universal newline support
11067echo "$as_me:$LINENO: checking for --with-universal-newline" >&5
11068echo $ECHO_N "checking for --with-universal-newline... $ECHO_C" >&6
11069
11070# Check whether --with-universal-newlines or --without-universal-newlines was given.
11071if test "${with_universal_newlines+set}" = set; then
11072 withval="$with_universal_newlines"
11073
11074fi;
11075
11076if test -z "$with_universal_newlines"
11077then with_universal_newlines="yes"
11078fi
11079if test "$with_universal_newlines" != "no"
11080then
Martin v. Löwise8aea582002-04-16 05:51:02 +000011081
11082cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011083#define WITH_UNIVERSAL_NEWLINES 1
11084_ACEOF
11085
11086fi
11087echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11088echo "${ECHO_T}$with_universal_newlines" >&6
11089
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011090# Check for --with-doc-strings
11091echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11092echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11093
11094# Check whether --with-doc-strings or --without-doc-strings was given.
11095if test "${with_doc_strings+set}" = set; then
11096 withval="$with_doc_strings"
11097
11098fi;
11099
11100if test -z "$with_doc_strings"
11101then with_doc_strings="yes"
11102fi
11103if test "$with_doc_strings" != "no"
11104then
11105
11106cat >>confdefs.h <<\_ACEOF
11107#define WITH_DOC_STRINGS 1
11108_ACEOF
11109
11110fi
11111echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11112echo "${ECHO_T}$with_doc_strings" >&6
11113
Neil Schemenauera35c6882001-02-27 04:45:05 +000011114# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011115echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11116echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11117
Neil Schemenauera35c6882001-02-27 04:45:05 +000011118# Check whether --with-pymalloc or --without-pymalloc was given.
11119if test "${with_pymalloc+set}" = set; then
11120 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011121
Martin v. Löwis11437992002-04-12 09:54:03 +000011122fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011123
Neil Schemenauer16c22972002-03-22 15:34:49 +000011124if test -z "$with_pymalloc"
11125then with_pymalloc="yes"
11126fi
11127if test "$with_pymalloc" != "no"
11128then
Martin v. Löwis11437992002-04-12 09:54:03 +000011129
11130cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011131#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011132_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011133
11134fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011135echo "$as_me:$LINENO: result: $with_pymalloc" >&5
11136echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000011137
Barry Warsawef82cd72000-06-30 16:21:01 +000011138# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011139echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
11140echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
11141
Barry Warsawef82cd72000-06-30 16:21:01 +000011142# Check whether --with-wctype-functions or --without-wctype-functions was given.
11143if test "${with_wctype_functions+set}" = set; then
11144 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000011145
Barry Warsawef82cd72000-06-30 16:21:01 +000011146if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011147then
11148
11149cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011150#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011151_ACEOF
11152
11153 echo "$as_me:$LINENO: result: yes" >&5
11154echo "${ECHO_T}yes" >&6
11155else echo "$as_me:$LINENO: result: no" >&5
11156echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011157fi
11158else
Martin v. Löwis11437992002-04-12 09:54:03 +000011159 echo "$as_me:$LINENO: result: no" >&5
11160echo "${ECHO_T}no" >&6
11161fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011162
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011163# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011164
Guido van Rossum98935bf2001-09-05 19:13:16 +000011165DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011166
Martin v. Löwis11437992002-04-12 09:54:03 +000011167echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11168echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11169
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011170# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011171if test "${with_sgi_dl+set}" = set; then
11172 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011173
11174echo "$as_me:$LINENO: result: $withval" >&5
11175echo "${ECHO_T}$withval" >&6
11176
11177cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011178#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011179_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011180
Guido van Rossume97ee181999-12-20 21:27:22 +000011181DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011182dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011183if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011184then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011185else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11186echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11187 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011188fi
11189DLINCLDIR=${dldir}
11190LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011191else
Martin v. Löwis11437992002-04-12 09:54:03 +000011192 echo "$as_me:$LINENO: result: no" >&5
11193echo "${ECHO_T}no" >&6
11194fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011195
Martin v. Löwis11437992002-04-12 09:54:03 +000011196echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11197echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011198
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011199# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011200if test "${with_dl_dld+set}" = set; then
11201 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011202
11203echo "$as_me:$LINENO: result: $withval" >&5
11204echo "${ECHO_T}$withval" >&6
11205
11206cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011207#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011208_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011209
Guido van Rossume97ee181999-12-20 21:27:22 +000011210DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011211dldir=`echo "$withval" | sed 's/,.*//'`
11212dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011213if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011214then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011215else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&5
11216echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&2;}
11217 { (exit DLD_DIRECTORY); exit DLD_DIRECTORY; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011218fi
11219DLINCLDIR=${dldir}
11220LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011221else
Martin v. Löwis11437992002-04-12 09:54:03 +000011222 echo "$as_me:$LINENO: result: no" >&5
11223echo "${ECHO_T}no" >&6
11224fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011225
Guido van Rossume97ee181999-12-20 21:27:22 +000011226# the dlopen() function means we might want to use dynload_shlib.o. some
11227# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011228
Thomas Wouters3a584202000-08-05 23:28:51 +000011229for ac_func in dlopen
11230do
Martin v. Löwis11437992002-04-12 09:54:03 +000011231as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11232echo "$as_me:$LINENO: checking for $ac_func" >&5
11233echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11234if eval "test \"\${$as_ac_var+set}\" = set"; then
11235 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011236else
Martin v. Löwis11437992002-04-12 09:54:03 +000011237 cat >conftest.$ac_ext <<_ACEOF
11238#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000011239#include "confdefs.h"
11240/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011241 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000011242#include <assert.h>
11243/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011244#ifdef __cplusplus
11245extern "C"
11246#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000011247/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011248 builtin and then its argument prototype would still apply. */
11249char $ac_func ();
11250char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000011251
Martin v. Löwis11437992002-04-12 09:54:03 +000011252#ifdef F77_DUMMY_MAIN
11253# ifdef __cplusplus
11254 extern "C"
11255# endif
11256 int F77_DUMMY_MAIN() { return 1; }
11257#endif
11258int
11259main ()
11260{
Guido van Rossume97ee181999-12-20 21:27:22 +000011261/* The GNU C library defines this for functions which it implements
11262 to always fail with ENOSYS. Some functions are actually named
11263 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011264#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000011265choke me
11266#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011267f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000011268#endif
11269
Martin v. Löwis11437992002-04-12 09:54:03 +000011270 ;
11271 return 0;
11272}
11273_ACEOF
11274rm -f conftest.$ac_objext conftest$ac_exeext
11275if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11276 (eval $ac_link) 2>&5
11277 ac_status=$?
11278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11279 (exit $ac_status); } &&
11280 { ac_try='test -s conftest$ac_exeext'
11281 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11282 (eval $ac_try) 2>&5
11283 ac_status=$?
11284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11285 (exit $ac_status); }; }; then
11286 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011287else
Martin v. Löwis11437992002-04-12 09:54:03 +000011288 echo "$as_me: failed program was:" >&5
11289cat conftest.$ac_ext >&5
11290eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011291fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011292rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011293fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011294echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11295echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11296if test `eval echo '${'$as_ac_var'}'` = yes; then
11297 cat >>confdefs.h <<_ACEOF
11298#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11299_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011300
Guido van Rossume97ee181999-12-20 21:27:22 +000011301fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011302done
Guido van Rossume97ee181999-12-20 21:27:22 +000011303
Michael W. Hudson54241132001-12-07 15:38:26 +000011304
Guido van Rossume97ee181999-12-20 21:27:22 +000011305# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11306# loading of modules.
11307
Martin v. Löwis11437992002-04-12 09:54:03 +000011308echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
11309echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011310if test -z "$DYNLOADFILE"
11311then
11312 case $ac_sys_system/$ac_sys_release in
11313 AIX*) DYNLOADFILE="dynload_aix.o";;
11314 BeOS*) DYNLOADFILE="dynload_beos.o";;
11315 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000011316 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011317 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011318 *)
11319 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11320 # out any dynamic loading
11321 if test "$ac_cv_func_dlopen" = yes
11322 then DYNLOADFILE="dynload_shlib.o"
11323 else DYNLOADFILE="dynload_stub.o"
11324 fi
11325 ;;
11326 esac
11327fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011328echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
11329echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011330if test "$DYNLOADFILE" != "dynload_stub.o"
11331then
Martin v. Löwis11437992002-04-12 09:54:03 +000011332
11333cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011334#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011335_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011336
11337fi
11338
Neil Schemenauer4e425612001-06-19 15:44:15 +000011339# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11340
Michael W. Hudson54241132001-12-07 15:38:26 +000011341
Martin v. Löwis11437992002-04-12 09:54:03 +000011342echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
11343echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011344if test -z "$MACHDEP_OBJS"
11345then
Jack Jansene578a632001-08-15 01:27:14 +000011346 MACHDEP_OBJS=$extra_machdep_objs
11347else
11348 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011349fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011350echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
11351echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011352
Guido van Rossum627b2d71993-12-24 10:39:16 +000011353# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011354
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
11418
11419
11420
11421
11422
11423
11424
11425
11426
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011427
Fred Drake6b3cc522002-04-15 19:20:27 +000011428
Jack Jansen0b06be72002-06-21 14:48:38 +000011429
Martin v. Löwis244edc82001-10-04 22:44:26 +000011430for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
Fred Drake6b3cc522002-04-15 19:20:27 +000011431 fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwis606edc12002-06-13 21:09:11 +000011432 gai_strerror getgroups getlogin getpeername getpgid getpid getpwent getwd \
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011433 hstrerror inet_pton kill killpg link lstat mkfifo mknod mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +000011434 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +000011435 putenv readlink \
Martin v. Löwis61c5edf2001-10-18 04:06:00 +000011436 select setegid seteuid setgid setgroups \
Martin v. Löwis791bfda2001-07-24 06:33:08 +000011437 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Michael W. Hudson065c1a22002-06-06 13:03:44 +000011438 sigaction siginterrupt sigrelse strftime strptime symlink \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011439 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Guido van Rossumc524d952001-10-19 01:31:59 +000011440 truncate uname unsetenv waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +000011441do
Martin v. Löwis11437992002-04-12 09:54:03 +000011442as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11443echo "$as_me:$LINENO: checking for $ac_func" >&5
11444echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11445if eval "test \"\${$as_ac_var+set}\" = set"; then
11446 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011447else
Martin v. Löwis11437992002-04-12 09:54:03 +000011448 cat >conftest.$ac_ext <<_ACEOF
11449#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011450#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011451/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011452 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011453#include <assert.h>
11454/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011455#ifdef __cplusplus
11456extern "C"
11457#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011458/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011459 builtin and then its argument prototype would still apply. */
11460char $ac_func ();
11461char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011462
Martin v. Löwis11437992002-04-12 09:54:03 +000011463#ifdef F77_DUMMY_MAIN
11464# ifdef __cplusplus
11465 extern "C"
11466# endif
11467 int F77_DUMMY_MAIN() { return 1; }
11468#endif
11469int
11470main ()
11471{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011472/* The GNU C library defines this for functions which it implements
11473 to always fail with ENOSYS. Some functions are actually named
11474 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011475#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011476choke me
11477#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011478f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011479#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011480
Martin v. Löwis11437992002-04-12 09:54:03 +000011481 ;
11482 return 0;
11483}
11484_ACEOF
11485rm -f conftest.$ac_objext conftest$ac_exeext
11486if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11487 (eval $ac_link) 2>&5
11488 ac_status=$?
11489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11490 (exit $ac_status); } &&
11491 { ac_try='test -s conftest$ac_exeext'
11492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11493 (eval $ac_try) 2>&5
11494 ac_status=$?
11495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11496 (exit $ac_status); }; }; then
11497 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011498else
Martin v. Löwis11437992002-04-12 09:54:03 +000011499 echo "$as_me: failed program was:" >&5
11500cat conftest.$ac_ext >&5
11501eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011502fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011503rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011504fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011505echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11506echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11507if test `eval echo '${'$as_ac_var'}'` = yes; then
11508 cat >>confdefs.h <<_ACEOF
11509#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11510_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011511
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011512fi
11513done
11514
Michael W. Hudson54241132001-12-07 15:38:26 +000011515
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011516# check for openpty and forkpty
11517
Martin v. Löwis11437992002-04-12 09:54:03 +000011518
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011519for ac_func in openpty
11520do
Martin v. Löwis11437992002-04-12 09:54:03 +000011521as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11522echo "$as_me:$LINENO: checking for $ac_func" >&5
11523echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11524if eval "test \"\${$as_ac_var+set}\" = set"; then
11525 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011526else
Martin v. Löwis11437992002-04-12 09:54:03 +000011527 cat >conftest.$ac_ext <<_ACEOF
11528#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011529#include "confdefs.h"
11530/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011531 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011532#include <assert.h>
11533/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011534#ifdef __cplusplus
11535extern "C"
11536#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011537/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011538 builtin and then its argument prototype would still apply. */
11539char $ac_func ();
11540char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011541
Martin v. Löwis11437992002-04-12 09:54:03 +000011542#ifdef F77_DUMMY_MAIN
11543# ifdef __cplusplus
11544 extern "C"
11545# endif
11546 int F77_DUMMY_MAIN() { return 1; }
11547#endif
11548int
11549main ()
11550{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011551/* The GNU C library defines this for functions which it implements
11552 to always fail with ENOSYS. Some functions are actually named
11553 something starting with __ and the normal name is an alias. */
11554#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11555choke me
11556#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011557f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011558#endif
11559
Martin v. Löwis11437992002-04-12 09:54:03 +000011560 ;
11561 return 0;
11562}
11563_ACEOF
11564rm -f conftest.$ac_objext conftest$ac_exeext
11565if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11566 (eval $ac_link) 2>&5
11567 ac_status=$?
11568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11569 (exit $ac_status); } &&
11570 { ac_try='test -s conftest$ac_exeext'
11571 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11572 (eval $ac_try) 2>&5
11573 ac_status=$?
11574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11575 (exit $ac_status); }; }; then
11576 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011577else
Martin v. Löwis11437992002-04-12 09:54:03 +000011578 echo "$as_me: failed program was:" >&5
11579cat conftest.$ac_ext >&5
11580eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011581fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011582rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011583fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011584echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11585echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11586if test `eval echo '${'$as_ac_var'}'` = yes; then
11587 cat >>confdefs.h <<_ACEOF
11588#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11589_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011590
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011591else
Martin v. Löwis11437992002-04-12 09:54:03 +000011592 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
11593echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
11594if test "${ac_cv_lib_util_openpty+set}" = set; then
11595 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011596else
Martin v. Löwis11437992002-04-12 09:54:03 +000011597 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011598LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011599cat >conftest.$ac_ext <<_ACEOF
11600#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011601#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011602
Fred Drake8cef4cf2000-06-28 16:40:38 +000011603/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011604#ifdef __cplusplus
11605extern "C"
11606#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011607/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011608 builtin and then its argument prototype would still apply. */
11609char openpty ();
11610#ifdef F77_DUMMY_MAIN
11611# ifdef __cplusplus
11612 extern "C"
11613# endif
11614 int F77_DUMMY_MAIN() { return 1; }
11615#endif
11616int
11617main ()
11618{
11619openpty ();
11620 ;
11621 return 0;
11622}
11623_ACEOF
11624rm -f conftest.$ac_objext conftest$ac_exeext
11625if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11626 (eval $ac_link) 2>&5
11627 ac_status=$?
11628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11629 (exit $ac_status); } &&
11630 { ac_try='test -s conftest$ac_exeext'
11631 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11632 (eval $ac_try) 2>&5
11633 ac_status=$?
11634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11635 (exit $ac_status); }; }; then
11636 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011637else
Martin v. Löwis11437992002-04-12 09:54:03 +000011638 echo "$as_me: failed program was:" >&5
11639cat conftest.$ac_ext >&5
11640ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011641fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011642rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11643LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011644fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011645echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
11646echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
11647if test $ac_cv_lib_util_openpty = yes; then
11648 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011649#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011650_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011651 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011652fi
11653
11654fi
11655done
11656
Martin v. Löwis11437992002-04-12 09:54:03 +000011657
Fred Drake8cef4cf2000-06-28 16:40:38 +000011658for ac_func in forkpty
11659do
Martin v. Löwis11437992002-04-12 09:54:03 +000011660as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11661echo "$as_me:$LINENO: checking for $ac_func" >&5
11662echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11663if eval "test \"\${$as_ac_var+set}\" = set"; then
11664 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011665else
Martin v. Löwis11437992002-04-12 09:54:03 +000011666 cat >conftest.$ac_ext <<_ACEOF
11667#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011668#include "confdefs.h"
11669/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011670 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000011671#include <assert.h>
11672/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011673#ifdef __cplusplus
11674extern "C"
11675#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011676/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011677 builtin and then its argument prototype would still apply. */
11678char $ac_func ();
11679char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000011680
Martin v. Löwis11437992002-04-12 09:54:03 +000011681#ifdef F77_DUMMY_MAIN
11682# ifdef __cplusplus
11683 extern "C"
11684# endif
11685 int F77_DUMMY_MAIN() { return 1; }
11686#endif
11687int
11688main ()
11689{
Fred Drake8cef4cf2000-06-28 16:40:38 +000011690/* The GNU C library defines this for functions which it implements
11691 to always fail with ENOSYS. Some functions are actually named
11692 something starting with __ and the normal name is an alias. */
11693#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11694choke me
11695#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011696f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000011697#endif
11698
Martin v. Löwis11437992002-04-12 09:54:03 +000011699 ;
11700 return 0;
11701}
11702_ACEOF
11703rm -f conftest.$ac_objext conftest$ac_exeext
11704if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11705 (eval $ac_link) 2>&5
11706 ac_status=$?
11707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11708 (exit $ac_status); } &&
11709 { ac_try='test -s conftest$ac_exeext'
11710 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11711 (eval $ac_try) 2>&5
11712 ac_status=$?
11713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11714 (exit $ac_status); }; }; then
11715 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011716else
Martin v. Löwis11437992002-04-12 09:54:03 +000011717 echo "$as_me: failed program was:" >&5
11718cat conftest.$ac_ext >&5
11719eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011720fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011721rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011722fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011723echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11724echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11725if test `eval echo '${'$as_ac_var'}'` = yes; then
11726 cat >>confdefs.h <<_ACEOF
11727#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11728_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011729
Fred Drake8cef4cf2000-06-28 16:40:38 +000011730else
Martin v. Löwis11437992002-04-12 09:54:03 +000011731 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
11732echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
11733if test "${ac_cv_lib_util_forkpty+set}" = set; then
11734 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011735else
Martin v. Löwis11437992002-04-12 09:54:03 +000011736 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011737LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011738cat >conftest.$ac_ext <<_ACEOF
11739#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011740#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011741
Fred Drake8cef4cf2000-06-28 16:40:38 +000011742/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011743#ifdef __cplusplus
11744extern "C"
11745#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011746/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011747 builtin and then its argument prototype would still apply. */
11748char forkpty ();
11749#ifdef F77_DUMMY_MAIN
11750# ifdef __cplusplus
11751 extern "C"
11752# endif
11753 int F77_DUMMY_MAIN() { return 1; }
11754#endif
11755int
11756main ()
11757{
11758forkpty ();
11759 ;
11760 return 0;
11761}
11762_ACEOF
11763rm -f conftest.$ac_objext conftest$ac_exeext
11764if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11765 (eval $ac_link) 2>&5
11766 ac_status=$?
11767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11768 (exit $ac_status); } &&
11769 { ac_try='test -s conftest$ac_exeext'
11770 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11771 (eval $ac_try) 2>&5
11772 ac_status=$?
11773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11774 (exit $ac_status); }; }; then
11775 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011776else
Martin v. Löwis11437992002-04-12 09:54:03 +000011777 echo "$as_me: failed program was:" >&5
11778cat conftest.$ac_ext >&5
11779ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011780fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011781rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11782LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011783fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011784echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
11785echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
11786if test $ac_cv_lib_util_forkpty = yes; then
11787 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011788#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011789_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011790 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011791fi
11792
11793fi
11794done
11795
Jack Jansendd19cf82001-12-06 22:36:17 +000011796
Michael W. Hudson54241132001-12-07 15:38:26 +000011797# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011798
11799
11800
11801
11802
11803
Fred Drake8cef4cf2000-06-28 16:40:38 +000011804for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
11805do
Martin v. Löwis11437992002-04-12 09:54:03 +000011806as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11807echo "$as_me:$LINENO: checking for $ac_func" >&5
11808echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11809if eval "test \"\${$as_ac_var+set}\" = set"; then
11810 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011811else
Martin v. Löwis11437992002-04-12 09:54:03 +000011812 cat >conftest.$ac_ext <<_ACEOF
11813#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011814#include "confdefs.h"
11815/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011816 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011817#include <assert.h>
11818/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011819#ifdef __cplusplus
11820extern "C"
11821#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011822/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011823 builtin and then its argument prototype would still apply. */
11824char $ac_func ();
11825char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011826
Martin v. Löwis11437992002-04-12 09:54:03 +000011827#ifdef F77_DUMMY_MAIN
11828# ifdef __cplusplus
11829 extern "C"
11830# endif
11831 int F77_DUMMY_MAIN() { return 1; }
11832#endif
11833int
11834main ()
11835{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011836/* The GNU C library defines this for functions which it implements
11837 to always fail with ENOSYS. Some functions are actually named
11838 something starting with __ and the normal name is an alias. */
11839#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11840choke me
11841#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011842f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011843#endif
11844
Martin v. Löwis11437992002-04-12 09:54:03 +000011845 ;
11846 return 0;
11847}
11848_ACEOF
11849rm -f conftest.$ac_objext conftest$ac_exeext
11850if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11851 (eval $ac_link) 2>&5
11852 ac_status=$?
11853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11854 (exit $ac_status); } &&
11855 { ac_try='test -s conftest$ac_exeext'
11856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11857 (eval $ac_try) 2>&5
11858 ac_status=$?
11859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11860 (exit $ac_status); }; }; then
11861 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011862else
Martin v. Löwis11437992002-04-12 09:54:03 +000011863 echo "$as_me: failed program was:" >&5
11864cat conftest.$ac_ext >&5
11865eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011866fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011867rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011868fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011869echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11870echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11871if test `eval echo '${'$as_ac_var'}'` = yes; then
11872 cat >>confdefs.h <<_ACEOF
11873#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11874_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011875
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011876fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011877done
11878
Michael W. Hudson54241132001-12-07 15:38:26 +000011879
Martin v. Löwis11437992002-04-12 09:54:03 +000011880
11881
11882
11883
11884
Martin v. Löwis1142de32002-03-29 16:28:31 +000011885for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000011886do
Martin v. Löwis11437992002-04-12 09:54:03 +000011887as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11888echo "$as_me:$LINENO: checking for $ac_func" >&5
11889echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11890if eval "test \"\${$as_ac_var+set}\" = set"; then
11891 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011892else
Martin v. Löwis11437992002-04-12 09:54:03 +000011893 cat >conftest.$ac_ext <<_ACEOF
11894#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011895#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011896/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011897 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011898#include <assert.h>
11899/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011900#ifdef __cplusplus
11901extern "C"
11902#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011903/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011904 builtin and then its argument prototype would still apply. */
11905char $ac_func ();
11906char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011907
Martin v. Löwis11437992002-04-12 09:54:03 +000011908#ifdef F77_DUMMY_MAIN
11909# ifdef __cplusplus
11910 extern "C"
11911# endif
11912 int F77_DUMMY_MAIN() { return 1; }
11913#endif
11914int
11915main ()
11916{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011917/* The GNU C library defines this for functions which it implements
11918 to always fail with ENOSYS. Some functions are actually named
11919 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011920#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011921choke me
11922#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011923f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011924#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011925
Martin v. Löwis11437992002-04-12 09:54:03 +000011926 ;
11927 return 0;
11928}
11929_ACEOF
11930rm -f conftest.$ac_objext conftest$ac_exeext
11931if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11932 (eval $ac_link) 2>&5
11933 ac_status=$?
11934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11935 (exit $ac_status); } &&
11936 { ac_try='test -s conftest$ac_exeext'
11937 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11938 (eval $ac_try) 2>&5
11939 ac_status=$?
11940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11941 (exit $ac_status); }; }; then
11942 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011943else
Martin v. Löwis11437992002-04-12 09:54:03 +000011944 echo "$as_me: failed program was:" >&5
11945cat conftest.$ac_ext >&5
11946eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011947fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011948rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000011949fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011950echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11951echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11952if test `eval echo '${'$as_ac_var'}'` = yes; then
11953 cat >>confdefs.h <<_ACEOF
11954#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11955_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000011956
Martin v. Löwis1142de32002-03-29 16:28:31 +000011957else
Martin v. Löwis11437992002-04-12 09:54:03 +000011958 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011959fi
11960done
11961
11962
Martin v. Löwis11437992002-04-12 09:54:03 +000011963
Martin v. Löwis1142de32002-03-29 16:28:31 +000011964for ac_func in getpgrp
11965do
Martin v. Löwis11437992002-04-12 09:54:03 +000011966as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11967echo "$as_me:$LINENO: checking for $ac_func" >&5
11968echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11969if eval "test \"\${$as_ac_var+set}\" = set"; then
11970 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000011971else
Martin v. Löwis11437992002-04-12 09:54:03 +000011972 cat >conftest.$ac_ext <<_ACEOF
11973#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011974#include "confdefs.h"
11975/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011976 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000011977#include <assert.h>
11978/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011979#ifdef __cplusplus
11980extern "C"
11981#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000011982/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011983 builtin and then its argument prototype would still apply. */
11984char $ac_func ();
11985char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000011986
Martin v. Löwis11437992002-04-12 09:54:03 +000011987#ifdef F77_DUMMY_MAIN
11988# ifdef __cplusplus
11989 extern "C"
11990# endif
11991 int F77_DUMMY_MAIN() { return 1; }
11992#endif
11993int
11994main ()
11995{
Martin v. Löwis1142de32002-03-29 16:28:31 +000011996/* The GNU C library defines this for functions which it implements
11997 to always fail with ENOSYS. Some functions are actually named
11998 something starting with __ and the normal name is an alias. */
11999#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12000choke me
12001#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012002f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000012003#endif
12004
Martin v. Löwis11437992002-04-12 09:54:03 +000012005 ;
12006 return 0;
12007}
12008_ACEOF
12009rm -f conftest.$ac_objext conftest$ac_exeext
12010if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12011 (eval $ac_link) 2>&5
12012 ac_status=$?
12013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12014 (exit $ac_status); } &&
12015 { ac_try='test -s conftest$ac_exeext'
12016 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12017 (eval $ac_try) 2>&5
12018 ac_status=$?
12019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12020 (exit $ac_status); }; }; then
12021 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012022else
Martin v. Löwis11437992002-04-12 09:54:03 +000012023 echo "$as_me: failed program was:" >&5
12024cat conftest.$ac_ext >&5
12025eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012026fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012027rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012028fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012029echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12030echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12031if test `eval echo '${'$as_ac_var'}'` = yes; then
12032 cat >>confdefs.h <<_ACEOF
12033#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12034_ACEOF
12035 cat >conftest.$ac_ext <<_ACEOF
12036#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012037#include "confdefs.h"
12038#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012039#ifdef F77_DUMMY_MAIN
12040# ifdef __cplusplus
12041 extern "C"
12042# endif
12043 int F77_DUMMY_MAIN() { return 1; }
12044#endif
12045int
12046main ()
12047{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012048getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012049 ;
12050 return 0;
12051}
12052_ACEOF
12053rm -f conftest.$ac_objext
12054if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12055 (eval $ac_compile) 2>&5
12056 ac_status=$?
12057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12058 (exit $ac_status); } &&
12059 { ac_try='test -s conftest.$ac_objext'
12060 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12061 (eval $ac_try) 2>&5
12062 ac_status=$?
12063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12064 (exit $ac_status); }; }; then
12065
12066cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012067#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012068_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012069
Martin v. Löwis11437992002-04-12 09:54:03 +000012070
Guido van Rossumf78abae1997-01-21 22:02:36 +000012071else
Martin v. Löwis11437992002-04-12 09:54:03 +000012072 echo "$as_me: failed program was:" >&5
12073cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000012074fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012075rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012076
Guido van Rossum627b2d71993-12-24 10:39:16 +000012077fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012078done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012079
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012080echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
12081echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
12082if test "${ac_cv_func_setpgrp_void+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012083 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012084else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012085 if test "$cross_compiling" = yes; then
12086 { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5
12087echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;}
12088 { (exit 1); exit 1; }; }
12089else
Martin v. Löwis11437992002-04-12 09:54:03 +000012090 cat >conftest.$ac_ext <<_ACEOF
12091#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012092#include "confdefs.h"
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012093#if HAVE_UNISTD_H
12094# include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012095#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012096
Martin v. Löwis11437992002-04-12 09:54:03 +000012097#ifdef F77_DUMMY_MAIN
12098# ifdef __cplusplus
12099 extern "C"
12100# endif
12101 int F77_DUMMY_MAIN() { return 1; }
12102#endif
12103int
12104main ()
12105{
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012106/* If this system has a BSD-style setpgrp which takes arguments,
12107 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
12108 exit successfully. */
12109 exit (setpgrp (1,1) == -1 ? 0 : 1);
Martin v. Löwis11437992002-04-12 09:54:03 +000012110 ;
12111 return 0;
12112}
12113_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012114rm -f conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000012115if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12116 (eval $ac_link) 2>&5
12117 ac_status=$?
12118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012119 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012120 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12121 (eval $ac_try) 2>&5
12122 ac_status=$?
12123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12124 (exit $ac_status); }; }; then
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012125 ac_cv_func_setpgrp_void=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012126else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012127 echo "$as_me: program exited with status $ac_status" >&5
12128echo "$as_me: failed program was:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012129cat conftest.$ac_ext >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012130( exit $ac_status )
12131ac_cv_func_setpgrp_void=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012132fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012133rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012134fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012135fi
12136echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
12137echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
12138if test $ac_cv_func_setpgrp_void = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012139
12140cat >>confdefs.h <<\_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012141#define SETPGRP_VOID 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012142_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012143
12144fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012145
Martin v. Löwis11437992002-04-12 09:54:03 +000012146
Thomas Wouters3a584202000-08-05 23:28:51 +000012147for ac_func in gettimeofday
12148do
Martin v. Löwis11437992002-04-12 09:54:03 +000012149as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12150echo "$as_me:$LINENO: checking for $ac_func" >&5
12151echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12152if eval "test \"\${$as_ac_var+set}\" = set"; then
12153 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012154else
Martin v. Löwis11437992002-04-12 09:54:03 +000012155 cat >conftest.$ac_ext <<_ACEOF
12156#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012157#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012158/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012159 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012160#include <assert.h>
12161/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012162#ifdef __cplusplus
12163extern "C"
12164#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012165/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012166 builtin and then its argument prototype would still apply. */
12167char $ac_func ();
12168char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012169
Martin v. Löwis11437992002-04-12 09:54:03 +000012170#ifdef F77_DUMMY_MAIN
12171# ifdef __cplusplus
12172 extern "C"
12173# endif
12174 int F77_DUMMY_MAIN() { return 1; }
12175#endif
12176int
12177main ()
12178{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012179/* The GNU C library defines this for functions which it implements
12180 to always fail with ENOSYS. Some functions are actually named
12181 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012182#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012183choke me
12184#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012185f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012186#endif
12187
Martin v. Löwis11437992002-04-12 09:54:03 +000012188 ;
12189 return 0;
12190}
12191_ACEOF
12192rm -f conftest.$ac_objext conftest$ac_exeext
12193if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12194 (eval $ac_link) 2>&5
12195 ac_status=$?
12196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12197 (exit $ac_status); } &&
12198 { ac_try='test -s conftest$ac_exeext'
12199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12200 (eval $ac_try) 2>&5
12201 ac_status=$?
12202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12203 (exit $ac_status); }; }; then
12204 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012205else
Martin v. Löwis11437992002-04-12 09:54:03 +000012206 echo "$as_me: failed program was:" >&5
12207cat conftest.$ac_ext >&5
12208eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012209fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012210rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012211fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012212echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12213echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12214if test `eval echo '${'$as_ac_var'}'` = yes; then
12215 cat >>confdefs.h <<_ACEOF
12216#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12217_ACEOF
12218 cat >conftest.$ac_ext <<_ACEOF
12219#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012220#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012221#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012222#ifdef F77_DUMMY_MAIN
12223# ifdef __cplusplus
12224 extern "C"
12225# endif
12226 int F77_DUMMY_MAIN() { return 1; }
12227#endif
12228int
12229main ()
12230{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012231gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012232 ;
12233 return 0;
12234}
12235_ACEOF
12236rm -f conftest.$ac_objext
12237if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12238 (eval $ac_compile) 2>&5
12239 ac_status=$?
12240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12241 (exit $ac_status); } &&
12242 { ac_try='test -s conftest.$ac_objext'
12243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12244 (eval $ac_try) 2>&5
12245 ac_status=$?
12246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12247 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000012248 :
12249else
Martin v. Löwis11437992002-04-12 09:54:03 +000012250 echo "$as_me: failed program was:" >&5
12251cat conftest.$ac_ext >&5
12252
12253cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012254#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012255_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012256
Martin v. Löwis11437992002-04-12 09:54:03 +000012257
Guido van Rossum627b2d71993-12-24 10:39:16 +000012258fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012259rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012260
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012261fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012262done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012263
Michael W. Hudson54241132001-12-07 15:38:26 +000012264
12265
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012266# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012267# for [no]getaddrinfo in netdb.h.
12268echo "$as_me:$LINENO: checking for getaddrinfo" >&5
12269echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
12270cat >conftest.$ac_ext <<_ACEOF
12271#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012272#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012273
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012274#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012275#include <sys/socket.h>
12276#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012277#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012278
Martin v. Löwis11437992002-04-12 09:54:03 +000012279#ifdef F77_DUMMY_MAIN
12280# ifdef __cplusplus
12281 extern "C"
12282# endif
12283 int F77_DUMMY_MAIN() { return 1; }
12284#endif
12285int
12286main ()
12287{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012288
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012289getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012290
Martin v. Löwis11437992002-04-12 09:54:03 +000012291 ;
12292 return 0;
12293}
12294_ACEOF
12295rm -f conftest.$ac_objext conftest$ac_exeext
12296if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12297 (eval $ac_link) 2>&5
12298 ac_status=$?
12299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12300 (exit $ac_status); } &&
12301 { ac_try='test -s conftest$ac_exeext'
12302 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12303 (eval $ac_try) 2>&5
12304 ac_status=$?
12305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12306 (exit $ac_status); }; }; then
12307
12308echo "$as_me:$LINENO: result: yes" >&5
12309echo "${ECHO_T}yes" >&6
12310echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
12311echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012312if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012313 echo "$as_me:$LINENO: result: buggy" >&5
12314echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012315buggygetaddrinfo=yes
12316else
Martin v. Löwis11437992002-04-12 09:54:03 +000012317 cat >conftest.$ac_ext <<_ACEOF
12318#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012319#include "confdefs.h"
12320
12321#include <sys/types.h>
12322#include <netdb.h>
12323#include <string.h>
12324#include <sys/socket.h>
12325#include <netinet/in.h>
12326
12327main()
12328{
12329 int passive, gaierr, inet4 = 0, inet6 = 0;
12330 struct addrinfo hints, *ai, *aitop;
12331 char straddr[INET6_ADDRSTRLEN], strport[16];
12332
12333 for (passive = 0; passive <= 1; passive++) {
12334 memset(&hints, 0, sizeof(hints));
12335 hints.ai_family = AF_UNSPEC;
12336 hints.ai_flags = passive ? AI_PASSIVE : 0;
12337 hints.ai_socktype = SOCK_STREAM;
12338 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12339 (void)gai_strerror(gaierr);
12340 goto bad;
12341 }
12342 for (ai = aitop; ai; ai = ai->ai_next) {
12343 if (ai->ai_addr == NULL ||
12344 ai->ai_addrlen == 0 ||
12345 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12346 straddr, sizeof(straddr), strport, sizeof(strport),
12347 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12348 goto bad;
12349 }
12350 switch (ai->ai_family) {
12351 case AF_INET:
12352 if (strcmp(strport, "54321") != 0) {
12353 goto bad;
12354 }
12355 if (passive) {
12356 if (strcmp(straddr, "0.0.0.0") != 0) {
12357 goto bad;
12358 }
12359 } else {
12360 if (strcmp(straddr, "127.0.0.1") != 0) {
12361 goto bad;
12362 }
12363 }
12364 inet4++;
12365 break;
12366 case AF_INET6:
12367 if (strcmp(strport, "54321") != 0) {
12368 goto bad;
12369 }
12370 if (passive) {
12371 if (strcmp(straddr, "::") != 0) {
12372 goto bad;
12373 }
12374 } else {
12375 if (strcmp(straddr, "::1") != 0) {
12376 goto bad;
12377 }
12378 }
12379 inet6++;
12380 break;
12381 case AF_UNSPEC:
12382 goto bad;
12383 break;
12384 default:
12385 /* another family support? */
12386 break;
12387 }
12388 }
12389 }
12390
12391 if (!(inet4 == 0 || inet4 == 2))
12392 goto bad;
12393 if (!(inet6 == 0 || inet6 == 2))
12394 goto bad;
12395
12396 if (aitop)
12397 freeaddrinfo(aitop);
12398 exit(0);
12399
12400 bad:
12401 if (aitop)
12402 freeaddrinfo(aitop);
12403 exit(1);
12404}
12405
Martin v. Löwis11437992002-04-12 09:54:03 +000012406_ACEOF
12407rm -f conftest$ac_exeext
12408if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12409 (eval $ac_link) 2>&5
12410 ac_status=$?
12411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12412 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12413 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12414 (eval $ac_try) 2>&5
12415 ac_status=$?
12416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12417 (exit $ac_status); }; }; then
12418 echo "$as_me:$LINENO: result: good" >&5
12419echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012420buggygetaddrinfo=no
12421else
Martin v. Löwis11437992002-04-12 09:54:03 +000012422 echo "$as_me: program exited with status $ac_status" >&5
12423echo "$as_me: failed program was:" >&5
12424cat conftest.$ac_ext >&5
12425( exit $ac_status )
12426echo "$as_me:$LINENO: result: buggy" >&5
12427echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012428buggygetaddrinfo=yes
12429fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012430rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012431fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012432else
Martin v. Löwis11437992002-04-12 09:54:03 +000012433 echo "$as_me: failed program was:" >&5
12434cat conftest.$ac_ext >&5
12435
12436echo "$as_me:$LINENO: result: no" >&5
12437echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012438buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012439
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012440fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012441rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012442
12443if test "$buggygetaddrinfo" = "yes"; then
12444 if test "$ipv6" = "yes"; then
12445 echo 'Fatal: You must get working getaddrinfo() function.'
12446 echo ' or you can specify "--disable-ipv6"'.
12447 exit 1
12448 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012449else
Martin v. Löwis11437992002-04-12 09:54:03 +000012450
12451cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012452#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012453_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012454
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012455fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012456
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012457for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012458do
Martin v. Löwis11437992002-04-12 09:54:03 +000012459as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12460echo "$as_me:$LINENO: checking for $ac_func" >&5
12461echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12462if eval "test \"\${$as_ac_var+set}\" = set"; then
12463 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012464else
Martin v. Löwis11437992002-04-12 09:54:03 +000012465 cat >conftest.$ac_ext <<_ACEOF
12466#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012467#include "confdefs.h"
12468/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012469 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012470#include <assert.h>
12471/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012472#ifdef __cplusplus
12473extern "C"
12474#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012475/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012476 builtin and then its argument prototype would still apply. */
12477char $ac_func ();
12478char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012479
Martin v. Löwis11437992002-04-12 09:54:03 +000012480#ifdef F77_DUMMY_MAIN
12481# ifdef __cplusplus
12482 extern "C"
12483# endif
12484 int F77_DUMMY_MAIN() { return 1; }
12485#endif
12486int
12487main ()
12488{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012489/* The GNU C library defines this for functions which it implements
12490 to always fail with ENOSYS. Some functions are actually named
12491 something starting with __ and the normal name is an alias. */
12492#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12493choke me
12494#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012495f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012496#endif
12497
Martin v. Löwis11437992002-04-12 09:54:03 +000012498 ;
12499 return 0;
12500}
12501_ACEOF
12502rm -f conftest.$ac_objext conftest$ac_exeext
12503if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12504 (eval $ac_link) 2>&5
12505 ac_status=$?
12506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12507 (exit $ac_status); } &&
12508 { ac_try='test -s conftest$ac_exeext'
12509 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12510 (eval $ac_try) 2>&5
12511 ac_status=$?
12512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12513 (exit $ac_status); }; }; then
12514 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012515else
Martin v. Löwis11437992002-04-12 09:54:03 +000012516 echo "$as_me: failed program was:" >&5
12517cat conftest.$ac_ext >&5
12518eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012519fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012520rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012521fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012522echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12523echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12524if test `eval echo '${'$as_ac_var'}'` = yes; then
12525 cat >>confdefs.h <<_ACEOF
12526#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12527_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012528
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012529fi
12530done
12531
Michael W. Hudson54241132001-12-07 15:38:26 +000012532
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012533# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000012534echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
12535echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12536if test "${ac_cv_header_time+set}" = set; then
12537 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012538else
Martin v. Löwis11437992002-04-12 09:54:03 +000012539 cat >conftest.$ac_ext <<_ACEOF
12540#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012541#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012542#include <sys/types.h>
12543#include <sys/time.h>
12544#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012545
12546#ifdef F77_DUMMY_MAIN
12547# ifdef __cplusplus
12548 extern "C"
12549# endif
12550 int F77_DUMMY_MAIN() { return 1; }
12551#endif
12552int
12553main ()
12554{
12555if ((struct tm *) 0)
12556return 0;
12557 ;
12558 return 0;
12559}
12560_ACEOF
12561rm -f conftest.$ac_objext
12562if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12563 (eval $ac_compile) 2>&5
12564 ac_status=$?
12565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12566 (exit $ac_status); } &&
12567 { ac_try='test -s conftest.$ac_objext'
12568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12569 (eval $ac_try) 2>&5
12570 ac_status=$?
12571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12572 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012573 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012574else
Martin v. Löwis11437992002-04-12 09:54:03 +000012575 echo "$as_me: failed program was:" >&5
12576cat conftest.$ac_ext >&5
12577ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012578fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012579rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012580fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012581echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
12582echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012583if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012584
12585cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012586#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012587_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012588
12589fi
12590
Martin v. Löwis11437992002-04-12 09:54:03 +000012591echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
12592echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
12593if test "${ac_cv_struct_tm+set}" = set; then
12594 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012595else
Martin v. Löwis11437992002-04-12 09:54:03 +000012596 cat >conftest.$ac_ext <<_ACEOF
12597#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012598#include "confdefs.h"
12599#include <sys/types.h>
12600#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012601
12602#ifdef F77_DUMMY_MAIN
12603# ifdef __cplusplus
12604 extern "C"
12605# endif
12606 int F77_DUMMY_MAIN() { return 1; }
12607#endif
12608int
12609main ()
12610{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012611struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000012612 ;
12613 return 0;
12614}
12615_ACEOF
12616rm -f conftest.$ac_objext
12617if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12618 (eval $ac_compile) 2>&5
12619 ac_status=$?
12620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12621 (exit $ac_status); } &&
12622 { ac_try='test -s conftest.$ac_objext'
12623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12624 (eval $ac_try) 2>&5
12625 ac_status=$?
12626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12627 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012628 ac_cv_struct_tm=time.h
12629else
Martin v. Löwis11437992002-04-12 09:54:03 +000012630 echo "$as_me: failed program was:" >&5
12631cat conftest.$ac_ext >&5
12632ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012633fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012634rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012635fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012636echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
12637echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012638if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012639
12640cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012641#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012642_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012643
12644fi
12645
Martin v. Löwis11437992002-04-12 09:54:03 +000012646echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
12647echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
12648if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
12649 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012650else
Martin v. Löwis11437992002-04-12 09:54:03 +000012651 cat >conftest.$ac_ext <<_ACEOF
12652#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012653#include "confdefs.h"
12654#include <sys/types.h>
12655#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012656
12657
12658#ifdef F77_DUMMY_MAIN
12659# ifdef __cplusplus
12660 extern "C"
12661# endif
12662 int F77_DUMMY_MAIN() { return 1; }
12663#endif
12664int
12665main ()
12666{
12667static struct tm ac_aggr;
12668if (ac_aggr.tm_zone)
12669return 0;
12670 ;
12671 return 0;
12672}
12673_ACEOF
12674rm -f conftest.$ac_objext
12675if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12676 (eval $ac_compile) 2>&5
12677 ac_status=$?
12678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12679 (exit $ac_status); } &&
12680 { ac_try='test -s conftest.$ac_objext'
12681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12682 (eval $ac_try) 2>&5
12683 ac_status=$?
12684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12685 (exit $ac_status); }; }; then
12686 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012687else
Martin v. Löwis11437992002-04-12 09:54:03 +000012688 echo "$as_me: failed program was:" >&5
12689cat conftest.$ac_ext >&5
12690ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012691fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012692rm -f conftest.$ac_objext conftest.$ac_ext
12693fi
12694echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
12695echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
12696if test $ac_cv_member_struct_tm_tm_zone = yes; then
12697
12698cat >>confdefs.h <<_ACEOF
12699#define HAVE_STRUCT_TM_TM_ZONE 1
12700_ACEOF
12701
12702
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012703fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012704
Martin v. Löwis11437992002-04-12 09:54:03 +000012705if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12706
12707cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012708#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012709_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012710
12711else
Martin v. Löwis11437992002-04-12 09:54:03 +000012712 echo "$as_me:$LINENO: checking for tzname" >&5
12713echo $ECHO_N "checking for tzname... $ECHO_C" >&6
12714if test "${ac_cv_var_tzname+set}" = set; then
12715 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012716else
Martin v. Löwis11437992002-04-12 09:54:03 +000012717 cat >conftest.$ac_ext <<_ACEOF
12718#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012719#include "confdefs.h"
12720#include <time.h>
12721#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012722extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012723#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012724
12725#ifdef F77_DUMMY_MAIN
12726# ifdef __cplusplus
12727 extern "C"
12728# endif
12729 int F77_DUMMY_MAIN() { return 1; }
12730#endif
12731int
12732main ()
12733{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012734atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000012735 ;
12736 return 0;
12737}
12738_ACEOF
12739rm -f conftest.$ac_objext conftest$ac_exeext
12740if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12741 (eval $ac_link) 2>&5
12742 ac_status=$?
12743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12744 (exit $ac_status); } &&
12745 { ac_try='test -s conftest$ac_exeext'
12746 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12747 (eval $ac_try) 2>&5
12748 ac_status=$?
12749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12750 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012751 ac_cv_var_tzname=yes
12752else
Martin v. Löwis11437992002-04-12 09:54:03 +000012753 echo "$as_me: failed program was:" >&5
12754cat conftest.$ac_ext >&5
12755ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012756fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012757rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012758fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012759echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
12760echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012761 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012762
12763cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012764#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012765_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012766
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012767 fi
12768fi
12769
Jack Jansendd19cf82001-12-06 22:36:17 +000012770
Martin v. Löwis11437992002-04-12 09:54:03 +000012771echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
12772echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
12773if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
12774 echo $ECHO_N "(cached) $ECHO_C" >&6
12775else
12776 cat >conftest.$ac_ext <<_ACEOF
12777#line $LINENO "configure"
12778#include "confdefs.h"
12779$ac_includes_default
12780#ifdef F77_DUMMY_MAIN
12781# ifdef __cplusplus
12782 extern "C"
12783# endif
12784 int F77_DUMMY_MAIN() { return 1; }
12785#endif
12786int
12787main ()
12788{
12789static struct stat ac_aggr;
12790if (ac_aggr.st_rdev)
12791return 0;
12792 ;
12793 return 0;
12794}
12795_ACEOF
12796rm -f conftest.$ac_objext
12797if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12798 (eval $ac_compile) 2>&5
12799 ac_status=$?
12800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12801 (exit $ac_status); } &&
12802 { ac_try='test -s conftest.$ac_objext'
12803 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12804 (eval $ac_try) 2>&5
12805 ac_status=$?
12806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12807 (exit $ac_status); }; }; then
12808 ac_cv_member_struct_stat_st_rdev=yes
12809else
12810 echo "$as_me: failed program was:" >&5
12811cat conftest.$ac_ext >&5
12812ac_cv_member_struct_stat_st_rdev=no
12813fi
12814rm -f conftest.$ac_objext conftest.$ac_ext
12815fi
12816echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
12817echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
12818if test $ac_cv_member_struct_stat_st_rdev = yes; then
12819
12820cat >>confdefs.h <<_ACEOF
12821#define HAVE_STRUCT_STAT_ST_RDEV 1
12822_ACEOF
12823
12824
12825cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012826#define HAVE_ST_RDEV 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012827_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012828
12829fi
12830
Martin v. Löwis11437992002-04-12 09:54:03 +000012831
12832
12833echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
12834echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
12835if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
12836 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012837else
Martin v. Löwis11437992002-04-12 09:54:03 +000012838 cat >conftest.$ac_ext <<_ACEOF
12839#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012840#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012841$ac_includes_default
12842#ifdef F77_DUMMY_MAIN
12843# ifdef __cplusplus
12844 extern "C"
12845# endif
12846 int F77_DUMMY_MAIN() { return 1; }
12847#endif
12848int
12849main ()
12850{
12851static struct stat ac_aggr;
12852if (ac_aggr.st_blksize)
12853return 0;
12854 ;
12855 return 0;
12856}
12857_ACEOF
12858rm -f conftest.$ac_objext
12859if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12860 (eval $ac_compile) 2>&5
12861 ac_status=$?
12862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12863 (exit $ac_status); } &&
12864 { ac_try='test -s conftest.$ac_objext'
12865 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12866 (eval $ac_try) 2>&5
12867 ac_status=$?
12868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12869 (exit $ac_status); }; }; then
12870 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012871else
Martin v. Löwis11437992002-04-12 09:54:03 +000012872 echo "$as_me: failed program was:" >&5
12873cat conftest.$ac_ext >&5
12874ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012875fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012876rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012877fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012878echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
12879echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
12880if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000012881
Martin v. Löwis11437992002-04-12 09:54:03 +000012882cat >>confdefs.h <<_ACEOF
12883#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12884_ACEOF
12885
12886
12887cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012888#define HAVE_ST_BLKSIZE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012889_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012890
12891fi
12892
Martin v. Löwis11437992002-04-12 09:54:03 +000012893
12894echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
12895echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
12896if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
12897 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012898else
Martin v. Löwis11437992002-04-12 09:54:03 +000012899 cat >conftest.$ac_ext <<_ACEOF
12900#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012901#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012902$ac_includes_default
12903#ifdef F77_DUMMY_MAIN
12904# ifdef __cplusplus
12905 extern "C"
12906# endif
12907 int F77_DUMMY_MAIN() { return 1; }
12908#endif
12909int
12910main ()
12911{
12912static struct stat ac_aggr;
12913if (ac_aggr.st_blocks)
12914return 0;
12915 ;
12916 return 0;
12917}
12918_ACEOF
12919rm -f conftest.$ac_objext
12920if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12921 (eval $ac_compile) 2>&5
12922 ac_status=$?
12923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12924 (exit $ac_status); } &&
12925 { ac_try='test -s conftest.$ac_objext'
12926 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12927 (eval $ac_try) 2>&5
12928 ac_status=$?
12929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12930 (exit $ac_status); }; }; then
12931 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012932else
Martin v. Löwis11437992002-04-12 09:54:03 +000012933 echo "$as_me: failed program was:" >&5
12934cat conftest.$ac_ext >&5
12935ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012936fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012937rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012938fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012939echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
12940echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
12941if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000012942
Martin v. Löwis11437992002-04-12 09:54:03 +000012943cat >>confdefs.h <<_ACEOF
12944#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12945_ACEOF
12946
12947
12948cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012949#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012950_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012951
12952else
Martin v. Löwis11437992002-04-12 09:54:03 +000012953 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012954fi
12955
Michael W. Hudson54241132001-12-07 15:38:26 +000012956
Martin v. Löwis11437992002-04-12 09:54:03 +000012957
12958echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
12959echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
12960if test "${ac_cv_header_time_altzone+set}" = set; then
12961 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012962else
Martin v. Löwis11437992002-04-12 09:54:03 +000012963 cat >conftest.$ac_ext <<_ACEOF
12964#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012965#include "confdefs.h"
12966#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012967#ifdef F77_DUMMY_MAIN
12968# ifdef __cplusplus
12969 extern "C"
12970# endif
12971 int F77_DUMMY_MAIN() { return 1; }
12972#endif
12973int
12974main ()
12975{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012976return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012977 ;
12978 return 0;
12979}
12980_ACEOF
12981rm -f conftest.$ac_objext
12982if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12983 (eval $ac_compile) 2>&5
12984 ac_status=$?
12985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12986 (exit $ac_status); } &&
12987 { ac_try='test -s conftest.$ac_objext'
12988 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12989 (eval $ac_try) 2>&5
12990 ac_status=$?
12991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12992 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012993 ac_cv_header_time_altzone=yes
12994else
Martin v. Löwis11437992002-04-12 09:54:03 +000012995 echo "$as_me: failed program was:" >&5
12996cat conftest.$ac_ext >&5
12997ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012998fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012999rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013000fi
13001
Martin v. Löwis11437992002-04-12 09:54:03 +000013002echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
13003echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013004if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013005
13006cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013007#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013008_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013009
13010fi
13011
Guido van Rossumda88dad1995-01-26 00:46:29 +000013012was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013013echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
13014echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
13015cat >conftest.$ac_ext <<_ACEOF
13016#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013017#include "confdefs.h"
13018
13019#include <sys/types.h>
13020#include <sys/select.h>
13021#include <sys/time.h>
13022
Martin v. Löwis11437992002-04-12 09:54:03 +000013023#ifdef F77_DUMMY_MAIN
13024# ifdef __cplusplus
13025 extern "C"
13026# endif
13027 int F77_DUMMY_MAIN() { return 1; }
13028#endif
13029int
13030main ()
13031{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013032;
Martin v. Löwis11437992002-04-12 09:54:03 +000013033 ;
13034 return 0;
13035}
13036_ACEOF
13037rm -f conftest.$ac_objext
13038if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13039 (eval $ac_compile) 2>&5
13040 ac_status=$?
13041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13042 (exit $ac_status); } &&
13043 { ac_try='test -s conftest.$ac_objext'
13044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13045 (eval $ac_try) 2>&5
13046 ac_status=$?
13047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13048 (exit $ac_status); }; }; then
13049
13050
13051cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013052#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013053_ACEOF
13054
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013055 was_it_defined=yes
13056
Guido van Rossumf78abae1997-01-21 22:02:36 +000013057else
Martin v. Löwis11437992002-04-12 09:54:03 +000013058 echo "$as_me: failed program was:" >&5
13059cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013060fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013061rm -f conftest.$ac_objext conftest.$ac_ext
13062echo "$as_me:$LINENO: result: $was_it_defined" >&5
13063echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013064
Martin v. Löwis11437992002-04-12 09:54:03 +000013065echo "$as_me:$LINENO: checking for addrinfo" >&5
13066echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
13067if test "${ac_cv_struct_addrinfo+set}" = set; then
13068 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013069else
Martin v. Löwis11437992002-04-12 09:54:03 +000013070 cat >conftest.$ac_ext <<_ACEOF
13071#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013072#include "confdefs.h"
13073
13074# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013075#ifdef F77_DUMMY_MAIN
13076# ifdef __cplusplus
13077 extern "C"
13078# endif
13079 int F77_DUMMY_MAIN() { return 1; }
13080#endif
13081int
13082main ()
13083{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013084struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013085 ;
13086 return 0;
13087}
13088_ACEOF
13089rm -f conftest.$ac_objext
13090if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13091 (eval $ac_compile) 2>&5
13092 ac_status=$?
13093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13094 (exit $ac_status); } &&
13095 { ac_try='test -s conftest.$ac_objext'
13096 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13097 (eval $ac_try) 2>&5
13098 ac_status=$?
13099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13100 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013101 ac_cv_struct_addrinfo=yes
13102else
Martin v. Löwis11437992002-04-12 09:54:03 +000013103 echo "$as_me: failed program was:" >&5
13104cat conftest.$ac_ext >&5
13105ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013106fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013107rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013108fi
13109
Martin v. Löwis11437992002-04-12 09:54:03 +000013110echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
13111echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013112if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013113
13114cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013115#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013116_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013117
13118fi
13119
Martin v. Löwis11437992002-04-12 09:54:03 +000013120echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
13121echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
13122if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
13123 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013124else
Martin v. Löwis11437992002-04-12 09:54:03 +000013125 cat >conftest.$ac_ext <<_ACEOF
13126#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013127#include "confdefs.h"
13128
13129# include <sys/types.h>
13130# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013131#ifdef F77_DUMMY_MAIN
13132# ifdef __cplusplus
13133 extern "C"
13134# endif
13135 int F77_DUMMY_MAIN() { return 1; }
13136#endif
13137int
13138main ()
13139{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013140struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013141 ;
13142 return 0;
13143}
13144_ACEOF
13145rm -f conftest.$ac_objext
13146if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13147 (eval $ac_compile) 2>&5
13148 ac_status=$?
13149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13150 (exit $ac_status); } &&
13151 { ac_try='test -s conftest.$ac_objext'
13152 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13153 (eval $ac_try) 2>&5
13154 ac_status=$?
13155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13156 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013157 ac_cv_struct_sockaddr_storage=yes
13158else
Martin v. Löwis11437992002-04-12 09:54:03 +000013159 echo "$as_me: failed program was:" >&5
13160cat conftest.$ac_ext >&5
13161ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013162fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013163rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013164fi
13165
Martin v. Löwis11437992002-04-12 09:54:03 +000013166echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
13167echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013168if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013169
13170cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013171#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013172_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013173
13174fi
13175
Guido van Rossum627b2d71993-12-24 10:39:16 +000013176# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013177
Michael W. Hudson54241132001-12-07 15:38:26 +000013178
Martin v. Löwis11437992002-04-12 09:54:03 +000013179echo "$as_me:$LINENO: checking whether char is unsigned" >&5
13180echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
13181if test "${ac_cv_c_char_unsigned+set}" = set; then
13182 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013183else
Martin v. Löwis11437992002-04-12 09:54:03 +000013184 cat >conftest.$ac_ext <<_ACEOF
13185#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000013186#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013187$ac_includes_default
13188#ifdef F77_DUMMY_MAIN
13189# ifdef __cplusplus
13190 extern "C"
13191# endif
13192 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013193#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013194int
13195main ()
13196{
13197static int test_array [1 - 2 * !(((char) -1) < 0)];
13198test_array [0] = 0
13199
13200 ;
13201 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013202}
Martin v. Löwis11437992002-04-12 09:54:03 +000013203_ACEOF
13204rm -f conftest.$ac_objext
13205if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13206 (eval $ac_compile) 2>&5
13207 ac_status=$?
13208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13209 (exit $ac_status); } &&
13210 { ac_try='test -s conftest.$ac_objext'
13211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13212 (eval $ac_try) 2>&5
13213 ac_status=$?
13214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13215 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000013216 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013217else
13218 echo "$as_me: failed program was:" >&5
13219cat conftest.$ac_ext >&5
13220ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013221fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013222rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013223fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013224echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
13225echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013226if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013227 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013228#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013229_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013230
13231fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013232
Martin v. Löwis11437992002-04-12 09:54:03 +000013233echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
13234echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13235if test "${ac_cv_prog_cc_stdc+set}" = set; then
13236 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013237else
Martin v. Löwis11437992002-04-12 09:54:03 +000013238 ac_cv_prog_cc_stdc=no
13239ac_save_CC=$CC
13240cat >conftest.$ac_ext <<_ACEOF
13241#line $LINENO "configure"
13242#include "confdefs.h"
13243#include <stdarg.h>
13244#include <stdio.h>
13245#include <sys/types.h>
13246#include <sys/stat.h>
13247/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
13248struct buf { int x; };
13249FILE * (*rcsopen) (struct buf *, struct stat *, int);
13250static char *e (p, i)
13251 char **p;
13252 int i;
13253{
13254 return p[i];
13255}
13256static char *f (char * (*g) (char **, int), char **p, ...)
13257{
13258 char *s;
13259 va_list v;
13260 va_start (v,p);
13261 s = g (p, va_arg (v,int));
13262 va_end (v);
13263 return s;
13264}
13265int test (int i, double x);
13266struct s1 {int (*f) (int a);};
13267struct s2 {int (*f) (double a);};
13268int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13269int argc;
13270char **argv;
13271#ifdef F77_DUMMY_MAIN
13272# ifdef __cplusplus
13273 extern "C"
13274# endif
13275 int F77_DUMMY_MAIN() { return 1; }
13276#endif
13277int
13278main ()
13279{
13280return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
13281 ;
13282 return 0;
13283}
13284_ACEOF
13285# Don't try gcc -ansi; that turns off useful extensions and
13286# breaks some systems' header files.
13287# AIX -qlanglvl=ansi
13288# Ultrix and OSF/1 -std1
13289# HP-UX 10.20 and later -Ae
13290# HP-UX older versions -Aa -D_HPUX_SOURCE
13291# SVR4 -Xc -D__EXTENSIONS__
13292for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13293do
13294 CC="$ac_save_CC $ac_arg"
13295 rm -f conftest.$ac_objext
13296if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13297 (eval $ac_compile) 2>&5
13298 ac_status=$?
13299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13300 (exit $ac_status); } &&
13301 { ac_try='test -s conftest.$ac_objext'
13302 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13303 (eval $ac_try) 2>&5
13304 ac_status=$?
13305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13306 (exit $ac_status); }; }; then
13307 ac_cv_prog_cc_stdc=$ac_arg
13308break
13309else
13310 echo "$as_me: failed program was:" >&5
13311cat conftest.$ac_ext >&5
13312fi
13313rm -f conftest.$ac_objext
13314done
13315rm -f conftest.$ac_ext conftest.$ac_objext
13316CC=$ac_save_CC
13317
13318fi
13319
13320case "x$ac_cv_prog_cc_stdc" in
13321 x|xno)
13322 echo "$as_me:$LINENO: result: none needed" >&5
13323echo "${ECHO_T}none needed" >&6 ;;
13324 *)
13325 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
13326echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13327 CC="$CC $ac_cv_prog_cc_stdc" ;;
13328esac
13329
13330echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
13331echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13332if test "${ac_cv_c_const+set}" = set; then
13333 echo $ECHO_N "(cached) $ECHO_C" >&6
13334else
13335 cat >conftest.$ac_ext <<_ACEOF
13336#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013337#include "confdefs.h"
13338
Martin v. Löwis11437992002-04-12 09:54:03 +000013339#ifdef F77_DUMMY_MAIN
13340# ifdef __cplusplus
13341 extern "C"
13342# endif
13343 int F77_DUMMY_MAIN() { return 1; }
13344#endif
13345int
13346main ()
13347{
13348/* FIXME: Include the comments suggested by Paul. */
13349#ifndef __cplusplus
13350 /* Ultrix mips cc rejects this. */
13351 typedef int charset[2];
13352 const charset x;
13353 /* SunOS 4.1.1 cc rejects this. */
13354 char const *const *ccp;
13355 char **p;
13356 /* NEC SVR4.0.2 mips cc rejects this. */
13357 struct point {int x, y;};
13358 static struct point const zero = {0,0};
13359 /* AIX XL C 1.02.0.0 rejects this.
13360 It does not let you subtract one const X* pointer from another in
13361 an arm of an if-expression whose if-part is not a constant
13362 expression */
13363 const char *g = "string";
13364 ccp = &g + (g ? g-g : 0);
13365 /* HPUX 7.0 cc rejects these. */
13366 ++ccp;
13367 p = (char**) ccp;
13368 ccp = (char const *const *) p;
13369 { /* SCO 3.2v4 cc rejects this. */
13370 char *t;
13371 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013372
Martin v. Löwis11437992002-04-12 09:54:03 +000013373 *t++ = 0;
13374 }
13375 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13376 int x[] = {25, 17};
13377 const int *foo = &x[0];
13378 ++foo;
13379 }
13380 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13381 typedef const int *iptr;
13382 iptr p = 0;
13383 ++p;
13384 }
13385 { /* AIX XL C 1.02.0.0 rejects this saying
13386 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13387 struct s { int j; const int *ap[3]; };
13388 struct s *b; b->j = 5;
13389 }
13390 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13391 const int foo = 10;
13392 }
13393#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013394
Martin v. Löwis11437992002-04-12 09:54:03 +000013395 ;
13396 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013397}
Martin v. Löwis11437992002-04-12 09:54:03 +000013398_ACEOF
13399rm -f conftest.$ac_objext
13400if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13401 (eval $ac_compile) 2>&5
13402 ac_status=$?
13403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13404 (exit $ac_status); } &&
13405 { ac_try='test -s conftest.$ac_objext'
13406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13407 (eval $ac_try) 2>&5
13408 ac_status=$?
13409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13410 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013411 ac_cv_c_const=yes
13412else
Martin v. Löwis11437992002-04-12 09:54:03 +000013413 echo "$as_me: failed program was:" >&5
13414cat conftest.$ac_ext >&5
13415ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013416fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013417rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013418fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013419echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
13420echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013421if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013422
13423cat >>confdefs.h <<\_ACEOF
13424#define const
13425_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013426
13427fi
13428
Michael W. Hudson54241132001-12-07 15:38:26 +000013429
Guido van Rossumda88dad1995-01-26 00:46:29 +000013430works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013431echo "$as_me:$LINENO: checking for working volatile" >&5
13432echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
13433cat >conftest.$ac_ext <<_ACEOF
13434#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013435#include "confdefs.h"
13436
Martin v. Löwis11437992002-04-12 09:54:03 +000013437#ifdef F77_DUMMY_MAIN
13438# ifdef __cplusplus
13439 extern "C"
13440# endif
13441 int F77_DUMMY_MAIN() { return 1; }
13442#endif
13443int
13444main ()
13445{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013446volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013447 ;
13448 return 0;
13449}
13450_ACEOF
13451rm -f conftest.$ac_objext
13452if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13453 (eval $ac_compile) 2>&5
13454 ac_status=$?
13455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13456 (exit $ac_status); } &&
13457 { ac_try='test -s conftest.$ac_objext'
13458 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13459 (eval $ac_try) 2>&5
13460 ac_status=$?
13461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13462 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013463 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013464else
Martin v. Löwis11437992002-04-12 09:54:03 +000013465 echo "$as_me: failed program was:" >&5
13466cat conftest.$ac_ext >&5
13467
13468cat >>confdefs.h <<\_ACEOF
13469#define volatile
13470_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013471
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013472
Guido van Rossum627b2d71993-12-24 10:39:16 +000013473fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013474rm -f conftest.$ac_objext conftest.$ac_ext
13475echo "$as_me:$LINENO: result: $works" >&5
13476echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013477
Guido van Rossumda88dad1995-01-26 00:46:29 +000013478works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013479echo "$as_me:$LINENO: checking for working signed char" >&5
13480echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
13481cat >conftest.$ac_ext <<_ACEOF
13482#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013483#include "confdefs.h"
13484
Martin v. Löwis11437992002-04-12 09:54:03 +000013485#ifdef F77_DUMMY_MAIN
13486# ifdef __cplusplus
13487 extern "C"
13488# endif
13489 int F77_DUMMY_MAIN() { return 1; }
13490#endif
13491int
13492main ()
13493{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013494signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013495 ;
13496 return 0;
13497}
13498_ACEOF
13499rm -f conftest.$ac_objext
13500if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13501 (eval $ac_compile) 2>&5
13502 ac_status=$?
13503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13504 (exit $ac_status); } &&
13505 { ac_try='test -s conftest.$ac_objext'
13506 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13507 (eval $ac_try) 2>&5
13508 ac_status=$?
13509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13510 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013511 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013512else
Martin v. Löwis11437992002-04-12 09:54:03 +000013513 echo "$as_me: failed program was:" >&5
13514cat conftest.$ac_ext >&5
13515
13516cat >>confdefs.h <<\_ACEOF
13517#define signed
13518_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000013519
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013520
Guido van Rossum7f43da71994-08-01 12:15:30 +000013521fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013522rm -f conftest.$ac_objext conftest.$ac_ext
13523echo "$as_me:$LINENO: result: $works" >&5
13524echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013525
Guido van Rossumda88dad1995-01-26 00:46:29 +000013526have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013527echo "$as_me:$LINENO: checking for prototypes" >&5
13528echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
13529cat >conftest.$ac_ext <<_ACEOF
13530#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013531#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013532int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013533#ifdef F77_DUMMY_MAIN
13534# ifdef __cplusplus
13535 extern "C"
13536# endif
13537 int F77_DUMMY_MAIN() { return 1; }
13538#endif
13539int
13540main ()
13541{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013542return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013543 ;
13544 return 0;
13545}
13546_ACEOF
13547rm -f conftest.$ac_objext
13548if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13549 (eval $ac_compile) 2>&5
13550 ac_status=$?
13551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13552 (exit $ac_status); } &&
13553 { ac_try='test -s conftest.$ac_objext'
13554 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13555 (eval $ac_try) 2>&5
13556 ac_status=$?
13557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13558 (exit $ac_status); }; }; then
13559
13560
13561cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013562#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013563_ACEOF
13564
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013565 have_prototypes=yes
13566
Guido van Rossumf78abae1997-01-21 22:02:36 +000013567else
Martin v. Löwis11437992002-04-12 09:54:03 +000013568 echo "$as_me: failed program was:" >&5
13569cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013570fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013571rm -f conftest.$ac_objext conftest.$ac_ext
13572echo "$as_me:$LINENO: result: $have_prototypes" >&5
13573echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013574
Guido van Rossumda88dad1995-01-26 00:46:29 +000013575works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013576echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
13577echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
13578cat >conftest.$ac_ext <<_ACEOF
13579#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013580#include "confdefs.h"
13581
13582#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013583int foo(int x, ...) {
13584 va_list va;
13585 va_start(va, x);
13586 va_arg(va, int);
13587 va_arg(va, char *);
13588 va_arg(va, double);
13589 return 0;
13590}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013591
Martin v. Löwis11437992002-04-12 09:54:03 +000013592#ifdef F77_DUMMY_MAIN
13593# ifdef __cplusplus
13594 extern "C"
13595# endif
13596 int F77_DUMMY_MAIN() { return 1; }
13597#endif
13598int
13599main ()
13600{
Guido van Rossum90eea071996-08-30 20:58:57 +000013601return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013602 ;
13603 return 0;
13604}
13605_ACEOF
13606rm -f conftest.$ac_objext
13607if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13608 (eval $ac_compile) 2>&5
13609 ac_status=$?
13610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13611 (exit $ac_status); } &&
13612 { ac_try='test -s conftest.$ac_objext'
13613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13614 (eval $ac_try) 2>&5
13615 ac_status=$?
13616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13617 (exit $ac_status); }; }; then
13618
13619
13620cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013621#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013622_ACEOF
13623
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013624 works=yes
13625
Guido van Rossumf78abae1997-01-21 22:02:36 +000013626else
Martin v. Löwis11437992002-04-12 09:54:03 +000013627 echo "$as_me: failed program was:" >&5
13628cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000013629fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013630rm -f conftest.$ac_objext conftest.$ac_ext
13631echo "$as_me:$LINENO: result: $works" >&5
13632echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013633
Guido van Rossumda88dad1995-01-26 00:46:29 +000013634if test "$have_prototypes" = yes; then
13635bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013636echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
13637echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
13638cat >conftest.$ac_ext <<_ACEOF
13639#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013640#include "confdefs.h"
13641#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013642#ifdef F77_DUMMY_MAIN
13643# ifdef __cplusplus
13644 extern "C"
13645# endif
13646 int F77_DUMMY_MAIN() { return 1; }
13647#endif
13648int
13649main ()
13650{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013651char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000013652 ;
13653 return 0;
13654}
13655_ACEOF
13656rm -f conftest.$ac_objext
13657if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13658 (eval $ac_compile) 2>&5
13659 ac_status=$?
13660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13661 (exit $ac_status); } &&
13662 { ac_try='test -s conftest.$ac_objext'
13663 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13664 (eval $ac_try) 2>&5
13665 ac_status=$?
13666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13667 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000013668 :
13669else
Martin v. Löwis11437992002-04-12 09:54:03 +000013670 echo "$as_me: failed program was:" >&5
13671cat conftest.$ac_ext >&5
13672
13673cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013674#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013675_ACEOF
13676
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013677 bad_prototypes=yes
13678
Guido van Rossum627b2d71993-12-24 10:39:16 +000013679fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013680rm -f conftest.$ac_objext conftest.$ac_ext
13681echo "$as_me:$LINENO: result: $bad_prototypes" >&5
13682echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013683fi
13684
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013685# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000013686echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
13687echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
13688cat >conftest.$ac_ext <<_ACEOF
13689#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013690#include "confdefs.h"
13691#include <sys/types.h>
13692#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013693#ifdef F77_DUMMY_MAIN
13694# ifdef __cplusplus
13695 extern "C"
13696# endif
13697 int F77_DUMMY_MAIN() { return 1; }
13698#endif
13699int
13700main ()
13701{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013702struct sockaddr x;
13703x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013704 ;
13705 return 0;
13706}
13707_ACEOF
13708rm -f conftest.$ac_objext
13709if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13710 (eval $ac_compile) 2>&5
13711 ac_status=$?
13712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13713 (exit $ac_status); } &&
13714 { ac_try='test -s conftest.$ac_objext'
13715 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13716 (eval $ac_try) 2>&5
13717 ac_status=$?
13718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13719 (exit $ac_status); }; }; then
13720 echo "$as_me:$LINENO: result: yes" >&5
13721echo "${ECHO_T}yes" >&6
13722
13723cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013724#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013725_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013726
13727else
Martin v. Löwis11437992002-04-12 09:54:03 +000013728 echo "$as_me: failed program was:" >&5
13729cat conftest.$ac_ext >&5
13730echo "$as_me:$LINENO: result: no" >&5
13731echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013732fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013733rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013734
Guido van Rossumda88dad1995-01-26 00:46:29 +000013735va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013736echo "$as_me:$LINENO: checking whether va_list is an array" >&5
13737echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
13738cat >conftest.$ac_ext <<_ACEOF
13739#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013740#include "confdefs.h"
13741
13742#ifdef HAVE_STDARG_PROTOTYPES
13743#include <stdarg.h>
13744#else
13745#include <varargs.h>
13746#endif
13747
Martin v. Löwis11437992002-04-12 09:54:03 +000013748#ifdef F77_DUMMY_MAIN
13749# ifdef __cplusplus
13750 extern "C"
13751# endif
13752 int F77_DUMMY_MAIN() { return 1; }
13753#endif
13754int
13755main ()
13756{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013757va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013758 ;
13759 return 0;
13760}
13761_ACEOF
13762rm -f conftest.$ac_objext
13763if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13764 (eval $ac_compile) 2>&5
13765 ac_status=$?
13766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13767 (exit $ac_status); } &&
13768 { ac_try='test -s conftest.$ac_objext'
13769 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13770 (eval $ac_try) 2>&5
13771 ac_status=$?
13772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13773 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013774 :
13775else
Martin v. Löwis11437992002-04-12 09:54:03 +000013776 echo "$as_me: failed program was:" >&5
13777cat conftest.$ac_ext >&5
13778
13779
13780cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013781#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013782_ACEOF
13783
Guido van Rossumda88dad1995-01-26 00:46:29 +000013784 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013785
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013786fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013787rm -f conftest.$ac_objext conftest.$ac_ext
13788echo "$as_me:$LINENO: result: $va_list_is_array" >&5
13789echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013790
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013791# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013792
13793
13794
13795echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
13796echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
13797if test "${ac_cv_func_gethostbyname_r+set}" = set; then
13798 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013799else
Martin v. Löwis11437992002-04-12 09:54:03 +000013800 cat >conftest.$ac_ext <<_ACEOF
13801#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013802#include "confdefs.h"
13803/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013804 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013805#include <assert.h>
13806/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013807#ifdef __cplusplus
13808extern "C"
13809#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013810/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013811 builtin and then its argument prototype would still apply. */
13812char gethostbyname_r ();
13813char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013814
Martin v. Löwis11437992002-04-12 09:54:03 +000013815#ifdef F77_DUMMY_MAIN
13816# ifdef __cplusplus
13817 extern "C"
13818# endif
13819 int F77_DUMMY_MAIN() { return 1; }
13820#endif
13821int
13822main ()
13823{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013824/* The GNU C library defines this for functions which it implements
13825 to always fail with ENOSYS. Some functions are actually named
13826 something starting with __ and the normal name is an alias. */
13827#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
13828choke me
13829#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013830f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013831#endif
13832
Martin v. Löwis11437992002-04-12 09:54:03 +000013833 ;
13834 return 0;
13835}
13836_ACEOF
13837rm -f conftest.$ac_objext conftest$ac_exeext
13838if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13839 (eval $ac_link) 2>&5
13840 ac_status=$?
13841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13842 (exit $ac_status); } &&
13843 { ac_try='test -s conftest$ac_exeext'
13844 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13845 (eval $ac_try) 2>&5
13846 ac_status=$?
13847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13848 (exit $ac_status); }; }; then
13849 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013850else
Martin v. Löwis11437992002-04-12 09:54:03 +000013851 echo "$as_me: failed program was:" >&5
13852cat conftest.$ac_ext >&5
13853ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013854fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013855rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013856fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013857echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
13858echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
13859if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013860
Martin v. Löwis11437992002-04-12 09:54:03 +000013861 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013862#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013863_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013864
Martin v. Löwis11437992002-04-12 09:54:03 +000013865 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
13866echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013867 OLD_CFLAGS=$CFLAGS
13868 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013869 cat >conftest.$ac_ext <<_ACEOF
13870#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013871#include "confdefs.h"
13872
13873# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013874
13875#ifdef F77_DUMMY_MAIN
13876# ifdef __cplusplus
13877 extern "C"
13878# endif
13879 int F77_DUMMY_MAIN() { return 1; }
13880#endif
13881int
13882main ()
13883{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013884
13885 char *name;
13886 struct hostent *he, *res;
13887 char buffer[2048];
13888 int buflen = 2048;
13889 int h_errnop;
13890
13891 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013892
13893 ;
13894 return 0;
13895}
13896_ACEOF
13897rm -f conftest.$ac_objext
13898if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13899 (eval $ac_compile) 2>&5
13900 ac_status=$?
13901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13902 (exit $ac_status); } &&
13903 { ac_try='test -s conftest.$ac_objext'
13904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13905 (eval $ac_try) 2>&5
13906 ac_status=$?
13907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13908 (exit $ac_status); }; }; then
13909
13910 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013911#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013912_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013913
Martin v. Löwis11437992002-04-12 09:54:03 +000013914
13915cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013916#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013917_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013918
Martin v. Löwis11437992002-04-12 09:54:03 +000013919 echo "$as_me:$LINENO: result: yes" >&5
13920echo "${ECHO_T}yes" >&6
13921
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013922else
Martin v. Löwis11437992002-04-12 09:54:03 +000013923 echo "$as_me: failed program was:" >&5
13924cat conftest.$ac_ext >&5
13925
13926 echo "$as_me:$LINENO: result: no" >&5
13927echo "${ECHO_T}no" >&6
13928 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
13929echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
13930 cat >conftest.$ac_ext <<_ACEOF
13931#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013932#include "confdefs.h"
13933
13934# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013935
13936#ifdef F77_DUMMY_MAIN
13937# ifdef __cplusplus
13938 extern "C"
13939# endif
13940 int F77_DUMMY_MAIN() { return 1; }
13941#endif
13942int
13943main ()
13944{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013945
13946 char *name;
13947 struct hostent *he;
13948 char buffer[2048];
13949 int buflen = 2048;
13950 int h_errnop;
13951
13952 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013953
13954 ;
13955 return 0;
13956}
13957_ACEOF
13958rm -f conftest.$ac_objext
13959if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13960 (eval $ac_compile) 2>&5
13961 ac_status=$?
13962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13963 (exit $ac_status); } &&
13964 { ac_try='test -s conftest.$ac_objext'
13965 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13966 (eval $ac_try) 2>&5
13967 ac_status=$?
13968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13969 (exit $ac_status); }; }; then
13970
13971 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013972#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013973_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013974
Martin v. Löwis11437992002-04-12 09:54:03 +000013975
13976cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013977#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013978_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013979
Martin v. Löwis11437992002-04-12 09:54:03 +000013980 echo "$as_me:$LINENO: result: yes" >&5
13981echo "${ECHO_T}yes" >&6
13982
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013983else
Martin v. Löwis11437992002-04-12 09:54:03 +000013984 echo "$as_me: failed program was:" >&5
13985cat conftest.$ac_ext >&5
13986
13987 echo "$as_me:$LINENO: result: no" >&5
13988echo "${ECHO_T}no" >&6
13989 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
13990echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
13991 cat >conftest.$ac_ext <<_ACEOF
13992#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013993#include "confdefs.h"
13994
13995# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013996
13997#ifdef F77_DUMMY_MAIN
13998# ifdef __cplusplus
13999 extern "C"
14000# endif
14001 int F77_DUMMY_MAIN() { return 1; }
14002#endif
14003int
14004main ()
14005{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014006
14007 char *name;
14008 struct hostent *he;
14009 struct hostent_data data;
14010
14011 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000014012
14013 ;
14014 return 0;
14015}
14016_ACEOF
14017rm -f conftest.$ac_objext
14018if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14019 (eval $ac_compile) 2>&5
14020 ac_status=$?
14021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14022 (exit $ac_status); } &&
14023 { ac_try='test -s conftest.$ac_objext'
14024 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14025 (eval $ac_try) 2>&5
14026 ac_status=$?
14027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14028 (exit $ac_status); }; }; then
14029
14030 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014031#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014032_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014033
Martin v. Löwis11437992002-04-12 09:54:03 +000014034
14035cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014036#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014037_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014038
Martin v. Löwis11437992002-04-12 09:54:03 +000014039 echo "$as_me:$LINENO: result: yes" >&5
14040echo "${ECHO_T}yes" >&6
14041
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014042else
Martin v. Löwis11437992002-04-12 09:54:03 +000014043 echo "$as_me: failed program was:" >&5
14044cat conftest.$ac_ext >&5
14045
14046 echo "$as_me:$LINENO: result: no" >&5
14047echo "${ECHO_T}no" >&6
14048
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014049fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014050rm -f conftest.$ac_objext conftest.$ac_ext
14051
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014052fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014053rm -f conftest.$ac_objext conftest.$ac_ext
14054
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014055fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014056rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014057 CFLAGS=$OLD_CFLAGS
14058
14059else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014060
Martin v. Löwis11437992002-04-12 09:54:03 +000014061
14062for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000014063do
Martin v. Löwis11437992002-04-12 09:54:03 +000014064as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14065echo "$as_me:$LINENO: checking for $ac_func" >&5
14066echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14067if eval "test \"\${$as_ac_var+set}\" = set"; then
14068 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014069else
Martin v. Löwis11437992002-04-12 09:54:03 +000014070 cat >conftest.$ac_ext <<_ACEOF
14071#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014072#include "confdefs.h"
14073/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014074 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014075#include <assert.h>
14076/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014077#ifdef __cplusplus
14078extern "C"
14079#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014080/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014081 builtin and then its argument prototype would still apply. */
14082char $ac_func ();
14083char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014084
Martin v. Löwis11437992002-04-12 09:54:03 +000014085#ifdef F77_DUMMY_MAIN
14086# ifdef __cplusplus
14087 extern "C"
14088# endif
14089 int F77_DUMMY_MAIN() { return 1; }
14090#endif
14091int
14092main ()
14093{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014094/* The GNU C library defines this for functions which it implements
14095 to always fail with ENOSYS. Some functions are actually named
14096 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014097#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014098choke me
14099#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014100f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014101#endif
14102
Martin v. Löwis11437992002-04-12 09:54:03 +000014103 ;
14104 return 0;
14105}
14106_ACEOF
14107rm -f conftest.$ac_objext conftest$ac_exeext
14108if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14109 (eval $ac_link) 2>&5
14110 ac_status=$?
14111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14112 (exit $ac_status); } &&
14113 { ac_try='test -s conftest$ac_exeext'
14114 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14115 (eval $ac_try) 2>&5
14116 ac_status=$?
14117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14118 (exit $ac_status); }; }; then
14119 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014120else
Martin v. Löwis11437992002-04-12 09:54:03 +000014121 echo "$as_me: failed program was:" >&5
14122cat conftest.$ac_ext >&5
14123eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014124fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014125rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014126fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014127echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14128echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14129if test `eval echo '${'$as_ac_var'}'` = yes; then
14130 cat >>confdefs.h <<_ACEOF
14131#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14132_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014133
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014134fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014135done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014136
Michael W. Hudson54241132001-12-07 15:38:26 +000014137
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014138fi
14139
Michael W. Hudson54241132001-12-07 15:38:26 +000014140
14141
14142
14143
14144
14145
Guido van Rossum627b2d71993-12-24 10:39:16 +000014146# checks for system services
14147# (none yet)
14148
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014149# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000014150echo "$as_me:$LINENO: checking for __fpu_control" >&5
14151echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
14152if test "${ac_cv_func___fpu_control+set}" = set; then
14153 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014154else
Martin v. Löwis11437992002-04-12 09:54:03 +000014155 cat >conftest.$ac_ext <<_ACEOF
14156#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014157#include "confdefs.h"
14158/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014159 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014160#include <assert.h>
14161/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014162#ifdef __cplusplus
14163extern "C"
14164#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014165/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014166 builtin and then its argument prototype would still apply. */
14167char __fpu_control ();
14168char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014169
Martin v. Löwis11437992002-04-12 09:54:03 +000014170#ifdef F77_DUMMY_MAIN
14171# ifdef __cplusplus
14172 extern "C"
14173# endif
14174 int F77_DUMMY_MAIN() { return 1; }
14175#endif
14176int
14177main ()
14178{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014179/* The GNU C library defines this for functions which it implements
14180 to always fail with ENOSYS. Some functions are actually named
14181 something starting with __ and the normal name is an alias. */
14182#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
14183choke me
14184#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014185f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014186#endif
14187
Martin v. Löwis11437992002-04-12 09:54:03 +000014188 ;
14189 return 0;
14190}
14191_ACEOF
14192rm -f conftest.$ac_objext conftest$ac_exeext
14193if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14194 (eval $ac_link) 2>&5
14195 ac_status=$?
14196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14197 (exit $ac_status); } &&
14198 { ac_try='test -s conftest$ac_exeext'
14199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14200 (eval $ac_try) 2>&5
14201 ac_status=$?
14202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14203 (exit $ac_status); }; }; then
14204 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014205else
Martin v. Löwis11437992002-04-12 09:54:03 +000014206 echo "$as_me: failed program was:" >&5
14207cat conftest.$ac_ext >&5
14208ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014209fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014210rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014211fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014212echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
14213echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
14214if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014215 :
14216else
Martin v. Löwis11437992002-04-12 09:54:03 +000014217
14218echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
14219echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
14220if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
14221 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014222else
Martin v. Löwis11437992002-04-12 09:54:03 +000014223 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014224LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014225cat >conftest.$ac_ext <<_ACEOF
14226#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014227#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014228
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014229/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014230#ifdef __cplusplus
14231extern "C"
14232#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014233/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014234 builtin and then its argument prototype would still apply. */
14235char __fpu_control ();
14236#ifdef F77_DUMMY_MAIN
14237# ifdef __cplusplus
14238 extern "C"
14239# endif
14240 int F77_DUMMY_MAIN() { return 1; }
14241#endif
14242int
14243main ()
14244{
14245__fpu_control ();
14246 ;
14247 return 0;
14248}
14249_ACEOF
14250rm -f conftest.$ac_objext conftest$ac_exeext
14251if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14252 (eval $ac_link) 2>&5
14253 ac_status=$?
14254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14255 (exit $ac_status); } &&
14256 { ac_try='test -s conftest$ac_exeext'
14257 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14258 (eval $ac_try) 2>&5
14259 ac_status=$?
14260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14261 (exit $ac_status); }; }; then
14262 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014263else
Martin v. Löwis11437992002-04-12 09:54:03 +000014264 echo "$as_me: failed program was:" >&5
14265cat conftest.$ac_ext >&5
14266ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014267fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014268rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14269LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014270fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014271echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
14272echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
14273if test $ac_cv_lib_ieee___fpu_control = yes; then
14274 cat >>confdefs.h <<_ACEOF
14275#define HAVE_LIBIEEE 1
14276_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014277
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014278 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014279
Guido van Rossum627b2d71993-12-24 10:39:16 +000014280fi
14281
Michael W. Hudson54241132001-12-07 15:38:26 +000014282
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014283fi
14284
Michael W. Hudson54241132001-12-07 15:38:26 +000014285
Guido van Rossum7f253911997-05-09 02:42:48 +000014286# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000014287echo "$as_me:$LINENO: checking for --with-fpectl" >&5
14288echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
14289
Guido van Rossum7f253911997-05-09 02:42:48 +000014290# Check whether --with-fpectl or --without-fpectl was given.
14291if test "${with_fpectl+set}" = set; then
14292 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000014293
Guido van Rossum7f253911997-05-09 02:42:48 +000014294if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000014295then
14296
14297cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000014298#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014299_ACEOF
14300
14301 echo "$as_me:$LINENO: result: yes" >&5
14302echo "${ECHO_T}yes" >&6
14303else echo "$as_me:$LINENO: result: no" >&5
14304echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014305fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014306else
Martin v. Löwis11437992002-04-12 09:54:03 +000014307 echo "$as_me:$LINENO: result: no" >&5
14308echo "${ECHO_T}no" >&6
14309fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000014310
Guido van Rossum7f43da71994-08-01 12:15:30 +000014311# check for --with-libm=...
14312
Guido van Rossum563e7081996-09-10 18:20:48 +000014313case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014314Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014315BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014316*) LIBM=-lm
14317esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014318echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
14319echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
14320
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014321# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014322if test "${with_libm+set}" = set; then
14323 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000014324
Guido van Rossum7f253911997-05-09 02:42:48 +000014325if test "$withval" = no
14326then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000014327 echo "$as_me:$LINENO: result: force LIBM empty" >&5
14328echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014329elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014330then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014331 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
14332echo "${ECHO_T}set LIBM=\"$withval\"" >&6
14333else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
14334echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
14335 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014336fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014337else
Martin v. Löwis11437992002-04-12 09:54:03 +000014338 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
14339echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
14340fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014341
14342# check for --with-libc=...
14343
Martin v. Löwis11437992002-04-12 09:54:03 +000014344echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
14345echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
14346
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014347# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014348if test "${with_libc+set}" = set; then
14349 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000014350
Guido van Rossum7f253911997-05-09 02:42:48 +000014351if test "$withval" = no
14352then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000014353 echo "$as_me:$LINENO: result: force LIBC empty" >&5
14354echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014355elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014356then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014357 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
14358echo "${ECHO_T}set LIBC=\"$withval\"" >&6
14359else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
14360echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
14361 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014362fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014363else
Martin v. Löwis11437992002-04-12 09:54:03 +000014364 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
14365echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
14366fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014367
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014368# check for hypot() in math library
14369LIBS_SAVE=$LIBS
14370LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000014371
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014372for ac_func in hypot
14373do
Martin v. Löwis11437992002-04-12 09:54:03 +000014374as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14375echo "$as_me:$LINENO: checking for $ac_func" >&5
14376echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14377if eval "test \"\${$as_ac_var+set}\" = set"; then
14378 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014379else
Martin v. Löwis11437992002-04-12 09:54:03 +000014380 cat >conftest.$ac_ext <<_ACEOF
14381#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014382#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014383/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014384 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014385#include <assert.h>
14386/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014387#ifdef __cplusplus
14388extern "C"
14389#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014390/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014391 builtin and then its argument prototype would still apply. */
14392char $ac_func ();
14393char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014394
Martin v. Löwis11437992002-04-12 09:54:03 +000014395#ifdef F77_DUMMY_MAIN
14396# ifdef __cplusplus
14397 extern "C"
14398# endif
14399 int F77_DUMMY_MAIN() { return 1; }
14400#endif
14401int
14402main ()
14403{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014404/* The GNU C library defines this for functions which it implements
14405 to always fail with ENOSYS. Some functions are actually named
14406 something starting with __ and the normal name is an alias. */
14407#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14408choke me
14409#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014410f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014411#endif
14412
Martin v. Löwis11437992002-04-12 09:54:03 +000014413 ;
14414 return 0;
14415}
14416_ACEOF
14417rm -f conftest.$ac_objext conftest$ac_exeext
14418if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14419 (eval $ac_link) 2>&5
14420 ac_status=$?
14421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14422 (exit $ac_status); } &&
14423 { ac_try='test -s conftest$ac_exeext'
14424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14425 (eval $ac_try) 2>&5
14426 ac_status=$?
14427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14428 (exit $ac_status); }; }; then
14429 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014430else
Martin v. Löwis11437992002-04-12 09:54:03 +000014431 echo "$as_me: failed program was:" >&5
14432cat conftest.$ac_ext >&5
14433eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014434fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014435rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014436fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014437echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14438echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14439if test `eval echo '${'$as_ac_var'}'` = yes; then
14440 cat >>confdefs.h <<_ACEOF
14441#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14442_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000014443
Michael W. Hudson54241132001-12-07 15:38:26 +000014444else
Martin v. Löwis11437992002-04-12 09:54:03 +000014445 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014446fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014447done
14448
Michael W. Hudson54241132001-12-07 15:38:26 +000014449
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014450LIBS=$LIBS_SAVE
14451
Guido van Rossumad713701997-07-10 22:42:38 +000014452# check whether malloc(0) returns NULL or not
Martin v. Löwis11437992002-04-12 09:54:03 +000014453echo "$as_me:$LINENO: checking what malloc(0) returns" >&5
14454echo $ECHO_N "checking what malloc(0) returns... $ECHO_C" >&6
14455if test "${ac_cv_malloc_zero+set}" = set; then
14456 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014457else
14458 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000014459 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +000014460else
Martin v. Löwis11437992002-04-12 09:54:03 +000014461 cat >conftest.$ac_ext <<_ACEOF
14462#line $LINENO "configure"
Guido van Rossumad713701997-07-10 22:42:38 +000014463#include "confdefs.h"
14464#include <stdio.h>
14465#ifdef HAVE_STDLIB
14466#include <stdlib.h>
14467#else
14468char *malloc(), *realloc();
14469int *free();
14470#endif
14471main() {
14472 char *p;
14473 p = malloc(0);
14474 if (p == NULL) exit(1);
14475 p = realloc(p, 0);
14476 if (p == NULL) exit(1);
14477 free(p);
14478 exit(0);
14479}
Martin v. Löwis11437992002-04-12 09:54:03 +000014480_ACEOF
14481rm -f conftest$ac_exeext
14482if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14483 (eval $ac_link) 2>&5
14484 ac_status=$?
14485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14486 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14487 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14488 (eval $ac_try) 2>&5
14489 ac_status=$?
14490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14491 (exit $ac_status); }; }; then
Guido van Rossumad713701997-07-10 22:42:38 +000014492 ac_cv_malloc_zero=nonnull
14493else
Martin v. Löwis11437992002-04-12 09:54:03 +000014494 echo "$as_me: program exited with status $ac_status" >&5
14495echo "$as_me: failed program was:" >&5
14496cat conftest.$ac_ext >&5
14497( exit $ac_status )
14498ac_cv_malloc_zero=null
Guido van Rossumad713701997-07-10 22:42:38 +000014499fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014500rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumad713701997-07-10 22:42:38 +000014501fi
Guido van Rossumad713701997-07-10 22:42:38 +000014502fi
Guido van Rossum3065c942001-09-17 04:03:14 +000014503 # XXX arm cross-compile?
Martin v. Löwis11437992002-04-12 09:54:03 +000014504echo "$as_me:$LINENO: result: $ac_cv_malloc_zero" >&5
14505echo "${ECHO_T}$ac_cv_malloc_zero" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014506if test "$ac_cv_malloc_zero" = null
14507then
Martin v. Löwis11437992002-04-12 09:54:03 +000014508
14509cat >>confdefs.h <<\_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014510#define MALLOC_ZERO_RETURNS_NULL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014511_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014512
14513fi
14514
Guido van Rossumef2255b2000-03-10 22:30:29 +000014515# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014516if test "${ac_cv_header_wchar_h+set}" = set; then
14517 echo "$as_me:$LINENO: checking for wchar.h" >&5
14518echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14519if test "${ac_cv_header_wchar_h+set}" = set; then
14520 echo $ECHO_N "(cached) $ECHO_C" >&6
14521fi
14522echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14523echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014524else
Martin v. Löwis11437992002-04-12 09:54:03 +000014525 # Is the header compilable?
14526echo "$as_me:$LINENO: checking wchar.h usability" >&5
14527echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
14528cat >conftest.$ac_ext <<_ACEOF
14529#line $LINENO "configure"
14530#include "confdefs.h"
14531$ac_includes_default
14532#include <wchar.h>
14533_ACEOF
14534rm -f conftest.$ac_objext
14535if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14536 (eval $ac_compile) 2>&5
14537 ac_status=$?
14538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14539 (exit $ac_status); } &&
14540 { ac_try='test -s conftest.$ac_objext'
14541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14542 (eval $ac_try) 2>&5
14543 ac_status=$?
14544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14545 (exit $ac_status); }; }; then
14546 ac_header_compiler=yes
14547else
14548 echo "$as_me: failed program was:" >&5
14549cat conftest.$ac_ext >&5
14550ac_header_compiler=no
14551fi
14552rm -f conftest.$ac_objext conftest.$ac_ext
14553echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14554echo "${ECHO_T}$ac_header_compiler" >&6
14555
14556# Is the header present?
14557echo "$as_me:$LINENO: checking wchar.h presence" >&5
14558echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
14559cat >conftest.$ac_ext <<_ACEOF
14560#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014561#include "confdefs.h"
14562#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014563_ACEOF
14564if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14565 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14566 ac_status=$?
14567 egrep -v '^ *\+' conftest.er1 >conftest.err
14568 rm -f conftest.er1
14569 cat conftest.err >&5
14570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14571 (exit $ac_status); } >/dev/null; then
14572 if test -s conftest.err; then
14573 ac_cpp_err=$ac_c_preproc_warn_flag
14574 else
14575 ac_cpp_err=
14576 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014577else
Martin v. Löwis11437992002-04-12 09:54:03 +000014578 ac_cpp_err=yes
14579fi
14580if test -z "$ac_cpp_err"; then
14581 ac_header_preproc=yes
14582else
14583 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000014584 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014585 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014586fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014587rm -f conftest.err conftest.$ac_ext
14588echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14589echo "${ECHO_T}$ac_header_preproc" >&6
14590
14591# So? What about this header?
14592case $ac_header_compiler:$ac_header_preproc in
14593 yes:no )
14594 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
14595echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14596 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14597echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14598 no:yes )
14599 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
14600echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
14601 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
14602echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
14603 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14604echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14605esac
14606echo "$as_me:$LINENO: checking for wchar.h" >&5
14607echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14608if test "${ac_cv_header_wchar_h+set}" = set; then
14609 echo $ECHO_N "(cached) $ECHO_C" >&6
14610else
14611 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000014612fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014613echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14614echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
14615
14616fi
14617if test $ac_cv_header_wchar_h = yes; then
14618
14619
14620cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000014621#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014622_ACEOF
14623
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014624 wchar_h="yes"
14625
Guido van Rossumef2255b2000-03-10 22:30:29 +000014626else
Martin v. Löwis11437992002-04-12 09:54:03 +000014627 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014628
14629fi
14630
Michael W. Hudson54241132001-12-07 15:38:26 +000014631
Martin v. Löwis11437992002-04-12 09:54:03 +000014632
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014633# determine wchar_t size
14634if test "$wchar_h" = yes
14635then
Martin v. Löwis11437992002-04-12 09:54:03 +000014636 echo "$as_me:$LINENO: checking for wchar_t" >&5
14637echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
14638if test "${ac_cv_type_wchar_t+set}" = set; then
14639 echo $ECHO_N "(cached) $ECHO_C" >&6
14640else
14641 cat >conftest.$ac_ext <<_ACEOF
14642#line $LINENO "configure"
14643#include "confdefs.h"
14644#include <wchar.h>
14645
14646#ifdef F77_DUMMY_MAIN
14647# ifdef __cplusplus
14648 extern "C"
14649# endif
14650 int F77_DUMMY_MAIN() { return 1; }
14651#endif
14652int
14653main ()
14654{
14655if ((wchar_t *) 0)
14656 return 0;
14657if (sizeof (wchar_t))
14658 return 0;
14659 ;
14660 return 0;
14661}
14662_ACEOF
14663rm -f conftest.$ac_objext
14664if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14665 (eval $ac_compile) 2>&5
14666 ac_status=$?
14667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14668 (exit $ac_status); } &&
14669 { ac_try='test -s conftest.$ac_objext'
14670 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14671 (eval $ac_try) 2>&5
14672 ac_status=$?
14673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14674 (exit $ac_status); }; }; then
14675 ac_cv_type_wchar_t=yes
14676else
14677 echo "$as_me: failed program was:" >&5
14678cat conftest.$ac_ext >&5
14679ac_cv_type_wchar_t=no
14680fi
14681rm -f conftest.$ac_objext conftest.$ac_ext
14682fi
14683echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
14684echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
14685
14686echo "$as_me:$LINENO: checking size of wchar_t" >&5
14687echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
14688if test "${ac_cv_sizeof_wchar_t+set}" = set; then
14689 echo $ECHO_N "(cached) $ECHO_C" >&6
14690else
14691 if test "$ac_cv_type_wchar_t" = yes; then
14692 # The cast to unsigned long works around a bug in the HP C Compiler
14693 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14694 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14695 # This bug is HP SR number 8606223364.
14696 if test "$cross_compiling" = yes; then
14697 # Depending upon the size, compute the lo and hi bounds.
14698cat >conftest.$ac_ext <<_ACEOF
14699#line $LINENO "configure"
14700#include "confdefs.h"
14701#include <wchar.h>
14702
14703#ifdef F77_DUMMY_MAIN
14704# ifdef __cplusplus
14705 extern "C"
14706# endif
14707 int F77_DUMMY_MAIN() { return 1; }
14708#endif
14709int
14710main ()
14711{
14712static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
14713test_array [0] = 0
14714
14715 ;
14716 return 0;
14717}
14718_ACEOF
14719rm -f conftest.$ac_objext
14720if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14721 (eval $ac_compile) 2>&5
14722 ac_status=$?
14723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14724 (exit $ac_status); } &&
14725 { ac_try='test -s conftest.$ac_objext'
14726 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14727 (eval $ac_try) 2>&5
14728 ac_status=$?
14729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14730 (exit $ac_status); }; }; then
14731 ac_lo=0 ac_mid=0
14732 while :; do
14733 cat >conftest.$ac_ext <<_ACEOF
14734#line $LINENO "configure"
14735#include "confdefs.h"
14736#include <wchar.h>
14737
14738#ifdef F77_DUMMY_MAIN
14739# ifdef __cplusplus
14740 extern "C"
14741# endif
14742 int F77_DUMMY_MAIN() { return 1; }
14743#endif
14744int
14745main ()
14746{
14747static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
14748test_array [0] = 0
14749
14750 ;
14751 return 0;
14752}
14753_ACEOF
14754rm -f conftest.$ac_objext
14755if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14756 (eval $ac_compile) 2>&5
14757 ac_status=$?
14758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14759 (exit $ac_status); } &&
14760 { ac_try='test -s conftest.$ac_objext'
14761 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14762 (eval $ac_try) 2>&5
14763 ac_status=$?
14764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14765 (exit $ac_status); }; }; then
14766 ac_hi=$ac_mid; break
14767else
14768 echo "$as_me: failed program was:" >&5
14769cat conftest.$ac_ext >&5
14770ac_lo=`expr $ac_mid + 1`
14771 if test $ac_lo -le $ac_mid; then
14772 ac_lo= ac_hi=
14773 break
14774 fi
14775 ac_mid=`expr 2 '*' $ac_mid + 1`
14776fi
14777rm -f conftest.$ac_objext conftest.$ac_ext
14778 done
14779else
14780 echo "$as_me: failed program was:" >&5
14781cat conftest.$ac_ext >&5
14782cat >conftest.$ac_ext <<_ACEOF
14783#line $LINENO "configure"
14784#include "confdefs.h"
14785#include <wchar.h>
14786
14787#ifdef F77_DUMMY_MAIN
14788# ifdef __cplusplus
14789 extern "C"
14790# endif
14791 int F77_DUMMY_MAIN() { return 1; }
14792#endif
14793int
14794main ()
14795{
14796static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
14797test_array [0] = 0
14798
14799 ;
14800 return 0;
14801}
14802_ACEOF
14803rm -f conftest.$ac_objext
14804if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14805 (eval $ac_compile) 2>&5
14806 ac_status=$?
14807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14808 (exit $ac_status); } &&
14809 { ac_try='test -s conftest.$ac_objext'
14810 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14811 (eval $ac_try) 2>&5
14812 ac_status=$?
14813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14814 (exit $ac_status); }; }; then
14815 ac_hi=-1 ac_mid=-1
14816 while :; do
14817 cat >conftest.$ac_ext <<_ACEOF
14818#line $LINENO "configure"
14819#include "confdefs.h"
14820#include <wchar.h>
14821
14822#ifdef F77_DUMMY_MAIN
14823# ifdef __cplusplus
14824 extern "C"
14825# endif
14826 int F77_DUMMY_MAIN() { return 1; }
14827#endif
14828int
14829main ()
14830{
14831static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
14832test_array [0] = 0
14833
14834 ;
14835 return 0;
14836}
14837_ACEOF
14838rm -f conftest.$ac_objext
14839if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14840 (eval $ac_compile) 2>&5
14841 ac_status=$?
14842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14843 (exit $ac_status); } &&
14844 { ac_try='test -s conftest.$ac_objext'
14845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14846 (eval $ac_try) 2>&5
14847 ac_status=$?
14848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14849 (exit $ac_status); }; }; then
14850 ac_lo=$ac_mid; break
14851else
14852 echo "$as_me: failed program was:" >&5
14853cat conftest.$ac_ext >&5
14854ac_hi=`expr '(' $ac_mid ')' - 1`
14855 if test $ac_mid -le $ac_hi; then
14856 ac_lo= ac_hi=
14857 break
14858 fi
14859 ac_mid=`expr 2 '*' $ac_mid`
14860fi
14861rm -f conftest.$ac_objext conftest.$ac_ext
14862 done
14863else
14864 echo "$as_me: failed program was:" >&5
14865cat conftest.$ac_ext >&5
14866ac_lo= ac_hi=
14867fi
14868rm -f conftest.$ac_objext conftest.$ac_ext
14869fi
14870rm -f conftest.$ac_objext conftest.$ac_ext
14871# Binary search between lo and hi bounds.
14872while test "x$ac_lo" != "x$ac_hi"; do
14873 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14874 cat >conftest.$ac_ext <<_ACEOF
14875#line $LINENO "configure"
14876#include "confdefs.h"
14877#include <wchar.h>
14878
14879#ifdef F77_DUMMY_MAIN
14880# ifdef __cplusplus
14881 extern "C"
14882# endif
14883 int F77_DUMMY_MAIN() { return 1; }
14884#endif
14885int
14886main ()
14887{
14888static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
14889test_array [0] = 0
14890
14891 ;
14892 return 0;
14893}
14894_ACEOF
14895rm -f conftest.$ac_objext
14896if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14897 (eval $ac_compile) 2>&5
14898 ac_status=$?
14899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14900 (exit $ac_status); } &&
14901 { ac_try='test -s conftest.$ac_objext'
14902 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14903 (eval $ac_try) 2>&5
14904 ac_status=$?
14905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14906 (exit $ac_status); }; }; then
14907 ac_hi=$ac_mid
14908else
14909 echo "$as_me: failed program was:" >&5
14910cat conftest.$ac_ext >&5
14911ac_lo=`expr '(' $ac_mid ')' + 1`
14912fi
14913rm -f conftest.$ac_objext conftest.$ac_ext
14914done
14915case $ac_lo in
14916?*) ac_cv_sizeof_wchar_t=$ac_lo;;
14917'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
14918echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
14919 { (exit 1); exit 1; }; } ;;
14920esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014921else
14922 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014923 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
14924echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14925 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014926else
Martin v. Löwis11437992002-04-12 09:54:03 +000014927 cat >conftest.$ac_ext <<_ACEOF
14928#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014929#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014930#include <wchar.h>
14931
14932long longval () { return (long) (sizeof (wchar_t)); }
14933unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000014934#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014935#include <stdlib.h>
14936#ifdef F77_DUMMY_MAIN
14937# ifdef __cplusplus
14938 extern "C"
14939# endif
14940 int F77_DUMMY_MAIN() { return 1; }
14941#endif
14942int
14943main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014944{
Martin v. Löwis11437992002-04-12 09:54:03 +000014945
14946 FILE *f = fopen ("conftest.val", "w");
14947 if (! f)
14948 exit (1);
14949 if (((long) (sizeof (wchar_t))) < 0)
14950 {
14951 long i = longval ();
14952 if (i != ((long) (sizeof (wchar_t))))
14953 exit (1);
14954 fprintf (f, "%ld\n", i);
14955 }
14956 else
14957 {
14958 unsigned long i = ulongval ();
14959 if (i != ((long) (sizeof (wchar_t))))
14960 exit (1);
14961 fprintf (f, "%lu\n", i);
14962 }
14963 exit (ferror (f) || fclose (f) != 0);
14964
14965 ;
14966 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014967}
Martin v. Löwis11437992002-04-12 09:54:03 +000014968_ACEOF
14969rm -f conftest$ac_exeext
14970if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14971 (eval $ac_link) 2>&5
14972 ac_status=$?
14973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14974 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14975 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14976 (eval $ac_try) 2>&5
14977 ac_status=$?
14978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14979 (exit $ac_status); }; }; then
14980 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000014981else
Martin v. Löwis11437992002-04-12 09:54:03 +000014982 echo "$as_me: program exited with status $ac_status" >&5
14983echo "$as_me: failed program was:" >&5
14984cat conftest.$ac_ext >&5
14985( exit $ac_status )
14986{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
14987echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
14988 { (exit 1); exit 1; }; }
14989fi
14990rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14991fi
14992fi
14993rm -f conftest.val
14994else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014995 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000014996fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014997fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014998echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
14999echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
15000cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015001#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015002_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015003
Michael W. Hudson54241132001-12-07 15:38:26 +000015004
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015005fi
15006
Martin v. Löwis11437992002-04-12 09:54:03 +000015007echo "$as_me:$LINENO: checking what type to use for unicode" >&5
15008echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015009# Check whether --enable-unicode or --disable-unicode was given.
15010if test "${enable_unicode+set}" = set; then
15011 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000015012
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015013else
15014 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015015fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015016
15017if test $enable_unicode = yes
15018then
Martin v. Löwisfd917792001-06-27 20:22:04 +000015019 # Without any arguments, Py_UNICODE defaults to two-byte mode
15020 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015021fi
15022
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015023
15024
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015025case "$enable_unicode" in
15026ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000015027 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015028#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000015029_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015030
15031 ;;
15032ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000015033 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015034#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000015035_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015036
15037 ;;
15038esac
15039
Michael W. Hudson54241132001-12-07 15:38:26 +000015040
Martin v. Löwis11437992002-04-12 09:54:03 +000015041
15042
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015043
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015044if test "$enable_unicode" = "no"
15045then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015046 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000015047 echo "$as_me:$LINENO: result: not used" >&5
15048echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015049else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015050 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000015051
15052cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015053#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015054_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015055
15056 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
15057 then
15058 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015059
Martin v. Löwis11437992002-04-12 09:54:03 +000015060cat >>confdefs.h <<\_ACEOF
15061#define HAVE_USABLE_WCHAR_T 1
15062_ACEOF
15063
15064 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015065#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015066_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015067
15068 elif test "$ac_cv_sizeof_short" = "$unicode_size"
15069 then
15070 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000015071 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015072#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000015073_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015074
15075 elif test "$ac_cv_sizeof_long" = "$unicode_size"
15076 then
15077 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000015078 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015079#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000015080_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015081
15082 else
15083 PY_UNICODE_TYPE="no type found"
15084 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015085 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
15086echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015087fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015088
15089# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000015090echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
15091echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
15092if test "${ac_cv_c_bigendian+set}" = set; then
15093 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015094else
Martin v. Löwis11437992002-04-12 09:54:03 +000015095 # See if sys/param.h defines the BYTE_ORDER macro.
15096cat >conftest.$ac_ext <<_ACEOF
15097#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015098#include "confdefs.h"
15099#include <sys/types.h>
15100#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015101
Martin v. Löwis11437992002-04-12 09:54:03 +000015102#ifdef F77_DUMMY_MAIN
15103# ifdef __cplusplus
15104 extern "C"
15105# endif
15106 int F77_DUMMY_MAIN() { return 1; }
15107#endif
15108int
15109main ()
15110{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015111#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15112 bogus endian macros
15113#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015114
15115 ;
15116 return 0;
15117}
15118_ACEOF
15119rm -f conftest.$ac_objext
15120if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15121 (eval $ac_compile) 2>&5
15122 ac_status=$?
15123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15124 (exit $ac_status); } &&
15125 { ac_try='test -s conftest.$ac_objext'
15126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15127 (eval $ac_try) 2>&5
15128 ac_status=$?
15129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15130 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015131 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000015132cat >conftest.$ac_ext <<_ACEOF
15133#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015134#include "confdefs.h"
15135#include <sys/types.h>
15136#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015137
Martin v. Löwis11437992002-04-12 09:54:03 +000015138#ifdef F77_DUMMY_MAIN
15139# ifdef __cplusplus
15140 extern "C"
15141# endif
15142 int F77_DUMMY_MAIN() { return 1; }
15143#endif
15144int
15145main ()
15146{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015147#if BYTE_ORDER != BIG_ENDIAN
15148 not big endian
15149#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015150
15151 ;
15152 return 0;
15153}
15154_ACEOF
15155rm -f conftest.$ac_objext
15156if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15157 (eval $ac_compile) 2>&5
15158 ac_status=$?
15159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15160 (exit $ac_status); } &&
15161 { ac_try='test -s conftest.$ac_objext'
15162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15163 (eval $ac_try) 2>&5
15164 ac_status=$?
15165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15166 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015167 ac_cv_c_bigendian=yes
15168else
Martin v. Löwis11437992002-04-12 09:54:03 +000015169 echo "$as_me: failed program was:" >&5
15170cat conftest.$ac_ext >&5
15171ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015172fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015173rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015174else
Martin v. Löwis11437992002-04-12 09:54:03 +000015175 echo "$as_me: failed program was:" >&5
15176cat conftest.$ac_ext >&5
15177# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000015178if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015179 # try to guess the endianess by grep'ing values into an object file
15180 ac_cv_c_bigendian=unknown
15181 cat >conftest.$ac_ext <<_ACEOF
15182#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015183#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015184short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15185short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15186void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
15187short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15188short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15189void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
15190#ifdef F77_DUMMY_MAIN
15191# ifdef __cplusplus
15192 extern "C"
15193# endif
15194 int F77_DUMMY_MAIN() { return 1; }
15195#endif
15196int
15197main ()
15198{
15199 _ascii (); _ebcdic ();
15200 ;
15201 return 0;
15202}
15203_ACEOF
15204rm -f conftest.$ac_objext
15205if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15206 (eval $ac_compile) 2>&5
15207 ac_status=$?
15208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15209 (exit $ac_status); } &&
15210 { ac_try='test -s conftest.$ac_objext'
15211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15212 (eval $ac_try) 2>&5
15213 ac_status=$?
15214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15215 (exit $ac_status); }; }; then
15216 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
15217 ac_cv_c_bigendian=yes
15218fi
15219if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15220 if test "$ac_cv_c_bigendian" = unknown; then
15221 ac_cv_c_bigendian=no
15222 else
15223 # finding both strings is unlikely to happen, but who knows?
15224 ac_cv_c_bigendian=unknown
15225 fi
15226fi
15227else
15228 echo "$as_me: failed program was:" >&5
15229cat conftest.$ac_ext >&5
15230fi
15231rm -f conftest.$ac_objext conftest.$ac_ext
15232else
15233 cat >conftest.$ac_ext <<_ACEOF
15234#line $LINENO "configure"
15235#include "confdefs.h"
15236int
15237main ()
15238{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015239 /* Are we little or big endian? From Harbison&Steele. */
15240 union
15241 {
15242 long l;
15243 char c[sizeof (long)];
15244 } u;
15245 u.l = 1;
15246 exit (u.c[sizeof (long) - 1] == 1);
15247}
Martin v. Löwis11437992002-04-12 09:54:03 +000015248_ACEOF
15249rm -f conftest$ac_exeext
15250if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15251 (eval $ac_link) 2>&5
15252 ac_status=$?
15253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15254 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15256 (eval $ac_try) 2>&5
15257 ac_status=$?
15258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15259 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015260 ac_cv_c_bigendian=no
15261else
Martin v. Löwis11437992002-04-12 09:54:03 +000015262 echo "$as_me: program exited with status $ac_status" >&5
15263echo "$as_me: failed program was:" >&5
15264cat conftest.$ac_ext >&5
15265( exit $ac_status )
15266ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015267fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015268rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015269fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015270fi
15271rm -f conftest.$ac_objext conftest.$ac_ext
15272fi
15273echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
15274echo "${ECHO_T}$ac_cv_c_bigendian" >&6
15275case $ac_cv_c_bigendian in
15276 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000015277
Martin v. Löwis11437992002-04-12 09:54:03 +000015278cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015279#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015280_ACEOF
15281 ;;
15282 no)
15283 ;;
15284 *)
15285 { { echo "$as_me:$LINENO: error: unknown endianess
15286presetting ac_cv_c_bigendian=no (or yes) will help" >&5
15287echo "$as_me: error: unknown endianess
15288presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
15289 { (exit 1); exit 1; }; } ;;
15290esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015291
Michael W. Hudson54241132001-12-07 15:38:26 +000015292
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015293# Check whether right shifting a negative integer extends the sign bit
15294# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000015295echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
15296echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
15297if test "${ac_cv_rshift_extends_sign+set}" = set; then
15298 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015299else
Martin v. Löwis11437992002-04-12 09:54:03 +000015300
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015301if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015302 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015303else
Martin v. Löwis11437992002-04-12 09:54:03 +000015304 cat >conftest.$ac_ext <<_ACEOF
15305#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015306#include "confdefs.h"
15307
15308int main()
15309{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015310 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015311}
15312
Martin v. Löwis11437992002-04-12 09:54:03 +000015313_ACEOF
15314rm -f conftest$ac_exeext
15315if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15316 (eval $ac_link) 2>&5
15317 ac_status=$?
15318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15319 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15320 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15321 (eval $ac_try) 2>&5
15322 ac_status=$?
15323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15324 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000015325 ac_cv_rshift_extends_sign=yes
15326else
Martin v. Löwis11437992002-04-12 09:54:03 +000015327 echo "$as_me: program exited with status $ac_status" >&5
15328echo "$as_me: failed program was:" >&5
15329cat conftest.$ac_ext >&5
15330( exit $ac_status )
15331ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015332fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015333rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15334fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000015335fi
15336
Martin v. Löwis11437992002-04-12 09:54:03 +000015337echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
15338echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015339if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015340then
Martin v. Löwis11437992002-04-12 09:54:03 +000015341
15342cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015343#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015344_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015345
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015346fi
15347
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015348# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015349echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
15350echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
15351if test "${ac_cv_have_getc_unlocked+set}" = set; then
15352 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015353else
Martin v. Löwis11437992002-04-12 09:54:03 +000015354
15355cat >conftest.$ac_ext <<_ACEOF
15356#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015357#include "confdefs.h"
15358#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015359#ifdef F77_DUMMY_MAIN
15360# ifdef __cplusplus
15361 extern "C"
15362# endif
15363 int F77_DUMMY_MAIN() { return 1; }
15364#endif
15365int
15366main ()
15367{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015368
15369 FILE *f = fopen("/dev/null", "r");
15370 flockfile(f);
15371 getc_unlocked(f);
15372 funlockfile(f);
15373
Martin v. Löwis11437992002-04-12 09:54:03 +000015374 ;
15375 return 0;
15376}
15377_ACEOF
15378rm -f conftest.$ac_objext conftest$ac_exeext
15379if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15380 (eval $ac_link) 2>&5
15381 ac_status=$?
15382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15383 (exit $ac_status); } &&
15384 { ac_try='test -s conftest$ac_exeext'
15385 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15386 (eval $ac_try) 2>&5
15387 ac_status=$?
15388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15389 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015390 ac_cv_have_getc_unlocked=yes
15391else
Martin v. Löwis11437992002-04-12 09:54:03 +000015392 echo "$as_me: failed program was:" >&5
15393cat conftest.$ac_ext >&5
15394ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015395fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015396rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015397fi
15398
Martin v. Löwis11437992002-04-12 09:54:03 +000015399echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
15400echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015401if test "$ac_cv_have_getc_unlocked" = yes
15402then
Martin v. Löwis11437992002-04-12 09:54:03 +000015403
15404cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015405#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015406_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015407
15408fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015409
Martin v. Löwis0daad592001-09-30 21:09:59 +000015410# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000015411echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
15412echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
15413if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
15414 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015415else
Martin v. Löwis11437992002-04-12 09:54:03 +000015416 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000015417LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015418cat >conftest.$ac_ext <<_ACEOF
15419#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000015420#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015421
Guido van Rossum353ae582001-07-10 16:45:32 +000015422/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015423#ifdef __cplusplus
15424extern "C"
15425#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000015426/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015427 builtin and then its argument prototype would still apply. */
15428char rl_pre_input_hook ();
15429#ifdef F77_DUMMY_MAIN
15430# ifdef __cplusplus
15431 extern "C"
15432# endif
15433 int F77_DUMMY_MAIN() { return 1; }
15434#endif
15435int
15436main ()
15437{
15438rl_pre_input_hook ();
15439 ;
15440 return 0;
15441}
15442_ACEOF
15443rm -f conftest.$ac_objext conftest$ac_exeext
15444if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15445 (eval $ac_link) 2>&5
15446 ac_status=$?
15447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15448 (exit $ac_status); } &&
15449 { ac_try='test -s conftest$ac_exeext'
15450 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15451 (eval $ac_try) 2>&5
15452 ac_status=$?
15453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15454 (exit $ac_status); }; }; then
15455 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015456else
Martin v. Löwis11437992002-04-12 09:54:03 +000015457 echo "$as_me: failed program was:" >&5
15458cat conftest.$ac_ext >&5
15459ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015460fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015461rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15462LIBS=$ac_check_lib_save_LIBS
15463fi
15464echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15465echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
15466if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015467
Martin v. Löwis11437992002-04-12 09:54:03 +000015468cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015469#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015470_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015471
Martin v. Löwis0daad592001-09-30 21:09:59 +000015472fi
15473
Michael W. Hudson54241132001-12-07 15:38:26 +000015474
Martin v. Löwis0daad592001-09-30 21:09:59 +000015475# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000015476echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
15477echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
15478if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
15479 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015480else
Martin v. Löwis11437992002-04-12 09:54:03 +000015481 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000015482LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015483cat >conftest.$ac_ext <<_ACEOF
15484#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000015485#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015486
Martin v. Löwis0daad592001-09-30 21:09:59 +000015487/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015488#ifdef __cplusplus
15489extern "C"
15490#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000015491/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015492 builtin and then its argument prototype would still apply. */
15493char rl_completion_matches ();
15494#ifdef F77_DUMMY_MAIN
15495# ifdef __cplusplus
15496 extern "C"
15497# endif
15498 int F77_DUMMY_MAIN() { return 1; }
15499#endif
15500int
15501main ()
15502{
15503rl_completion_matches ();
15504 ;
15505 return 0;
15506}
15507_ACEOF
15508rm -f conftest.$ac_objext conftest$ac_exeext
15509if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15510 (eval $ac_link) 2>&5
15511 ac_status=$?
15512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15513 (exit $ac_status); } &&
15514 { ac_try='test -s conftest$ac_exeext'
15515 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15516 (eval $ac_try) 2>&5
15517 ac_status=$?
15518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15519 (exit $ac_status); }; }; then
15520 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015521else
Martin v. Löwis11437992002-04-12 09:54:03 +000015522 echo "$as_me: failed program was:" >&5
15523cat conftest.$ac_ext >&5
15524ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015525fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015526rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15527LIBS=$ac_check_lib_save_LIBS
15528fi
15529echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15530echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
15531if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015532
Martin v. Löwis11437992002-04-12 09:54:03 +000015533cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015534#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015535_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015536
Guido van Rossum353ae582001-07-10 16:45:32 +000015537fi
15538
Jack Jansendd19cf82001-12-06 22:36:17 +000015539
Martin v. Löwis11437992002-04-12 09:54:03 +000015540echo "$as_me:$LINENO: checking for broken nice()" >&5
15541echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
15542if test "${ac_cv_broken_nice+set}" = set; then
15543 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015544else
Martin v. Löwis11437992002-04-12 09:54:03 +000015545
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015546if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015547 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015548else
Martin v. Löwis11437992002-04-12 09:54:03 +000015549 cat >conftest.$ac_ext <<_ACEOF
15550#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015551#include "confdefs.h"
15552
15553int main()
15554{
15555 int val1 = nice(1);
15556 if (val1 != -1 && val1 == nice(2))
15557 exit(0);
15558 exit(1);
15559}
15560
Martin v. Löwis11437992002-04-12 09:54:03 +000015561_ACEOF
15562rm -f conftest$ac_exeext
15563if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15564 (eval $ac_link) 2>&5
15565 ac_status=$?
15566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15567 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15569 (eval $ac_try) 2>&5
15570 ac_status=$?
15571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15572 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015573 ac_cv_broken_nice=yes
15574else
Martin v. Löwis11437992002-04-12 09:54:03 +000015575 echo "$as_me: program exited with status $ac_status" >&5
15576echo "$as_me: failed program was:" >&5
15577cat conftest.$ac_ext >&5
15578( exit $ac_status )
15579ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015580fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015581rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15582fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015583fi
15584
Martin v. Löwis11437992002-04-12 09:54:03 +000015585echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
15586echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015587if test "$ac_cv_broken_nice" = yes
15588then
Martin v. Löwis11437992002-04-12 09:54:03 +000015589
15590cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015591#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015592_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015593
15594fi
15595
Jack Jansen666b1e72001-10-31 12:11:48 +000015596# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000015597echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
15598echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
15599if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
15600 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015601else
Martin v. Löwis11437992002-04-12 09:54:03 +000015602 cat >conftest.$ac_ext <<_ACEOF
15603#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015604#include "confdefs.h"
15605#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015606#ifdef F77_DUMMY_MAIN
15607# ifdef __cplusplus
15608 extern "C"
15609# endif
15610 int F77_DUMMY_MAIN() { return 1; }
15611#endif
15612int
15613main ()
15614{
Jack Jansen666b1e72001-10-31 12:11:48 +000015615
15616 int rtn;
15617 rtn = mvwdelch(0,0,0);
15618
Martin v. Löwis11437992002-04-12 09:54:03 +000015619 ;
15620 return 0;
15621}
15622_ACEOF
15623rm -f conftest.$ac_objext
15624if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15625 (eval $ac_compile) 2>&5
15626 ac_status=$?
15627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15628 (exit $ac_status); } &&
15629 { ac_try='test -s conftest.$ac_objext'
15630 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15631 (eval $ac_try) 2>&5
15632 ac_status=$?
15633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15634 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015635 ac_cv_mvwdelch_is_expression=yes
15636else
Martin v. Löwis11437992002-04-12 09:54:03 +000015637 echo "$as_me: failed program was:" >&5
15638cat conftest.$ac_ext >&5
15639ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015640fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015641rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015642fi
15643
Martin v. Löwis11437992002-04-12 09:54:03 +000015644echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
15645echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015646
15647if test "$ac_cv_mvwdelch_is_expression" = yes
15648then
Martin v. Löwis11437992002-04-12 09:54:03 +000015649
15650cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015651#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015652_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015653
15654fi
15655
Martin v. Löwis11437992002-04-12 09:54:03 +000015656echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
15657echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
15658if test "${ac_cv_window_has_flags+set}" = set; then
15659 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015660else
Martin v. Löwis11437992002-04-12 09:54:03 +000015661 cat >conftest.$ac_ext <<_ACEOF
15662#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015663#include "confdefs.h"
15664#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015665#ifdef F77_DUMMY_MAIN
15666# ifdef __cplusplus
15667 extern "C"
15668# endif
15669 int F77_DUMMY_MAIN() { return 1; }
15670#endif
15671int
15672main ()
15673{
Jack Jansen666b1e72001-10-31 12:11:48 +000015674
15675 WINDOW *w;
15676 w->_flags = 0;
15677
Martin v. Löwis11437992002-04-12 09:54:03 +000015678 ;
15679 return 0;
15680}
15681_ACEOF
15682rm -f conftest.$ac_objext
15683if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15684 (eval $ac_compile) 2>&5
15685 ac_status=$?
15686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15687 (exit $ac_status); } &&
15688 { ac_try='test -s conftest.$ac_objext'
15689 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15690 (eval $ac_try) 2>&5
15691 ac_status=$?
15692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15693 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015694 ac_cv_window_has_flags=yes
15695else
Martin v. Löwis11437992002-04-12 09:54:03 +000015696 echo "$as_me: failed program was:" >&5
15697cat conftest.$ac_ext >&5
15698ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015699fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015700rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015701fi
15702
Martin v. Löwis11437992002-04-12 09:54:03 +000015703echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
15704echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015705
Jack Jansen666b1e72001-10-31 12:11:48 +000015706
15707if test "$ac_cv_window_has_flags" = yes
15708then
Martin v. Löwis11437992002-04-12 09:54:03 +000015709
15710cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015711#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015712_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015713
15714fi
15715
Guido van Rossum95713eb2000-05-18 20:53:31 +000015716# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
15717# Add sys/socket.h to confdefs.h
15718cat >> confdefs.h <<\EOF
15719#ifdef HAVE_SYS_SOCKET_H
15720#include <sys/socket.h>
15721#endif
15722EOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015723echo "$as_me:$LINENO: checking for socklen_t" >&5
15724echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
15725if test "${ac_cv_type_socklen_t+set}" = set; then
15726 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000015727else
Martin v. Löwis11437992002-04-12 09:54:03 +000015728 cat >conftest.$ac_ext <<_ACEOF
15729#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000015730#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015731$ac_includes_default
15732#ifdef F77_DUMMY_MAIN
15733# ifdef __cplusplus
15734 extern "C"
15735# endif
15736 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015737#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015738int
15739main ()
15740{
15741if ((socklen_t *) 0)
15742 return 0;
15743if (sizeof (socklen_t))
15744 return 0;
15745 ;
15746 return 0;
15747}
15748_ACEOF
15749rm -f conftest.$ac_objext
15750if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15751 (eval $ac_compile) 2>&5
15752 ac_status=$?
15753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15754 (exit $ac_status); } &&
15755 { ac_try='test -s conftest.$ac_objext'
15756 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15757 (eval $ac_try) 2>&5
15758 ac_status=$?
15759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15760 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015761 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000015762else
Martin v. Löwis11437992002-04-12 09:54:03 +000015763 echo "$as_me: failed program was:" >&5
15764cat conftest.$ac_ext >&5
15765ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000015766fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015767rm -f conftest.$ac_objext conftest.$ac_ext
15768fi
15769echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
15770echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
15771if test $ac_cv_type_socklen_t = yes; then
15772 :
15773else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015774
Martin v. Löwis11437992002-04-12 09:54:03 +000015775cat >>confdefs.h <<_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015776#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000015777_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015778
15779fi
15780
Michael W. Hudson54241132001-12-07 15:38:26 +000015781
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015782#AC_MSG_CHECKING(for Modules/Setup)
15783#if test ! -f Modules/Setup ; then
15784# if test ! -d Modules ; then
15785# mkdir Modules
15786# fi
15787# cp "$srcdir/Modules/Setup.dist" Modules/Setup
15788# AC_MSG_RESULT(creating)
15789#else
15790# AC_MSG_RESULT(already exists)
15791#fi
15792
Michael W. Hudson54241132001-12-07 15:38:26 +000015793
15794
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015795for h in `(cd $srcdir;echo Python/thread_*.h)`
15796do
15797 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15798done
15799
Michael W. Hudson54241132001-12-07 15:38:26 +000015800
Jack Jansen0b06be72002-06-21 14:48:38 +000015801SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000015802echo "$as_me:$LINENO: checking for build directories" >&5
15803echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015804for dir in $SRCDIRS; do
15805 if test ! -d $dir; then
15806 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015807 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015808done
Martin v. Löwis11437992002-04-12 09:54:03 +000015809echo "$as_me:$LINENO: result: done" >&5
15810echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000015811
Guido van Rossum627b2d71993-12-24 10:39:16 +000015812# generate output files
Martin v. Löwis11437992002-04-12 09:54:03 +000015813ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
15814cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015815# This file is a shell script that caches the results of configure
15816# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015817# scripts and configure runs, see configure's option --config-cache.
15818# It is not useful on other systems. If it contains results you don't
15819# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015820#
Martin v. Löwis11437992002-04-12 09:54:03 +000015821# config.status only pays attention to the cache file if you give it
15822# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015823#
Martin v. Löwis11437992002-04-12 09:54:03 +000015824# `ac_cv_env_foo' variables (set or unset) will be overriden when
15825# loading this file, other *unset* `ac_cv_foo' will be assigned the
15826# following values.
15827
15828_ACEOF
15829
Guido van Rossumf78abae1997-01-21 22:02:36 +000015830# The following way of writing the cache mishandles newlines in values,
15831# but we know of no workaround that is simple, portable, and efficient.
15832# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015833# Ultrix sh set writes to stderr and can't be redirected directly,
15834# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000015835{
15836 (set) 2>&1 |
15837 case `(ac_space=' '; set | grep ac_space) 2>&1` in
15838 *ac_space=\ *)
15839 # `set' does not quote correctly, so add quotes (double-quote
15840 # substitution turns \\\\ into \\, and sed turns \\ into \).
15841 sed -n \
15842 "s/'/'\\\\''/g;
15843 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15844 ;;
15845 *)
15846 # `set' quotes correctly as required by POSIX, so do not add quotes.
15847 sed -n \
15848 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15849 ;;
15850 esac;
15851} |
15852 sed '
15853 t clear
15854 : clear
15855 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15856 t end
15857 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15858 : end' >>confcache
15859if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015860 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015861 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15862 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015863 else
15864 echo "not updating unwritable cache $cache_file"
15865 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015866fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015867rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015868
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015869test "x$prefix" = xNONE && prefix=$ac_default_prefix
15870# Let make expand exec_prefix.
15871test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015872
Martin v. Löwis11437992002-04-12 09:54:03 +000015873# VPATH may cause trouble with some makes, so we remove $(srcdir),
15874# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15875# trailing colons and then remove the whole line if VPATH becomes empty
15876# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000015877if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015878 ac_vpsub='/^[ ]*VPATH[ ]*=/{
15879s/:*\$(srcdir):*/:/;
15880s/:*\${srcdir}:*/:/;
15881s/:*@srcdir@:*/:/;
15882s/^\([^=]*=[ ]*\):*/\1/;
15883s/:*$//;
15884s/^[^=]*=[ ]*$//;
15885}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000015886fi
15887
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015888DEFS=-DHAVE_CONFIG_H
15889
Martin v. Löwis11437992002-04-12 09:54:03 +000015890
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015891: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000015892ac_clean_files_save=$ac_clean_files
15893ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15894{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
15895echo "$as_me: creating $CONFIG_STATUS" >&6;}
15896cat >$CONFIG_STATUS <<_ACEOF
15897#! $SHELL
15898# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015899# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015900# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015901# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015902
Martin v. Löwis11437992002-04-12 09:54:03 +000015903debug=false
15904SHELL=\${CONFIG_SHELL-$SHELL}
15905_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000015906
Martin v. Löwis11437992002-04-12 09:54:03 +000015907cat >>$CONFIG_STATUS <<\_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000015908
Martin v. Löwis11437992002-04-12 09:54:03 +000015909## --------------------- ##
15910## M4sh Initialization. ##
15911## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015912
Martin v. Löwis11437992002-04-12 09:54:03 +000015913# Be Bourne compatible
15914if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15915 emulate sh
15916 NULLCMD=:
15917elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
15918 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000015919fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015920
Martin v. Löwis11437992002-04-12 09:54:03 +000015921# NLS nuisances.
15922# Support unset when possible.
15923if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
15924 as_unset=unset
15925else
15926 as_unset=false
15927fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015928
Martin v. Löwis11437992002-04-12 09:54:03 +000015929(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
15930 { $as_unset LANG || test "${LANG+set}" != set; } ||
15931 { LANG=C; export LANG; }
15932(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
15933 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
15934 { LC_ALL=C; export LC_ALL; }
15935(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
15936 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
15937 { LC_TIME=C; export LC_TIME; }
15938(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
15939 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
15940 { LC_CTYPE=C; export LC_CTYPE; }
15941(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
15942 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
15943 { LANGUAGE=C; export LANGUAGE; }
15944(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
15945 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
15946 { LC_COLLATE=C; export LC_COLLATE; }
15947(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
15948 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
15949 { LC_NUMERIC=C; export LC_NUMERIC; }
15950(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
15951 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
15952 { LC_MESSAGES=C; export LC_MESSAGES; }
15953
15954
15955# Name of the executable.
15956as_me=`(basename "$0") 2>/dev/null ||
15957$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15958 X"$0" : 'X\(//\)$' \| \
15959 X"$0" : 'X\(/\)$' \| \
15960 . : '\(.\)' 2>/dev/null ||
15961echo X/"$0" |
15962 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
15963 /^X\/\(\/\/\)$/{ s//\1/; q; }
15964 /^X\/\(\/\).*/{ s//\1/; q; }
15965 s/.*/./; q'`
15966
15967# PATH needs CR, and LINENO needs CR and PATH.
15968# Avoid depending upon Character Ranges.
15969as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15970as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15971as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15972as_cr_digits='0123456789'
15973as_cr_alnum=$as_cr_Letters$as_cr_digits
15974
15975# The user is always right.
15976if test "${PATH_SEPARATOR+set}" != set; then
15977 echo "#! /bin/sh" >conftest.sh
15978 echo "exit 0" >>conftest.sh
15979 chmod +x conftest.sh
15980 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
15981 PATH_SEPARATOR=';'
15982 else
15983 PATH_SEPARATOR=:
15984 fi
15985 rm -f conftest.sh
15986fi
15987
15988
15989 as_lineno_1=$LINENO
15990 as_lineno_2=$LINENO
15991 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
15992 test "x$as_lineno_1" != "x$as_lineno_2" &&
15993 test "x$as_lineno_3" = "x$as_lineno_2" || {
15994 # Find who we are. Look in the path if we contain no path at all
15995 # relative or not.
15996 case $0 in
15997 *[\\/]* ) as_myself=$0 ;;
15998 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15999for as_dir in $PATH
16000do
16001 IFS=$as_save_IFS
16002 test -z "$as_dir" && as_dir=.
16003 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16004done
16005
16006 ;;
16007 esac
16008 # We did not find ourselves, most probably we were run as `sh COMMAND'
16009 # in which case we are not to be found in the path.
16010 if test "x$as_myself" = x; then
16011 as_myself=$0
16012 fi
16013 if test ! -f "$as_myself"; then
16014 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
16015echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
16016 { (exit 1); exit 1; }; }
16017 fi
16018 case $CONFIG_SHELL in
16019 '')
16020 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16021for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
16022do
16023 IFS=$as_save_IFS
16024 test -z "$as_dir" && as_dir=.
16025 for as_base in sh bash ksh sh5; do
16026 case $as_dir in
16027 /*)
16028 if ("$as_dir/$as_base" -c '
16029 as_lineno_1=$LINENO
16030 as_lineno_2=$LINENO
16031 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16032 test "x$as_lineno_1" != "x$as_lineno_2" &&
16033 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
16034 CONFIG_SHELL=$as_dir/$as_base
16035 export CONFIG_SHELL
16036 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
16037 fi;;
16038 esac
16039 done
16040done
16041;;
Jack Jansendd19cf82001-12-06 22:36:17 +000016042 esac
16043
Martin v. Löwis11437992002-04-12 09:54:03 +000016044 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
16045 # uniformly replaced by the line number. The first 'sed' inserts a
16046 # line-number line before each line; the second 'sed' does the real
16047 # work. The second script uses 'N' to pair each line-number line
16048 # with the numbered line, and appends trailing '-' during
16049 # substitution so that $LINENO is not a special case at line end.
16050 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
16051 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
16052 sed '=' <$as_myself |
16053 sed '
16054 N
16055 s,$,-,
16056 : loop
16057 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
16058 t loop
16059 s,-$,,
16060 s,^['$as_cr_digits']*\n,,
16061 ' >$as_me.lineno &&
16062 chmod +x $as_me.lineno ||
16063 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16064echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
16065 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016066
Martin v. Löwis11437992002-04-12 09:54:03 +000016067 # Don't try to exec as it changes $[0], causing all sort of problems
16068 # (the dirname of $[0] is not the place where we might find the
16069 # original and so on. Autoconf is especially sensible to this).
16070 . ./$as_me.lineno
16071 # Exit status is that of the last command.
16072 exit
16073}
16074
16075
16076case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16077 *c*,-n*) ECHO_N= ECHO_C='
16078' ECHO_T=' ' ;;
16079 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16080 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
16081esac
16082
16083if expr a : '\(a\)' >/dev/null 2>&1; then
16084 as_expr=expr
16085else
16086 as_expr=false
16087fi
16088
16089rm -f conf$$ conf$$.exe conf$$.file
16090echo >conf$$.file
16091if ln -s conf$$.file conf$$ 2>/dev/null; then
16092 # We could just check for DJGPP; but this test a) works b) is more generic
16093 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16094 if test -f conf$$.exe; then
16095 # Don't use ln at all; we don't have any links
16096 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016097 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016098 as_ln_s='ln -s'
16099 fi
16100elif ln conf$$.file conf$$ 2>/dev/null; then
16101 as_ln_s=ln
16102else
16103 as_ln_s='cp -p'
16104fi
16105rm -f conf$$ conf$$.exe conf$$.file
16106
16107as_executable_p="test -f"
16108
16109# Sed expression to map a string onto a valid CPP name.
16110as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
16111
16112# Sed expression to map a string onto a valid variable name.
16113as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
16114
16115
16116# IFS
16117# We need space, tab and new line, in precisely that order.
16118as_nl='
16119'
16120IFS=" $as_nl"
16121
16122# CDPATH.
16123$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
16124
16125exec 6>&1
16126
16127# Open the log real soon, to keep \$[0] and so on meaningful, and to
16128# report actual input values of CONFIG_FILES etc. instead of their
16129# values after options handling. Logging --version etc. is OK.
16130exec 5>>config.log
16131{
16132 echo
16133 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16134## Running $as_me. ##
16135_ASBOX
16136} >&5
16137cat >&5 <<_CSEOF
16138
16139This file was extended by $as_me, which was
16140generated by GNU Autoconf 2.53. Invocation command line was
16141
16142 CONFIG_FILES = $CONFIG_FILES
16143 CONFIG_HEADERS = $CONFIG_HEADERS
16144 CONFIG_LINKS = $CONFIG_LINKS
16145 CONFIG_COMMANDS = $CONFIG_COMMANDS
16146 $ $0 $@
16147
16148_CSEOF
16149echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
16150echo >&5
16151_ACEOF
16152
16153# Files that config.status was made for.
16154if test -n "$ac_config_files"; then
16155 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16156fi
16157
16158if test -n "$ac_config_headers"; then
16159 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16160fi
16161
16162if test -n "$ac_config_links"; then
16163 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16164fi
16165
16166if test -n "$ac_config_commands"; then
16167 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16168fi
16169
16170cat >>$CONFIG_STATUS <<\_ACEOF
16171
16172ac_cs_usage="\
16173\`$as_me' instantiates files from templates according to the
16174current configuration.
16175
16176Usage: $0 [OPTIONS] [FILE]...
16177
16178 -h, --help print this help, then exit
16179 -V, --version print version number, then exit
16180 -d, --debug don't remove temporary files
16181 --recheck update $as_me by reconfiguring in the same conditions
16182 --file=FILE[:TEMPLATE]
16183 instantiate the configuration file FILE
16184 --header=FILE[:TEMPLATE]
16185 instantiate the configuration header FILE
16186
16187Configuration files:
16188$config_files
16189
16190Configuration headers:
16191$config_headers
16192
16193Report bugs to <bug-autoconf@gnu.org>."
16194_ACEOF
16195
16196cat >>$CONFIG_STATUS <<_ACEOF
16197ac_cs_version="\\
16198config.status
16199configured by $0, generated by GNU Autoconf 2.53,
16200 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16201
16202Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16203Free Software Foundation, Inc.
16204This config.status script is free software; the Free Software Foundation
16205gives unlimited permission to copy, distribute and modify it."
16206srcdir=$srcdir
16207INSTALL="$INSTALL"
16208_ACEOF
16209
16210cat >>$CONFIG_STATUS <<\_ACEOF
16211# If no file are specified by the user, then we need to provide default
16212# value. By we need to know if files were specified by the user.
16213ac_need_defaults=:
16214while test $# != 0
16215do
16216 case $1 in
16217 --*=*)
16218 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16219 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16220 shift
16221 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16222 shift
16223 ;;
16224 -*);;
16225 *) # This is not an option, so the user has probably given explicit
16226 # arguments.
16227 ac_need_defaults=false;;
16228 esac
16229
16230 case $1 in
16231 # Handling of the options.
16232_ACEOF
16233cat >>$CONFIG_STATUS <<_ACEOF
16234 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16235 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16236 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16237_ACEOF
16238cat >>$CONFIG_STATUS <<\_ACEOF
16239 --version | --vers* | -V )
16240 echo "$ac_cs_version"; exit 0 ;;
16241 --he | --h)
16242 # Conflict between --help and --header
16243 { { echo "$as_me:$LINENO: error: ambiguous option: $1
16244Try \`$0 --help' for more information." >&5
16245echo "$as_me: error: ambiguous option: $1
16246Try \`$0 --help' for more information." >&2;}
16247 { (exit 1); exit 1; }; };;
16248 --help | --hel | -h )
16249 echo "$ac_cs_usage"; exit 0 ;;
16250 --debug | --d* | -d )
16251 debug=: ;;
16252 --file | --fil | --fi | --f )
16253 shift
16254 CONFIG_FILES="$CONFIG_FILES $1"
16255 ac_need_defaults=false;;
16256 --header | --heade | --head | --hea )
16257 shift
16258 CONFIG_HEADERS="$CONFIG_HEADERS $1"
16259 ac_need_defaults=false;;
16260
16261 # This is an error.
16262 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
16263Try \`$0 --help' for more information." >&5
16264echo "$as_me: error: unrecognized option: $1
16265Try \`$0 --help' for more information." >&2;}
16266 { (exit 1); exit 1; }; } ;;
16267
16268 *) ac_config_targets="$ac_config_targets $1" ;;
16269
16270 esac
16271 shift
16272done
16273
16274_ACEOF
16275
16276
16277
16278
16279
16280cat >>$CONFIG_STATUS <<\_ACEOF
16281for ac_config_target in $ac_config_targets
16282do
16283 case "$ac_config_target" in
16284 # Handling of arguments.
16285 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16286 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
16287 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16288 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
16289echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16290 { (exit 1); exit 1; }; };;
16291 esac
16292done
16293
16294# If the user did not use the arguments to specify the items to instantiate,
16295# then the envvar interface is used. Set only those that are not.
16296# We use the long form for the default assignment because of an extremely
16297# bizarre bug on SunOS 4.1.3.
16298if $ac_need_defaults; then
16299 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16300 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16301fi
16302
16303# Create a temporary directory, and hook for its removal unless debugging.
16304$debug ||
16305{
16306 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16307 trap '{ (exit 1); exit 1; }' 1 2 13 15
16308}
16309
16310# Create a (secure) tmp directory for tmp files.
16311: ${TMPDIR=/tmp}
16312{
16313 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16314 test -n "$tmp" && test -d "$tmp"
16315} ||
16316{
16317 tmp=$TMPDIR/cs$$-$RANDOM
16318 (umask 077 && mkdir $tmp)
16319} ||
16320{
16321 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16322 { (exit 1); exit 1; }
16323}
16324
16325_ACEOF
16326
16327cat >>$CONFIG_STATUS <<_ACEOF
16328
16329#
16330# CONFIG_FILES section.
16331#
16332
16333# No need to generate the scripts if there are no CONFIG_FILES.
16334# This happens for instance when ./config.status config.h
16335if test -n "\$CONFIG_FILES"; then
16336 # Protect against being on the right side of a sed subst in config.status.
16337 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16338 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16339s,@SHELL@,$SHELL,;t t
16340s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16341s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16342s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16343s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16344s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16345s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16346s,@exec_prefix@,$exec_prefix,;t t
16347s,@prefix@,$prefix,;t t
16348s,@program_transform_name@,$program_transform_name,;t t
16349s,@bindir@,$bindir,;t t
16350s,@sbindir@,$sbindir,;t t
16351s,@libexecdir@,$libexecdir,;t t
16352s,@datadir@,$datadir,;t t
16353s,@sysconfdir@,$sysconfdir,;t t
16354s,@sharedstatedir@,$sharedstatedir,;t t
16355s,@localstatedir@,$localstatedir,;t t
16356s,@libdir@,$libdir,;t t
16357s,@includedir@,$includedir,;t t
16358s,@oldincludedir@,$oldincludedir,;t t
16359s,@infodir@,$infodir,;t t
16360s,@mandir@,$mandir,;t t
16361s,@build_alias@,$build_alias,;t t
16362s,@host_alias@,$host_alias,;t t
16363s,@target_alias@,$target_alias,;t t
16364s,@DEFS@,$DEFS,;t t
16365s,@ECHO_C@,$ECHO_C,;t t
16366s,@ECHO_N@,$ECHO_N,;t t
16367s,@ECHO_T@,$ECHO_T,;t t
16368s,@LIBS@,$LIBS,;t t
16369s,@VERSION@,$VERSION,;t t
16370s,@SOVERSION@,$SOVERSION,;t t
16371s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
16372s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
16373s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
16374s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
16375s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
16376s,@MACHDEP@,$MACHDEP,;t t
16377s,@SGI_ABI@,$SGI_ABI,;t t
16378s,@CXX@,$CXX,;t t
16379s,@MAINOBJ@,$MAINOBJ,;t t
16380s,@EXEEXT@,$EXEEXT,;t t
16381s,@CC@,$CC,;t t
16382s,@CFLAGS@,$CFLAGS,;t t
16383s,@LDFLAGS@,$LDFLAGS,;t t
16384s,@CPPFLAGS@,$CPPFLAGS,;t t
16385s,@ac_ct_CC@,$ac_ct_CC,;t t
16386s,@OBJEXT@,$OBJEXT,;t t
16387s,@CPP@,$CPP,;t t
16388s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
16389s,@LIBRARY@,$LIBRARY,;t t
16390s,@LDLIBRARY@,$LDLIBRARY,;t t
16391s,@DLLLIBRARY@,$DLLLIBRARY,;t t
16392s,@BLDLIBRARY@,$BLDLIBRARY,;t t
16393s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
16394s,@INSTSONAME@,$INSTSONAME,;t t
16395s,@RUNSHARED@,$RUNSHARED,;t t
16396s,@LINKCC@,$LINKCC,;t t
16397s,@RANLIB@,$RANLIB,;t t
16398s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16399s,@AR@,$AR,;t t
16400s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16401s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16402s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16403s,@LN@,$LN,;t t
16404s,@OPT@,$OPT,;t t
16405s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
16406s,@SO@,$SO,;t t
16407s,@LDSHARED@,$LDSHARED,;t t
16408s,@BLDSHARED@,$BLDSHARED,;t t
16409s,@CCSHARED@,$CCSHARED,;t t
16410s,@LINKFORSHARED@,$LINKFORSHARED,;t t
16411s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016412s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000016413s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
16414s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
16415s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
16416s,@LDLAST@,$LDLAST,;t t
16417s,@THREADOBJ@,$THREADOBJ,;t t
16418s,@DLINCLDIR@,$DLINCLDIR,;t t
16419s,@DYNLOADFILE@,$DYNLOADFILE,;t t
16420s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
16421s,@LIBOBJS@,$LIBOBJS,;t t
16422s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
16423s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
16424s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
16425s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
16426s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
16427s,@LIBM@,$LIBM,;t t
16428s,@LIBC@,$LIBC,;t t
16429s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
16430s,@THREADHEADERS@,$THREADHEADERS,;t t
16431s,@SRCDIRS@,$SRCDIRS,;t t
16432CEOF
16433
16434_ACEOF
16435
16436 cat >>$CONFIG_STATUS <<\_ACEOF
16437 # Split the substitutions into bite-sized pieces for seds with
16438 # small command number limits, like on Digital OSF/1 and HP-UX.
16439 ac_max_sed_lines=48
16440 ac_sed_frag=1 # Number of current file.
16441 ac_beg=1 # First line for current file.
16442 ac_end=$ac_max_sed_lines # Line after last line for current file.
16443 ac_more_lines=:
16444 ac_sed_cmds=
16445 while $ac_more_lines; do
16446 if test $ac_beg -gt 1; then
16447 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16448 else
16449 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16450 fi
16451 if test ! -s $tmp/subs.frag; then
16452 ac_more_lines=false
16453 else
16454 # The purpose of the label and of the branching condition is to
16455 # speed up the sed processing (if there are no `@' at all, there
16456 # is no need to browse any of the substitutions).
16457 # These are the two extra sed commands mentioned above.
16458 (echo ':t
16459 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16460 if test -z "$ac_sed_cmds"; then
16461 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16462 else
16463 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16464 fi
16465 ac_sed_frag=`expr $ac_sed_frag + 1`
16466 ac_beg=$ac_end
16467 ac_end=`expr $ac_end + $ac_max_sed_lines`
16468 fi
16469 done
16470 if test -z "$ac_sed_cmds"; then
16471 ac_sed_cmds=cat
16472 fi
16473fi # test -n "$CONFIG_FILES"
16474
16475_ACEOF
16476cat >>$CONFIG_STATUS <<\_ACEOF
16477for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16478 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16479 case $ac_file in
16480 - | *:- | *:-:* ) # input from stdin
16481 cat >$tmp/stdin
16482 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16483 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16484 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16485 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16486 * ) ac_file_in=$ac_file.in ;;
16487 esac
16488
16489 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16490 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16491$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16492 X"$ac_file" : 'X\(//\)[^/]' \| \
16493 X"$ac_file" : 'X\(//\)$' \| \
16494 X"$ac_file" : 'X\(/\)' \| \
16495 . : '\(.\)' 2>/dev/null ||
16496echo X"$ac_file" |
16497 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16498 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16499 /^X\(\/\/\)$/{ s//\1/; q; }
16500 /^X\(\/\).*/{ s//\1/; q; }
16501 s/.*/./; q'`
16502 { case "$ac_dir" in
16503 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16504 *) as_incr_dir=.;;
16505esac
16506as_dummy="$ac_dir"
16507for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16508 case $as_mkdir_dir in
16509 # Skip DOS drivespec
16510 ?:) as_incr_dir=$as_mkdir_dir ;;
16511 *)
16512 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16513 test -d "$as_incr_dir" ||
16514 mkdir "$as_incr_dir" ||
16515 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16516echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16517 { (exit 1); exit 1; }; }
16518 ;;
16519 esac
16520done; }
16521
16522 ac_builddir=.
16523
16524if test "$ac_dir" != .; then
16525 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
16526 # A "../" for each directory in $ac_dir_suffix.
16527 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
16528else
16529 ac_dir_suffix= ac_top_builddir=
16530fi
16531
16532case $srcdir in
16533 .) # No --srcdir option. We are building in place.
16534 ac_srcdir=.
16535 if test -z "$ac_top_builddir"; then
16536 ac_top_srcdir=.
16537 else
16538 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
16539 fi ;;
16540 [\\/]* | ?:[\\/]* ) # Absolute path.
16541 ac_srcdir=$srcdir$ac_dir_suffix;
16542 ac_top_srcdir=$srcdir ;;
16543 *) # Relative path.
16544 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
16545 ac_top_srcdir=$ac_top_builddir$srcdir ;;
16546esac
16547# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
16548# absolute.
16549ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
16550ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
16551ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
16552ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
16553
16554
16555 case $INSTALL in
16556 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16557 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
16558 esac
16559
16560 if test x"$ac_file" != x-; then
16561 { echo "$as_me:$LINENO: creating $ac_file" >&5
16562echo "$as_me: creating $ac_file" >&6;}
16563 rm -f "$ac_file"
16564 fi
16565 # Let's still pretend it is `configure' which instantiates (i.e., don't
16566 # use $as_me), people would be surprised to read:
16567 # /* config.h. Generated by config.status. */
16568 if test x"$ac_file" = x-; then
16569 configure_input=
16570 else
16571 configure_input="$ac_file. "
16572 fi
16573 configure_input=$configure_input"Generated from `echo $ac_file_in |
16574 sed 's,.*/,,'` by configure."
16575
16576 # First look for the input files in the build tree, otherwise in the
16577 # src tree.
16578 ac_file_inputs=`IFS=:
16579 for f in $ac_file_in; do
16580 case $f in
16581 -) echo $tmp/stdin ;;
16582 [\\/$]*)
16583 # Absolute (can't be DOS-style, as IFS=:)
16584 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16585echo "$as_me: error: cannot find input file: $f" >&2;}
16586 { (exit 1); exit 1; }; }
16587 echo $f;;
16588 *) # Relative
16589 if test -f "$f"; then
16590 # Build tree
16591 echo $f
16592 elif test -f "$srcdir/$f"; then
16593 # Source tree
16594 echo $srcdir/$f
16595 else
16596 # /dev/null tree
16597 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16598echo "$as_me: error: cannot find input file: $f" >&2;}
16599 { (exit 1); exit 1; }; }
16600 fi;;
16601 esac
16602 done` || { (exit 1); exit 1; }
16603_ACEOF
16604cat >>$CONFIG_STATUS <<_ACEOF
16605 sed "$ac_vpsub
16606$extrasub
16607_ACEOF
16608cat >>$CONFIG_STATUS <<\_ACEOF
16609:t
16610/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16611s,@configure_input@,$configure_input,;t t
16612s,@srcdir@,$ac_srcdir,;t t
16613s,@abs_srcdir@,$ac_abs_srcdir,;t t
16614s,@top_srcdir@,$ac_top_srcdir,;t t
16615s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
16616s,@builddir@,$ac_builddir,;t t
16617s,@abs_builddir@,$ac_abs_builddir,;t t
16618s,@top_builddir@,$ac_top_builddir,;t t
16619s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
16620s,@INSTALL@,$ac_INSTALL,;t t
16621" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16622 rm -f $tmp/stdin
16623 if test x"$ac_file" != x-; then
16624 mv $tmp/out $ac_file
16625 else
16626 cat $tmp/out
16627 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016628 fi
16629
Martin v. Löwis11437992002-04-12 09:54:03 +000016630done
16631_ACEOF
16632cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016633
Martin v. Löwis11437992002-04-12 09:54:03 +000016634#
16635# CONFIG_HEADER section.
16636#
Guido van Rossum627b2d71993-12-24 10:39:16 +000016637
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016638# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16639# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016640#
16641# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000016642ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
16643ac_dB='[ ].*$,\1#\2'
16644ac_dC=' '
16645ac_dD=',;t'
16646# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16647ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
16648ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016649ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000016650ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016651
Martin v. Löwis11437992002-04-12 09:54:03 +000016652for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000016653 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000016654 case $ac_file in
16655 - | *:- | *:-:* ) # input from stdin
16656 cat >$tmp/stdin
16657 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16658 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16659 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16660 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16661 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016662 esac
16663
Martin v. Löwis11437992002-04-12 09:54:03 +000016664 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
16665echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000016666
Martin v. Löwis11437992002-04-12 09:54:03 +000016667 # First look for the input files in the build tree, otherwise in the
16668 # src tree.
16669 ac_file_inputs=`IFS=:
16670 for f in $ac_file_in; do
16671 case $f in
16672 -) echo $tmp/stdin ;;
16673 [\\/$]*)
16674 # Absolute (can't be DOS-style, as IFS=:)
16675 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16676echo "$as_me: error: cannot find input file: $f" >&2;}
16677 { (exit 1); exit 1; }; }
16678 echo $f;;
16679 *) # Relative
16680 if test -f "$f"; then
16681 # Build tree
16682 echo $f
16683 elif test -f "$srcdir/$f"; then
16684 # Source tree
16685 echo $srcdir/$f
16686 else
16687 # /dev/null tree
16688 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16689echo "$as_me: error: cannot find input file: $f" >&2;}
16690 { (exit 1); exit 1; }; }
16691 fi;;
16692 esac
16693 done` || { (exit 1); exit 1; }
16694 # Remove the trailing spaces.
16695 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016696
Martin v. Löwis11437992002-04-12 09:54:03 +000016697_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016698
Martin v. Löwis11437992002-04-12 09:54:03 +000016699# Transform confdefs.h into two sed scripts, `conftest.defines' and
16700# `conftest.undefs', that substitutes the proper values into
16701# config.h.in to produce config.h. The first handles `#define'
16702# templates, and the second `#undef' templates.
16703# And first: Protect against being on the right side of a sed subst in
16704# config.status. Protect against being in an unquoted here document
16705# in config.status.
16706rm -f conftest.defines conftest.undefs
16707# Using a here document instead of a string reduces the quoting nightmare.
16708# Putting comments in sed scripts is not portable.
16709#
16710# `end' is used to avoid that the second main sed command (meant for
16711# 0-ary CPP macros) applies to n-ary macro definitions.
16712# See the Autoconf documentation for `clear'.
16713cat >confdef2sed.sed <<\_ACEOF
16714s/[\\&,]/\\&/g
16715s,[\\$`],\\&,g
16716t clear
16717: clear
16718s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
16719t end
16720s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
16721: end
16722_ACEOF
16723# If some macros were called several times there might be several times
16724# the same #defines, which is useless. Nevertheless, we may not want to
16725# sort them, since we want the *last* AC-DEFINE to be honored.
16726uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
16727sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
16728rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016729
16730# This sed command replaces #undef with comments. This is necessary, for
16731# example, in the case of _POSIX_SOURCE, which is predefined and required
16732# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016733cat >>conftest.undefs <<\_ACEOF
16734s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
16735_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016736
Martin v. Löwis11437992002-04-12 09:54:03 +000016737# Break up conftest.defines because some shells have a limit on the size
16738# of here documents, and old seds have small limits too (100 cmds).
16739echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
16740echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
16741echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
16742echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016743rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000016744while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000016745do
Martin v. Löwis11437992002-04-12 09:54:03 +000016746 # Write a limited-size here document to $tmp/defines.sed.
16747 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
16748 # Speed up: don't consider the non `#define' lines.
16749 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
16750 # Work around the forget-to-reset-the-flag bug.
16751 echo 't clr' >>$CONFIG_STATUS
16752 echo ': clr' >>$CONFIG_STATUS
16753 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016754 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016755 sed -f $tmp/defines.sed $tmp/in >$tmp/out
16756 rm -f $tmp/in
16757 mv $tmp/out $tmp/in
16758' >>$CONFIG_STATUS
16759 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
16760 rm -f conftest.defines
16761 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000016762done
Martin v. Löwis11437992002-04-12 09:54:03 +000016763rm -f conftest.defines
16764echo ' fi # egrep' >>$CONFIG_STATUS
16765echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016766
Martin v. Löwis11437992002-04-12 09:54:03 +000016767# Break up conftest.undefs because some shells have a limit on the size
16768# of here documents, and old seds have small limits too (100 cmds).
16769echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
16770rm -f conftest.tail
16771while grep . conftest.undefs >/dev/null
16772do
16773 # Write a limited-size here document to $tmp/undefs.sed.
16774 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
16775 # Speed up: don't consider the non `#undef'
16776 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
16777 # Work around the forget-to-reset-the-flag bug.
16778 echo 't clr' >>$CONFIG_STATUS
16779 echo ': clr' >>$CONFIG_STATUS
16780 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
16781 echo 'CEOF
16782 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
16783 rm -f $tmp/in
16784 mv $tmp/out $tmp/in
16785' >>$CONFIG_STATUS
16786 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
16787 rm -f conftest.undefs
16788 mv conftest.tail conftest.undefs
16789done
16790rm -f conftest.undefs
16791
16792cat >>$CONFIG_STATUS <<\_ACEOF
16793 # Let's still pretend it is `configure' which instantiates (i.e., don't
16794 # use $as_me), people would be surprised to read:
16795 # /* config.h. Generated by config.status. */
16796 if test x"$ac_file" = x-; then
16797 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000016798 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016799 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000016800 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016801 cat $tmp/in >>$tmp/config.h
16802 rm -f $tmp/in
16803 if test x"$ac_file" != x-; then
16804 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16805 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
16806echo "$as_me: $ac_file is unchanged" >&6;}
16807 else
16808 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16809$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16810 X"$ac_file" : 'X\(//\)[^/]' \| \
16811 X"$ac_file" : 'X\(//\)$' \| \
16812 X"$ac_file" : 'X\(/\)' \| \
16813 . : '\(.\)' 2>/dev/null ||
16814echo X"$ac_file" |
16815 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16816 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16817 /^X\(\/\/\)$/{ s//\1/; q; }
16818 /^X\(\/\).*/{ s//\1/; q; }
16819 s/.*/./; q'`
16820 { case "$ac_dir" in
16821 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16822 *) as_incr_dir=.;;
16823esac
16824as_dummy="$ac_dir"
16825for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16826 case $as_mkdir_dir in
16827 # Skip DOS drivespec
16828 ?:) as_incr_dir=$as_mkdir_dir ;;
16829 *)
16830 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16831 test -d "$as_incr_dir" ||
16832 mkdir "$as_incr_dir" ||
16833 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16834echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16835 { (exit 1); exit 1; }; }
16836 ;;
16837 esac
16838done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016839
Martin v. Löwis11437992002-04-12 09:54:03 +000016840 rm -f $ac_file
16841 mv $tmp/config.h $ac_file
16842 fi
16843 else
16844 cat $tmp/config.h
16845 rm -f $tmp/config.h
16846 fi
16847done
16848_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000016849
Martin v. Löwis11437992002-04-12 09:54:03 +000016850cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016851
Martin v. Löwis11437992002-04-12 09:54:03 +000016852{ (exit 0); exit 0; }
16853_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016854chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000016855ac_clean_files=$ac_clean_files_save
16856
16857
16858# configure is writing to config.log, and then calls config.status.
16859# config.status does its own redirection, appending to config.log.
16860# Unfortunately, on DOS this fails, as config.log is still kept open
16861# by configure, so config.status won't be able to write to it; its
16862# output is simply discarded. So we exec the FD to /dev/null,
16863# effectively closing config.log, so it can be properly (re)opened and
16864# appended to by config.status. When coming back to configure, we
16865# need to make the FD available again.
16866if test "$no_create" != yes; then
16867 ac_cs_success=:
16868 exec 5>/dev/null
16869 $SHELL $CONFIG_STATUS || ac_cs_success=false
16870 exec 5>>config.log
16871 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16872 # would make configure fail if this is the last instruction.
16873 $ac_cs_success || { (exit 1); exit 1; }
16874fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016875
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016876
16877echo "creating Setup"
16878if test ! -f Modules/Setup
16879then
16880 cp $srcdir/Modules/Setup.dist Modules/Setup
16881fi
16882
16883echo "creating Setup.local"
16884if test ! -f Modules/Setup.local
16885then
16886 echo "# Edit this file for local setup changes" >Modules/Setup.local
16887fi
16888
16889echo "creating Makefile"
16890$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16891 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016892 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016893mv config.c Modules